From 13e14a6bfd9f29cbfeab0c5161d2a994f97532e7 Mon Sep 17 00:00:00 2001
From: Lorenz Kästle <12514511+RincewindsHat@users.noreply.github.com>
Date: Thu, 26 Mar 2026 12:53:53 +0100
Subject: Update/gnulib 2026 03 (#2247)
* Sync with the 202601-stable Gnulib code (4a3650d887)
* Ignore more deps stuff in gnulib
* Remove autogenerated gnulib files
* Ignore more gnulib generated headers
---
.gitignore | 11 +-
gl/Makefile.am | 70 +-
gl/_Noreturn.h | 2 +-
gl/af_alg.c | 188 +--
gl/af_alg.h | 2 +-
gl/alloca.in.h | 2 +-
gl/arg-nonnull.h | 2 +-
gl/arpa_inet.c | 5 +-
gl/arpa_inet.in.h | 4 +-
gl/asnprintf.c | 6 +-
gl/asprintf.c | 6 +-
gl/assert.in.h | 2 +-
gl/attribute.h | 108 +-
gl/base64.c | 60 +-
gl/base64.h | 2 +-
gl/basename-lgpl.c | 11 +-
gl/basename-lgpl.h | 2 +-
gl/basename.c | 2 +-
gl/btowc.c | 2 +-
gl/byteswap.c | 5 +-
gl/byteswap.in.h | 2 +-
gl/c++defs.h | 18 +-
gl/c-ctype.c | 5 +-
gl/c-ctype.h | 2 +-
gl/c32is-impl.h | 4 +-
gl/c32isalnum.c | 2 +-
gl/c32isalpha.c | 2 +-
gl/c32isblank.c | 2 +-
gl/c32iscntrl.c | 2 +-
gl/c32isdigit.c | 2 +-
gl/c32isgraph.c | 2 +-
gl/c32islower.c | 2 +-
gl/c32isprint.c | 2 +-
gl/c32ispunct.c | 2 +-
gl/c32isspace.c | 2 +-
gl/c32isupper.c | 2 +-
gl/c32isxdigit.c | 2 +-
gl/c32to-impl.h | 4 +-
gl/c32tolower.c | 2 +-
gl/c32width.c | 4 +-
gl/calloc.c | 4 +-
gl/cdefs.h | 2 +-
gl/cloexec.c | 2 +-
gl/cloexec.h | 2 +-
gl/close.c | 2 +-
gl/dirname-lgpl.c | 7 +-
gl/dirname.c | 2 +-
gl/dirname.h | 2 +-
gl/dup2.c | 68 +-
gl/dynarray.h | 2 +-
gl/errno.in.h | 20 +-
gl/error.c | 4 +-
gl/error.in.h | 2 +-
gl/exitfail.c | 2 +-
gl/exitfail.h | 2 +-
gl/fcntl.c | 185 +--
gl/fcntl.in.h | 59 +-
gl/fd-hook.c | 2 +-
gl/fd-hook.h | 2 +-
gl/fflush.c | 4 +-
gl/float+.h | 2 +-
gl/float.c | 7 +-
gl/float.in.h | 91 +-
gl/floor.c | 2 +-
gl/floorf.c | 2 +-
gl/fopen.c | 47 +-
gl/fpurge.c | 4 +-
gl/freading.c | 6 +-
gl/freading.h | 2 +-
gl/free.c | 8 +-
gl/fseek.c | 2 +-
gl/fseeko.c | 6 +-
gl/fseterr.c | 14 +-
gl/fseterr.h | 2 +-
gl/fstat.c | 11 +-
gl/fsusage.c | 21 +-
gl/fsusage.h | 2 +-
gl/ftell.c | 2 +-
gl/ftello.c | 6 +-
gl/gai_strerror.c | 7 +-
gl/getaddrinfo.c | 91 +-
gl/getdelim.c | 111 +-
gl/getdtablesize.c | 13 +-
gl/gethostname.c | 6 +-
gl/getline.c | 2 +-
gl/getloadavg.c | 226 ++-
gl/getopt-cdefs.in.h | 2 +-
gl/getopt-core.h | 2 +-
gl/getopt-ext.h | 2 +-
gl/getopt-pfx-core.h | 2 +-
gl/getopt-pfx-ext.h | 2 +-
gl/getopt.c | 65 +-
gl/getopt.in.h | 2 +-
gl/getopt1.c | 7 +-
gl/getopt_int.h | 2 +-
gl/getprogname.c | 66 +-
gl/getprogname.h | 2 +-
gl/gettext.h | 8 +-
gl/gl_openssl.h | 4 +-
gl/glthread/lock.c | 68 +-
gl/glthread/lock.h | 4 +-
gl/glthread/once.c | 2 +-
gl/glthread/once.h | 2 +-
gl/glthread/threadlib.c | 2 +-
gl/hard-locale.c | 4 +-
gl/hard-locale.h | 2 +-
gl/ialloc.c | 5 +-
gl/ialloc.h | 2 +-
gl/idpriv-droptemp.c | 10 +-
gl/idpriv.h | 2 +-
gl/idx.h | 2 +-
gl/inet_ntop.c | 44 +-
gl/inet_pton.c | 229 ++-
gl/intprops-internal.h | 14 +-
gl/intprops.h | 6 +-
gl/inttypes.in.h | 6 +-
gl/iswblank.c | 2 +-
gl/iswctype-impl.h | 2 +-
gl/iswctype.c | 2 +-
gl/iswdigit.c | 2 +-
gl/iswpunct.c | 2 +-
gl/iswxdigit.c | 2 +-
gl/itold.c | 2 +-
gl/langinfo.in.h | 14 +-
gl/lc-charset-dispatch.c | 2 +-
gl/lc-charset-dispatch.h | 2 +-
gl/libc-config.h | 2 +-
gl/limits.in.h | 8 +-
gl/localcharset.c | 63 +-
gl/localcharset.h | 44 +-
gl/locale.in.h | 8 +-
gl/localeconv.c | 2 +-
gl/lseek.c | 2 +-
gl/lstat.c | 11 +-
gl/m4/00gnulib.m4 | 2 +-
gl/m4/__inline.m4 | 2 +-
gl/m4/absolute-header.m4 | 2 +-
gl/m4/af_alg.m4 | 2 +-
gl/m4/alloca.m4 | 2 +-
gl/m4/arpa_inet_h.m4 | 2 +-
gl/m4/assert_h.m4 | 9 +-
gl/m4/base64.m4 | 2 +-
gl/m4/btowc.m4 | 47 +-
gl/m4/build-to-host.m4 | 2 +-
gl/m4/builtin-expect.m4 | 2 +-
gl/m4/byteswap.m4 | 2 +-
gl/m4/c-bool.m4 | 2 +-
gl/m4/c32rtomb.m4 | 2 +-
gl/m4/calloc.m4 | 2 +-
gl/m4/close.m4 | 2 +-
gl/m4/codeset.m4 | 2 +-
gl/m4/double-slash-root.m4 | 2 +-
gl/m4/dup2.m4 | 2 +-
gl/m4/environ.m4 | 2 +-
gl/m4/errno_h.m4 | 59 +-
gl/m4/error.m4 | 2 +-
gl/m4/error_h.m4 | 2 +-
gl/m4/exponentd.m4 | 2 +-
gl/m4/extensions-aix.m4 | 2 +-
gl/m4/extensions.m4 | 2 +-
gl/m4/extern-inline.m4 | 16 +-
gl/m4/fclose.m4 | 2 +-
gl/m4/fcntl-o.m4 | 2 +-
gl/m4/fcntl.m4 | 2 +-
gl/m4/fcntl_h.m4 | 8 +-
gl/m4/fflush.m4 | 2 +-
gl/m4/float_h.m4 | 7 +-
gl/m4/floorf.m4 | 2 +-
gl/m4/fopen.m4 | 2 +-
gl/m4/fpurge.m4 | 2 +-
gl/m4/freading.m4 | 2 +-
gl/m4/free.m4 | 6 +-
gl/m4/fseek.m4 | 2 +-
gl/m4/fseeko.m4 | 2 +-
gl/m4/fseterr.m4 | 2 +-
gl/m4/fstat.m4 | 2 +-
gl/m4/fstypename.m4 | 2 +-
gl/m4/fsusage.m4 | 45 +-
gl/m4/ftell.m4 | 2 +-
gl/m4/ftello.m4 | 2 +-
gl/m4/getaddrinfo.m4 | 28 +-
gl/m4/getdelim.m4 | 51 +-
gl/m4/getdtablesize.m4 | 2 +-
gl/m4/gethostname.m4 | 2 +-
gl/m4/getline.m4 | 51 +-
gl/m4/getloadavg.m4 | 7 +-
gl/m4/getopt.m4 | 13 +-
gl/m4/getprogname.m4 | 10 +-
gl/m4/gettext_h.m4 | 21 +
gl/m4/gl-openssl.m4 | 17 +-
gl/m4/gnulib-cache.m4 | 2 +-
gl/m4/gnulib-common.m4 | 117 +-
gl/m4/gnulib-comp.m4 | 71 +-
gl/m4/gnulib-i18n.m4 | 2 +-
gl/m4/gnulib-tool.m4 | 2 +-
gl/m4/hostent.m4 | 2 +-
gl/m4/idpriv.m4 | 2 +-
gl/m4/include_next.m4 | 2 +-
gl/m4/inet_ntop.m4 | 7 +-
gl/m4/inet_pton.m4 | 7 +-
gl/m4/intmax_t.m4 | 2 +-
gl/m4/inttypes.m4 | 2 +-
gl/m4/inttypes_h.m4 | 2 +-
gl/m4/iswblank.m4 | 2 +-
gl/m4/iswctype.m4 | 2 +-
gl/m4/iswdigit.m4 | 2 +-
gl/m4/iswpunct.m4 | 2 +-
gl/m4/iswxdigit.m4 | 2 +-
gl/m4/langinfo_h.m4 | 33 +-
gl/m4/largefile.m4 | 7 +-
gl/m4/libunistring-base.m4 | 2 +-
gl/m4/limits-h.m4 | 2 +-
gl/m4/localcharset.m4 | 2 +-
gl/m4/locale-en.m4 | 4 +-
gl/m4/locale-fr.m4 | 8 +-
gl/m4/locale-ja.m4 | 8 +-
gl/m4/locale-zh.m4 | 2 +-
gl/m4/locale_h.m4 | 8 +-
gl/m4/localeconv.m4 | 2 +-
gl/m4/lock.m4 | 8 +-
gl/m4/lseek.m4 | 2 +-
gl/m4/lstat.m4 | 2 +-
gl/m4/malloc.m4 | 58 +-
gl/m4/malloca.m4 | 2 +-
gl/m4/math_h.m4 | 37 +-
gl/m4/mbchar.m4 | 2 +-
gl/m4/mbiter.m4 | 2 +-
gl/m4/mbrtoc32.m4 | 2 +-
gl/m4/mbrtowc.m4 | 73 +-
gl/m4/mbsinit.m4 | 2 +-
gl/m4/mbstate_t.m4 | 2 +-
gl/m4/mbtowc.m4 | 2 +-
gl/m4/memchr.m4 | 35 +-
gl/m4/minmax.m4 | 2 +-
gl/m4/mktime.m4 | 26 +-
gl/m4/mmap-anon.m4 | 21 +-
gl/m4/mode_t.m4 | 2 +-
gl/m4/mountlist.m4 | 15 +-
gl/m4/msvc-inval.m4 | 2 +-
gl/m4/msvc-nothrow.m4 | 2 +-
gl/m4/multiarch.m4 | 2 +-
gl/m4/musl.m4 | 2 +-
gl/m4/netdb_h.m4 | 2 +-
gl/m4/netinet_in_h.m4 | 2 +-
gl/m4/nl_langinfo.m4 | 31 +-
gl/m4/nocrash.m4 | 2 +-
gl/m4/off64_t.m4 | 2 +-
gl/m4/off_t.m4 | 2 +-
gl/m4/once.m4 | 2 +-
gl/m4/open-cloexec.m4 | 2 +-
gl/m4/open-slash.m4 | 2 +-
gl/m4/open.m4 | 2 +-
gl/m4/pathmax.m4 | 2 +-
gl/m4/pid_t.m4 | 2 +-
gl/m4/printf.m4 | 35 +-
gl/m4/pthread-once.m4 | 2 +-
gl/m4/pthread-spin.m4 | 2 +-
gl/m4/pthread_h.m4 | 2 +-
gl/m4/pthread_rwlock_rdlock.m4 | 4 +-
gl/m4/realloc.m4 | 4 +-
gl/m4/reallocarray.m4 | 2 +-
gl/m4/regex.m4 | 2 +-
gl/m4/sched_h.m4 | 2 +-
gl/m4/servent.m4 | 2 +-
gl/m4/setenv.m4 | 6 +-
gl/m4/setlocale_null.m4 | 12 +-
gl/m4/sha256.m4 | 2 +-
gl/m4/size_max.m4 | 2 +-
gl/m4/snprintf.m4 | 2 +-
gl/m4/socketlib.m4 | 2 +-
gl/m4/sockets.m4 | 2 +-
gl/m4/socklen.m4 | 6 +-
gl/m4/sockpfaf.m4 | 2 +-
gl/m4/ssize_t.m4 | 2 +-
gl/m4/stat-time.m4 | 2 +-
gl/m4/stat.m4 | 2 +-
gl/m4/std-gnu11.m4 | 4 +-
gl/m4/stdalign.m4 | 10 +-
gl/m4/stdckdint_h.m4 | 2 +-
gl/m4/stddef_h.m4 | 6 +-
gl/m4/stdint.m4 | 10 +-
gl/m4/stdint_h.m4 | 2 +-
gl/m4/stdio_h.m4 | 2 +-
gl/m4/stdlib_h.m4 | 6 +-
gl/m4/strcasecmp.m4 | 2 +-
gl/m4/strcasestr.m4 | 6 +-
gl/m4/strerror.m4 | 2 +-
gl/m4/string_h.m4 | 7 +-
gl/m4/stringeq.m4 | 25 +
gl/m4/strings_h.m4 | 2 +-
gl/m4/strncasecmp.m4 | 2 +-
gl/m4/strncpy.m4 | 2 +-
gl/m4/strsep.m4 | 2 +-
gl/m4/strstr.m4 | 6 +-
gl/m4/sys_cdefs_h.m4 | 2 +-
gl/m4/sys_socket_h.m4 | 15 +-
gl/m4/sys_stat_h.m4 | 4 +-
gl/m4/sys_types_h.m4 | 2 +-
gl/m4/sys_uio_h.m4 | 2 +-
gl/m4/threadlib.m4 | 45 +-
gl/m4/time_h.m4 | 2 +-
gl/m4/time_r.m4 | 2 +-
gl/m4/timegm.m4 | 2 +-
gl/m4/uchar_h.m4 | 2 +-
gl/m4/ungetc.m4 | 2 +-
gl/m4/unicase_h.m4 | 2 +-
gl/m4/unictype_h.m4 | 2 +-
gl/m4/uninorm_h.m4 | 2 +-
gl/m4/unistd_h.m4 | 2 +-
gl/m4/unitypes_h.m4 | 2 +-
gl/m4/unlocked-io.m4 | 5 +-
gl/m4/vararrays.m4 | 2 +-
gl/m4/vasnprintf.m4 | 2 +-
gl/m4/vasprintf.m4 | 2 +-
gl/m4/visibility.m4 | 2 +-
gl/m4/vsnprintf.m4 | 2 +-
gl/m4/warn-on-use.m4 | 2 +-
gl/m4/wchar_h.m4 | 10 +-
gl/m4/wcrtomb.m4 | 10 +-
gl/m4/wctype.m4 | 2 +-
gl/m4/wctype_h.m4 | 2 +-
gl/m4/wcwidth.m4 | 6 +-
gl/m4/wint_t.m4 | 2 +-
gl/m4/xalloc.m4 | 2 +-
gl/m4/xsize.m4 | 2 +-
gl/m4/zzgnulib.m4 | 2 +-
gl/malloc.c | 2 +-
gl/malloc/dynarray-skeleton.c | 2 +-
gl/malloc/dynarray.h | 2 +-
gl/malloc/dynarray_at_failure.c | 2 +-
gl/malloc/dynarray_emplace_enlarge.c | 2 +-
gl/malloc/dynarray_finalize.c | 2 +-
gl/malloc/dynarray_resize.c | 2 +-
gl/malloc/dynarray_resize_clear.c | 2 +-
gl/malloca.c | 2 +-
gl/malloca.h | 2 +-
gl/math.c | 2 +-
gl/math.in.h | 269 ++--
gl/mbchar.c | 5 +-
gl/mbchar.h | 17 +-
gl/mbiterf.c | 5 +-
gl/mbiterf.h | 4 +-
gl/mbrtoc32.c | 6 +-
gl/mbrtowc-impl-utf8.h | 2 +-
gl/mbrtowc-impl.h | 29 +-
gl/mbrtowc.c | 11 +-
gl/mbsinit.c | 2 +-
gl/mbsnlen.c | 2 +-
gl/mbszero.c | 2 +-
gl/mbtowc-impl.h | 9 +-
gl/mbtowc-lock.c | 2 +-
gl/mbtowc-lock.h | 17 +-
gl/mbtowc.c | 2 +-
gl/memchr.c | 174 ++-
gl/memchr.valgrind | 2 +-
gl/minmax.h | 6 +-
gl/mktime-internal.h | 2 +-
gl/mktime.c | 8 +-
gl/mountlist.c | 399 +++---
gl/mountlist.h | 2 +-
gl/msvc-inval.c | 2 +-
gl/msvc-inval.h | 6 +-
gl/msvc-nothrow.c | 2 +-
gl/msvc-nothrow.h | 2 +-
gl/netdb.in.h | 10 +-
gl/netinet_in.in.h | 2 +-
gl/nl_langinfo-lock.c | 2 +-
gl/nl_langinfo.c | 35 +-
gl/open.c | 12 +-
gl/pathmax.h | 2 +-
gl/printf-args.c | 2 +-
gl/printf-args.h | 2 +-
gl/printf-parse.c | 16 +-
gl/printf-parse.h | 2 +-
gl/pthread-once.c | 2 +-
gl/pthread.h | 2571 ----------------------------------
gl/pthread.in.h | 53 +-
gl/realloc.c | 6 +-
gl/reallocarray.c | 2 +-
gl/regcomp.c | 2 +-
gl/regex.c | 3 +-
gl/regex.h | 2 +-
gl/regex_internal.c | 2 +-
gl/regex_internal.h | 20 +-
gl/regexec.c | 2 +-
gl/sched.h | 631 ---------
gl/sched.in.h | 5 +-
gl/setenv.c | 22 +-
gl/setlocale-lock.c | 2 +-
gl/setlocale_null-unlocked.c | 10 +-
gl/setlocale_null.c | 15 +-
gl/setlocale_null.h | 2 +-
gl/sha256-stream.c | 7 +-
gl/sha256.c | 19 +-
gl/sha256.h | 2 +-
gl/size_max.h | 2 +-
gl/snprintf.c | 6 +-
gl/sockets.c | 21 +-
gl/sockets.h | 2 +-
gl/stat-time.c | 5 +-
gl/stat-time.h | 5 +-
gl/stat-w32.c | 7 +-
gl/stat-w32.h | 2 +-
gl/stat.c | 16 +-
gl/stdckdint.in.h | 2 +-
gl/stddef.in.h | 6 +-
gl/stdint.in.h | 19 +-
gl/stdio-consolesafe.c | 11 +-
gl/stdio-impl.h | 2 +-
gl/stdio-read.c | 13 +-
gl/stdio-write.c | 13 +-
gl/stdio.in.h | 84 +-
gl/stdlib.c | 2 +-
gl/stdlib.in.h | 84 +-
gl/str-two-way.h | 283 ++--
gl/strcasecmp.c | 35 +-
gl/strcasestr.c | 41 +-
gl/streq.h | 4 +-
gl/strerror-override.c | 2 +-
gl/strerror-override.h | 2 +-
gl/strerror.c | 5 +-
gl/string.c | 19 +
gl/string.in.h | 80 +-
gl/strings.in.h | 7 +-
gl/stripslash.c | 8 +-
gl/strncasecmp.c | 35 +-
gl/strncpy.c | 4 +-
gl/strsep.c | 5 +-
gl/strstr.c | 32 +-
gl/sys-limits.h | 6 +-
gl/sys_socket.c | 2 +-
gl/sys_socket.in.h | 20 +-
gl/sys_stat.in.h | 21 +-
gl/sys_types.in.h | 2 +-
gl/sys_uio.in.h | 2 +-
gl/time.in.h | 27 +-
gl/time_r.c | 2 +-
gl/timegm.c | 2 +-
gl/uchar.h | 1456 -------------------
gl/uchar.in.h | 5 +-
gl/unicase.h | 472 -------
gl/unicase.in.h | 2 +-
gl/unicase/simple-mapping.h | 2 +-
gl/unicase/tolower.c | 2 +-
gl/unicase/tolower.h | 30 +-
gl/unictype.h | 1148 ---------------
gl/unictype.in.h | 5 +-
gl/unictype/bitmap.h | 2 +-
gl/unictype/ctype_alnum.c | 2 +-
gl/unictype/ctype_alnum.h | 102 +-
gl/unictype/ctype_alpha.c | 2 +-
gl/unictype/ctype_alpha.h | 102 +-
gl/unictype/ctype_blank.c | 2 +-
gl/unictype/ctype_blank.h | 4 +-
gl/unictype/ctype_cntrl.c | 2 +-
gl/unictype/ctype_cntrl.h | 4 +-
gl/unictype/ctype_digit.c | 2 +-
gl/unictype/ctype_digit.h | 4 +-
gl/unictype/ctype_graph.c | 2 +-
gl/unictype/ctype_graph.h | 134 +-
gl/unictype/ctype_lower.c | 2 +-
gl/unictype/ctype_lower.h | 8 +-
gl/unictype/ctype_print.c | 2 +-
gl/unictype/ctype_print.h | 134 +-
gl/unictype/ctype_punct.c | 2 +-
gl/unictype/ctype_punct.h | 50 +-
gl/unictype/ctype_space.c | 2 +-
gl/unictype/ctype_space.h | 4 +-
gl/unictype/ctype_upper.c | 2 +-
gl/unictype/ctype_upper.h | 8 +-
gl/unictype/ctype_xdigit.c | 2 +-
gl/unictype/ctype_xdigit.h | 4 +-
gl/uninorm.h | 256 ----
gl/uninorm.in.h | 2 +-
gl/unistd.c | 2 +-
gl/unistd.in.h | 97 +-
gl/unitypes.h | 72 -
gl/unitypes.in.h | 2 +-
gl/uniwidth.h | 73 -
gl/uniwidth.in.h | 2 +-
gl/uniwidth/cjk.h | 2 +-
gl/uniwidth/width.c | 6 +-
gl/uniwidth/width0.h | 23 +-
gl/uniwidth/width2.h | 4 +-
gl/unlocked-io.h | 9 +-
gl/unsetenv.c | 11 +-
gl/vasnprintf.c | 674 ++++-----
gl/vasnprintf.h | 2 +-
gl/vasprintf.c | 2 +-
gl/verify.h | 2 +-
gl/vsnprintf.c | 2 +-
gl/vsnzprintf.c | 9 +-
gl/w32sock.h | 2 +-
gl/warn-on-use.h | 2 +-
gl/wchar.in.h | 72 +-
gl/wcrtomb.c | 6 +-
gl/wctype-h.c | 2 +-
gl/wctype-impl.h | 26 +-
gl/wctype.c | 2 +-
gl/wctype.in.h | 28 +-
gl/wcwidth.c | 2 +-
gl/windows-initguard.h | 2 +-
gl/windows-mutex.c | 2 +-
gl/windows-mutex.h | 2 +-
gl/windows-once.c | 2 +-
gl/windows-once.h | 2 +-
gl/windows-recmutex.c | 2 +-
gl/windows-recmutex.h | 2 +-
gl/windows-rwlock.c | 24 +-
gl/windows-rwlock.h | 2 +-
gl/xalloc-die.c | 4 +-
gl/xalloc-oversized.h | 2 +-
gl/xalloc.h | 2 +-
gl/xmalloc.c | 18 +-
gl/xsize.c | 5 +-
gl/xsize.h | 2 +-
516 files changed, 3347 insertions(+), 11098 deletions(-)
create mode 100644 gl/m4/gettext_h.m4
create mode 100644 gl/m4/stringeq.m4
delete mode 100644 gl/pthread.h
delete mode 100644 gl/sched.h
create mode 100644 gl/string.c
delete mode 100644 gl/uchar.h
delete mode 100644 gl/unicase.h
delete mode 100644 gl/unictype.h
delete mode 100644 gl/uninorm.h
delete mode 100644 gl/unitypes.h
delete mode 100644 gl/uniwidth.h
diff --git a/.gitignore b/.gitignore
index d0115b05..4d49c220 100644
--- a/.gitignore
+++ b/.gitignore
@@ -52,6 +52,7 @@ NP-VERSION-FILE
# /gl/
/gl/.deps
+/gl/*/.deps
/gl/alloca.h
/gl/arpa
/gl/arpa_inet.h
@@ -93,9 +94,17 @@ NP-VERSION-FILE
/gl/wctype.h
/gl/inttypes.h
/gl/limits.h
+/gl/pthread.h
+/gl/sched.h
+/gl/uchar.h
+/gl/unicase.h
+/gl/unictype.h
+/gl/uninorm.h
+/gl/unitypes.h
+/gl/uniwidth.h
+/gl/stdckdint.h
/gl/malloc/dynarray-skeleton.gl.h
/gl/malloc/dynarray.gl.h
-/gl/stdckdint.h
# /lib/
/lib/.deps
diff --git a/gl/Makefile.am b/gl/Makefile.am
index f462fdb7..6f50b0c5 100644
--- a/gl/Makefile.am
+++ b/gl/Makefile.am
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# Copyright (C) 2002-2025 Free Software Foundation, Inc.
+# Copyright (C) 2002-2026 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -59,6 +59,7 @@
AUTOMAKE_OPTIONS = 1.14 gnits subdir-objects
SUBDIRS =
+TESTS_ENVIRONMENT =
noinst_HEADERS =
noinst_LIBRARIES =
noinst_LTLIBRARIES =
@@ -449,12 +450,6 @@ errno.h: errno.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
- -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
- -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
- -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
- -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
- -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
- -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
$(srcdir)/errno.in.h > $@-t
$(AM_V_at)mv $@-t $@
else
@@ -533,10 +528,12 @@ fcntl.h: fcntl.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_NONBLOCKING''@/$(GL_GNULIB_NONBLOCKING)/g' \
-e 's/@''GNULIB_OPEN''@/$(GL_GNULIB_OPEN)/g' \
-e 's/@''GNULIB_OPENAT''@/$(GL_GNULIB_OPENAT)/g' \
+ -e 's/@''GNULIB_OPENAT2''@/$(GL_GNULIB_OPENAT2)/g' \
-e 's/@''GNULIB_MDA_CREAT''@/$(GL_GNULIB_MDA_CREAT)/g' \
-e 's/@''GNULIB_MDA_OPEN''@/$(GL_GNULIB_MDA_OPEN)/g' \
-e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
-e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
+ -e 's|@''HAVE_OPENAT2''@|$(HAVE_OPENAT2)|g' \
-e 's|@''REPLACE_CREAT''@|$(REPLACE_CREAT)|g' \
-e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
-e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
@@ -1055,11 +1052,9 @@ langinfo.h: langinfo.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U
-e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
-e 's/@''GNULIB_NL_LANGINFO''@/$(GL_GNULIB_NL_LANGINFO)/g' \
-e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
- -e 's|@''HAVE_LANGINFO_T_FMT_AMPM''@|$(HAVE_LANGINFO_T_FMT_AMPM)|g' \
-e 's|@''HAVE_LANGINFO_ALTMON''@|$(HAVE_LANGINFO_ALTMON)|g' \
-e 's|@''HAVE_LANGINFO_ABALTMON''@|$(HAVE_LANGINFO_ABALTMON)|g' \
-e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
- -e 's|@''HAVE_LANGINFO_YESEXPR''@|$(HAVE_LANGINFO_YESEXPR)|g' \
-e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
-e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
@@ -1284,8 +1279,11 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_ILOGBF''@/$(GL_GNULIB_ILOGBF)/g' \
-e 's/@''GNULIB_ILOGBL''@/$(GL_GNULIB_ILOGBL)/g' \
-e 's/@''GNULIB_ISFINITE''@/$(GL_GNULIB_ISFINITE)/g' \
+ -e 's/@''GNULIB_ISFINITE_NO_CXX''@/$(GL_GNULIB_ISFINITE_NO_CXX)/g' \
-e 's/@''GNULIB_ISINF''@/$(GL_GNULIB_ISINF)/g' \
+ -e 's/@''GNULIB_ISINF_NO_CXX''@/$(GL_GNULIB_ISINF_NO_CXX)/g' \
-e 's/@''GNULIB_ISNAN''@/$(GL_GNULIB_ISNAN)/g' \
+ -e 's/@''GNULIB_ISNAN_NO_CXX''@/$(GL_GNULIB_ISNAN_NO_CXX)/g' \
-e 's/@''GNULIB_ISNANF''@/$(GL_GNULIB_ISNANF)/g' \
-e 's/@''GNULIB_ISNAND''@/$(GL_GNULIB_ISNAND)/g' \
-e 's/@''GNULIB_ISNANL''@/$(GL_GNULIB_ISNANL)/g' \
@@ -1330,6 +1328,7 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's/@''GNULIB_SETPAYLOADSIGF''@/$(GL_GNULIB_SETPAYLOADSIGF)/g' \
-e 's/@''GNULIB_SETPAYLOADSIGL''@/$(GL_GNULIB_SETPAYLOADSIGL)/g' \
-e 's/@''GNULIB_SIGNBIT''@/$(GL_GNULIB_SIGNBIT)/g' \
+ -e 's/@''GNULIB_SIGNBIT_NO_CXX''@/$(GL_GNULIB_SIGNBIT_NO_CXX)/g' \
-e 's/@''GNULIB_SINF''@/$(GL_GNULIB_SINF)/g' \
-e 's/@''GNULIB_SINL''@/$(GL_GNULIB_SINL)/g' \
-e 's/@''GNULIB_SINHF''@/$(GL_GNULIB_SINHF)/g' \
@@ -1366,14 +1365,19 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_CBRTF''@|$(HAVE_CBRTF)|g' \
-e 's|@''HAVE_CBRTL''@|$(HAVE_CBRTL)|g' \
-e 's|@''HAVE_COPYSIGN''@|$(HAVE_COPYSIGN)|g' \
+ -e 's|@''HAVE_COPYSIGNF''@|$(HAVE_COPYSIGNF)|g' \
-e 's|@''HAVE_COPYSIGNL''@|$(HAVE_COPYSIGNL)|g' \
-e 's|@''HAVE_COSF''@|$(HAVE_COSF)|g' \
-e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
-e 's|@''HAVE_COSHF''@|$(HAVE_COSHF)|g' \
-e 's|@''HAVE_EXPF''@|$(HAVE_EXPF)|g' \
-e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \
+ -e 's|@''HAVE_EXP2''@|$(HAVE_EXP2)|g' \
+ -e 's|@''HAVE_EXP2F''@|$(HAVE_EXP2F)|g' \
+ -e 's|@''HAVE_EXP2L''@|$(HAVE_EXP2L)|g' \
-e 's|@''HAVE_EXPM1''@|$(HAVE_EXPM1)|g' \
-e 's|@''HAVE_EXPM1F''@|$(HAVE_EXPM1F)|g' \
+ -e 's|@''HAVE_EXPM1L''@|$(HAVE_EXPM1L)|g' \
-e 's|@''HAVE_FABSF''@|$(HAVE_FABSF)|g' \
-e 's|@''HAVE_FABSL''@|$(HAVE_FABSL)|g' \
-e 's|@''HAVE_FMA''@|$(HAVE_FMA)|g' \
@@ -1401,6 +1405,9 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_LOG1P''@|$(HAVE_LOG1P)|g' \
-e 's|@''HAVE_LOG1PF''@|$(HAVE_LOG1PF)|g' \
-e 's|@''HAVE_LOG1PL''@|$(HAVE_LOG1PL)|g' \
+ -e 's|@''HAVE_LOG2''@|$(HAVE_LOG2)|g' \
+ -e 's|@''HAVE_LOG2F''@|$(HAVE_LOG2F)|g' \
+ -e 's|@''HAVE_LOG2L''@|$(HAVE_LOG2L)|g' \
-e 's|@''HAVE_LOGBF''@|$(HAVE_LOGBF)|g' \
-e 's|@''HAVE_LOGBL''@|$(HAVE_LOGBL)|g' \
-e 's|@''HAVE_LOGP1''@|$(HAVE_LOGP1)|g' \
@@ -1411,8 +1418,13 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_POWF''@|$(HAVE_POWF)|g' \
-e 's|@''HAVE_REMAINDER''@|$(HAVE_REMAINDER)|g' \
-e 's|@''HAVE_REMAINDERF''@|$(HAVE_REMAINDERF)|g' \
+ -e 's|@''HAVE_REMAINDERL''@|$(HAVE_REMAINDERL)|g' \
-e 's|@''HAVE_RINT''@|$(HAVE_RINT)|g' \
+ -e 's|@''HAVE_RINTF''@|$(HAVE_RINTF)|g' \
-e 's|@''HAVE_RINTL''@|$(HAVE_RINTL)|g' \
+ -e 's|@''HAVE_ROUND''@|$(HAVE_ROUND)|g' \
+ -e 's|@''HAVE_ROUNDF''@|$(HAVE_ROUNDF)|g' \
+ -e 's|@''HAVE_ROUNDL''@|$(HAVE_ROUNDL)|g' \
-e 's|@''HAVE_SETPAYLOAD''@|$(HAVE_SETPAYLOAD)|g' \
-e 's|@''HAVE_SETPAYLOADF''@|$(HAVE_SETPAYLOADF)|g' \
-e 's|@''HAVE_SETPAYLOADL''@|$(HAVE_SETPAYLOADL)|g' \
@@ -1438,33 +1450,17 @@ math.h: math.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
-e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
-e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
- -e 's|@''HAVE_DECL_CBRTF''@|$(HAVE_DECL_CBRTF)|g' \
- -e 's|@''HAVE_DECL_CBRTL''@|$(HAVE_DECL_CBRTL)|g' \
-e 's|@''HAVE_DECL_CEILF''@|$(HAVE_DECL_CEILF)|g' \
-e 's|@''HAVE_DECL_CEILL''@|$(HAVE_DECL_CEILL)|g' \
- -e 's|@''HAVE_DECL_COPYSIGNF''@|$(HAVE_DECL_COPYSIGNF)|g' \
-e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
-e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
- -e 's|@''HAVE_DECL_EXP2''@|$(HAVE_DECL_EXP2)|g' \
- -e 's|@''HAVE_DECL_EXP2F''@|$(HAVE_DECL_EXP2F)|g' \
- -e 's|@''HAVE_DECL_EXP2L''@|$(HAVE_DECL_EXP2L)|g' \
- -e 's|@''HAVE_DECL_EXPM1L''@|$(HAVE_DECL_EXPM1L)|g' \
-e 's|@''HAVE_DECL_FLOORF''@|$(HAVE_DECL_FLOORF)|g' \
-e 's|@''HAVE_DECL_FLOORL''@|$(HAVE_DECL_FLOORL)|g' \
-e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
-e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
-e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
-e 's|@''HAVE_DECL_LOG10L''@|$(HAVE_DECL_LOG10L)|g' \
- -e 's|@''HAVE_DECL_LOG2''@|$(HAVE_DECL_LOG2)|g' \
- -e 's|@''HAVE_DECL_LOG2F''@|$(HAVE_DECL_LOG2F)|g' \
- -e 's|@''HAVE_DECL_LOG2L''@|$(HAVE_DECL_LOG2L)|g' \
-e 's|@''HAVE_DECL_LOGB''@|$(HAVE_DECL_LOGB)|g' \
- -e 's|@''HAVE_DECL_REMAINDER''@|$(HAVE_DECL_REMAINDER)|g' \
- -e 's|@''HAVE_DECL_REMAINDERL''@|$(HAVE_DECL_REMAINDERL)|g' \
- -e 's|@''HAVE_DECL_RINTF''@|$(HAVE_DECL_RINTF)|g' \
- -e 's|@''HAVE_DECL_ROUND''@|$(HAVE_DECL_ROUND)|g' \
- -e 's|@''HAVE_DECL_ROUNDF''@|$(HAVE_DECL_ROUNDF)|g' \
- -e 's|@''HAVE_DECL_ROUNDL''@|$(HAVE_DECL_ROUNDL)|g' \
-e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \
-e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \
-e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \
@@ -2395,9 +2391,6 @@ stdio.h: stdio.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
$(AM_V_at)mv $@-t3 $@
MOSTLYCLEANFILES += stdio.h stdio.h-t1 stdio.h-t2 stdio.h-t3
-if GL_COND_OBJ_STDIO_CONSOLESAFE
-libgnu_a_SOURCES += stdio-consolesafe.c
-endif
if GL_COND_OBJ_STDIO_READ
libgnu_a_SOURCES += stdio-read.c
endif
@@ -2409,6 +2402,14 @@ EXTRA_DIST += stdio.in.h
## end gnulib module stdio-h
+## begin gnulib module stdio-windows
+
+if GL_COND_OBJ_STDIO_CONSOLESAFE
+libgnu_a_SOURCES += stdio-consolesafe.c
+endif
+
+## end gnulib module stdio-windows
+
## begin gnulib module stdlib-h
BUILT_SOURCES += stdlib.h
@@ -2503,7 +2504,6 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_PTSNAME_R''@|$(HAVE_PTSNAME_R)|g' \
-e 's|@''HAVE_QSORT_R''@|$(HAVE_QSORT_R)|g' \
-e 's|@''HAVE_RANDOM''@|$(HAVE_RANDOM)|g' \
- -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
-e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
-e 's|@''HAVE_REALLOCARRAY''@|$(HAVE_REALLOCARRAY)|g' \
-e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
@@ -2521,6 +2521,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status $(CXXDEFS_H) \
-e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
-e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
-e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+ -e 's|@''HAVE_SYS_PROCESS_H''@|$(HAVE_SYS_PROCESS_H)|g' \
-e 's|@''HAVE_UNLOCKPT''@|$(HAVE_UNLOCKPT)|g' \
-e 's|@''HAVE_DECL_UNSETENV''@|$(HAVE_DECL_UNSETENV)|g' \
< $@-t1 > $@-t2
@@ -2674,6 +2675,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_STPNCPY''@/$(GL_GNULIB_STPNCPY)/g' \
-e 's/@''GNULIB_STRCHRNUL''@/$(GL_GNULIB_STRCHRNUL)/g' \
-e 's/@''GNULIB_STRDUP''@/$(GL_GNULIB_STRDUP)/g' \
+ -e 's/@''GNULIB_STRINGEQ''@/$(GL_GNULIB_STRINGEQ)/g' \
-e 's/@''GNULIB_STRNCAT''@/$(GL_GNULIB_STRNCAT)/g' \
-e 's/@''GNULIB_STRNCPY''@/$(GL_GNULIB_STRNCPY)/g' \
-e 's/@''GNULIB_STRNDUP''@/$(GL_GNULIB_STRNDUP)/g' \
@@ -2702,6 +2704,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_FFSL''@|$(HAVE_FFSL)|g' \
-e 's|@''HAVE_FFSLL''@|$(HAVE_FFSLL)|g' \
-e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+ -e 's|@''HAVE_DECL_MEMEQ''@|$(HAVE_DECL_MEMEQ)|g' \
-e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
-e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
-e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
@@ -2711,6 +2714,7 @@ string.h: string.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
-e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
-e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+ -e 's|@''HAVE_DECL_STREQ''@|$(HAVE_DECL_STREQ)|g' \
-e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
-e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
-e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
@@ -2760,6 +2764,12 @@ EXTRA_DIST += string.in.h
## end gnulib module string-h
+## begin gnulib module stringeq
+
+libgnu_a_SOURCES += string.c
+
+## end gnulib module stringeq
+
## begin gnulib module strings-h
BUILT_SOURCES += strings.h
@@ -3918,7 +3928,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's|@''HAVE_WCSTOK''@|$(HAVE_WCSTOK)|g' \
-e 's|@''HAVE_WCSWIDTH''@|$(HAVE_WCSWIDTH)|g' \
-e 's|@''HAVE_WCSFTIME''@|$(HAVE_WCSFTIME)|g' \
- -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+ -e 's|@''HAVE_WCTOB''@|$(HAVE_WCTOB)|g' \
-e 's|@''HAVE_DECL_WCSDUP''@|$(HAVE_DECL_WCSDUP)|g' \
-e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
< $@-t1 > $@-t2
diff --git a/gl/_Noreturn.h b/gl/_Noreturn.h
index d42f15ee..0bab051e 100644
--- a/gl/_Noreturn.h
+++ b/gl/_Noreturn.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that a function does not return.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/gl/af_alg.c b/gl/af_alg.c
index cfa96954..91f3df15 100644
--- a/gl/af_alg.c
+++ b/gl/af_alg.c
@@ -1,5 +1,5 @@
/* af_alg.c - Compute message digests from file streams and buffers.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -112,100 +112,102 @@ afalg_stream (FILE *stream, const char *alg,
read-write loop work around an empty-input bug noted below. */
int fd = fileno (stream);
int result;
- struct stat st;
- off_t off = ftello (stream);
- if (0 <= off && fstat (fd, &st) == 0
- && (S_ISREG (st.st_mode) || S_TYPEISSHM (&st) || S_TYPEISTMO (&st))
- && off < st.st_size && st.st_size - off < SYS_BUFSIZE_MAX)
- {
- /* Make sure the offset of fileno (stream) reflects how many bytes
- have been read from stream before this function got invoked.
- Note: fflush on an input stream after ungetc does not work as expected
- on some platforms. Therefore this situation is not supported here. */
- if (fflush (stream))
- result = -EIO;
- else
- {
- off_t nbytes = st.st_size - off;
- if (sendfile (ofd, fd, &off, nbytes) == nbytes)
- {
- if (read (ofd, resblock, hashlen) == hashlen)
- {
- /* The input buffers of stream are no longer valid. */
- if (lseek (fd, off, SEEK_SET) != (off_t)-1)
- result = 0;
- else
- /* The file position of fd has not changed. */
+ {
+ struct stat st;
+ off_t off = ftello (stream);
+ if (0 <= off && fstat (fd, &st) == 0
+ && (S_ISREG (st.st_mode) || S_TYPEISSHM (&st) || S_TYPEISTMO (&st))
+ && off < st.st_size && st.st_size - off < SYS_BUFSIZE_MAX)
+ {
+ /* Make sure the offset of fileno (stream) reflects how many bytes
+ have been read from stream before this function got invoked.
+ Note: fflush on an input stream after ungetc does not work as expected
+ on some platforms. Therefore this situation is not supported here. */
+ if (fflush (stream))
+ result = -EIO;
+ else
+ {
+ off_t nbytes = st.st_size - off;
+ if (sendfile (ofd, fd, &off, nbytes) == nbytes)
+ {
+ if (read (ofd, resblock, hashlen) == hashlen)
+ {
+ /* The input buffers of stream are no longer valid. */
+ if (lseek (fd, off, SEEK_SET) != (off_t)-1)
+ result = 0;
+ else
+ /* The file position of fd has not changed. */
+ result = -EAFNOSUPPORT;
+ }
+ else
+ /* The file position of fd has not changed. */
+ result = -EAFNOSUPPORT;
+ }
+ else
+ /* The file position of fd has not changed. */
+ result = -EAFNOSUPPORT;
+ }
+ }
+ else
+ {
+ /* sendfile not possible, do a classic read-write loop. */
+
+ /* Number of bytes to seek (backwards) in case of error. */
+ off_t nseek = 0;
+
+ for (;;)
+ {
+ char buf[BLOCKSIZE];
+ /* When the stream is not seekable, start with a single-byte block,
+ so that we can use ungetc() in the case that send() fails. */
+ size_t blocksize = (nseek == 0 && off < 0 ? 1 : BLOCKSIZE);
+ ssize_t size = fread (buf, 1, blocksize, stream);
+ if (size == 0)
+ {
+ /* On Linux < 4.9, the value for an empty stream is wrong (all 0).
+ See .
+ This was not fixed properly until November 2016,
+ see . */
+ result = ferror (stream) ? -EIO : nseek == 0 ? -EAFNOSUPPORT : 0;
+ break;
+ }
+ nseek -= size;
+ if (send (ofd, buf, size, MSG_MORE) != size)
+ {
+ if (nseek == -1)
+ {
+ /* 1 byte of pushback buffer is guaranteed on stream, even
+ if stream is not seekable. */
+ ungetc ((unsigned char) buf[0], stream);
result = -EAFNOSUPPORT;
- }
- else
- /* The file position of fd has not changed. */
- result = -EAFNOSUPPORT;
- }
- else
- /* The file position of fd has not changed. */
- result = -EAFNOSUPPORT;
- }
- }
- else
- {
- /* sendfile not possible, do a classic read-write loop. */
-
- /* Number of bytes to seek (backwards) in case of error. */
- off_t nseek = 0;
-
- for (;;)
- {
- char buf[BLOCKSIZE];
- /* When the stream is not seekable, start with a single-byte block,
- so that we can use ungetc() in the case that send() fails. */
- size_t blocksize = (nseek == 0 && off < 0 ? 1 : BLOCKSIZE);
- ssize_t size = fread (buf, 1, blocksize, stream);
- if (size == 0)
- {
- /* On Linux < 4.9, the value for an empty stream is wrong (all 0).
- See .
- This was not fixed properly until November 2016,
- see . */
- result = ferror (stream) ? -EIO : nseek == 0 ? -EAFNOSUPPORT : 0;
- break;
- }
- nseek -= size;
- if (send (ofd, buf, size, MSG_MORE) != size)
- {
- if (nseek == -1)
- {
- /* 1 byte of pushback buffer is guaranteed on stream, even
- if stream is not seekable. */
- ungetc ((unsigned char) buf[0], stream);
+ }
+ else if (fseeko (stream, nseek, SEEK_CUR) == 0)
+ /* The position of stream has been restored. */
result = -EAFNOSUPPORT;
- }
- else if (fseeko (stream, nseek, SEEK_CUR) == 0)
- /* The position of stream has been restored. */
- result = -EAFNOSUPPORT;
- else
- result = -EIO;
- break;
- }
-
- /* Don't assume that EOF is sticky. See:
- . */
- if (feof (stream))
- {
- result = 0;
- break;
- }
- }
-
- if (result == 0 && read (ofd, resblock, hashlen) != hashlen)
- {
- if (nseek == 0 || fseeko (stream, nseek, SEEK_CUR) == 0)
- /* The position of stream has been restored. */
- result = -EAFNOSUPPORT;
- else
- result = -EIO;
- }
- }
+ else
+ result = -EIO;
+ break;
+ }
+
+ /* Don't assume that EOF is sticky. See:
+ . */
+ if (feof (stream))
+ {
+ result = 0;
+ break;
+ }
+ }
+
+ if (result == 0 && read (ofd, resblock, hashlen) != hashlen)
+ {
+ if (nseek == 0 || fseeko (stream, nseek, SEEK_CUR) == 0)
+ /* The position of stream has been restored. */
+ result = -EAFNOSUPPORT;
+ else
+ result = -EIO;
+ }
+ }
+ }
close (ofd);
return result;
}
diff --git a/gl/af_alg.h b/gl/af_alg.h
index 236659bc..1321970f 100644
--- a/gl/af_alg.h
+++ b/gl/af_alg.h
@@ -1,5 +1,5 @@
/* af_alg.h - Compute message digests from file streams and buffers.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/alloca.in.h b/gl/alloca.in.h
index afb00caf..bb2cb881 100644
--- a/gl/alloca.in.h
+++ b/gl/alloca.in.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2025 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2026 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/arg-nonnull.h b/gl/arg-nonnull.h
index 747bb413..d370d139 100644
--- a/gl/arg-nonnull.h
+++ b/gl/arg-nonnull.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/gl/arpa_inet.c b/gl/arpa_inet.c
index fae7c241..d0ff3a31 100644
--- a/gl/arpa_inet.c
+++ b/gl/arpa_inet.c
@@ -1,6 +1,6 @@
/* Inline functions for .
- Copyright (C) 2024-2025 Free Software Foundation, Inc.
+ Copyright (C) 2024-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -15,7 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see . */
-#include
-
#define _GL_ARPA_INET_INLINE _GL_EXTERN_INLINE
+#include
#include
diff --git a/gl/arpa_inet.in.h b/gl/arpa_inet.in.h
index d7417bfd..a9c93d07 100644
--- a/gl/arpa_inet.in.h
+++ b/gl/arpa_inet.in.h
@@ -1,6 +1,6 @@
/* A GNU-like .
- Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -159,7 +159,6 @@ _GL_CXXALIAS_SYS_CAST (inet_ntop, const char *,
_GL_CXXALIASWARN (inet_ntop);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef inet_ntop
# if HAVE_RAW_DECL_INET_NTOP
_GL_WARN_ON_USE (inet_ntop, "inet_ntop is unportable - "
"use gnulib module inet_ntop for portability");
@@ -190,7 +189,6 @@ _GL_CXXALIAS_SYS (inet_pton, int,
_GL_CXXALIASWARN (inet_pton);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef inet_pton
# if HAVE_RAW_DECL_INET_PTON
_GL_WARN_ON_USE (inet_pton, "inet_pton is unportable - "
"use gnulib module inet_pton for portability");
diff --git a/gl/asnprintf.c b/gl/asnprintf.c
index 0488b6be..05582499 100644
--- a/gl/asnprintf.c
+++ b/gl/asnprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -25,10 +25,8 @@ char *
asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
{
va_list args;
- char *result;
-
va_start (args, format);
- result = vasnprintf (resultbuf, lengthp, format, args);
+ char *result = vasnprintf (resultbuf, lengthp, format, args);
va_end (args);
return result;
}
diff --git a/gl/asprintf.c b/gl/asprintf.c
index 336700be..5da2d085 100644
--- a/gl/asprintf.c
+++ b/gl/asprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007, 2009-2025 Free Software Foundation,
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2026 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
@@ -30,10 +30,8 @@ int
asprintf (char **resultp, const char *format, ...)
{
va_list args;
- int result;
-
va_start (args, format);
- result = vasprintf (resultp, format, args);
+ int result = vasprintf (resultp, format, args);
va_end (args);
return result;
}
diff --git a/gl/assert.in.h b/gl/assert.in.h
index 87339abc..8a564670 100644
--- a/gl/assert.in.h
+++ b/gl/assert.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/attribute.h b/gl/attribute.h
index c85412d9..c50befdf 100644
--- a/gl/attribute.h
+++ b/gl/attribute.h
@@ -1,6 +1,6 @@
/* ATTRIBUTE_* macros for using attributes in GCC and similar compilers
- Copyright 2020-2025 Free Software Foundation, Inc.
+ Copyright 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -89,7 +89,7 @@
_GL_ATTRIBUTE_NONNULL_IF_NONZERO, _GL_ATTRIBUTE_NONSTRING,
_GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED, _GL_ATTRIBUTE_PURE,
_GL_ATTRIBUTE_REPRODUCIBLE, _GL_ATTRIBUTE_RETURNS_NONNULL,
- _GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNSEQUENCED. */
+ _GL_ATTRIBUTE_SENTINEL, _GL_ATTRIBUTE_UNSEQUENCED, _GL_UNNAMED. */
#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
@@ -240,62 +240,68 @@
/* Applies to: functions. */
#define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE
-/* It is OK for a compiler to move calls to the function and to omit
- calls to the function if another call has the same arguments or the
- result is not used.
- This attribute is safe for a function that neither depends on
- nor affects state, and always returns exactly once -
+/* It is OK for a compiler to move a call, or omit a duplicate call
+ and reuse a cached return value, even if the state changes between calls.
+ It is also OK to omit a call if the result is not used.
+ This attribute is safe if the function does not change observable state,
+ returns a value determined solely by its arguments' values
+ without examining state, and always returns exactly once -
e.g., does not raise an exception, call longjmp, or loop forever.
- (This attribute is stricter than ATTRIBUTE_PURE because the
- function cannot observe state. It is stricter than UNSEQUENCED
- because the function must return exactly once and cannot depend on
- state addressed by its arguments.) */
+ (This attribute is stricter than _GL_ATTRIBUTE_PURE because the
+ function cannot observe state. Unlike _GL_ATTRIBUTE_UNSEQUENCED
+ the function must return exactly once and cannot access state
+ addressed by its pointer arguments or that happens to have the same
+ value for all calls to the function, but the function is allowed to
+ return a pointer to storage that can be modified later. */
/* Applies to: functions. */
#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
-/* It is OK for a compiler to move calls to the function and to omit duplicate
- calls to the function with the same arguments, so long as the state
- addressed by its arguments is the same.
+/* It is OK for a compiler to move a call, or omit a duplicate call
+ and reuse a cached value returned either directly or indirectly via
+ a pointer, if the state addressed by its pointer arguments is the same;
+ however, pointer arguments cannot alias.
This attribute is safe for a function that is effectless, idempotent,
- stateless, and independent; see ISO C 23 § 6.7.12.7 for a definition of
+ stateless, and independent; see ISO C 23 § 6.7.13.8 for a definition of
these terms.
- (This attribute is stricter than REPRODUCIBLE because the function
- must be stateless and independent. It is looser than ATTRIBUTE_CONST
- because the function need not return exactly once and can depend
- on state addressed by its arguments.)
+ (This attribute is stricter than _GL_ATTRIBUTE_REPRODUCIBLE because
+ the function must be stateless and independent. Unlike
+ _GL_ATTRIBUTE_CONST the function need not return exactly once, and
+ can depend on state accessed via its pointer arguments or that
+ happens to have the same value for all calls to the function, but
+ the function cannot return a pointer to storage whose contents
+ change later.)
See also and
- .
- ATTENTION! Efforts are underway to change the meaning of this attribute.
- See . */
+ . */
/* Applies to: functions, pointer to functions, function type. */
#define UNSEQUENCED _GL_ATTRIBUTE_UNSEQUENCED
-/* It is OK for a compiler to move calls to the function and to omit
- calls to the function if another call has the same arguments or the
- result is not used, and if observable state is the same.
- This attribute is safe for a function that does not affect observable state
- and always returns exactly once.
- (This attribute is looser than ATTRIBUTE_CONST because the function
- can depend on observable state. It is stricter than REPRODUCIBLE
- because the function must return exactly once and cannot affect
- state addressed by its arguments.) */
+/* It is OK for a compiler to move a call, or omit a duplicate call
+ and reuse a cached return value, if observable state is the same.
+ It is also OK to omit a call if the return value is not used.
+ This attribute is safe if the function does not change observable state,
+ returns a value determined solely by its arguments's values
+ together with observable state, and always returns exactly once.
+ (This attribute is looser than _GL_ATTRIBUTE_CONST because the function
+ can depend on observable state.
+ Unlike _GL_ATTRIBUTE_REPRODUCIBLE the function must return exactly
+ once and cannot change state addressed by its arguments, but the
+ function can return a pointer to storage whose contents change later.) */
/* Applies to: functions. */
#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE
-/* It is OK for a compiler to move calls to the function and to omit duplicate
- calls to the function with the same arguments, so long as the state
- addressed by its arguments is the same and is updated in time for
- the rest of the program.
- This attribute is safe for a function that is effectless and idempotent; see
- ISO C 23 § 6.7.12.7 for a definition of these terms.
- (This attribute is looser than UNSEQUENCED because the function need
- not be stateless and idempotent. It is looser than ATTRIBUTE_PURE
- because the function need not return exactly once and can affect
- state addressed by its arguments.)
+/* It is OK for a compiler to move a call, or omit a duplicate call
+ and reuse a cached value returned either directly or indirectly via
+ a pointer, if other observable state is the same;
+ however, pointer arguments cannot alias.
+ This attribute is safe for a function that is effectless and idempotent;
+ see ISO C 23 § 6.7.13.8 for a definition of these terms.
+ (This attribute is looser than _GL_ATTRIBUTE_UNSEQUENCED because
+ the function need not be stateless or independent.
+ Unlike _GL_ATTRIBUTE_PURE the function need not return exactly once
+ and can change state addressed by its pointer arguments, but the
+ function cannot return a pointer to storage whose contents change later.)
See also and
- .
- ATTENTION! Efforts are underway to change the meaning of this attribute.
- See . */
+ . */
/* Applies to: functions, pointer to functions, function type. */
#define REPRODUCIBLE _GL_ATTRIBUTE_REPRODUCIBLE
@@ -328,4 +334,18 @@
#define ATTRIBUTE_MAY_ALIAS _GL_ATTRIBUTE_MAY_ALIAS
+/* ==================== Unnamed function parameters ======================== */
+
+/* Although UNNAMED is not an attribute, it is related to MAYBE_UNUSED
+ and so is defined here for convenience. */
+
+/* UNNAMED (ID) is the "name" of an unnamed function parameter.
+ Each of the function's unnamed parameters should have a unique "name".
+ The "name" cannot be used. This ports both to C17 and earlier, which
+ lack unnamed parameters, and to C++ and later C, which have them. */
+/* Applies to:
+ - function parameters. */
+#define UNNAMED(id) _GL_UNNAMED (id)
+
+
#endif /* _GL_ATTRIBUTE_H */
diff --git a/gl/base64.c b/gl/base64.c
index 8a0edd4a..77ee371b 100644
--- a/gl/base64.c
+++ b/gl/base64.c
@@ -1,5 +1,5 @@
/* base64.c -- Encode binary data using printable characters.
- Copyright (C) 1999-2001, 2004-2006, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999-2001, 2004-2006, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -39,10 +39,10 @@
*
*/
+#define BASE64_INLINE _GL_EXTERN_INLINE
#include
/* Get prototype. */
-#define BASE64_INLINE _GL_EXTERN_INLINE
#include "base64.h"
/* Get imalloc. */
@@ -372,13 +372,14 @@ static bool
decode_4 (char const *restrict in, idx_t inlen,
char *restrict *outp, idx_t *outleft)
{
- char *out = *outp;
if (inlen < 2)
return false;
if (!isbase64 (in[0]) || !isbase64 (in[1]))
return false;
+ char *out = *outp;
+
if (*outleft)
{
*out++ = ((base64_to_int[to_uchar (in[0])] << 2)
@@ -466,7 +467,6 @@ base64_decode_ctx (struct base64_decode_context *ctx,
const char *restrict in, idx_t inlen,
char *restrict out, idx_t *outlen)
{
- idx_t outleft = *outlen;
bool ignore_newlines = ctx != NULL;
bool flush_ctx = false;
unsigned int ctx_i = 0;
@@ -477,6 +477,7 @@ base64_decode_ctx (struct base64_decode_context *ctx,
flush_ctx = inlen == 0;
}
+ idx_t outleft = *outlen;
while (true)
{
@@ -505,35 +506,36 @@ base64_decode_ctx (struct base64_decode_context *ctx,
{
++in;
--inlen;
- continue;
}
+ else
+ {
+ /* Restore OUT and OUTLEFT. */
+ out -= outleft_save - outleft;
+ outleft = outleft_save;
- /* Restore OUT and OUTLEFT. */
- out -= outleft_save - outleft;
- outleft = outleft_save;
-
- {
- char const *in_end = in + inlen;
- char const *non_nl;
-
- if (ignore_newlines)
- non_nl = get_4 (ctx, &in, in_end, &inlen);
- else
- non_nl = in; /* Might have nl in this case. */
-
- /* If the input is empty or consists solely of newlines (0 non-newlines),
- then we're done. Likewise if there are fewer than 4 bytes when not
- flushing context and not treating newlines as garbage. */
- if (inlen == 0 || (inlen < 4 && !flush_ctx && ignore_newlines))
{
- inlen = 0;
- break;
- }
- if (!decode_4 (non_nl, inlen, &out, &outleft))
- break;
+ char const *in_end = in + inlen;
+
+ char const *non_nl;
+ if (ignore_newlines)
+ non_nl = get_4 (ctx, &in, in_end, &inlen);
+ else
+ non_nl = in; /* Might have nl in this case. */
+
+ /* If the input is empty or consists solely of newlines (0 non-newlines),
+ then we're done. Likewise if there are fewer than 4 bytes when not
+ flushing context and not treating newlines as garbage. */
+ if (inlen == 0 || (inlen < 4 && !flush_ctx && ignore_newlines))
+ {
+ inlen = 0;
+ break;
+ }
+ if (!decode_4 (non_nl, inlen, &out, &outleft))
+ break;
- inlen = in_end - in;
- }
+ inlen = in_end - in;
+ }
+ }
}
*outlen -= outleft;
diff --git a/gl/base64.h b/gl/base64.h
index cdafdac9..35f8a30b 100644
--- a/gl/base64.h
+++ b/gl/base64.h
@@ -1,5 +1,5 @@
/* base64.h -- Encode binary data using printable characters.
- Copyright (C) 2004-2006, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2004-2006, 2009-2026 Free Software Foundation, Inc.
Written by Simon Josefsson.
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 2aecb0dd..53f3bae5 100644
--- a/gl/basename-lgpl.c
+++ b/gl/basename-lgpl.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2025 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2026 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -29,13 +29,11 @@ char *
last_component (char const *name)
{
char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
- char const *p;
- bool last_was_slash = false;
-
while (ISSLASH (*base))
base++;
- for (p = base; *p; p++)
+ bool last_was_slash = false;
+ for (char const *p = base; *p; p++)
{
if (ISSLASH (*p))
last_was_slash = true;
@@ -53,8 +51,6 @@ size_t
base_len (char const *name)
{
size_t len;
- size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
-
for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
continue;
@@ -62,6 +58,7 @@ base_len (char const *name)
&& ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2])
return 2;
+ size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len
&& len == prefix_len && ISSLASH (name[prefix_len]))
return prefix_len + 1;
diff --git a/gl/basename-lgpl.h b/gl/basename-lgpl.h
index 120bd1cf..fa43cffb 100644
--- a/gl/basename-lgpl.h
+++ b/gl/basename-lgpl.h
@@ -1,6 +1,6 @@
/* Extract the last component (base name) of a file name.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2025 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2026 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/basename.c b/gl/basename.c
index 9d2852d4..3a825981 100644
--- a/gl/basename.c
+++ b/gl/basename.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2025 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2026 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/btowc.c b/gl/btowc.c
index 891347de..19b490d1 100644
--- a/gl/btowc.c
+++ b/gl/btowc.c
@@ -1,5 +1,5 @@
/* Convert unibyte character to wide character.
- Copyright (C) 2008, 2010-2025 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2026 Free Software Foundation, Inc.
Written by Bruno Haible , 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/byteswap.c b/gl/byteswap.c
index 97f7fc9e..e01eaa9a 100644
--- a/gl/byteswap.c
+++ b/gl/byteswap.c
@@ -1,6 +1,6 @@
/* Inline functions for .
- Copyright 2024-2025 Free Software Foundation, Inc.
+ Copyright 2024-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -15,7 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see . */
-#include
-
#define _GL_BYTESWAP_INLINE _GL_EXTERN_INLINE
+#include
#include
diff --git a/gl/byteswap.in.h b/gl/byteswap.in.h
index 6b4fbabf..b2b26af8 100644
--- a/gl/byteswap.in.h
+++ b/gl/byteswap.in.h
@@ -1,5 +1,5 @@
/* byteswap.h - Byte swapping
- Copyright (C) 2005, 2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2007, 2009-2026 Free Software Foundation, Inc.
Written by Oskar Liljeblad , 2005.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/c++defs.h b/gl/c++defs.h
index df98a5ae..cfe68cb1 100644
--- a/gl/c++defs.h
+++ b/gl/c++defs.h
@@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2025 Free Software Foundation, Inc.
+ Copyright (C) 2010-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
@@ -127,6 +127,16 @@
#define _GL_FUNCDECL_RPL_1(rpl_func,rettype,parameters,...) \
_GL_EXTERN_C_FUNC __VA_ARGS__ rettype rpl_func parameters
+/* _GL_FUNCDECL_SYS_NAME (func) expands to plain func if C++, and to
+ parenthesized func otherwise. Parenthesization is needed in C23 if
+ the function is like strchr and so is a qualifier-generic macro
+ that expands to something more complicated. */
+#ifdef __cplusplus
+# define _GL_FUNCDECL_SYS_NAME(func) func
+#else
+# define _GL_FUNCDECL_SYS_NAME(func) (func)
+#endif
+
/* _GL_FUNCDECL_SYS (func, rettype, parameters, [attributes]);
declares the system function, named func, with the given prototype,
consisting of return type, parameters, and attributes.
@@ -139,7 +149,7 @@
_GL_FUNCDECL_SYS (posix_openpt, int, (int flags), _GL_ATTRIBUTE_NODISCARD);
*/
#define _GL_FUNCDECL_SYS(func,rettype,parameters,...) \
- _GL_EXTERN_C_FUNC __VA_ARGS__ rettype func parameters
+ _GL_EXTERN_C_FUNC __VA_ARGS__ rettype _GL_FUNCDECL_SYS_NAME (func) parameters
/* _GL_CXXALIAS_RPL (func, rettype, parameters);
declares a C++ alias called GNULIB_NAMESPACE::func
@@ -310,7 +320,7 @@
_GL_CXXALIASWARN_1 (func, GNULIB_NAMESPACE)
# define _GL_CXXALIASWARN_1(func,namespace) \
_GL_CXXALIASWARN_2 (func, namespace)
-/* To work around GCC bug ,
+/* To work around GCC bug ,
we enable the warning only when not optimizing. */
# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
# define _GL_CXXALIASWARN_2(func,namespace) \
@@ -338,7 +348,7 @@
GNULIB_NAMESPACE)
# define _GL_CXXALIASWARN1_1(func,rettype,parameters_and_attributes,namespace) \
_GL_CXXALIASWARN1_2 (func, rettype, parameters_and_attributes, namespace)
-/* To work around GCC bug ,
+/* To work around GCC bug ,
we enable the warning only when not optimizing. */
# if !(defined __GNUC__ && !defined __clang__ && __OPTIMIZE__)
# define _GL_CXXALIASWARN1_2(func,rettype,parameters_and_attributes,namespace) \
diff --git a/gl/c-ctype.c b/gl/c-ctype.c
index ecf2c083..cd9a205a 100644
--- a/gl/c-ctype.c
+++ b/gl/c-ctype.c
@@ -1,6 +1,6 @@
/* Character handling in C locale.
- Copyright (C) 2003-2025 Free Software Foundation, Inc.
+ Copyright (C) 2003-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -15,7 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see . */
-#include
-
#define C_CTYPE_INLINE _GL_EXTERN_INLINE
+#include
#include "c-ctype.h"
diff --git a/gl/c-ctype.h b/gl/c-ctype.h
index 39063142..e3448a43 100644
--- a/gl/c-ctype.h
+++ b/gl/c-ctype.h
@@ -5,7 +5,7 @@
functions' behaviour depends on the current locale set via
setlocale.
- Copyright (C) 2000-2003, 2006, 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2006, 2008-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32is-impl.h b/gl/c32is-impl.h
index 8366035d..7fa79291 100644
--- a/gl/c32is-impl.h
+++ b/gl/c32is-impl.h
@@ -1,5 +1,5 @@
/* Test whether a 32-bit wide character belongs to a specific character class.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -43,7 +43,7 @@ FUNC (wint_t wc)
/* The char32_t encoding of a multibyte character is defined by the way
mbrtoc32() is defined. */
-#if GNULIB_defined_mbstate_t /* AIX, IRIX */
+#if GNULIB_defined_mbstate_t /* AIX */
/* mbrtoc32() is defined on top of mbtowc() for the non-UTF-8 locales
and directly for the UTF-8 locales. */
if (wc != WEOF)
diff --git a/gl/c32isalnum.c b/gl/c32isalnum.c
index 7d0ebcf5..0972d5be 100644
--- a/gl/c32isalnum.c
+++ b/gl/c32isalnum.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being alphanumeric.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32isalpha.c b/gl/c32isalpha.c
index 308fd76a..1dde246d 100644
--- a/gl/c32isalpha.c
+++ b/gl/c32isalpha.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being alphabetic.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32isblank.c b/gl/c32isblank.c
index 1a03c2db..36f21ec1 100644
--- a/gl/c32isblank.c
+++ b/gl/c32isblank.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being blank.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32iscntrl.c b/gl/c32iscntrl.c
index 1d004087..dcb32705 100644
--- a/gl/c32iscntrl.c
+++ b/gl/c32iscntrl.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being a control character.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32isdigit.c b/gl/c32isdigit.c
index 7d3bda81..96374718 100644
--- a/gl/c32isdigit.c
+++ b/gl/c32isdigit.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being a digit.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32isgraph.c b/gl/c32isgraph.c
index 8b68ae39..f660ceba 100644
--- a/gl/c32isgraph.c
+++ b/gl/c32isgraph.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being graphic.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32islower.c b/gl/c32islower.c
index 1ce08cf4..98abb8a2 100644
--- a/gl/c32islower.c
+++ b/gl/c32islower.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being lowercase.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32isprint.c b/gl/c32isprint.c
index d47ce1f8..72975751 100644
--- a/gl/c32isprint.c
+++ b/gl/c32isprint.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being printable.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32ispunct.c b/gl/c32ispunct.c
index 41ac3d70..1945c6c5 100644
--- a/gl/c32ispunct.c
+++ b/gl/c32ispunct.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being a punctuation or symbol character.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32isspace.c b/gl/c32isspace.c
index 2393142b..58e2a02a 100644
--- a/gl/c32isspace.c
+++ b/gl/c32isspace.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being white-space.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32isupper.c b/gl/c32isupper.c
index bfe4a148..29558234 100644
--- a/gl/c32isupper.c
+++ b/gl/c32isupper.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being uppercase.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32isxdigit.c b/gl/c32isxdigit.c
index b38d7f1f..c9262b58 100644
--- a/gl/c32isxdigit.c
+++ b/gl/c32isxdigit.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being a hexadecimal digit.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32to-impl.h b/gl/c32to-impl.h
index a63a25b6..2528e51d 100644
--- a/gl/c32to-impl.h
+++ b/gl/c32to-impl.h
@@ -1,5 +1,5 @@
/* Case mapping of a 32-bit wide character.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -39,7 +39,7 @@ FUNC (wint_t wc)
/* The char32_t encoding of a multibyte character is defined by the way
mbrtoc32() is defined. */
-#if GNULIB_defined_mbstate_t /* AIX, IRIX */
+#if GNULIB_defined_mbstate_t /* AIX */
/* mbrtoc32() is defined on top of mbtowc() for the non-UTF-8 locales
and directly for the UTF-8 locales. */
if (wc != WEOF)
diff --git a/gl/c32tolower.c b/gl/c32tolower.c
index a0b0523f..15608d88 100644
--- a/gl/c32tolower.c
+++ b/gl/c32tolower.c
@@ -1,5 +1,5 @@
/* Map a 32-bit wide character to lowercase.
- Copyright (C) 2023-2025 Free Software Foundation, Inc.
+ Copyright (C) 2023-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/c32width.c b/gl/c32width.c
index 442a432c..727c2bd3 100644
--- a/gl/c32width.c
+++ b/gl/c32width.c
@@ -1,5 +1,5 @@
/* Determine the number of screen columns needed for a 32-bit wide character.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -49,7 +49,7 @@ c32width (char32_t wc)
/* The char32_t encoding of a multibyte character is defined by the way
mbrtoc32() is defined. */
-#if GNULIB_defined_mbstate_t /* AIX, IRIX */
+#if GNULIB_defined_mbstate_t /* AIX */
/* mbrtoc32() is defined on top of mbtowc() for the non-UTF-8 locales
and directly for the UTF-8 locales. */
const char *encoding = locale_charset ();
diff --git a/gl/calloc.c b/gl/calloc.c
index 5258c5de..b4ca8f89 100644
--- a/gl/calloc.c
+++ b/gl/calloc.c
@@ -1,6 +1,6 @@
/* calloc() function that is glibc compatible.
- This wrapper function is required at least on Tru64 UNIX 5.1 and mingw.
- Copyright (C) 2004-2007, 2009-2025 Free Software Foundation, Inc.
+ This wrapper function is required at least on mingw.
+ Copyright (C) 2004-2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/cdefs.h b/gl/cdefs.h
index dce5739d..696e6542 100644
--- a/gl/cdefs.h
+++ b/gl/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2025 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2026 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
diff --git a/gl/cloexec.c b/gl/cloexec.c
index 8ab5591f..3d4f916b 100644
--- a/gl/cloexec.c
+++ b/gl/cloexec.c
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 1991, 2004-2006, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 1991, 2004-2006, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/cloexec.h b/gl/cloexec.h
index 0eb9fa09..3716bd72 100644
--- a/gl/cloexec.h
+++ b/gl/cloexec.h
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 2004, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/close.c b/gl/close.c
index 3bcfc479..86ccdf9a 100644
--- a/gl/close.c
+++ b/gl/close.c
@@ -1,5 +1,5 @@
/* close replacement.
- Copyright (C) 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2008-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/dirname-lgpl.c b/gl/dirname-lgpl.c
index 9e0ec565..9f772e0f 100644
--- a/gl/dirname-lgpl.c
+++ b/gl/dirname-lgpl.c
@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2025 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2026 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -32,7 +32,6 @@ size_t
dir_len (char const *file)
{
size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file);
- size_t length;
/* Advance prefix_length beyond important leading slashes. */
prefix_length += (prefix_length != 0
@@ -45,8 +44,10 @@ dir_len (char const *file)
: 0));
/* Strip the basename and any redundant slashes before it. */
+ size_t length;
for (length = last_component (file) - file;
- prefix_length < length; length--)
+ prefix_length < length;
+ length--)
if (! ISSLASH (file[length - 1]))
break;
return length;
diff --git a/gl/dirname.c b/gl/dirname.c
index e747fcaf..a67c7593 100644
--- a/gl/dirname.c
+++ b/gl/dirname.c
@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2025 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2026 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
diff --git a/gl/dirname.h b/gl/dirname.h
index d4d03f66..8ecbb9e6 100644
--- a/gl/dirname.h
+++ b/gl/dirname.h
@@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2025 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2026 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/dup2.c b/gl/dup2.c
index 69b37196..b9a55263 100644
--- a/gl/dup2.c
+++ b/gl/dup2.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -70,8 +70,6 @@ dup2_nothrow (int fd, int desired_fd)
static int
ms_windows_dup2 (int fd, int desired_fd)
{
- int result;
-
/* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open,
dup2 (fd, fd) returns 0, but all further attempts to use fd in
future dup2 calls will hang. */
@@ -93,7 +91,7 @@ ms_windows_dup2 (int fd, int desired_fd)
return -1;
}
- result = dup2_nothrow (fd, desired_fd);
+ int result = dup2_nothrow (fd, desired_fd);
if (result == 0)
result = desired_fd;
@@ -110,14 +108,11 @@ ms_windows_dup2 (int fd, int desired_fd)
static int
klibc_dup2dirfd (int fd, int desired_fd)
{
- int tempfd;
- int dupfd;
-
- tempfd = open ("NUL", O_RDONLY);
- if (tempfd == -1)
- return -1;
+ int tempfd = open ("NUL", O_RDONLY);
+ if (tempfd < 0)
+ return tempfd;
- if (tempfd == desired_fd)
+ if (tempfd >= desired_fd)
{
close (tempfd);
@@ -125,10 +120,32 @@ klibc_dup2dirfd (int fd, int desired_fd)
if (__libc_Back_ioFHToPath (fd, path, sizeof (path)))
return -1;
- return open(path, O_RDONLY);
+ for (;;)
+ {
+ close (desired_fd);
+
+ int dupfd = open (path, O_RDONLY);
+ if (dupfd < 0)
+ return dupfd;
+
+ if (dupfd == desired_fd)
+ return dupfd;
+
+ /* If lower FD was closed by other threads, fill again. */
+ if (dupfd < desired_fd)
+ {
+ tempfd = dupfd;
+ break;
+ }
+
+ /* desired_fd was opened by other threads. Try again. */
+ /* FIXME: Closing desired_fd opened by other threads may lead to
+ unexpected behavior. */
+ close (dupfd);
+ }
}
- dupfd = klibc_dup2dirfd (fd, desired_fd);
+ int dupfd = klibc_dup2dirfd (fd, desired_fd);
close (tempfd);
@@ -138,16 +155,16 @@ klibc_dup2dirfd (int fd, int desired_fd)
static int
klibc_dup2 (int fd, int desired_fd)
{
- int dupfd;
- struct stat sbuf;
-
- dupfd = dup2 (fd, desired_fd);
- if (dupfd == -1 && errno == ENOTSUP \
- && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ int dupfd = dup2 (fd, desired_fd);
+ if (dupfd < 0 && errno == ENOTSUP)
{
- close (desired_fd);
+ struct stat sbuf;
+ if (!fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ {
+ close (desired_fd);
- return klibc_dup2dirfd (fd, desired_fd);
+ return klibc_dup2dirfd (fd, desired_fd);
+ }
}
return dupfd;
@@ -159,8 +176,6 @@ klibc_dup2 (int fd, int desired_fd)
int
rpl_dup2 (int fd, int desired_fd)
{
- int result;
-
#ifdef F_GETFL
/* On Linux kernels 2.6.26-2.6.29, dup2 (fd, fd) returns -EBADF.
On Cygwin 1.5.x, dup2 (1, 1) returns 0.
@@ -176,13 +191,14 @@ rpl_dup2 (int fd, int desired_fd)
return fcntl (fd, F_GETFL) == -1 ? -1 : fd;
#endif
- result = dup2 (fd, desired_fd);
+ int result = dup2 (fd, desired_fd);
/* Correct an errno value on FreeBSD 6.1 and Cygwin 1.5.x. */
- if (result == -1 && errno == EMFILE)
+ if (result < 0 && errno == EMFILE)
errno = EBADF;
+
#if REPLACE_FCHDIR
- if (fd != desired_fd && result != -1)
+ if (! (result < 0 || fd == desired_fd))
result = _gl_register_dup (fd, result);
#endif
return result;
diff --git a/gl/dynarray.h b/gl/dynarray.h
index 74471ea2..a5cdf630 100644
--- a/gl/dynarray.h
+++ b/gl/dynarray.h
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically.
- Copyright 2021-2025 Free Software Foundation, Inc.
+ Copyright 2021-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/errno.in.h b/gl/errno.in.h
index ba5dd371..784a4018 100644
--- a/gl/errno.in.h
+++ b/gl/errno.in.h
@@ -1,6 +1,6 @@
/* A POSIX-like .
- Copyright (C) 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2008-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -148,27 +148,11 @@
# endif
-/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
- EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */
-# if @EMULTIHOP_HIDDEN@
-# define EMULTIHOP @EMULTIHOP_VALUE@
-# define GNULIB_defined_EMULTIHOP 1
-# endif
-# if @ENOLINK_HIDDEN@
-# define ENOLINK @ENOLINK_VALUE@
-# define GNULIB_defined_ENOLINK 1
-# endif
-# if @EOVERFLOW_HIDDEN@
-# define EOVERFLOW @EOVERFLOW_VALUE@
-# define GNULIB_defined_EOVERFLOW 1
-# endif
-
-
/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
Likewise, on NonStop Kernel, EDQUOT is not defined.
Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
- HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
+ HP-UX EWOULDBLOCK = 246.
Note: When one of these systems defines some of these macros some day,
binaries will have to be recompiled so that they recognizes the new
diff --git a/gl/error.c b/gl/error.c
index 9231c79c..e066241b 100644
--- a/gl/error.c
+++ b/gl/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-2025 Free Software Foundation, Inc.
+ Copyright (C) 1990-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,7 +38,7 @@
#if !_LIBC && ENABLE_NLS
# include "gettext.h"
-# define _(msgid) dgettext ("gnulib", msgid)
+# define _(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid)
#endif
#ifdef _LIBC
diff --git a/gl/error.in.h b/gl/error.in.h
index 6c512ec8..3355fb3b 100644
--- a/gl/error.in.h
+++ b/gl/error.in.h
@@ -1,5 +1,5 @@
/* Declarations for error-reporting functions.
- Copyright (C) 1995-1997, 2003, 2006, 2008-2025 Free Software Foundation,
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2026 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
diff --git a/gl/exitfail.c b/gl/exitfail.c
index 5b37c10b..148468b7 100644
--- a/gl/exitfail.c
+++ b/gl/exitfail.c
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/exitfail.h b/gl/exitfail.h
index 9d6b1528..64e2aa33 100644
--- a/gl/exitfail.h
+++ b/gl/exitfail.h
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fcntl.c b/gl/fcntl.c
index ecb18e50..1c0e52d2 100644
--- a/gl/fcntl.c
+++ b/gl/fcntl.c
@@ -1,6 +1,6 @@
/* Provide file descriptor control.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -30,6 +30,7 @@
#ifdef __KLIBC__
# include
+# include
#endif
#if defined _WIN32 && ! defined __CYGWIN__
@@ -55,19 +56,15 @@ dupfd (int oldfd, int newfd, int flags)
{
/* Mingw has no way to create an arbitrary fd. Iterate until all
file descriptors less than newfd are filled up. */
- HANDLE curr_process = GetCurrentProcess ();
- HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd);
- unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT];
- unsigned int fds_to_close_bound = 0;
- int result;
- BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE;
- int mode;
if (newfd < 0 || getdtablesize () <= newfd)
{
errno = EINVAL;
return -1;
}
+
+ HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd);
+ int mode;
if (old_handle == INVALID_HANDLE_VALUE
|| (mode = _setmode (oldfd, O_BINARY)) == -1)
{
@@ -79,6 +76,11 @@ dupfd (int oldfd, int newfd, int flags)
_setmode (oldfd, mode);
flags |= mode;
+ HANDLE curr_process = GetCurrentProcess ();
+ BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE;
+ unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT];
+ unsigned int fds_to_close_bound = 0;
+ int result;
for (;;)
{
HANDLE new_handle;
@@ -145,9 +147,8 @@ dupfd (int oldfd, int newfd, int flags)
/* Close the previous fds that turned out to be too small. */
{
int saved_errno = errno;
- unsigned int duplicated_fd;
- for (duplicated_fd = 0;
+ for (unsigned int duplicated_fd = 0;
duplicated_fd < fds_to_close_bound * CHAR_BIT;
duplicated_fd++)
if ((fds_to_close[duplicated_fd / CHAR_BIT]
@@ -205,8 +206,9 @@ fcntl (int fd, int action, /* arg */...)
#endif
{
va_list arg;
- int result = -1;
va_start (arg, action);
+
+ int result = -1;
switch (action)
{
case F_DUPFD:
@@ -375,12 +377,6 @@ fcntl (int fd, int action, /* arg */...)
#ifdef F_NOTIFY /* Linux */
case F_NOTIFY:
#endif
- #ifdef F_OPLKACK /* IRIX */
- case F_OPLKACK:
- #endif
- #ifdef F_OPLKREG /* IRIX */
- case F_OPLKREG:
- #endif
#ifdef F_RDAHEAD /* macOS */
case F_RDAHEAD:
#endif
@@ -438,7 +434,9 @@ fcntl (int fd, int action, /* arg */...)
break;
}
}
+
va_end (arg);
+
return result;
}
@@ -545,86 +543,115 @@ rpl_fcntl_DUPFD_CLOEXEC (int fd, int target)
#undef fcntl
#ifdef __KLIBC__
-
static int
-klibc_fcntl (int fd, int action, /* arg */...)
+klibc_dupdirfd (int fd, int minfd)
{
- va_list arg_ptr;
- int arg;
- struct stat sbuf;
- int result;
+ int tempfd = open ("NUL", O_RDONLY);
+ if (tempfd == -1)
+ return -1;
- va_start (arg_ptr, action);
- arg = va_arg (arg_ptr, int);
- result = fcntl (fd, action, arg);
- /* EPERM for F_DUPFD, ENOTSUP for others */
- if (result == -1 && (errno == EPERM || errno == ENOTSUP)
- && !fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ if (tempfd >= minfd)
{
- PLIBCFH pFH;
- unsigned fFlags;
+ close (tempfd);
- switch (action)
- {
- case F_DUPFD:
- /* Find available fd */
- while (fcntl (arg, F_GETFL) != -1 || errno != EBADF)
- arg++;
+ char path[_MAX_PATH];
+ if (__libc_Back_ioFHToPath (fd, path, sizeof (path)))
+ return -1;
- result = dup2 (fd, arg);
- break;
+ int dupfd = open (path, O_RDONLY);
+ if (dupfd == -1)
+ return -1;
- case F_GETFD:
- pFH = __libc_FH (fd);
- if (!pFH)
- {
- errno = EBADF;
- break;
- }
+ if (dupfd >= minfd)
+ return dupfd;
- result = (pFH->fFlags & ((FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT )
- | O_NOINHERIT)) ? FD_CLOEXEC : 0;
- break;
+ /* Lower FD was closed by other threads. Fill again. */
+ tempfd = dupfd;
+ }
- case F_SETFD:
- if (arg & ~FD_CLOEXEC)
- break;
+ int dupfd = klibc_dupdirfd (fd, minfd);
- pFH = __libc_FH (fd);
- if (!pFH)
+ close (tempfd);
+
+ return dupfd;
+}
+
+static int
+klibc_fcntl (int fd, int action, /* arg */...)
+{
+ va_list arg_ptr;
+ va_start (arg_ptr, action);
+
+ int arg = va_arg (arg_ptr, int);
+ int result = fcntl (fd, action, arg);
+ /* EPERM for F_DUPFD, ENOTSUP for others */
+ if (result == -1 && (errno == EPERM || errno == ENOTSUP))
+ {
+ struct stat sbuf;
+ if (!fstat (fd, &sbuf) && S_ISDIR (sbuf.st_mode))
+ {
+ switch (action)
{
- errno = EBADF;
+ case F_DUPFD:
+ result = klibc_dupdirfd (fd, arg);
break;
- }
- fFlags = pFH->fFlags;
- if (arg & FD_CLOEXEC)
- fFlags |= (FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT) | O_NOINHERIT;
- else
- fFlags &= ~((FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT) | O_NOINHERIT);
+ case F_GETFD:
+ {
+ PLIBCFH pFH = __libc_FH (fd);
+ if (!pFH)
+ {
+ errno = EBADF;
+ break;
+ }
+
+ result = (pFH->fFlags & ((FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT )
+ | O_NOINHERIT)) ? FD_CLOEXEC : 0;
+ }
+ break;
- result = __libc_FHSetFlags (pFH, fd, fFlags);
- if (result < 0)
- {
- errno = -result;
- result = -1;
- }
- break;
+ case F_SETFD:
+ {
+ if (arg & ~FD_CLOEXEC)
+ break;
+
+ PLIBCFH pFH = __libc_FH (fd);
+ if (!pFH)
+ {
+ errno = EBADF;
+ break;
+ }
+
+ unsigned fFlags = pFH->fFlags;
+ if (arg & FD_CLOEXEC)
+ fFlags |= (FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT) | O_NOINHERIT;
+ else
+ fFlags &= ~((FD_CLOEXEC << __LIBC_FH_FDFLAGS_SHIFT) | O_NOINHERIT);
+
+ result = __libc_FHSetFlags (pFH, fd, fFlags);
+ if (result < 0)
+ {
+ errno = -result;
+ result = -1;
+ }
+ }
+ break;
- case F_GETFL:
- result = 0;
- break;
+ case F_GETFL:
+ result = 0;
+ break;
- case F_SETFL:
- if (arg != 0)
- break;
+ case F_SETFL:
+ if (arg != 0)
+ break;
- result = 0;
- break;
+ result = 0;
+ break;
- default:
- errno = EINVAL;
- break;
+ default:
+ errno = EINVAL;
+ break;
+ }
}
}
diff --git a/gl/fcntl.in.h b/gl/fcntl.in.h
index c5068ed4..52727074 100644
--- a/gl/fcntl.in.h
+++ b/gl/fcntl.in.h
@@ -1,6 +1,6 @@
/* Like , but with non-working flags defined to 0.
- Copyright (C) 2006-2025 Free Software Foundation, Inc.
+ Copyright (C) 2006-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -122,7 +122,6 @@ _GL_CXXALIAS_SYS (creat, int, (const char *filename, mode_t mode));
# endif
_GL_CXXALIASWARN (creat);
#elif defined GNULIB_POSIXCHECK
-# undef creat
/* Assume creat is always declared. */
_GL_WARN_ON_USE (creat, "creat is not always POSIX compliant - "
"use gnulib module creat for portability");
@@ -165,7 +164,6 @@ _GL_CXXALIAS_SYS (fcntl, int, (int fd, int action, ...));
# endif
_GL_CXXALIASWARN (fcntl);
#elif defined GNULIB_POSIXCHECK
-# undef fcntl
# if HAVE_RAW_DECL_FCNTL
_GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
"use gnulib module fcntl for portability");
@@ -196,7 +194,6 @@ _GL_CXXALIAS_SYS (open, int, (const char *filename, int flags, ...));
_GL_CXXALIASWARN (open);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef open
/* Assume open is always declared. */
_GL_WARN_ON_USE (open, "open is not always POSIX compliant - "
"use gnulib module open for portability");
@@ -242,13 +239,51 @@ _GL_CXXALIAS_SYS (openat, int,
# endif
_GL_CXXALIASWARN (openat);
#elif defined GNULIB_POSIXCHECK
-# undef openat
# if HAVE_RAW_DECL_OPENAT
_GL_WARN_ON_USE (openat, "openat is not portable - "
"use gnulib module openat for portability");
# endif
#endif
+#if @GNULIB_OPENAT2@
+# if !defined RESOLVE_NO_XDEV && defined __has_include
+# if __has_include ()
+# include
+# endif
+# endif
+# ifndef RESOLVE_NO_XDEV
+struct open_how
+{
+# ifdef __UINT64_TYPE__
+ __UINT64_TYPE__ flags, mode, resolve;
+# else
+ unsigned long long int flags, mode, resolve;
+# endif
+};
+# define RESOLVE_NO_XDEV 0x01
+# define RESOLVE_NO_MAGICLINKS 0x02
+# define RESOLVE_NO_SYMLINKS 0x04
+# define RESOLVE_BENEATH 0x08
+# define RESOLVE_IN_ROOT 0x10
+# define RESOLVE_CACHED 0x20
+# endif
+
+# if !@HAVE_OPENAT2@
+_GL_FUNCDECL_SYS (openat2, int,
+ (int fd, char const *file, struct open_how const *how,
+ size_t size),
+ _GL_ARG_NONNULL ((2, 3)));
+# endif
+_GL_CXXALIAS_SYS (openat2, int,
+ (int fd, char const *file, struct open_how const *how,
+ size_t size));
+_GL_CXXALIASWARN (openat2);
+#elif defined GNULIB_POSIXCHECK
+# if HAVE_RAW_DECL_OPENAT2
+_GL_WARN_ON_USE (openat2, "openat2 is not portable - "
+ "use gnulib module openat2 for portability");
+# endif
+#endif
/* Fix up the FD_* macros, only known to be missing on mingw. */
@@ -293,11 +328,6 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# endif
#endif
-#if !defined O_DIRECT && defined O_DIRECTIO
-/* Tru64 spells it 'O_DIRECTIO'. */
-# define O_DIRECT O_DIRECTIO
-#endif
-
#if !defined O_CLOEXEC && defined O_NOINHERIT
/* Mingw spells it 'O_NOINHERIT'. */
# define O_CLOEXEC O_NOINHERIT
@@ -460,6 +490,15 @@ _GL_WARN_ON_USE (openat, "openat is not portable - "
# define AT_NO_AUTOMOUNT 0
#endif
+/* errno when openat+O_NOFOLLOW fails because the file is a symlink. */
+#if defined __FreeBSD__ || defined __FreeBSD_kernel__ || defined __DragonFly__
+# define _GL_OPENAT_ESYMLINK EMLINK
+#elif defined __NetBSD__
+# define _GL_OPENAT_ESYMLINK EFTYPE
+#else
+# define _GL_OPENAT_ESYMLINK ELOOP
+#endif
+
#endif /* _@GUARD_PREFIX@_FCNTL_H */
#endif /* _@GUARD_PREFIX@_FCNTL_H */
#endif
diff --git a/gl/fd-hook.c b/gl/fd-hook.c
index 4a5014eb..eef4e81e 100644
--- a/gl/fd-hook.c
+++ b/gl/fd-hook.c
@@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible , 2009.
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 a960eaf3..0f029d42 100644
--- a/gl/fd-hook.h
+++ b/gl/fd-hook.h
@@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fflush.c b/gl/fflush.c
index d8619082..862ff926 100644
--- a/gl/fflush.c
+++ b/gl/fflush.c
@@ -1,5 +1,5 @@
/* fflush.c -- allow flushing input streams
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -65,7 +65,7 @@ clear_ungetc_buffer (FILE *fp)
fp->_ungetc_count = 0;
fp->_rcount = - fp->_rcount;
}
-# elif defined _IOERR /* Minix, AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
+# elif defined _IOERR /* Minix, AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
/* Nothing to do. */
# else /* other implementations */
fseeko (fp, 0, SEEK_CUR);
diff --git a/gl/float+.h b/gl/float+.h
index 37381146..58eca376 100644
--- a/gl/float+.h
+++ b/gl/float+.h
@@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
- Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible , 2007.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/float.c b/gl/float.c
index 780a0d1c..2e95957a 100644
--- a/gl/float.c
+++ b/gl/float.c
@@ -1,5 +1,5 @@
/* Auxiliary definitions for .
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
Written by Bruno Haible , 2011.
This file is free software: you can redistribute it and/or modify
@@ -21,10 +21,7 @@
#include
#if GNULIB_defined_long_double_union
-# if (defined _ARCH_PPC || defined _POWER) && (defined _AIX || defined __linux__) && (LDBL_MANT_DIG == 106) && defined __GNUC__
-const union gl_long_double_union gl_LDBL_MAX =
- { { DBL_MAX, DBL_MAX / 0x1p53 } };
-# elif defined __i386__
+# ifdef __i386__
const union gl_long_double_union gl_LDBL_MAX =
{ { 0xFFFFFFFF, 0xFFFFFFFF, 32766 } };
# endif
diff --git a/gl/float.in.h b/gl/float.in.h
index d75a06e7..9f735cb9 100644
--- a/gl/float.in.h
+++ b/gl/float.in.h
@@ -1,6 +1,6 @@
/* A correct .
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -113,69 +113,31 @@ extern const union gl_long_double_union gl_LDBL_MAX;
# define LDBL_MAX_10_EXP 4932
#endif
-/* On PowerPC with gcc 15 when using __ibm128 long double, the value of
- LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX, and LDBL_NORM_MAX are wrong. */
+/* On AIX 7.1 with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_MAX are
+ wrong.
+ On Linux/PowerPC with gcc 8.3, the values of LDBL_MAX and LDBL_EPSILON are
+ wrong.
+ Assume these bugs are fixed in any GCC new enough
+ to define __LDBL_NORM_MAX__. */
#if (defined _ARCH_PPC && LDBL_MANT_DIG == 106 \
- && defined __GNUC__)
+ && defined __GNUC__ && !defined __LDBL_NORM_MAX__)
# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP DBL_MIN_EXP
+# define LDBL_MIN_EXP (-968)
# undef LDBL_MIN_10_EXP
-# define LDBL_MIN_10_EXP DBL_MIN_10_EXP
+# define LDBL_MIN_10_EXP (-291)
# undef LDBL_MIN
-# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */
+# define LDBL_MIN 0x1p-969L
+
+/* IBM long double is tricky: it is represented as the sum of two doubles,
+ and the high double must equal the sum of the two parts rounded to nearest.
+ The maximum finite value for which this is true is
+ { 0x1.fffffffffffffp+1023, 0x1.ffffffffffffep+969 },
+ which represents 0x1.fffffffffffff7ffffffffffff8p+1023L.
+ Although computations can yield representations of numbers larger than this,
+ these computations are considered to have overflowed and behavior is undefined.
+ See . */
# undef LDBL_MAX
-/* LDBL_MAX is 2**1024 - 2**918, represented as: { 0x7FEFFFFF, 0xFFFFFFFF,
- 0x7C9FFFFF, 0xFFFFFFFF }.
-
- Do not write it as a constant expression, as GCC would likely treat
- that as infinity due to the vagaries of this platform's funky arithmetic.
- Instead, define it through a reference to an external variable.
- Like the following, but using a union to avoid type mismatches:
-
- const double LDBL_MAX[2] = { DBL_MAX, DBL_MAX / 0x1p53 };
- extern const long double LDBL_MAX;
-
- The following alternative would not work as well when GCC is optimizing:
-
- #define LDBL_MAX (*(long double const *) (double[])
- { DBL_MAX, DBL_MAX / 0x1p53 })
-
- The following alternative would require GCC 6 or later:
-
- #define LDBL_MAX __builtin_pack_longdouble (DBL_MAX, DBL_MAX / 0x1p53)
-
- Unfortunately none of the alternatives are constant expressions. */
-# if !GNULIB_defined_long_double_union
-union gl_long_double_union
- {
- struct { double hi; double lo; } dd;
- long double ld;
- };
-# define GNULIB_defined_long_double_union 1
-# endif
-extern const union gl_long_double_union gl_LDBL_MAX;
-# define LDBL_MAX (gl_LDBL_MAX.ld)
-# undef LDBL_NORM_MAX
-# define LDBL_NORM_MAX LDBL_MAX
-#endif
-
-/* On IRIX 6.5, with cc, the value of LDBL_MANT_DIG is wrong.
- On IRIX 6.5, with gcc 4.2, the values of LDBL_MIN_EXP, LDBL_MIN, LDBL_EPSILON
- are wrong. */
-#if defined __sgi && (LDBL_MANT_DIG >= 106)
-# undef LDBL_MANT_DIG
-# define LDBL_MANT_DIG 106
-# if defined __GNUC__
-# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP DBL_MIN_EXP
-# undef LDBL_MIN_10_EXP
-# define LDBL_MIN_10_EXP DBL_MIN_10_EXP
-# undef LDBL_MIN
-# define LDBL_MIN 2.22507385850720138309023271733240406422e-308L /* DBL_MIN = 2^-1022 */
-# undef LDBL_EPSILON
-# define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */
-# endif
-#endif
+# define LDBL_MAX 0x1.fffffffffffff7ffffffffffff8p+1023L
/* On PowerPC platforms, 'long double' has a double-double representation.
Up to ISO C 17, this was outside the scope of ISO C because it can represent
@@ -187,9 +149,8 @@ extern const union gl_long_double_union gl_LDBL_MAX;
numbers with mantissas of the form 1.<52 bits><52 bits> are
called "unnormalized". And since LDBL_EPSILON must be normalized (per
ISO C 23 § 5.2.5.3.3.(33)), it must be 2^-105. */
-#if defined __powerpc__ && LDBL_MANT_DIG == 106
# undef LDBL_EPSILON
-# define LDBL_EPSILON 2.46519032881566189191165176650870696773e-32L /* 2^-105 */
+# define LDBL_EPSILON 0x1p-105L
#endif
/* ============================ ISO C11 support ============================ */
@@ -273,7 +234,7 @@ extern const union gl_long_double_union gl_LDBL_TRUE_MIN;
# define FLT_NORM_MAX FLT_MAX
#endif
#ifndef FLT_SNAN
-/* For sh, beware of . */
+/* For sh, beware of . */
# if ((__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__) && !defined __sh__
# define FLT_SNAN __builtin_nansf ("")
# else
@@ -297,7 +258,7 @@ extern gl_FLT_SNAN_t gl_FLT_SNAN;
# define DBL_NORM_MAX DBL_MAX
#endif
#ifndef DBL_SNAN
-/* For sh, beware of . */
+/* For sh, beware of . */
# if ((__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__) && !defined __sh__
# define DBL_SNAN __builtin_nans ("")
# else
@@ -322,12 +283,14 @@ extern gl_DBL_SNAN_t gl_DBL_SNAN;
#ifndef LDBL_NORM_MAX
# ifdef __LDBL_NORM_MAX__
# define LDBL_NORM_MAX __LDBL_NORM_MAX__
+# elif FLT_RADIX == 2 && LDBL_MAX_EXP == 1024 && LDBL_MANT_DIG == 106
+# define LDBL_NORM_MAX 0x1.ffffffffffffffffffffffffff8p+1022L
# else
# define LDBL_NORM_MAX LDBL_MAX
# endif
#endif
#ifndef LDBL_SNAN
-/* For sh, beware of . */
+/* For sh, beware of . */
# if ((__GNUC__ + (__GNUC_MINOR__ >= 3) > 3) || defined __clang__) && !defined __sh__
# define LDBL_SNAN __builtin_nansl ("")
# else
diff --git a/gl/floor.c b/gl/floor.c
index 4d7fecae..9cecb7bb 100644
--- a/gl/floor.c
+++ b/gl/floor.c
@@ -1,5 +1,5 @@
/* Round towards negative infinity.
- Copyright (C) 2007, 2010-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2010-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/floorf.c b/gl/floorf.c
index d210c297..34a507b9 100644
--- a/gl/floorf.c
+++ b/gl/floorf.c
@@ -1,5 +1,5 @@
/* Round towards negative infinity.
- Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fopen.c b/gl/fopen.c
index 41587d2c..93710ad0 100644
--- a/gl/fopen.c
+++ b/gl/fopen.c
@@ -1,5 +1,5 @@
/* Open a stream to a file.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -33,13 +33,7 @@ orig_fopen (const char *filename, const char *mode)
}
/* Specification. */
-#ifdef __osf__
-/* Write "stdio.h" here, not , otherwise OSF/1 5.1 DTK cc eliminates
- this include because of the preliminary #include above. */
-# include "stdio.h"
-#else
-# include
-#endif
+#include
#include
#include
@@ -51,24 +45,18 @@ orig_fopen (const char *filename, const char *mode)
FILE *
rpl_fopen (const char *filename, const char *mode)
{
- int open_direction;
- int open_flags;
-#if GNULIB_FOPEN_GNU
- bool open_flags_gnu;
-# define BUF_SIZE 80
- char fdopen_mode_buf[BUF_SIZE + 1];
-#endif
-
#if defined _WIN32 && ! defined __CYGWIN__
- if (strcmp (filename, "/dev/null") == 0)
+ if (streq (filename, "/dev/null"))
filename = "NUL";
#endif
/* Parse the mode. */
- open_direction = 0;
- open_flags = 0;
+ int open_direction = 0;
+ int open_flags = 0;
#if GNULIB_FOPEN_GNU
- open_flags_gnu = false;
+ bool open_flags_gnu = false;
+# define BUF_SIZE 80
+ char fdopen_mode_buf[BUF_SIZE + 1];
#endif
{
const char *p = mode;
@@ -169,21 +157,18 @@ rpl_fopen (const char *filename, const char *mode)
size_t len = strlen (filename);
if (len > 0 && filename[len - 1] == '/')
{
- int fd;
- struct stat statbuf;
- FILE *fp;
-
if (open_direction != O_RDONLY)
{
errno = EISDIR;
return NULL;
}
- fd = open (filename, open_direction | open_flags,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+ int fd = open (filename, open_direction | open_flags,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (fd < 0)
return NULL;
+ struct stat statbuf;
if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
{
close (fd);
@@ -191,6 +176,7 @@ rpl_fopen (const char *filename, const char *mode)
return NULL;
}
+ FILE *fp;
# if GNULIB_FOPEN_GNU
fp = fdopen (fd, fdopen_mode_buf);
# else
@@ -210,15 +196,12 @@ rpl_fopen (const char *filename, const char *mode)
#if GNULIB_FOPEN_GNU
if (open_flags_gnu)
{
- int fd;
- FILE *fp;
-
- fd = open (filename, open_direction | open_flags,
- S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
+ int fd = open (filename, open_direction | open_flags,
+ S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH);
if (fd < 0)
return NULL;
- fp = fdopen (fd, fdopen_mode_buf);
+ FILE *fp = fdopen (fd, fdopen_mode_buf);
if (fp == NULL)
{
int saved_errno = errno;
diff --git a/gl/fpurge.c b/gl/fpurge.c
index 0b69da3f..6799b52b 100644
--- a/gl/fpurge.c
+++ b/gl/fpurge.c
@@ -1,5 +1,5 @@
/* Flushing buffers of a FILE stream.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -101,7 +101,7 @@ fpurge (FILE *fp)
if (fp->_ptr != NULL)
fp->_count = 0;
return 0;
-# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
+# elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
fp_->_ptr = fp_->_base;
if (fp_->_ptr != NULL)
fp_->_cnt = 0;
diff --git a/gl/freading.c b/gl/freading.c
index 6a60d6b3..8e06282e 100644
--- a/gl/freading.c
+++ b/gl/freading.c
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -22,7 +22,7 @@
#include "stdio-impl.h"
/* Don't use glibc's __freading function in glibc < 2.7, see
- */
+ */
#if !(HAVE___FREADING && (!defined __GLIBC__ || defined __UCLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)))
/* This code is not compiled on systems that have a working __freading function,
@@ -47,7 +47,7 @@ freading (FILE *fp)
return (fp->_flags & _IOREAD) != 0;
# elif defined __minix /* Minix */
return (fp->_flags & _IOREADING) != 0;
-# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
+# elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
# if defined __sun /* Solaris */
return (fp_->_flag & _IOREAD) != 0 && (fp_->_flag & _IOWRT) == 0;
# else
diff --git a/gl/freading.h b/gl/freading.h
index 405a651e..3d75d75e 100644
--- a/gl/freading.h
+++ b/gl/freading.h
@@ -1,5 +1,5 @@
/* Retrieve information about a FILE stream.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/free.c b/gl/free.c
index 98ceafd7..e6e7cf0f 100644
--- a/gl/free.c
+++ b/gl/free.c
@@ -1,6 +1,6 @@
/* Make free() preserve errno.
- Copyright (C) 2003, 2006, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -33,7 +33,7 @@ rpl_free (void *p)
{
# if defined __GNUC__ && !defined __clang__
/* An invalid GCC optimization
-
+
would optimize away the assignments in the code below, when link-time
optimization (LTO) is enabled. Make the code more complicated, so that
GCC does not grok how to optimize it. */
@@ -44,9 +44,9 @@ rpl_free (void *p)
free (p);
errno = err[errno == 0];
# else
- int err = errno;
+ int saved_errno = errno;
free (p);
- errno = err;
+ errno = saved_errno;
# endif
}
diff --git a/gl/fseek.c b/gl/fseek.c
index a5857650..bf1f303f 100644
--- a/gl/fseek.c
+++ b/gl/fseek.c
@@ -1,5 +1,5 @@
/* An fseek() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fseeko.c b/gl/fseeko.c
index ecd2f83a..f6cd7cba 100644
--- a/gl/fseeko.c
+++ b/gl/fseeko.c
@@ -1,5 +1,5 @@
/* An fseeko() function that, together with fflush(), is POSIX compliant.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -84,7 +84,7 @@ fseeko (FILE *fp, off_t offset, int whence)
#elif defined __minix /* Minix */
if (fp_->_ptr == fp_->_buf
&& (fp_->_ptr == NULL || fp_->_count == 0))
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
+#elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
if (fp_->_ptr == fp_->_base
&& (fp_->_ptr == NULL || fp_->_cnt == 0))
#elif defined __UCLIBC__ /* uClibc */
@@ -158,7 +158,7 @@ fseeko (FILE *fp, off_t offset, int whence)
fp_->_flags &= ~__SEOF;
#elif defined __EMX__ /* emx+gcc */
fp->_flags &= ~_IOEOF;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
+#elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
fp_->_flag &= ~_IOEOF;
#elif defined __MINT__ /* Atari FreeMiNT */
fp->__offset = pos;
diff --git a/gl/fseterr.c b/gl/fseterr.c
index a01ef2af..0ab61765 100644
--- a/gl/fseterr.c
+++ b/gl/fseterr.c
@@ -1,5 +1,5 @@
/* Set the error indicator of a stream.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -42,7 +42,7 @@ fseterr (FILE *fp)
fp->_flags |= _IOERR;
#elif defined __minix /* Minix */
fp->_flags |= _IOERR;
-#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
+#elif defined _IOERR /* AIX, HP-UX, Solaris, OpenServer, UnixWare, mingw, MSVC, NonStop Kernel, OpenVMS */
fp_->_flag |= _IOERR;
#elif defined __UCLIBC__ /* uClibc */
fp->__modeflags |= __FLAG_ERROR;
@@ -59,14 +59,10 @@ fseterr (FILE *fp)
Not activated on any system, because there is no way to repair FP when
the sequence of system calls fails, and library code should not call
abort(). */
- int saved_errno;
- int fd;
- int fd2;
-
- saved_errno = errno;
+ int saved_errno = errno;
fflush (fp);
- fd = fileno (fp);
- fd2 = dup (fd);
+ int fd = fileno (fp);
+ int fd2 = dup (fd);
if (fd2 >= 0)
{
close (fd);
diff --git a/gl/fseterr.h b/gl/fseterr.h
index 57c30ef3..ac2b793e 100644
--- a/gl/fseterr.h
+++ b/gl/fseterr.h
@@ -1,5 +1,5 @@
/* Set the error indicator of a stream.
- Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/fstat.c b/gl/fstat.c
index 200e672e..292ce75f 100644
--- a/gl/fstat.c
+++ b/gl/fstat.c
@@ -1,5 +1,5 @@
/* fstat() replacement.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -40,14 +40,7 @@ orig_fstat (int fd, struct stat *buf)
#endif
/* Specification. */
-#ifdef __osf__
-/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc
- eliminates this include because of the preliminary #include
- above. */
-# include "sys/stat.h"
-#else
-# include
-#endif
+#include
#include "stat-time.h"
diff --git a/gl/fsusage.c b/gl/fsusage.c
index e26bda88..1700a19c 100644
--- a/gl/fsusage.c
+++ b/gl/fsusage.c
@@ -1,6 +1,6 @@
/* fsusage.c -- return space usage of mounted file systems
- Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2025 Free Software
+ Copyright (C) 1991-1992, 1996, 1998-1999, 2002-2006, 2009-2026 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -91,10 +91,12 @@ static int
statvfs_works (void)
{
static int statvfs_works_cache = -1;
- struct utsname name;
if (statvfs_works_cache < 0)
- statvfs_works_cache = (uname (&name) == 0
- && 0 <= strverscmp (name.release, "2.6.36"));
+ {
+ struct utsname name;
+ statvfs_works_cache = (uname (&name) == 0
+ && 0 <= strverscmp (name.release, "2.6.36"));
+ }
return statvfs_works_cache;
}
# endif
@@ -148,15 +150,6 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
? PROPAGATE_ALL_ONES (fsd.f_frsize)
: PROPAGATE_ALL_ONES (fsd.f_bsize));
-#elif defined STAT_STATFS3_OSF1 /* OSF/1 */
-
- struct statfs fsd;
-
- if (statfs (file, &fsd, sizeof (struct statfs)) != 0)
- return -1;
-
- fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize);
-
#elif defined STAT_STATFS2_FRSIZE /* 2.6 < glibc/Linux < 2.6.36 */
struct statfs fsd;
@@ -201,7 +194,7 @@ get_fs_usage (char const *file, char const *disk, struct fs_usage *fsp)
fsp->fsu_blocksize = PROPAGATE_ALL_ONES (fsd.f_fsize);
-#elif defined STAT_STATFS4 /* SVR3, old Irix */
+#elif defined STAT_STATFS4 /* SVR3 */
struct statfs fsd;
diff --git a/gl/fsusage.h b/gl/fsusage.h
index 00d9067e..bfa1857e 100644
--- a/gl/fsusage.h
+++ b/gl/fsusage.h
@@ -1,6 +1,6 @@
/* fsusage.h -- declarations for file system space usage info
- Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2025 Free Software
+ Copyright (C) 1991-1992, 1997, 2003-2006, 2009-2026 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/ftell.c b/gl/ftell.c
index 96648d5a..f2a64e73 100644
--- a/gl/ftell.c
+++ b/gl/ftell.c
@@ -1,5 +1,5 @@
/* An ftell() function that works around platform bugs.
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/ftello.c b/gl/ftello.c
index b0a20bf3..e4f96d1a 100644
--- a/gl/ftello.c
+++ b/gl/ftello.c
@@ -1,5 +1,5 @@
/* An ftello() function that works around platform bugs.
- Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -124,13 +124,11 @@ ftello (FILE *fp)
gets confused by this. */
if (fp_->_flag & _IOWRT)
{
- off_t pos;
-
/* Call ftello nevertheless, for the side effects that it does on fp. */
ftello (fp);
/* Compute the file position ourselves. */
- pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR);
+ off_t pos = lseek (fileno (fp), (off_t) 0, SEEK_CUR);
if (pos >= 0)
{
if ((fp_->_flag & _IONBF) == 0 && fp_->_base != NULL)
diff --git a/gl/gai_strerror.c b/gl/gai_strerror.c
index 9c5f1419..ef6b506b 100644
--- a/gl/gai_strerror.c
+++ b/gl/gai_strerror.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2025 Free Software
+/* Copyright (C) 1997, 2001-2002, 2004-2006, 2008-2026 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Philip Blundell , 1997.
@@ -27,7 +27,7 @@
# include
#else
# include "gettext.h"
-# define _(msgid) dgettext ("gnulib", msgid)
+# define _(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid)
# define N_(msgid) msgid
#endif
@@ -79,8 +79,7 @@ values[] =
const char *
gai_strerror (int code)
{
- size_t i;
- for (i = 0; i < sizeof (values) / sizeof (values[0]); ++i)
+ for (size_t i = 0; i < sizeof (values) / sizeof (values[0]); ++i)
if (values[i].code == code)
return _(values[i].msg);
diff --git a/gl/getaddrinfo.c b/gl/getaddrinfo.c
index a8c45c21..2b60377b 100644
--- a/gl/getaddrinfo.c
+++ b/gl/getaddrinfo.c
@@ -1,5 +1,5 @@
/* Get address information (partial implementation).
- Copyright (C) 1997, 2001-2002, 2004-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997, 2001-2002, 2004-2026 Free Software Foundation, Inc.
Contributed by Simon Josefsson .
This file is free software: you can redistribute it and/or modify
@@ -40,7 +40,7 @@
#include
#include "gettext.h"
-#define _(msgid) dgettext ("gnulib", msgid)
+#define _(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid)
#define N_(msgid) msgid
/* BeOS has AF_INET, but not PF_INET. */
@@ -52,9 +52,40 @@
# define PF_UNSPEC 0
#endif
+#if defined __sun || !HAVE_GETADDRINFO
+
+static bool
+is_numeric_host (const char *host, int family)
+{
+# if HAVE_IPV4
+ if (family == PF_INET || family == PF_UNSPEC)
+ {
+ /* glibc supports IPv4 addresses in numbers-and-dots notation, that is,
+ also hexadecimal and octal number formats and formats that don't
+ require all four bytes to be explicitly written, via inet_aton().
+ But POSIX doesn't require support for these legacy formats. Therefore
+ we are free to use inet_pton() instead of inet_aton(). */
+ struct in_addr addr;
+ if (inet_pton (AF_INET, host, &addr))
+ return true;
+ }
+# endif
+# if HAVE_IPV6
+ if (family == PF_INET6 || family == PF_UNSPEC)
+ {
+ struct in6_addr addr;
+ if (inet_pton (AF_INET6, host, &addr))
+ return true;
+ }
+# endif
+ return false;
+}
+
+#endif
+
#if HAVE_GETADDRINFO
-/* Override with cdecl calling convention and mingw fix. */
+/* Override with cdecl calling convention and Windows and Solaris 10 fixes. */
int
getaddrinfo (const char *restrict nodename,
@@ -63,10 +94,18 @@ getaddrinfo (const char *restrict nodename,
struct addrinfo **restrict res)
# undef getaddrinfo
{
+ /* Workaround for native Windows. */
if (hints && (hints->ai_flags & AI_NUMERICSERV) != 0
&& servname && !(*servname >= '0' && *servname <= '9'))
return EAI_NONAME;
+# ifdef __sun
+ /* Workaround for Solaris 10. */
+ if (hints && (hints->ai_flags & AI_NUMERICHOST)
+ && nodename && !is_numeric_host (nodename, hints->ai_family))
+ return EAI_NONAME;
+# endif
+
return getaddrinfo (nodename, servname, hints, res);
}
@@ -114,14 +153,13 @@ static int
use_win32_p (void)
{
static int done = 0;
- HMODULE h;
if (done)
return getaddrinfo_ptr ? 1 : 0;
done = 1;
- h = GetModuleHandle ("ws2_32.dll");
+ HMODULE h = GetModuleHandle ("ws2_32.dll");
if (h)
{
@@ -185,33 +223,6 @@ validate_family (int family)
return false;
}
-static bool
-is_numeric_host (const char *host, int family)
-{
-# if HAVE_IPV4
- if (family == PF_INET || family == PF_UNSPEC)
- {
- /* glibc supports IPv4 addresses in numbers-and-dots notation, that is,
- also hexadecimal and octal number formats and formats that don't
- require all four bytes to be explicitly written, via inet_aton().
- But POSIX doesn't require support for these legacy formats. Therefore
- we are free to use inet_pton() instead of inet_aton(). */
- struct in_addr addr;
- if (inet_pton (AF_INET, host, &addr))
- return true;
- }
-# endif
-# if HAVE_IPV6
- if (family == PF_INET6 || family == PF_UNSPEC)
- {
- struct in6_addr addr;
- if (inet_pton (AF_INET6, host, &addr))
- return true;
- }
-# endif
- return false;
-}
-
/* Translate name of a service location and/or a service name to set of
socket addresses. */
int
@@ -221,11 +232,6 @@ getaddrinfo (const char *restrict nodename,
struct addrinfo **restrict res)
#undef getaddrinfo
{
- struct addrinfo *tmp;
- int port = 0;
- struct hostent *he;
- void *storage;
- size_t size;
# if HAVE_IPV6
struct v6_pair {
struct addrinfo addrinfo;
@@ -281,6 +287,7 @@ getaddrinfo (const char *restrict nodename,
# endif
}
+ int port = 0;
if (servname)
{
struct servent *se = NULL;
@@ -306,10 +313,11 @@ getaddrinfo (const char *restrict nodename,
}
/* FIXME: Use gethostbyname_r if available. */
- he = gethostbyname (nodename);
+ struct hostent *he = gethostbyname (nodename);
if (!he || he->h_addr_list[0] == NULL)
return EAI_NONAME;
+ size_t size;
switch (he->h_addrtype)
{
# if HAVE_IPV6
@@ -328,10 +336,11 @@ getaddrinfo (const char *restrict nodename,
return EAI_NODATA;
}
- storage = calloc (1, size);
+ void *storage = calloc (1, size);
if (!storage)
return EAI_MEMORY;
+ struct addrinfo *tmp;
switch (he->h_addrtype)
{
# if HAVE_IPV6
@@ -446,9 +455,7 @@ freeaddrinfo (struct addrinfo *ai)
while (ai)
{
- struct addrinfo *cur;
-
- cur = ai;
+ struct addrinfo *cur = ai;
ai = ai->ai_next;
free (cur->ai_canonname);
diff --git a/gl/getdelim.c b/gl/getdelim.c
index 2576d376..21f3abc2 100644
--- a/gl/getdelim.c
+++ b/gl/getdelim.c
@@ -1,5 +1,5 @@
/* getdelim.c --- Implementation of replacement getdelim function.
- Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2025 Free Software
+ Copyright (C) 1994, 1996-1998, 2001, 2003, 2005-2026 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -62,10 +62,13 @@ alloc_failed (void)
ssize_t
getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
{
- ssize_t result;
- size_t cur_len = 0;
-
- if (lineptr == NULL || n == NULL || fp == NULL)
+ if (lineptr == NULL || n == NULL
+ /* glibc already declares this function as __nonnull ((4)).
+ Avoid a gcc warning "‘nonnull’ argument ‘fp’ compared to NULL". */
+#if !(__GLIBC__ >= 2)
+ || fp == NULL
+#endif
+ )
{
errno = EINVAL;
return -1;
@@ -73,6 +76,8 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
flockfile (fp);
+ ssize_t result;
+
if (*lineptr == NULL || *n == 0)
{
char *new_lineptr;
@@ -87,54 +92,56 @@ getdelim (char **lineptr, size_t *n, int delimiter, FILE *fp)
*lineptr = new_lineptr;
}
- for (;;)
- {
- int i;
-
- i = getc_maybe_unlocked (fp);
- if (i == EOF)
- {
- result = -1;
+ {
+ size_t cur_len = 0;
+ for (;;)
+ {
+ int i;
+
+ i = getc_maybe_unlocked (fp);
+ if (i == EOF)
+ {
+ result = -1;
+ break;
+ }
+
+ /* Make enough space for len+1 (for final NUL) bytes. */
+ if (cur_len + 1 >= *n)
+ {
+ size_t needed_max =
+ SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX;
+ size_t needed = 2 * *n + 1; /* Be generous. */
+
+ if (needed_max < needed)
+ needed = needed_max;
+ if (cur_len + 1 >= needed)
+ {
+ result = -1;
+ errno = EOVERFLOW;
+ goto unlock_return;
+ }
+
+ char *new_lineptr = (char *) realloc (*lineptr, needed);
+ if (new_lineptr == NULL)
+ {
+ alloc_failed ();
+ result = -1;
+ goto unlock_return;
+ }
+
+ *lineptr = new_lineptr;
+ *n = needed;
+ }
+
+ (*lineptr)[cur_len] = i;
+ cur_len++;
+
+ if (i == delimiter)
break;
- }
-
- /* Make enough space for len+1 (for final NUL) bytes. */
- if (cur_len + 1 >= *n)
- {
- size_t needed_max =
- SSIZE_MAX < SIZE_MAX ? (size_t) SSIZE_MAX + 1 : SIZE_MAX;
- size_t needed = 2 * *n + 1; /* Be generous. */
- char *new_lineptr;
-
- if (needed_max < needed)
- needed = needed_max;
- if (cur_len + 1 >= needed)
- {
- result = -1;
- errno = EOVERFLOW;
- goto unlock_return;
- }
-
- new_lineptr = (char *) realloc (*lineptr, needed);
- if (new_lineptr == NULL)
- {
- alloc_failed ();
- result = -1;
- goto unlock_return;
- }
-
- *lineptr = new_lineptr;
- *n = needed;
- }
-
- (*lineptr)[cur_len] = i;
- cur_len++;
-
- if (i == delimiter)
- break;
- }
- (*lineptr)[cur_len] = '\0';
- result = cur_len ? cur_len : result;
+ }
+ (*lineptr)[cur_len] = '\0';
+ result = cur_len ? cur_len : result;
+ }
unlock_return:
funlockfile (fp); /* doesn't set errno */
diff --git a/gl/getdtablesize.c b/gl/getdtablesize.c
index b98fbb70..cc823952 100644
--- a/gl/getdtablesize.c
+++ b/gl/getdtablesize.c
@@ -1,5 +1,5 @@
/* getdtablesize() function: Return maximum possible file descriptor value + 1.
- Copyright (C) 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2008-2026 Free Software Foundation, Inc.
Written by Bruno Haible , 2008.
This file is free software: you can redistribute it and/or modify
@@ -61,13 +61,10 @@ getdtablesize (void)
{
/* We are looking for the number N such that the valid file descriptors
are 0..N-1. It can be obtained through a loop as follows:
- {
- int fd;
- for (fd = 3; fd < 65536; fd++)
- if (dup2 (0, fd) == -1)
- break;
- return fd;
- }
+ for (int fd = 3; fd < 65536; fd++)
+ if (dup2 (0, fd) == -1)
+ break;
+ return fd;
On Windows XP, the result is 2048.
The drawback of this loop is that it allocates memory for a libc
internal array that is never freed.
diff --git a/gl/gethostname.c b/gl/gethostname.c
index 8f0ceafc..464bac39 100644
--- a/gl/gethostname.c
+++ b/gl/gethostname.c
@@ -1,6 +1,6 @@
/* gethostname emulation for SysV and POSIX.1.
- Copyright (C) 1992, 2003, 2006, 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 1992, 2003, 2006, 2008-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -89,12 +89,10 @@ gethostname (char *name, size_t len)
int
rpl_gethostname (char *name, size_t len)
{
- int r;
-
if (len > INT_MAX)
len = INT_MAX;
gl_sockets_startup (SOCKETS_1_1);
- r = gethostname (name, (int) len);
+ int r = gethostname (name, (int) len);
if (r < 0)
set_winsock_errno ();
diff --git a/gl/getline.c b/gl/getline.c
index 0921dd95..bbc8712d 100644
--- a/gl/getline.c
+++ b/gl/getline.c
@@ -1,5 +1,5 @@
/* getline.c --- Implementation of replacement getline function.
- Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/getloadavg.c b/gl/getloadavg.c
index 752ec1f5..73b2ee28 100644
--- a/gl/getloadavg.c
+++ b/gl/getloadavg.c
@@ -1,6 +1,6 @@
/* Get the system load averages.
- Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2025 Free Software
+ Copyright (C) 1985-1989, 1991-1995, 1997, 1999-2000, 2003-2026 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with gnulib.
@@ -140,21 +140,6 @@
# define SUNOS_5
# endif
-# if defined (__osf__) && defined (__alpha)
-# define OSF_ALPHA
-# include
-# include
-# include
-# include
-/* Tru64 4.0D's table.h redefines sys */
-# undef sys
-# endif
-
-# if defined (__osf__) && (defined (mips) || defined (__mips__))
-# define OSF_MIPS
-# include
-# endif
-
/* VAX C can't handle multi-line #ifs, or lines longer than 256 chars. */
# ifndef LOAD_AVE_TYPE
@@ -167,31 +152,16 @@
# define LOAD_AVE_TYPE long
# endif
-# ifdef sgi
-# define LOAD_AVE_TYPE long
-# endif
-
# ifdef SVR4
# define LOAD_AVE_TYPE long
# endif
-# ifdef OSF_ALPHA
-# define LOAD_AVE_TYPE long
-# endif
-
# if defined _AIX && ! defined HAVE_LIBPERFSTAT
# define LOAD_AVE_TYPE long
# endif
# endif /* No LOAD_AVE_TYPE. */
-# ifdef OSF_ALPHA
-/* defines an incorrect value for FSCALE on Alpha OSF/1,
- according to ghazi@noc.rutgers.edu. */
-# undef FSCALE
-# define FSCALE 1024.0
-# endif
-
# ifndef FSCALE
@@ -324,10 +294,6 @@
# endif
# endif /* NeXT */
-# ifdef sgi
-# include
-# endif /* sgi */
-
# ifdef UMAX
# include
# include
@@ -389,7 +355,7 @@ static bool getloadavg_initialized;
/* Offset in kmem to seek to read load average, or 0 means invalid. */
static long offset;
-# if ! defined __VMS && ! defined sgi && ! (defined __linux__ || defined __ANDROID__)
+# if ! defined __VMS && ! (defined __linux__ || defined __ANDROID__)
static struct nlist name_list[2];
# endif
@@ -418,51 +384,47 @@ getloadavg (double loadavg[], int nelem)
# if !defined (LDAV_DONE) && defined (HAVE_LIBKSTAT) /* Solaris <= 2.6 */
/* Use libkstat because we don't have to be root. */
# define LDAV_DONE
- kstat_ctl_t *kc;
- kstat_t *ksp;
- kstat_named_t *kn;
- int saved_errno;
-
- kc = kstat_open ();
- if (kc == NULL)
- return -1;
- ksp = kstat_lookup (kc, "unix", 0, "system_misc");
- if (ksp == NULL)
- return -1;
- if (kstat_read (kc, ksp, 0) == -1)
- return -1;
-
-
- kn = kstat_data_lookup (ksp, "avenrun_1min");
- if (kn == NULL)
- {
- /* Return -1 if no load average information is available. */
- nelem = 0;
- elem = -1;
- }
-
- if (nelem >= 1)
- loadavg[elem++] = (double) kn->value.ul / FSCALE;
-
- if (nelem >= 2)
- {
- kn = kstat_data_lookup (ksp, "avenrun_5min");
- if (kn != NULL)
- {
- loadavg[elem++] = (double) kn->value.ul / FSCALE;
+ {
+ kstat_ctl_t *kc = kstat_open ();
+ if (kc == NULL)
+ return -1;
+ kstat_t *ksp = kstat_lookup (kc, "unix", 0, "system_misc");
+ if (ksp == NULL)
+ return -1;
+ if (kstat_read (kc, ksp, 0) == -1)
+ return -1;
- if (nelem >= 3)
- {
- kn = kstat_data_lookup (ksp, "avenrun_15min");
- if (kn != NULL)
- loadavg[elem++] = (double) kn->value.ul / FSCALE;
- }
- }
- }
+ kstat_named_t *kn = kstat_data_lookup (ksp, "avenrun_1min");
+ if (kn == NULL)
+ {
+ /* Return -1 if no load average information is available. */
+ nelem = 0;
+ elem = -1;
+ }
+
+ if (nelem >= 1)
+ loadavg[elem++] = (double) kn->value.ul / FSCALE;
+
+ if (nelem >= 2)
+ {
+ kn = kstat_data_lookup (ksp, "avenrun_5min");
+ if (kn != NULL)
+ {
+ loadavg[elem++] = (double) kn->value.ul / FSCALE;
+
+ if (nelem >= 3)
+ {
+ kn = kstat_data_lookup (ksp, "avenrun_15min");
+ if (kn != NULL)
+ loadavg[elem++] = (double) kn->value.ul / FSCALE;
+ }
+ }
+ }
- saved_errno = errno;
- kstat_close (kc);
- errno = saved_errno;
+ int saved_errno = errno;
+ kstat_close (kc);
+ errno = saved_errno;
+ }
# endif /* HAVE_LIBKSTAT */
# if !defined (LDAV_DONE) && defined (hpux) && defined (HAVE_PSTAT_GETDYNAMIC)
@@ -523,13 +485,12 @@ getloadavg (double loadavg[], int nelem)
char ldavgbuf[3 * (INT_STRLEN_BOUND (int) + sizeof ".00 ")];
char const *ptr = ldavgbuf;
- int fd, count, saved_errno;
- fd = open ("/proc/loadavg", O_RDONLY | O_CLOEXEC);
+ int fd = open ("/proc/loadavg", O_RDONLY | O_CLOEXEC);
if (fd == -1)
return -1;
- count = read (fd, ldavgbuf, sizeof ldavgbuf - 1);
- saved_errno = errno;
+ int count = read (fd, ldavgbuf, sizeof ldavgbuf - 1);
+ int saved_errno = errno;
(void) close (fd);
errno = saved_errno;
if (count <= 0)
@@ -538,9 +499,6 @@ getloadavg (double loadavg[], int nelem)
for (elem = 0; elem < nelem; elem++)
{
- double numerator = 0;
- double denominator = 1;
-
while (*ptr == ' ')
ptr++;
@@ -556,6 +514,9 @@ getloadavg (double loadavg[], int nelem)
break;
}
+ double numerator = 0;
+ double denominator = 1;
+
while ('0' <= *ptr && *ptr <= '9')
numerator = 10 * numerator + (*ptr++ - '0');
@@ -578,24 +539,25 @@ getloadavg (double loadavg[], int nelem)
# define NETBSD_LDAV_FILE "/kern/loadavg"
# endif
- unsigned long int load_ave[3], scale;
- int count;
- char readbuf[4 * INT_BUFSIZE_BOUND (unsigned long int) + 1];
int fd = open (NETBSD_LDAV_FILE, O_RDONLY | O_CLOEXEC);
if (fd < 0)
return fd;
+
+ char readbuf[4 * INT_BUFSIZE_BOUND (unsigned long int) + 1];
int nread = read (fd, readbuf, sizeof readbuf - 1);
- int err = errno;
+ int saved_errno = errno;
close (fd);
if (nread < 0)
{
- errno = err;
+ errno = saved_errno;
return -1;
}
readbuf[nread] = '\0';
- count = sscanf (readbuf, "%lu %lu %lu %lu\n",
- &load_ave[0], &load_ave[1], &load_ave[2],
- &scale);
+
+ unsigned long int load_ave[3], scale;
+ int count = sscanf (readbuf, "%lu %lu %lu %lu\n",
+ &load_ave[0], &load_ave[1], &load_ave[2],
+ &scale);
if (count != 4)
{
errno = ENOTSUP;
@@ -613,10 +575,6 @@ getloadavg (double loadavg[], int nelem)
# define LDAV_DONE
/* The NeXT code was adapted from iscreen 3.2. */
- host_t host;
- struct processor_set_basic_info info;
- unsigned int info_count;
-
/* We only know how to get the 1-minute average for this system,
so even if the caller asks for more than 1, we only return 1. */
@@ -628,7 +586,9 @@ getloadavg (double loadavg[], int nelem)
if (getloadavg_initialized)
{
- info_count = PROCESSOR_SET_BASIC_INFO_COUNT;
+ host_t host;
+ struct processor_set_basic_info info;
+ unsigned int info_count = PROCESSOR_SET_BASIC_INFO_COUNT;
if (processor_set_info (default_set, PROCESSOR_SET_BASIC_INFO, &host,
(processor_set_info_t) &info, &info_count)
!= KERN_SUCCESS)
@@ -654,14 +614,9 @@ getloadavg (double loadavg[], int nelem)
can be gathered with inq_stats system calls.
We only know how to get the 1-minute average for this system. */
- struct proc_summary proc_sum_data;
- struct stat_descr proc_info;
- double load;
- register unsigned int i, j;
-
if (cpus == 0)
{
- register unsigned int c, i;
+ register unsigned int c;
struct cpu_config conf;
struct stat_descr desc;
@@ -675,7 +630,7 @@ getloadavg (double loadavg[], int nelem)
return -1;
c = 0;
- for (i = 0; i < conf.config_maxclass; ++i)
+ for (unsigned int i = 0; i < conf.config_maxclass; ++i)
{
struct class_stats stats;
memset (&stats, 0, sizeof stats);
@@ -694,6 +649,9 @@ getloadavg (double loadavg[], int nelem)
samples = cpus < 2 ? 3 : (2 * cpus / 3);
}
+ struct proc_summary proc_sum_data;
+
+ struct stat_descr proc_info;
proc_info.sd_next = 0;
proc_info.sd_subsys = SUBSYS_PROC;
proc_info.sd_type = PROCTYPE_SUMMARY;
@@ -704,9 +662,9 @@ getloadavg (double loadavg[], int nelem)
if (inq_stats (1, &proc_info) != 0)
return -1;
- load = proc_sum_data.ps_nrunnable;
- j = 0;
- for (i = samples - 1; i > 0; --i)
+ double load = proc_sum_data.ps_nrunnable;
+ register unsigned int j = 0;
+ for (unsigned int i = samples - 1; i > 0; --i)
{
load += proc_sum_data.ps_nrun[j];
if (j++ == PS_NRUNSIZE)
@@ -781,18 +739,6 @@ getloadavg (double loadavg[], int nelem)
}
# endif /* __MSDOS__ || WINDOWS32 */
-# if !defined (LDAV_DONE) && defined (OSF_ALPHA) /* OSF/1 */
-# define LDAV_DONE
-
- struct tbl_loadavg load_ave;
- table (TBL_LOADAVG, 0, &load_ave, 1, sizeof (load_ave));
- for (elem = 0; elem < nelem; elem++)
- loadavg[elem]
- = (load_ave.tl_lscale == 0
- ? load_ave.tl_avenrun.d[elem]
- : (load_ave.tl_avenrun.l[elem] / (double) load_ave.tl_lscale));
-# endif /* OSF_ALPHA */
-
# if ! defined LDAV_DONE && defined __VMS /* VMS */
/* VMS specific code -- read from the Load Ave driver. */
@@ -837,52 +783,44 @@ getloadavg (double loadavg[], int nelem)
# endif /* ! defined LDAV_DONE && defined __VMS */
# if ! defined LDAV_DONE && defined LOAD_AVE_TYPE && ! defined __VMS
- /* IRIX, other old systems */
+ /* other old systems */
/* UNIX-specific code -- read the average from /dev/kmem. */
# define LDAV_PRIVILEGED /* This code requires special installation. */
- LOAD_AVE_TYPE load_ave[3];
-
/* Get the address of LDAV_SYMBOL. */
if (offset == 0)
{
-# ifndef sgi
-# if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER
+# if ! defined NLIST_STRUCT || ! defined N_NAME_POINTER
strcpy (name_list[0].n_name, LDAV_SYMBOL);
strcpy (name_list[1].n_name, "");
-# else /* NLIST_STRUCT */
-# ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
+# else /* NLIST_STRUCT */
+# ifdef HAVE_STRUCT_NLIST_N_UN_N_NAME
name_list[0].n_un.n_name = LDAV_SYMBOL;
name_list[1].n_un.n_name = 0;
-# else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
+# else /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
name_list[0].n_name = LDAV_SYMBOL;
name_list[1].n_name = 0;
-# endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
-# endif /* NLIST_STRUCT */
+# endif /* not HAVE_STRUCT_NLIST_N_UN_N_NAME */
+# endif /* NLIST_STRUCT */
-# ifndef SUNOS_5
+# ifndef SUNOS_5
if (
-# if !defined (_AIX)
+# if !defined (_AIX)
nlist (KERNEL_FILE, name_list)
-# else /* _AIX */
+# else /* _AIX */
knlist (name_list, 1, sizeof (name_list[0]))
-# endif
+# endif
>= 0)
/* Omit "&& name_list[0].n_type != 0 " -- it breaks on Sun386i. */
{
-# ifdef FIXUP_KERNEL_SYMBOL_ADDR
+# ifdef FIXUP_KERNEL_SYMBOL_ADDR
FIXUP_KERNEL_SYMBOL_ADDR (name_list);
-# endif
+# endif
offset = name_list[0].n_value;
}
-# endif /* !SUNOS_5 */
-# else /* sgi */
- ptrdiff_t ldav_off = sysmp (MP_KERNADDR, MPKA_AVENRUN);
- if (ldav_off != -1)
- offset = (long int) ldav_off & 0x7fffffff;
-# endif /* sgi */
+# endif /* !SUNOS_5 */
}
/* Make sure we have /dev/kmem open. */
@@ -909,6 +847,8 @@ getloadavg (double loadavg[], int nelem)
# endif /* SUNOS_5 */
}
+ LOAD_AVE_TYPE load_ave[3];
+
/* If we can, get the load average values. */
if (offset && getloadavg_initialized)
{
diff --git a/gl/getopt-cdefs.in.h b/gl/getopt-cdefs.in.h
index 3a5d06be..57406947 100644
--- a/gl/getopt-cdefs.in.h
+++ b/gl/getopt-cdefs.in.h
@@ -1,5 +1,5 @@
/* getopt-on-non-glibc compatibility macros.
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gl/getopt-core.h b/gl/getopt-core.h
index 51ac213d..c815966f 100644
--- a/gl/getopt-core.h
+++ b/gl/getopt-core.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (basic, portable features only).
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/getopt-ext.h b/gl/getopt-ext.h
index 92b66a3b..c0784d96 100644
--- a/gl/getopt-ext.h
+++ b/gl/getopt-ext.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (GNU extensions).
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/getopt-pfx-core.h b/gl/getopt-pfx-core.h
index 7c5ea094..d7dd8788 100644
--- a/gl/getopt-pfx-core.h
+++ b/gl/getopt-pfx-core.h
@@ -1,5 +1,5 @@
/* getopt (basic, portable features) gnulib wrapper header.
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gl/getopt-pfx-ext.h b/gl/getopt-pfx-ext.h
index a61c68c7..db2e27f3 100644
--- a/gl/getopt-pfx-ext.h
+++ b/gl/getopt-pfx-ext.h
@@ -1,5 +1,5 @@
/* getopt (GNU extensions) gnulib wrapper header.
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gl/getopt.c b/gl/getopt.c
index 6b155e6c..406a406b 100644
--- a/gl/getopt.c
+++ b/gl/getopt.c
@@ -1,5 +1,5 @@
/* Getopt for GNU.
- Copyright (C) 1987-2025 Free Software Foundation, Inc.
+ Copyright (C) 1987-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
@@ -42,7 +42,7 @@
# define funlockfile(fp) _IO_funlockfile (fp)
#else
# include "gettext.h"
-# define _(msgid) dgettext ("gnulib", msgid)
+# define _(msgid) dgettext (GNULIB_TEXT_DOMAIN, msgid)
/* When used standalone, flockfile and funlockfile might not be
available. */
# if (!defined _POSIX_THREAD_SAFE_FUNCTIONS \
@@ -133,7 +133,6 @@ exchange (char **argv, struct _getopt_data *d)
int bottom = d->__first_nonopt;
int middle = d->__last_nonopt;
int top = d->optind;
- char *tem;
/* Exchange the shorter segment with the far end of the longer segment.
That puts the shorter segment into the right place.
@@ -151,7 +150,7 @@ exchange (char **argv, struct _getopt_data *d)
/* Swap it with the top part of the top segment. */
for (i = 0; i < len; i++)
{
- tem = argv[bottom + i];
+ char *tem = argv[bottom + i];
argv[bottom + i] = argv[top - (middle - bottom) + i];
argv[top - (middle - bottom) + i] = tem;
}
@@ -167,7 +166,7 @@ exchange (char **argv, struct _getopt_data *d)
/* Swap it with the bottom part of the bottom segment. */
for (i = 0; i < len; i++)
{
- tem = argv[bottom + i];
+ char *tem = argv[bottom + i];
argv[bottom + i] = argv[middle + i];
argv[middle + i] = tem;
}
@@ -196,28 +195,29 @@ process_long_option (int argc, char **argv, const char *optstring,
int long_only, struct _getopt_data *d,
int print_errors, const char *prefix)
{
- char *nameend;
- size_t namelen;
- const struct option *p;
- const struct option *pfound = NULL;
- int n_options;
- int option_index;
+ char *nameend;
for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
/* Do nothing. */ ;
- namelen = nameend - d->__nextchar;
+ size_t namelen = nameend - d->__nextchar;
/* First look for an exact match, counting the options as a side
effect. */
- for (p = longopts, n_options = 0; p->name; p++, n_options++)
- if (!strncmp (p->name, d->__nextchar, namelen)
- && namelen == strlen (p->name))
- {
- /* Exact match found. */
- pfound = p;
- option_index = n_options;
- break;
- }
+ const struct option *pfound = NULL;
+ int n_options;
+ int option_index;
+ {
+ const struct option *p;
+ for (p = longopts, n_options = 0; p->name; p++, n_options++)
+ if (!strncmp (p->name, d->__nextchar, namelen)
+ && namelen == strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ option_index = n_options;
+ break;
+ }
+ }
if (pfound == NULL)
{
@@ -227,6 +227,7 @@ process_long_option (int argc, char **argv, const char *optstring,
unsigned char ambig_fallback;
void *ambig_malloced = NULL;
int indfound = -1;
+ const struct option *p;
for (p = longopts, option_index = 0; p->name; p++, option_index++)
if (!strncmp (p->name, d->__nextchar, namelen))
@@ -475,11 +476,11 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
const struct option *longopts, int *longind,
int long_only, struct _getopt_data *d, int posixly_correct)
{
- int print_errors = d->opterr;
-
if (argc < 1)
return -1;
+ int print_errors = d->opterr;
+
d->optarg = NULL;
if (d->optind == 0 || !d->__initialized)
@@ -594,11 +595,10 @@ _getopt_internal_r (int argc, char **argv, const char *optstring,
if (long_only && (argv[d->optind][2]
|| !strchr (optstring, argv[d->optind][1])))
{
- int code;
d->__nextchar = argv[d->optind] + 1;
- code = process_long_option (argc, argv, optstring, longopts,
- longind, long_only, d,
- print_errors, "-");
+ int code = process_long_option (argc, argv, optstring, longopts,
+ longind, long_only, d,
+ print_errors, "-");
if (code != -1)
return code;
}
@@ -707,14 +707,12 @@ _getopt_internal (int argc, char **argv, const char *optstring,
const struct option *longopts, int *longind, int long_only,
int posixly_correct)
{
- int result;
-
getopt_data.optind = optind;
getopt_data.opterr = opterr;
- result = _getopt_internal_r (argc, argv, optstring, longopts,
- longind, long_only, &getopt_data,
- posixly_correct);
+ int result = _getopt_internal_r (argc, argv, optstring, longopts,
+ longind, long_only, &getopt_data,
+ posixly_correct);
optind = getopt_data.optind;
optarg = getopt_data.optarg;
@@ -751,14 +749,13 @@ GETOPT_ENTRY(getopt, 1)
int
main (int argc, char **argv)
{
- int c;
int digit_optind = 0;
while (1)
{
int this_option_optind = optind ? optind : 1;
- c = getopt (argc, argv, "abc:d:0123456789");
+ int c = getopt (argc, argv, "abc:d:0123456789");
if (c == -1)
break;
diff --git a/gl/getopt.in.h b/gl/getopt.in.h
index 4a87a2d5..e72a034b 100644
--- a/gl/getopt.in.h
+++ b/gl/getopt.in.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library, which supplies a different version of
diff --git a/gl/getopt1.c b/gl/getopt1.c
index c8566845..a5f99888 100644
--- a/gl/getopt1.c
+++ b/gl/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-2025 Free Software Foundation, Inc.
+ Copyright (C) 1987-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
@@ -73,7 +73,6 @@ _getopt_long_only_r (int argc, char **argv, const char *options,
int
main (int argc, char **argv)
{
- int c;
int digit_optind = 0;
while (1)
@@ -91,8 +90,8 @@ main (int argc, char **argv)
{0, 0, 0, 0}
};
- c = getopt_long (argc, argv, "abc:d:0123456789",
- long_options, &option_index);
+ int c = getopt_long (argc, argv, "abc:d:0123456789",
+ long_options, &option_index);
if (c == -1)
break;
diff --git a/gl/getopt_int.h b/gl/getopt_int.h
index 94c1945c..023d8a4f 100644
--- a/gl/getopt_int.h
+++ b/gl/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-2025 Free Software Foundation, Inc.
+ Copyright (C) 1989-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gl/getprogname.c b/gl/getprogname.c
index 4fe7c90d..8eec96c5 100644
--- a/gl/getprogname.c
+++ b/gl/getprogname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
@@ -42,14 +42,6 @@
# include
#endif
-#if defined __sgi || defined __osf__
-# include
-# include
-# include
-# include
-# include
-#endif
-
#if defined __SCO_VERSION__ || defined __sysv5__
# include
# include
@@ -137,7 +129,7 @@ getprogname (void)
else
p = cmd;
if (strlen (p) > PST_UCOMMLEN - 1
- && memcmp (p, ucomm, PST_UCOMMLEN - 1) == 0)
+ && memeq (p, ucomm, PST_UCOMMLEN - 1))
/* p is less truncated than ucomm. */
;
else
@@ -173,7 +165,7 @@ getprogname (void)
else
p = cmd;
if (strlen (p) > PST_UCOMMLEN - 1
- && memcmp (p, ucomm, PST_UCOMMLEN - 1) == 0)
+ && memeq (p, ucomm, PST_UCOMMLEN - 1))
/* p is less truncated than ucomm. */
;
else
@@ -196,7 +188,6 @@ getprogname (void)
if (first)
{
pid_t pid = getpid ();
- int token;
W_PSPROC buf;
first = 0;
memset (&buf, 0, sizeof(buf));
@@ -205,7 +196,8 @@ getprogname (void)
buf.ps_pathptr = (char *) malloc (buf.ps_pathlen = PS_PATHBLEN);
if (buf.ps_cmdptr && buf.ps_conttyptr && buf.ps_pathptr)
{
- for (token = 0; token >= 0;
+ for (int token = 0;
+ token >= 0;
token = w_getpsent (token, &buf, sizeof(buf)))
{
if (token > 0 && buf.ps_pid == pid)
@@ -234,60 +226,22 @@ getprogname (void)
free (buf.ps_pathptr);
}
return p;
-# elif defined __sgi || defined __osf__ /* IRIX or Tru64 */
- char filename[50];
- int fd;
-
- # if defined __sgi
- sprintf (filename, "/proc/pinfo/%d", (int) getpid ());
- # else
- sprintf (filename, "/proc/%d", (int) getpid ());
- # endif
- fd = open (filename, O_RDONLY | O_CLOEXEC);
- if (0 <= fd)
- {
- prpsinfo_t buf;
- int ioctl_ok = 0 <= ioctl (fd, PIOCPSINFO, &buf);
- close (fd);
- if (ioctl_ok)
- {
- char *name = buf.pr_fname;
- size_t namesize = sizeof buf.pr_fname;
- /* It may not be NUL-terminated. */
- char *namenul = memchr (name, '\0', namesize);
- size_t namelen = namenul ? namenul - name : namesize;
- char *namecopy = malloc (namelen + 1);
- if (namecopy)
- {
- namecopy[namelen] = '\0';
- return memcpy (namecopy, name, namelen);
- }
- }
- }
- return NULL;
# elif defined __SCO_VERSION__ || defined __sysv5__ /* SCO OpenServer6/UnixWare */
char buf[80];
- int fd;
sprintf (buf, "/proc/%d/cmdline", getpid());
- fd = open (buf, O_RDONLY);
+ int fd = open (buf, O_RDONLY);
if (0 <= fd)
{
size_t n = read (fd, buf, 79);
if (n > 0)
{
buf[n] = '\0'; /* Guarantee null-termination */
- char *progname;
- progname = strrchr (buf, '/');
+ char *progname = strrchr (buf, '/');
if (progname)
- {
- progname = progname + 1; /* Skip the '/' */
- }
+ progname = progname + 1; /* Skip the '/' */
else
- {
- progname = buf;
- }
- char *ret;
- ret = malloc (strlen (progname) + 1);
+ progname = buf;
+ char *ret = malloc (strlen (progname) + 1);
if (ret)
{
strcpy (ret, progname);
diff --git a/gl/getprogname.h b/gl/getprogname.h
index ee9bb286..3b5e502e 100644
--- a/gl/getprogname.h
+++ b/gl/getprogname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2025 Free Software Foundation, Inc.
+ Copyright (C) 2016-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
diff --git a/gl/gettext.h b/gl/gettext.h
index 0650abc9..0291cf09 100644
--- a/gl/gettext.h
+++ b/gl/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU .
- Copyright (C) 1995-2025 Free Software Foundation, Inc.
+ Copyright (C) 1995-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -298,12 +298,11 @@ dcpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
- int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcgettext (domain, msg_ctxt_id, category);
- found_translation = (translation != msg_ctxt_id);
+ int found_translation = (translation != msg_ctxt_id);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
@@ -346,12 +345,11 @@ dcnpgettext_expr (const char *domain,
if (msg_ctxt_id != NULL)
#endif
{
- int found_translation;
memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
msg_ctxt_id[msgctxt_len - 1] = '\004';
memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
- found_translation = !(translation == msg_ctxt_id || translation == msgid_plural);
+ int found_translation = !(translation == msg_ctxt_id || translation == msgid_plural);
#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
if (msg_ctxt_id != buf)
free (msg_ctxt_id);
diff --git a/gl/gl_openssl.h b/gl/gl_openssl.h
index dea70c1c..06fd8f66 100644
--- a/gl/gl_openssl.h
+++ b/gl/gl_openssl.h
@@ -1,6 +1,6 @@
/* Wrap openssl crypto hash routines in gnulib interface. -*- coding: utf-8 -*-
- Copyright (C) 2013-2025 Free Software Foundation, Inc.
+ Copyright (C) 2013-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -103,7 +103,7 @@ GL_OPENSSL_INLINE void *
GL_CRYPTO_FN (_read_ctx) (const struct _gl_ctx *ctx, void *restrict res)
{
/* Assume any unprocessed bytes in ctx are not to be ignored. */
- _gl_CTX tmp_ctx = *(_gl_CTX *) ctx;
+ _gl_CTX tmp_ctx = *(_gl_CTX const *) ctx;
OPENSSL_FN (_Final) ((unsigned char *) res, &tmp_ctx);
return res;
}
diff --git a/gl/glthread/lock.c b/gl/glthread/lock.c
index dace4fda..cfb9393c 100644
--- a/gl/glthread/lock.c
+++ b/gl/glthread/lock.c
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -255,15 +255,13 @@ glthread_recursive_lock_destroy (gl_recursive_lock_t *lock)
# if defined PTHREAD_RWLOCK_INITIALIZER || defined PTHREAD_RWLOCK_INITIALIZER_NP
# if !HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER
- /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */
+ /* glibc with bug https://sourceware.org/PR13701 */
int
glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock)
{
pthread_rwlockattr_t attributes;
- int err;
-
- err = pthread_rwlockattr_init (&attributes);
+ int err = pthread_rwlockattr_init (&attributes);
if (err != 0)
return err;
/* Note: PTHREAD_RWLOCK_PREFER_WRITER_NONRECURSIVE_NP is the only value that
@@ -286,9 +284,7 @@ glthread_rwlock_init_for_glibc (pthread_rwlock_t *lock)
int
glthread_rwlock_init_multithreaded (gl_rwlock_t *lock)
{
- int err;
-
- err = pthread_rwlock_init (&lock->rwlock, NULL);
+ int err = pthread_rwlock_init (&lock->rwlock, NULL);
if (err != 0)
return err;
lock->initialized = 1;
@@ -300,9 +296,7 @@ glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock)
{
if (!lock->initialized)
{
- int err;
-
- err = pthread_mutex_lock (&lock->guard);
+ int err = pthread_mutex_lock (&lock->guard);
if (err != 0)
return err;
if (!lock->initialized)
@@ -326,9 +320,7 @@ glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock)
{
if (!lock->initialized)
{
- int err;
-
- err = pthread_mutex_lock (&lock->guard);
+ int err = pthread_mutex_lock (&lock->guard);
if (err != 0)
return err;
if (!lock->initialized)
@@ -358,11 +350,9 @@ glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock)
int
glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock)
{
- int err;
-
if (!lock->initialized)
return EINVAL;
- err = pthread_rwlock_destroy (&lock->rwlock);
+ int err = pthread_rwlock_destroy (&lock->rwlock);
if (err != 0)
return err;
lock->initialized = 0;
@@ -376,9 +366,7 @@ glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock)
int
glthread_rwlock_init_multithreaded (gl_rwlock_t *lock)
{
- int err;
-
- err = pthread_mutex_init (&lock->lock, NULL);
+ int err = pthread_mutex_init (&lock->lock, NULL);
if (err != 0)
return err;
err = pthread_cond_init (&lock->waiting_readers, NULL);
@@ -395,9 +383,7 @@ glthread_rwlock_init_multithreaded (gl_rwlock_t *lock)
int
glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock)
{
- int err;
-
- err = pthread_mutex_lock (&lock->lock);
+ int err = pthread_mutex_lock (&lock->lock);
if (err != 0)
return err;
/* Test whether only readers are currently running, and whether the runcount
@@ -422,9 +408,7 @@ glthread_rwlock_rdlock_multithreaded (gl_rwlock_t *lock)
int
glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock)
{
- int err;
-
- err = pthread_mutex_lock (&lock->lock);
+ int err = pthread_mutex_lock (&lock->lock);
if (err != 0)
return err;
/* Test whether no readers or writers are currently running. */
@@ -449,9 +433,7 @@ glthread_rwlock_wrlock_multithreaded (gl_rwlock_t *lock)
int
glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock)
{
- int err;
-
- err = pthread_mutex_lock (&lock->lock);
+ int err = pthread_mutex_lock (&lock->lock);
if (err != 0)
return err;
if (lock->runcount < 0)
@@ -505,9 +487,7 @@ glthread_rwlock_unlock_multithreaded (gl_rwlock_t *lock)
int
glthread_rwlock_destroy_multithreaded (gl_rwlock_t *lock)
{
- int err;
-
- err = pthread_mutex_destroy (&lock->lock);
+ int err = pthread_mutex_destroy (&lock->lock);
if (err != 0)
return err;
err = pthread_cond_destroy (&lock->waiting_readers);
@@ -531,9 +511,7 @@ int
glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
{
pthread_mutexattr_t attributes;
- int err;
-
- err = pthread_mutexattr_init (&attributes);
+ int err = pthread_mutexattr_init (&attributes);
if (err != 0)
return err;
err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE);
@@ -560,9 +538,7 @@ int
glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
{
pthread_mutexattr_t attributes;
- int err;
-
- err = pthread_mutexattr_init (&attributes);
+ int err = pthread_mutexattr_init (&attributes);
if (err != 0)
return err;
err = pthread_mutexattr_settype (&attributes, PTHREAD_MUTEX_RECURSIVE);
@@ -589,9 +565,7 @@ glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock)
{
if (!lock->initialized)
{
- int err;
-
- err = pthread_mutex_lock (&lock->guard);
+ int err = pthread_mutex_lock (&lock->guard);
if (err != 0)
return err;
if (!lock->initialized)
@@ -621,11 +595,9 @@ glthread_recursive_lock_unlock_multithreaded (gl_recursive_lock_t *lock)
int
glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
{
- int err;
-
if (!lock->initialized)
return EINVAL;
- err = pthread_mutex_destroy (&lock->recmutex);
+ int err = pthread_mutex_destroy (&lock->recmutex);
if (err != 0)
return err;
lock->initialized = 0;
@@ -639,9 +611,7 @@ glthread_recursive_lock_destroy_multithreaded (gl_recursive_lock_t *lock)
int
glthread_recursive_lock_init_multithreaded (gl_recursive_lock_t *lock)
{
- int err;
-
- err = pthread_mutex_init (&lock->mutex, NULL);
+ int err = pthread_mutex_init (&lock->mutex, NULL);
if (err != 0)
return err;
lock->owner = (pthread_t) 0;
@@ -655,9 +625,7 @@ glthread_recursive_lock_lock_multithreaded (gl_recursive_lock_t *lock)
pthread_t self = pthread_self ();
if (lock->owner != self)
{
- int err;
-
- err = pthread_mutex_lock (&lock->mutex);
+ int err = pthread_mutex_lock (&lock->mutex);
if (err != 0)
return err;
lock->owner = self;
diff --git a/gl/glthread/lock.h b/gl/glthread/lock.h
index d6ccc202..d8190b6c 100644
--- a/gl/glthread/lock.h
+++ b/gl/glthread/lock.h
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -239,7 +239,7 @@ typedef pthread_rwlock_t gl_rwlock_t;
# endif
# define glthread_rwlock_init(LOCK) \
(pthread_in_use () ? pthread_rwlock_init (LOCK, NULL) : 0)
-# else /* glibc with bug https://sourceware.org/bugzilla/show_bug.cgi?id=13701 */
+# else /* glibc with bug https://sourceware.org/PR13701 */
# define gl_rwlock_initializer \
PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP
# define glthread_rwlock_init(LOCK) \
diff --git a/gl/glthread/once.c b/gl/glthread/once.c
index 53211af8..b72a4a20 100644
--- a/gl/glthread/once.c
+++ b/gl/glthread/once.c
@@ -1,5 +1,5 @@
/* Once-only initialization in multithreaded situations.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/glthread/once.h b/gl/glthread/once.h
index 943bd7a2..b6d9ab40 100644
--- a/gl/glthread/once.h
+++ b/gl/glthread/once.h
@@ -1,5 +1,5 @@
/* Once-only initialization in multithreaded situations.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/glthread/threadlib.c b/gl/glthread/threadlib.c
index a6f7688b..5c0ba1f4 100644
--- a/gl/glthread/threadlib.c
+++ b/gl/glthread/threadlib.c
@@ -1,5 +1,5 @@
/* Multithreading primitives.
- Copyright (C) 2005-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/hard-locale.c b/gl/hard-locale.c
index 767906d1..6a3dad4f 100644
--- a/gl/hard-locale.c
+++ b/gl/hard-locale.c
@@ -1,6 +1,6 @@
/* hard-locale.c -- Determine whether a locale is hard.
- Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2025 Free Software
+ Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2026 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
@@ -32,7 +32,7 @@ hard_locale (int category)
if (setlocale_null_r (category, locale, sizeof (locale)))
return false;
- if (!(strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0))
+ if (!(streq (locale, "C") || streq (locale, "POSIX")))
return true;
#if defined __ANDROID__
diff --git a/gl/hard-locale.h b/gl/hard-locale.h
index 29808da6..b8d7029d 100644
--- a/gl/hard-locale.h
+++ b/gl/hard-locale.h
@@ -1,6 +1,6 @@
/* Determine whether a locale is hard.
- Copyright (C) 1999, 2003-2004, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003-2004, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/ialloc.c b/gl/ialloc.c
index 881c8f04..38ec1d05 100644
--- a/gl/ialloc.c
+++ b/gl/ialloc.c
@@ -1,6 +1,6 @@
/* malloc with idx_t rather than size_t
- Copyright 2021-2025 Free Software Foundation, Inc.
+ Copyright 2021-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -15,7 +15,6 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see . */
-#include
-
#define IALLOC_INLINE _GL_EXTERN_INLINE
+#include
#include "ialloc.h"
diff --git a/gl/ialloc.h b/gl/ialloc.h
index 8bf5dd12..97b0e0c5 100644
--- a/gl/ialloc.h
+++ b/gl/ialloc.h
@@ -1,6 +1,6 @@
/* ialloc.h -- malloc with idx_t rather than size_t
- Copyright 2021-2025 Free Software Foundation, Inc.
+ Copyright 2021-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/idpriv-droptemp.c b/gl/idpriv-droptemp.c
index ecaab836..993d25b6 100644
--- a/gl/idpriv-droptemp.c
+++ b/gl/idpriv-droptemp.c
@@ -1,5 +1,5 @@
/* Dropping uid/gid privileges of the current process temporarily.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ idpriv_temp_drop (void)
# if HAVE_SETRESGID /* glibc, FreeBSD, OpenBSD, HP-UX */
if (setresgid (-1, gid, saved_gid) < 0)
return -1;
-# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, Solaris >= 2.5, Cygwin */
if (setregid (-1, gid) < 0)
return -1;
# endif
@@ -64,7 +64,7 @@ idpriv_temp_drop (void)
figure 14. */
if (setresuid (-1, uid, saved_uid) < 0)
return -1;
-# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, Solaris >= 2.5, Cygwin */
if (setreuid (-1, uid) < 0)
return -1;
# endif
@@ -142,7 +142,7 @@ idpriv_temp_restore (void)
figure 14. */
if (setresuid (-1, saved_uid, -1) < 0)
return -1;
-# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, Solaris >= 2.5, Cygwin */
if (setreuid (-1, saved_uid) < 0)
return -1;
# endif
@@ -151,7 +151,7 @@ idpriv_temp_restore (void)
# if HAVE_SETRESGID /* glibc, FreeBSD, OpenBSD, HP-UX */
if (setresgid (-1, saved_gid, -1) < 0)
return -1;
-# else /* Mac OS X, NetBSD, AIX, IRIX, Solaris >= 2.5, OSF/1, Cygwin */
+# else /* Mac OS X, NetBSD, AIX, Solaris >= 2.5, Cygwin */
if (setregid (-1, saved_gid) < 0)
return -1;
# endif
diff --git a/gl/idpriv.h b/gl/idpriv.h
index f4f8158e..8fa6c0e6 100644
--- a/gl/idpriv.h
+++ b/gl/idpriv.h
@@ -1,5 +1,5 @@
/* Dropping uid/gid privileges of the current process.
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gl/idx.h b/gl/idx.h
index 639b6cf0..deb7dc4c 100644
--- a/gl/idx.h
+++ b/gl/idx.h
@@ -1,5 +1,5 @@
/* A type for indices and sizes.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/inet_ntop.c b/gl/inet_ntop.c
index df3d9512..599ca4fb 100644
--- a/gl/inet_ntop.c
+++ b/gl/inet_ntop.c
@@ -1,6 +1,6 @@
/* inet_ntop.c -- convert IPv4 and IPv6 addresses from binary to text form
- Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2008-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -125,9 +125,7 @@ static const char *
inet_ntop4 (const unsigned char *src, char *dst, socklen_t size)
{
char tmp[sizeof "255.255.255.255"];
- int len;
-
- len = sprintf (tmp, "%u.%u.%u.%u", src[0], src[1], src[2], src[3]);
+ int len = sprintf (tmp, "%u.%u.%u.%u", src[0], src[1], src[2], src[3]);
if (len < 0)
return NULL;
@@ -151,34 +149,26 @@ inet_ntop4 (const unsigned char *src, char *dst, socklen_t size)
static const char *
inet_ntop6 (const unsigned char *src, char *dst, socklen_t size)
{
- /*
- * Note that int32_t and int16_t need only be "at least" large enough
- * to contain a value of the specified size. On some systems, like
- * Crays, there is no such thing as an integer variable with 16 bits.
- * Keep this in mind if you think this function should have been coded
- * to use pointer overlays. All the world's not a VAX.
- */
- char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
- struct
- {
- int base, len;
- } best, cur;
- unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ];
- int i;
-
/*
* Preprocess:
* Copy the input (bytewise) array into a wordwise array.
* Find the longest run of 0x00's in src[] for :: shorthanding.
*/
+ unsigned int words[NS_IN6ADDRSZ / NS_INT16SZ];
memset (words, '\0', sizeof words);
- for (i = 0; i < NS_IN6ADDRSZ; i += 2)
+ for (int i = 0; i < NS_IN6ADDRSZ; i += 2)
words[i / 2] = (src[i] << 8) | src[i + 1];
+
+ struct
+ {
+ int base, len;
+ } best, cur;
best.base = -1;
cur.base = -1;
IF_LINT(best.len = 0);
IF_LINT(cur.len = 0);
- for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++)
+
+ for (int i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++)
{
if (words[i] == 0)
{
@@ -208,8 +198,16 @@ inet_ntop6 (const unsigned char *src, char *dst, socklen_t size)
/*
* Format the result.
*/
- tp = tmp;
- for (i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++)
+ /*
+ * Note that int32_t and int16_t need only be "at least" large enough
+ * to contain a value of the specified size. On some systems, like
+ * Crays, there is no such thing as an integer variable with 16 bits.
+ * Keep this in mind if you think this function should have been coded
+ * to use pointer overlays. All the world's not a VAX.
+ */
+ char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"];
+ char *tp = tmp;
+ for (int i = 0; i < (NS_IN6ADDRSZ / NS_INT16SZ); i++)
{
/* Are we inside the best run of 0x00's? */
if (best.base != -1 && i >= best.base && i < (best.base + best.len))
diff --git a/gl/inet_pton.c b/gl/inet_pton.c
index 74d55c43..1e75c8c5 100644
--- a/gl/inet_pton.c
+++ b/gl/inet_pton.c
@@ -1,6 +1,6 @@
/* inet_pton.c -- convert IPv4 and IPv6 addresses from text to binary form
- Copyright (C) 2006, 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2008-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -112,43 +112,44 @@ inet_pton (int af, const char *restrict src, void *restrict dst)
static int
inet_pton4 (const char *restrict src, unsigned char *restrict dst)
{
- int saw_digit, octets, ch;
- unsigned char tmp[NS_INADDRSZ], *tp;
+ unsigned char tmp[NS_INADDRSZ];
- saw_digit = 0;
- octets = 0;
- *(tp = tmp) = 0;
- while ((ch = *src++) != '\0')
- {
-
- if (ch >= '0' && ch <= '9')
- {
- unsigned new = *tp * 10 + (ch - '0');
-
- if (saw_digit && *tp == 0)
- return (0);
- if (new > 255)
- return (0);
- *tp = new;
- if (!saw_digit)
- {
- if (++octets > 4)
- return (0);
- saw_digit = 1;
- }
- }
- else if (ch == '.' && saw_digit)
- {
- if (octets == 4)
- return (0);
- *++tp = 0;
- saw_digit = 0;
- }
- else
- return (0);
- }
- if (octets < 4)
- return (0);
+ {
+ int saw_digit = 0;
+ int octets = 0;
+ unsigned char *tp = tmp;
+ *tp = 0;
+ int ch;
+ while ((ch = *src++) != '\0')
+ {
+ if (ch >= '0' && ch <= '9')
+ {
+ if (saw_digit && *tp == 0)
+ return (0);
+ unsigned new = *tp * 10 + (ch - '0');
+ if (new > 255)
+ return (0);
+ *tp = new;
+ if (!saw_digit)
+ {
+ if (++octets > 4)
+ return (0);
+ saw_digit = 1;
+ }
+ }
+ else if (ch == '.' && saw_digit)
+ {
+ if (octets == 4)
+ return (0);
+ *++tp = 0;
+ saw_digit = 0;
+ }
+ else
+ return (0);
+ }
+ if (octets < 4)
+ return (0);
+ }
memcpy (dst, tmp, NS_INADDRSZ);
return (1);
}
@@ -172,93 +173,89 @@ static int
inet_pton6 (const char *restrict src, unsigned char *restrict dst)
{
static const char xdigits[] = "0123456789abcdef";
- unsigned char tmp[NS_IN6ADDRSZ], *tp, *endp, *colonp;
- const char *curtok;
- int ch, saw_xdigit;
- unsigned val;
+ unsigned char tmp[NS_IN6ADDRSZ];
- tp = memset (tmp, '\0', NS_IN6ADDRSZ);
- endp = tp + NS_IN6ADDRSZ;
- colonp = NULL;
/* Leading :: requires some special handling. */
if (*src == ':')
if (*++src != ':')
return (0);
- curtok = src;
- saw_xdigit = 0;
- val = 0;
- while ((ch = c_tolower (*src++)) != '\0')
- {
- const char *pch;
- pch = strchr (xdigits, ch);
- if (pch != NULL)
- {
- val <<= 4;
- val |= (pch - xdigits);
- if (val > 0xffff)
- return (0);
- saw_xdigit = 1;
- continue;
- }
- if (ch == ':')
- {
- curtok = src;
- if (!saw_xdigit)
- {
- if (colonp)
- return (0);
- colonp = tp;
- continue;
- }
- else if (*src == '\0')
- {
+ {
+ unsigned char *tp = memset (tmp, '\0', NS_IN6ADDRSZ);
+ unsigned char *endp = tp + NS_IN6ADDRSZ;
+ unsigned char *colonp = NULL;
+ const char *curtok = src;
+ int saw_xdigit = 0;
+ unsigned int val = 0;
+ int ch;
+ while ((ch = c_tolower (*src++)) != '\0')
+ {
+ const char *pch = strchr (xdigits, ch);
+ if (pch != NULL)
+ {
+ val <<= 4;
+ val |= (pch - xdigits);
+ if (val > 0xffff)
return (0);
- }
- if (tp + NS_INT16SZ > endp)
- return (0);
- *tp++ = (unsigned char) (val >> 8) & 0xff;
- *tp++ = (unsigned char) val & 0xff;
- saw_xdigit = 0;
- val = 0;
- continue;
- }
- if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
- inet_pton4 (curtok, tp) > 0)
- {
- tp += NS_INADDRSZ;
- saw_xdigit = 0;
- break; /* '\0' was seen by inet_pton4(). */
- }
+ saw_xdigit = 1;
+ }
+ else if (ch == ':')
+ {
+ curtok = src;
+ if (!saw_xdigit)
+ {
+ if (colonp)
+ return (0);
+ colonp = tp;
+ }
+ else if (*src == '\0')
+ return (0);
+ else if (tp + NS_INT16SZ > endp)
+ return (0);
+ else
+ {
+ *tp++ = (unsigned char) (val >> 8) & 0xff;
+ *tp++ = (unsigned char) val & 0xff;
+ saw_xdigit = 0;
+ val = 0;
+ }
+ }
+ else if (ch == '.' && ((tp + NS_INADDRSZ) <= endp) &&
+ inet_pton4 (curtok, tp) > 0)
+ {
+ tp += NS_INADDRSZ;
+ saw_xdigit = 0;
+ break; /* '\0' was seen by inet_pton4(). */
+ }
+ else
+ return (0);
+ }
+ if (saw_xdigit)
+ {
+ if (tp + NS_INT16SZ > endp)
+ return (0);
+ *tp++ = (unsigned char) (val >> 8) & 0xff;
+ *tp++ = (unsigned char) val & 0xff;
+ }
+ if (colonp != NULL)
+ {
+ if (tp == endp)
+ return (0);
+ /*
+ * Since some memmove()'s erroneously fail to handle
+ * overlapping regions, we'll do the shift by hand.
+ */
+ const int n = tp - colonp;
+ for (int i = 1; i <= n; i++)
+ {
+ endp[-i] = colonp[n - i];
+ colonp[n - i] = 0;
+ }
+ tp = endp;
+ }
+ if (tp != endp)
return (0);
- }
- if (saw_xdigit)
- {
- if (tp + NS_INT16SZ > endp)
- return (0);
- *tp++ = (unsigned char) (val >> 8) & 0xff;
- *tp++ = (unsigned char) val & 0xff;
- }
- if (colonp != NULL)
- {
- /*
- * Since some memmove()'s erroneously fail to handle
- * overlapping regions, we'll do the shift by hand.
- */
- const int n = tp - colonp;
- int i;
-
- if (tp == endp)
- return (0);
- for (i = 1; i <= n; i++)
- {
- endp[-i] = colonp[n - i];
- colonp[n - i] = 0;
- }
- tp = endp;
- }
- if (tp != endp)
- return (0);
+ }
memcpy (dst, tmp, NS_IN6ADDRSZ);
return (1);
}
diff --git a/gl/intprops-internal.h b/gl/intprops-internal.h
index 7ace0cdd..0df385b9 100644
--- a/gl/intprops-internal.h
+++ b/gl/intprops-internal.h
@@ -1,6 +1,6 @@
/* intprops-internal.h -- properties of integer types not visible to users
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
@@ -29,10 +29,6 @@
Do not evaluate E. */
#define _GL_INT_CONVERT(e, v) ((1 ? 0 : (e)) + (v))
-/* Act like _GL_INT_CONVERT (E, -V) but work around a bug in IRIX 6.5 cc; see
- . */
-#define _GL_INT_NEGATE_CONVERT(e, v) ((1 ? 0 : (e)) - (v))
-
/* The extra casts in the following macros work around compiler bugs,
e.g., in Cray C 5.0.3.0. */
@@ -41,7 +37,7 @@
/* Return 1 if the real expression E, after promotion, has a
signed or floating type. Do not evaluate E. */
-#define _GL_EXPR_SIGNED(e) (_GL_INT_NEGATE_CONVERT (e, 1) < 0)
+#define _GL_EXPR_SIGNED(e) (_GL_INT_CONVERT (e, -1) < 0)
/* Minimum and maximum values for integer types and expressions. */
@@ -60,7 +56,7 @@
#define _GL_INT_MAXIMUM(e) \
(_GL_EXPR_SIGNED (e) \
? _GL_SIGNED_INT_MAXIMUM (e) \
- : _GL_INT_NEGATE_CONVERT (e, 1))
+ : _GL_INT_CONVERT (e, -1))
#define _GL_SIGNED_INT_MAXIMUM(e) \
(((_GL_INT_CONVERT (e, 1) << (_GL_TYPE_WIDTH (+ (e)) - 2)) - 1) * 2 + 1)
@@ -112,7 +108,7 @@
#elif defined __has_builtin
# define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow)
/* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x,
- see . */
+ see . */
#elif 7 <= __GNUC__
# define _GL_HAS_BUILTIN_ADD_OVERFLOW 1
#else
@@ -184,7 +180,7 @@
#endif
/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25764. See:
- https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
+ https://gcc.gnu.org/PR68193
https://github.com/llvm/llvm-project/issues/25764
For now, assume GCC < 14 and all Clang versions generate bogus
warnings for _Generic. This matters only for compilers that
diff --git a/gl/intprops.h b/gl/intprops.h
index 2f9fa0a0..924b6f9a 100644
--- a/gl/intprops.h
+++ b/gl/intprops.h
@@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001-2026 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
@@ -205,11 +205,11 @@
|| INT_MULTIPLY_RANGE_OVERFLOW (a, b, min, max))
#endif
#define _GL_DIVIDE_OVERFLOW(a, b, min, max) \
- ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
+ ((min) < 0 ? (b) == _GL_INT_CONVERT (min, -1) && (a) < - (max) \
: (a) < 0 ? (b) <= (a) + (b) - 1 \
: (b) < 0 && (a) + (b) <= (a))
#define _GL_REMAINDER_OVERFLOW(a, b, min, max) \
- ((min) < 0 ? (b) == _GL_INT_NEGATE_CONVERT (min, 1) && (a) < - (max) \
+ ((min) < 0 ? (b) == _GL_INT_CONVERT (min, -1) && (a) < - (max) \
: (a) < 0 ? (a) % (b) != ((max) - (b) + 1) % (b) \
: (b) < 0 && ! _GL_UNSIGNED_NEG_MULTIPLE (a, b, max))
diff --git a/gl/inttypes.in.h b/gl/inttypes.in.h
index 5520ebc5..cbe5a6f0 100644
--- a/gl/inttypes.in.h
+++ b/gl/inttypes.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2026 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
@@ -925,7 +925,6 @@ _GL_CXXALIAS_SYS (imaxabs, intmax_t, (intmax_t x));
_GL_CXXALIASWARN (imaxabs);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef imaxabs
# if HAVE_RAW_DECL_IMAXABS
_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
"use gnulib module imaxabs for portability");
@@ -956,7 +955,6 @@ _GL_CXXALIAS_SYS (imaxdiv, imaxdiv_t, (intmax_t numer, intmax_t denom));
_GL_CXXALIASWARN (imaxdiv);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef imaxdiv
# if HAVE_RAW_DECL_IMAXDIV
_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
"use gnulib module imaxdiv for portability");
@@ -986,7 +984,6 @@ _GL_CXXALIAS_SYS (strtoimax, intmax_t,
# endif
_GL_CXXALIASWARN (strtoimax);
#elif defined GNULIB_POSIXCHECK
-# undef strtoimax
# if HAVE_RAW_DECL_STRTOIMAX
_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
"use gnulib module strtoimax for portability");
@@ -1016,7 +1013,6 @@ _GL_CXXALIAS_SYS (strtoumax, uintmax_t,
# endif
_GL_CXXALIASWARN (strtoumax);
#elif defined GNULIB_POSIXCHECK
-# undef strtoumax
# if HAVE_RAW_DECL_STRTOUMAX
_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
"use gnulib module strtoumax for portability");
diff --git a/gl/iswblank.c b/gl/iswblank.c
index 6e361f43..c09f33bd 100644
--- a/gl/iswblank.c
+++ b/gl/iswblank.c
@@ -1,5 +1,5 @@
/* Test wide character for being blank.
- Copyright (C) 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2008-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/iswctype-impl.h b/gl/iswctype-impl.h
index c87e00ff..34d84b19 100644
--- a/gl/iswctype-impl.h
+++ b/gl/iswctype-impl.h
@@ -1,5 +1,5 @@
/* Test whether a wide character has a given property.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
Written by Bruno Haible , 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/iswctype.c b/gl/iswctype.c
index 576e93e4..97a60032 100644
--- a/gl/iswctype.c
+++ b/gl/iswctype.c
@@ -1,5 +1,5 @@
/* Test whether a wide character has a given property.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
Written by Bruno Haible , 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/iswdigit.c b/gl/iswdigit.c
index 6bba487b..65616822 100644
--- a/gl/iswdigit.c
+++ b/gl/iswdigit.c
@@ -1,5 +1,5 @@
/* Test wide character for being a digit.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/iswpunct.c b/gl/iswpunct.c
index 2b9258a9..5308ddae 100644
--- a/gl/iswpunct.c
+++ b/gl/iswpunct.c
@@ -1,5 +1,5 @@
/* Test wide character for being a punctuation or symbol character.
- Copyright (C) 2023-2025 Free Software Foundation, Inc.
+ Copyright (C) 2023-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/iswxdigit.c b/gl/iswxdigit.c
index e154ac80..7db2f676 100644
--- a/gl/iswxdigit.c
+++ b/gl/iswxdigit.c
@@ -1,5 +1,5 @@
/* Test wide character for being a hexadecimal digit.
- Copyright (C) 2020-2025 Free Software Foundation, Inc.
+ Copyright (C) 2020-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/itold.c b/gl/itold.c
index 084eba23..d240fb7e 100644
--- a/gl/itold.c
+++ b/gl/itold.c
@@ -1,5 +1,5 @@
/* Replacement for 'int' to 'long double' conversion routine.
- Copyright (C) 2011-2025 Free Software Foundation, Inc.
+ Copyright (C) 2011-2026 Free Software Foundation, Inc.
Written by Bruno Haible , 2011.
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 e16c95b3..4b3f9b5b 100644
--- a/gl/langinfo.in.h
+++ b/gl/langinfo.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around .
- Copyright (C) 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -162,11 +162,6 @@ typedef int nl_item;
# define GNULIB_defined_CODESET 1
# endif
-# if !@HAVE_LANGINFO_T_FMT_AMPM@
-# define T_FMT_AMPM 10006
-# define GNULIB_defined_T_FMT_AMPM 1
-# endif
-
# if !@HAVE_LANGINFO_ALTMON@
# define ALTMON_1 10200
# define ALTMON_2 (ALTMON_1 + 1)
@@ -223,12 +218,6 @@ typedef int nl_item;
# define GNULIB_defined_ERA 1
# endif
-# if !@HAVE_LANGINFO_YESEXPR@
-# define YESEXPR 10053
-# define NOEXPR 10054
-# define GNULIB_defined_YESEXPR 1
-# endif
-
#endif
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -260,7 +249,6 @@ _GL_CXXALIAS_SYS (nl_langinfo, char *, (nl_item item));
_GL_CXXALIASWARN (nl_langinfo);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef nl_langinfo
# if HAVE_RAW_DECL_NL_LANGINFO
_GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
"use gnulib module nl_langinfo for portability");
diff --git a/gl/lc-charset-dispatch.c b/gl/lc-charset-dispatch.c
index 91ab6d72..53a9b2cd 100644
--- a/gl/lc-charset-dispatch.c
+++ b/gl/lc-charset-dispatch.c
@@ -1,5 +1,5 @@
/* Dispatching based on the current locale's character encoding.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lc-charset-dispatch.h b/gl/lc-charset-dispatch.h
index 554137b6..665da408 100644
--- a/gl/lc-charset-dispatch.h
+++ b/gl/lc-charset-dispatch.h
@@ -1,5 +1,5 @@
/* Dispatching based on the current locale's character encoding.
- Copyright (C) 2018-2025 Free Software Foundation, Inc.
+ Copyright (C) 2018-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/libc-config.h b/gl/libc-config.h
index 33da9cf1..e5102aa9 100644
--- a/gl/libc-config.h
+++ b/gl/libc-config.h
@@ -1,6 +1,6 @@
/* System definitions for code taken from the GNU C Library
- Copyright 2017-2025 Free Software Foundation, Inc.
+ Copyright 2017-2026 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/gl/limits.in.h b/gl/limits.in.h
index c33c59e1..66bd63ee 100644
--- a/gl/limits.in.h
+++ b/gl/limits.in.h
@@ -1,6 +1,6 @@
/* A GNU-like .
- Copyright 2016-2025 Free Software Foundation, Inc.
+ Copyright 2016-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -47,7 +47,7 @@
#ifndef LLONG_MIN
# if defined LONG_LONG_MIN /* HP-UX 11.31 */
# define LLONG_MIN LONG_LONG_MIN
-# elif defined LONGLONG_MIN /* IRIX 6.5 */
+# elif defined LONGLONG_MIN /* AIX, BeOS */
# define LLONG_MIN LONGLONG_MIN
# elif defined __GNUC__
# define LLONG_MIN (- __LONG_LONG_MAX__ - 1LL)
@@ -56,7 +56,7 @@
#ifndef LLONG_MAX
# if defined LONG_LONG_MAX /* HP-UX 11.31 */
# define LLONG_MAX LONG_LONG_MAX
-# elif defined LONGLONG_MAX /* IRIX 6.5 */
+# elif defined LONGLONG_MAX /* AIX, BeOS */
# define LLONG_MAX LONGLONG_MAX
# elif defined __GNUC__
# define LLONG_MAX __LONG_LONG_MAX__
@@ -65,7 +65,7 @@
#ifndef ULLONG_MAX
# if defined ULONG_LONG_MAX /* HP-UX 11.31 */
# define ULLONG_MAX ULONG_LONG_MAX
-# elif defined ULONGLONG_MAX /* IRIX 6.5 */
+# elif defined ULONGLONG_MAX /* AIX, BeOS */
# define ULLONG_MAX ULONGLONG_MAX
# elif defined __GNUC__
# define ULLONG_MAX (__LONG_LONG_MAX__ * 2ULL + 1ULL)
diff --git a/gl/localcharset.c b/gl/localcharset.c
index 32f6f78e..22dc38d3 100644
--- a/gl/localcharset.c
+++ b/gl/localcharset.c
@@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -279,45 +279,6 @@ static const struct table_entry alias_table[] =
{ "utf8", "UTF-8" }
# define alias_table_defined
# endif
-# if defined __sgi /* IRIX */
- { "ISO8859-1", "ISO-8859-1" },
- { "ISO8859-15", "ISO-8859-15" },
- { "ISO8859-2", "ISO-8859-2" },
- { "ISO8859-5", "ISO-8859-5" },
- { "ISO8859-7", "ISO-8859-7" },
- { "ISO8859-9", "ISO-8859-9" },
- { "eucCN", "GB2312" },
- { "eucJP", "EUC-JP" },
- { "eucKR", "EUC-KR" },
- { "eucTW", "EUC-TW" }
-# define alias_table_defined
-# endif
-# if defined __osf__ /* OSF/1 */
- /*{ "GBK", "GBK" },*/
- { "ISO8859-1", "ISO-8859-1" },
- { "ISO8859-15", "ISO-8859-15" },
- { "ISO8859-2", "ISO-8859-2" },
- { "ISO8859-4", "ISO-8859-4" },
- { "ISO8859-5", "ISO-8859-5" },
- { "ISO8859-7", "ISO-8859-7" },
- { "ISO8859-8", "ISO-8859-8" },
- { "ISO8859-9", "ISO-8859-9" },
- { "KSC5601", "CP949" },
- { "SJIS", "SHIFT_JIS" },
- { "TACTIS", "TIS-620" },
- /*{ "UTF-8", "UTF-8" },*/
- { "big5", "BIG5" },
- { "cp850", "CP850" },
- { "dechanyu", "DEC-HANYU" },
- { "dechanzi", "GB2312" },
- { "deckanji", "DEC-KANJI" },
- { "deckorean", "EUC-KR" },
- { "eucJP", "EUC-JP" },
- { "eucKR", "EUC-KR" },
- { "eucTW", "EUC-TW" },
- { "sdeckanji", "EUC-JP" }
-# define alias_table_defined
-# endif
# if defined __sun /* Solaris */
{ "5601", "EUC-KR" },
{ "646", "ASCII" },
@@ -850,12 +811,11 @@ locale_charset (void)
/* Cygwin < 1.7 does not have locales. nl_langinfo (CODESET) always
returns "US-ASCII". Return the suffix of the locale name from the
environment variables (if present) or the codepage as a number. */
- if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
+ if (codeset != NULL && streq (codeset, "US-ASCII"))
{
- const char *locale;
static char resultbuf[2 + 10 + 1];
- locale = getenv ("LC_ALL");
+ const char *locale = getenv ("LC_ALL");
if (locale == NULL || locale[0] == '\0')
{
locale = getenv ("LC_CTYPE");
@@ -941,8 +901,7 @@ locale_charset (void)
/* For a locale name such as "French_France.65001", in Windows 10,
setlocale now returns "French_France.utf8" instead, or in the UTF-8
environment (with modern system settings) "fr_FR.UTF-8". */
- if (strcmp (buf + 2, "65001") == 0 || strcmp (buf + 2, "utf8") == 0
- || strcmp (buf + 2, "UTF-8") == 0)
+ if (streq (buf + 2, "65001") || streq (buf + 2, "utf8") || streq (buf + 2, "UTF-8"))
codeset = "UTF-8";
else
{
@@ -952,16 +911,13 @@ locale_charset (void)
# elif defined OS2
- const char *locale;
static char resultbuf[2 + 10 + 1];
- ULONG cp[3];
- ULONG cplen;
codeset = NULL;
/* Allow user to override the codeset, as set in the operating system,
with standard language environment variables. */
- locale = getenv ("LC_ALL");
+ const char *locale = getenv ("LC_ALL");
if (locale == NULL || locale[0] == '\0')
{
locale = getenv ("LC_CTYPE");
@@ -992,12 +948,15 @@ locale_charset (void)
}
/* For the POSIX locale, don't use the system's codepage. */
- if (strcmp (locale, "C") == 0 || strcmp (locale, "POSIX") == 0)
+ if (streq (locale, "C") || streq (locale, "POSIX"))
codeset = "";
}
if (codeset == NULL)
{
+ ULONG cp[3];
+ ULONG cplen;
+
/* OS/2 has a function returning the locale's codepage as a number. */
if (DosQueryCp (sizeof (cp), cp, &cplen))
codeset = "";
@@ -1024,7 +983,7 @@ locale_charset (void)
Speed up the common case and slow down the less common cases by
testing for this case first. */
# if defined __OpenBSD__ || (defined __APPLE__ && defined __MACH__) || defined __sun || defined __CYGWIN__
- if (strcmp (codeset, "UTF-8") == 0)
+ if (streq (codeset, "UTF-8"))
goto done_table_lookup;
else
# endif
@@ -1153,7 +1112,7 @@ locale_charset (void)
#ifdef DARWIN7
/* Mac OS X sets MB_CUR_MAX to 1 when LC_ALL=C, and "UTF-8"
(the default codeset) does not work when MB_CUR_MAX is 1. */
- if (strcmp (codeset, "UTF-8") == 0 && MB_CUR_MAX_L (uselocale (NULL)) <= 1)
+ if (streq (codeset, "UTF-8") && MB_CUR_MAX_L (uselocale (NULL)) <= 1)
codeset = "ASCII";
#endif
diff --git a/gl/localcharset.h b/gl/localcharset.h
index 25e6d099..59f748d7 100644
--- a/gl/localcharset.h
+++ b/gl/localcharset.h
@@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2003, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2009-2026 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This file is free software: you can redistribute it and/or modify
@@ -48,24 +48,24 @@ extern const char * locale_charset (void);
(darwin = Mac OS X, windows = native Windows)
ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin minix cygwin
- ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
- ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
+ ISO-8859-1 Y glibc aix hpux solaris freebsd netbsd openbsd darwin cygwin zos
+ ISO-8859-2 Y glibc aix hpux solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-3 Y glibc solaris cygwin
- ISO-8859-4 Y hpux osf solaris freebsd netbsd openbsd darwin
- ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
+ ISO-8859-4 Y hpux solaris freebsd netbsd openbsd darwin
+ ISO-8859-5 Y glibc aix hpux solaris freebsd netbsd openbsd darwin cygwin zos
ISO-8859-6 Y glibc aix hpux solaris cygwin
- ISO-8859-7 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin cygwin zos
- ISO-8859-8 Y glibc aix hpux osf solaris cygwin zos
- ISO-8859-9 Y glibc aix hpux irix osf solaris freebsd darwin cygwin zos
+ ISO-8859-7 Y glibc aix hpux solaris freebsd netbsd openbsd darwin cygwin zos
+ ISO-8859-8 Y glibc aix hpux solaris cygwin zos
+ ISO-8859-9 Y glibc aix hpux solaris freebsd darwin cygwin zos
ISO-8859-13 glibc hpux solaris freebsd netbsd openbsd darwin cygwin
ISO-8859-14 glibc cygwin
- ISO-8859-15 glibc aix irix osf solaris freebsd netbsd openbsd darwin cygwin
+ ISO-8859-15 glibc aix solaris freebsd netbsd openbsd darwin cygwin
KOI8-R Y glibc hpux solaris freebsd netbsd openbsd darwin
KOI8-U Y glibc freebsd netbsd openbsd darwin cygwin
KOI8-T glibc
CP437 dos
CP775 dos
- CP850 aix osf dos
+ CP850 aix dos
CP852 dos
CP855 dos
CP856 aix
@@ -80,7 +80,7 @@ extern const char * locale_charset (void);
CP922 aix
CP932 aix cygwin windows dos
CP943 aix zos
- CP949 osf darwin windows dos
+ CP949 darwin windows dos
CP950 windows dos
CP1046 aix
CP1124 aix
@@ -95,17 +95,17 @@ extern const char * locale_charset (void);
CP1255 glibc windows
CP1256 windows
CP1257 windows
- GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin cygwin zos
- EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin
- EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin cygwin zos
- EUC-TW glibc aix hpux irix osf solaris netbsd
- BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin cygwin zos
+ GB2312 Y glibc aix hpux solaris freebsd netbsd darwin cygwin zos
+ EUC-JP Y glibc aix hpux solaris freebsd netbsd darwin cygwin
+ EUC-KR Y glibc aix hpux solaris freebsd netbsd darwin cygwin zos
+ EUC-TW glibc aix hpux solaris netbsd
+ BIG5 Y glibc aix hpux solaris freebsd netbsd darwin cygwin zos
BIG5-HKSCS glibc hpux solaris netbsd darwin
- GBK glibc aix osf solaris freebsd darwin cygwin windows dos
+ GBK glibc aix solaris freebsd darwin cygwin windows dos
GB18030 glibc hpux solaris freebsd netbsd darwin
- SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
+ SHIFT_JIS Y hpux solaris freebsd netbsd darwin
JOHAB solaris windows
- TIS-620 glibc aix hpux osf solaris cygwin zos
+ TIS-620 glibc aix hpux solaris cygwin zos
ARMSCII-8 glibc freebsd netbsd darwin
GEORGIAN-PS glibc cygwin
PT154 glibc netbsd cygwin
@@ -115,9 +115,9 @@ extern const char * locale_charset (void);
HP-HEBREW8 hpux
HP-TURKISH8 hpux
HP-KANA8 hpux
- DEC-KANJI osf
- DEC-HANYU osf
- UTF-8 Y glibc aix hpux osf solaris netbsd darwin cygwin zos
+ DEC-KANJI vms
+ DEC-HANYU vms
+ UTF-8 Y glibc aix hpux solaris netbsd darwin cygwin zos
Note: Names which are not marked as being a MIME name should not be used in
Internet protocols for information interchange (mail, news, etc.).
diff --git a/gl/locale.in.h b/gl/locale.in.h
index 34f8c5b6..c264493e 100644
--- a/gl/locale.in.h
+++ b/gl/locale.in.h
@@ -1,5 +1,5 @@
/* A POSIX .
- Copyright (C) 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -264,7 +264,6 @@ _GL_CXXALIASWARN (localeconv);
# define localeconv localeconv_used_without_requesting_gnulib_module_localeconv
# endif
#elif defined GNULIB_POSIXCHECK
-# undef localeconv
# if HAVE_RAW_DECL_LOCALECONV
_GL_WARN_ON_USE (localeconv,
"localeconv returns too few information on some platforms - "
@@ -288,7 +287,6 @@ _GL_CXXALIAS_SYS (setlocale, char *, (int category, const char *locale));
_GL_CXXALIASWARN (setlocale);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef setlocale
# if HAVE_RAW_DECL_SETLOCALE
_GL_WARN_ON_USE (setlocale, "setlocale works differently on native Windows - "
"use gnulib module setlocale for portability");
@@ -325,7 +323,6 @@ _GL_CXXALIAS_SYS (newlocale, locale_t,
_GL_CXXALIASWARN (newlocale);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef newlocale
# if HAVE_RAW_DECL_NEWLOCALE
_GL_WARN_ON_USE (newlocale, "newlocale is not portable");
# endif
@@ -350,7 +347,6 @@ _GL_CXXALIAS_SYS (duplocale, locale_t, (locale_t locale));
_GL_CXXALIASWARN (duplocale);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef duplocale
# if HAVE_RAW_DECL_DUPLOCALE
_GL_WARN_ON_USE (duplocale, "duplocale is unportable and buggy on some glibc systems - "
"use gnulib module duplocale for portability");
@@ -378,7 +374,6 @@ _GL_CXXALIAS_SYS_CAST (freelocale, void, (locale_t locale));
_GL_CXXALIASWARN (freelocale);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef freelocale
# if HAVE_RAW_DECL_FREELOCALE
_GL_WARN_ON_USE (freelocale, "freelocale is not portable");
# endif
@@ -408,7 +403,6 @@ _GL_CXXALIAS_SYS (getlocalename_l, const char *,
_GL_CXXALIASWARN (getlocalename_l);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef getlocalename_l
# if HAVE_RAW_DECL_GETLOCALENAME_L
_GL_WARN_ON_USE (getlocalename_l, "getlocalename_l is not portable");
# endif
diff --git a/gl/localeconv.c b/gl/localeconv.c
index a6bbdced..bf6271ee 100644
--- a/gl/localeconv.c
+++ b/gl/localeconv.c
@@ -1,5 +1,5 @@
/* Query locale dependent information for formatting numbers.
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lseek.c b/gl/lseek.c
index 41708787..7478ea13 100644
--- a/gl/lseek.c
+++ b/gl/lseek.c
@@ -1,5 +1,5 @@
/* An lseek() function that detects pipes.
- Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/lstat.c b/gl/lstat.c
index bb4a59f1..2495568f 100644
--- a/gl/lstat.c
+++ b/gl/lstat.c
@@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-2006, 2008-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -42,14 +42,7 @@ orig_lstat (const char *filename, struct stat *buf)
}
/* Specification. */
-# ifdef __osf__
-/* Write "sys/stat.h" here, not , otherwise OSF/1 5.1 DTK cc
- eliminates this include because of the preliminary #include
- above. */
-# include "sys/stat.h"
-# else
-# include
-# endif
+# include
# include "stat-time.h"
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4
index 2b205b35..a4b32403 100644
--- a/gl/m4/00gnulib.m4
+++ b/gl/m4/00gnulib.m4
@@ -1,6 +1,6 @@
# 00gnulib.m4
# serial 9
-dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/__inline.m4 b/gl/m4/__inline.m4
index d1b8257b..4dedc0d4 100644
--- a/gl/m4/__inline.m4
+++ b/gl/m4/__inline.m4
@@ -1,6 +1,6 @@
# __inline.m4
# serial 1
-dnl Copyright 2017-2025 Free Software Foundation, Inc.
+dnl Copyright 2017-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4
index 5501b07b..94ecc510 100644
--- a/gl/m4/absolute-header.m4
+++ b/gl/m4/absolute-header.m4
@@ -1,6 +1,6 @@
# absolute-header.m4
# serial 18
-dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/af_alg.m4 b/gl/m4/af_alg.m4
index 38575b6d..e4ff9a3d 100644
--- a/gl/m4/af_alg.m4
+++ b/gl/m4/af_alg.m4
@@ -1,6 +1,6 @@
# af_alg.m4
# serial 6
-dnl Copyright 2018-2025 Free Software Foundation, Inc.
+dnl Copyright 2018-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index 68fc6211..ff0c59dd 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,6 +1,6 @@
# alloca.m4
# serial 21
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2025 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2026 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/arpa_inet_h.m4 b/gl/m4/arpa_inet_h.m4
index 5dae6f72..63634c30 100644
--- a/gl/m4/arpa_inet_h.m4
+++ b/gl/m4/arpa_inet_h.m4
@@ -1,6 +1,6 @@
# arpa_inet_h.m4
# serial 18
-dnl Copyright (C) 2006, 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/assert_h.m4 b/gl/m4/assert_h.m4
index e77524ca..d9433ef7 100644
--- a/gl/m4/assert_h.m4
+++ b/gl/m4/assert_h.m4
@@ -1,6 +1,6 @@
# assert_h.m4
-# serial 5
-dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
+# serial 6
+dnl Copyright (C) 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -56,8 +56,6 @@ AC_DEFUN([gl_ASSERT_H],
dnl The seemingly redundant parentheses are necessary for MSVC 14.
dnl #undef assert so that programs are not tempted to use it without
dnl specifically including assert.h.
- dnl #undef __ASSERT_H__ so that on IRIX, when programs later include
- dnl , this include actually defines assert.
dnl Break the #undef_s apart with a comment so that 'configure' does
dnl not comment them out.
AH_VERBATIM([zzstatic_assert],
@@ -78,9 +76,6 @@ AC_DEFUN([gl_ASSERT_H],
&& __GNUG__ < 6 && __clang_major__ < 6)))
#include
#undef/**/assert
- #ifdef __sgi
- #undef/**/__ASSERT_H__
- #endif
/* Solaris 11.4 defines static_assert as a macro with 2 arguments.
We need it also to be invocable with a single argument.
Haiku 2022 does not define static_assert at all. */
diff --git a/gl/m4/base64.m4 b/gl/m4/base64.m4
index 785d31c0..40beb50b 100644
--- a/gl/m4/base64.m4
+++ b/gl/m4/base64.m4
@@ -1,6 +1,6 @@
# base64.m4
# serial 4
-dnl Copyright (C) 2004, 2006, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4
index 59d52be6..93c9d769 100644
--- a/gl/m4/btowc.m4
+++ b/gl/m4/btowc.m4
@@ -1,6 +1,6 @@
# btowc.m4
-# serial 15
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+# serial 16
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FUNC_BTOWC],
dnl Check whether is usable at all, first. Otherwise the test
dnl program below may lead to an endless loop. See
- dnl .
+ dnl .
AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
AC_CHECK_FUNCS_ONCE([btowc])
@@ -54,43 +54,6 @@ changequote([,])dnl
])
])
- dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF.
- AC_CACHE_CHECK([whether btowc(EOF) is correct],
- [gl_cv_func_btowc_eof],
- [
- dnl Initial guess, used when cross-compiling or when no suitable locale
- dnl is present.
-changequote(,)dnl
- case "$host_os" in
- # Guess no on IRIX.
- irix*) gl_cv_func_btowc_eof="guessing no" ;;
- # Guess yes on native Windows.
- mingw* | windows*) gl_cv_func_btowc_eof="guessing yes" ;;
- # Guess yes otherwise.
- *) gl_cv_func_btowc_eof="guessing yes" ;;
- esac
-changequote([,])dnl
- if test $LOCALE_FR != none; then
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include
-#include
-#include
-int main ()
-{
- if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
- {
- if (btowc (EOF) != WEOF)
- return 1;
- }
- return 0;
-}]])],
- [gl_cv_func_btowc_eof=yes],
- [gl_cv_func_btowc_eof=no],
- [:])
- fi
- ])
-
dnl On mingw, in the C locale, btowc is inconsistent with mbrtowc:
dnl mbrtowc avoids calling MultiByteToWideChar when MB_CUR_MAX is 1 and
dnl ___lc_codepage_func() is 0, but btowc is lacking this special case.
@@ -146,10 +109,6 @@ int main ()
*yes) ;;
*) REPLACE_BTOWC=1 ;;
esac
- case "$gl_cv_func_btowc_eof" in
- *yes) ;;
- *) REPLACE_BTOWC=1 ;;
- esac
case "$gl_cv_func_btowc_consistent" in
*yes) ;;
*) REPLACE_BTOWC=1 ;;
diff --git a/gl/m4/build-to-host.m4 b/gl/m4/build-to-host.m4
index 01bff8f3..d3b93ce1 100644
--- a/gl/m4/build-to-host.m4
+++ b/gl/m4/build-to-host.m4
@@ -1,6 +1,6 @@
# build-to-host.m4
# serial 5
-dnl Copyright (C) 2023-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2023-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/builtin-expect.m4 b/gl/m4/builtin-expect.m4
index 76d32867..cf96977e 100644
--- a/gl/m4/builtin-expect.m4
+++ b/gl/m4/builtin-expect.m4
@@ -1,6 +1,6 @@
# builtin-expect.m4
# serial 3
-dnl Copyright 2016-2025 Free Software Foundation, Inc.
+dnl Copyright 2016-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/byteswap.m4 b/gl/m4/byteswap.m4
index b53cb4d0..a0287062 100644
--- a/gl/m4/byteswap.m4
+++ b/gl/m4/byteswap.m4
@@ -1,6 +1,6 @@
# byteswap.m4
# serial 7
-dnl Copyright (C) 2005, 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/c-bool.m4 b/gl/m4/c-bool.m4
index 8fa8bfc8..f04041a4 100644
--- a/gl/m4/c-bool.m4
+++ b/gl/m4/c-bool.m4
@@ -1,6 +1,6 @@
# c-bool.m4
# serial 3
-dnl Copyright 2022-2025 Free Software Foundation, Inc.
+dnl Copyright 2022-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/c32rtomb.m4 b/gl/m4/c32rtomb.m4
index ce26a31e..b7a0d44c 100644
--- a/gl/m4/c32rtomb.m4
+++ b/gl/m4/c32rtomb.m4
@@ -1,6 +1,6 @@
# c32rtomb.m4
# serial 8
-dnl Copyright (C) 2020-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/calloc.m4 b/gl/m4/calloc.m4
index ac7d08d4..2ed64332 100644
--- a/gl/m4/calloc.m4
+++ b/gl/m4/calloc.m4
@@ -1,6 +1,6 @@
# calloc.m4
# serial 36
-dnl Copyright (C) 2004-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/close.m4 b/gl/m4/close.m4
index 314e321e..9b498643 100644
--- a/gl/m4/close.m4
+++ b/gl/m4/close.m4
@@ -1,6 +1,6 @@
# close.m4
# serial 10
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4
index 6bed9dee..4ab542f4 100644
--- a/gl/m4/codeset.m4
+++ b/gl/m4/codeset.m4
@@ -1,6 +1,6 @@
# codeset.m4
# serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2025 Free Software
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2026 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4
index 5c40b73c..957adca6 100644
--- a/gl/m4/double-slash-root.m4
+++ b/gl/m4/double-slash-root.m4
@@ -1,6 +1,6 @@
# double-slash-root.m4
# serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4
index 5da3a0b9..e1d51898 100644
--- a/gl/m4/dup2.m4
+++ b/gl/m4/dup2.m4
@@ -1,6 +1,6 @@
# dup2.m4
# serial 28
-dnl Copyright (C) 2002, 2005, 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005, 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/environ.m4 b/gl/m4/environ.m4
index e0690e54..5c0644ab 100644
--- a/gl/m4/environ.m4
+++ b/gl/m4/environ.m4
@@ -1,6 +1,6 @@
# environ.m4
# serial 8
-dnl Copyright (C) 2001-2004, 2006-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index 420d5bb3..ade19b6f 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,6 +1,6 @@
# errno_h.m4
-# serial 18
-dnl Copyright (C) 2004, 2006, 2008-2025 Free Software Foundation, Inc.
+# serial 19
+dnl Copyright (C) 2004, 2006, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -83,59 +83,4 @@ booboo
gl_NEXT_HEADERS([errno.h])
GL_GENERATE_ERRNO_H=true
fi
- gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
- gl_REPLACE_ERRNO_VALUE([ENOLINK])
- gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
-])
-
-# Assuming $1 = EOVERFLOW.
-# The EOVERFLOW errno value ought to be defined in , according to
-# POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and
-# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
-# Check for the value of EOVERFLOW.
-# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
-AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
-[
- if $GL_GENERATE_ERRNO_H; then
- AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
- AC_EGREP_CPP([yes],[
-#include
-#ifdef ]$1[
-yes
-#endif
- ],
- [gl_cv_header_errno_h_]$1[=yes],
- [gl_cv_header_errno_h_]$1[=no])
- if test $gl_cv_header_errno_h_]$1[ = no; then
- AC_EGREP_CPP([yes],[
-#define _XOPEN_SOURCE_EXTENDED 1
-#include
-#ifdef ]$1[
-yes
-#endif
- ], [gl_cv_header_errno_h_]$1[=hidden])
- if test $gl_cv_header_errno_h_]$1[ = hidden; then
- dnl The macro exists but is hidden.
- dnl Define it to the same value.
- AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [
-#define _XOPEN_SOURCE_EXTENDED 1
-#include
-/* The following two lines are a workaround against an autoconf-2.52 bug. */
-#include
-#include
-])
- fi
- fi
- ])
- case $gl_cv_header_errno_h_]$1[ in
- yes | no)
- ]$1[_HIDDEN=0; ]$1[_VALUE=
- ;;
- *)
- ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1["
- ;;
- esac
- AC_SUBST($1[_HIDDEN])
- AC_SUBST($1[_VALUE])
- fi
])
diff --git a/gl/m4/error.m4 b/gl/m4/error.m4
index 1572250a..f14b9ceb 100644
--- a/gl/m4/error.m4
+++ b/gl/m4/error.m4
@@ -1,6 +1,6 @@
# error.m4
# serial 16
-dnl Copyright (C) 1996-1998, 2001-2004, 2009-2025 Free Software Foundation,
+dnl Copyright (C) 1996-1998, 2001-2004, 2009-2026 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/error_h.m4 b/gl/m4/error_h.m4
index 4ef5cbff..73e96943 100644
--- a/gl/m4/error_h.m4
+++ b/gl/m4/error_h.m4
@@ -1,6 +1,6 @@
# error_h.m4
# serial 5
-dnl Copyright (C) 1996-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/exponentd.m4 b/gl/m4/exponentd.m4
index 08e93397..bff98570 100644
--- a/gl/m4/exponentd.m4
+++ b/gl/m4/exponentd.m4
@@ -1,6 +1,6 @@
# exponentd.m4
# serial 5
-dnl Copyright (C) 2007-2008, 2010-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/extensions-aix.m4 b/gl/m4/extensions-aix.m4
index 08b703b4..9036d7bb 100644
--- a/gl/m4/extensions-aix.m4
+++ b/gl/m4/extensions-aix.m4
@@ -1,6 +1,6 @@
# extensions-aix.m4
# serial 1
-dnl Copyright (C) 2024-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2024-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 76516bce..01a8e5f9 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,6 +1,6 @@
# extensions.m4
# serial 25 -*- Autoconf -*-
-dnl Copyright (C) 2003, 2006-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
index d4fe6d82..4ccc4a95 100644
--- a/gl/m4/extern-inline.m4
+++ b/gl/m4/extern-inline.m4
@@ -1,6 +1,6 @@
# extern-inline.m4
-# serial 1
-dnl Copyright 2012-2025 Free Software Foundation, Inc.
+# serial 2
+dnl Copyright 2012-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -43,9 +43,11 @@ AC_DEFUN([gl_EXTERN_INLINE],
functions or macros in standard C headers like . For example,
if isdigit is mistakenly implemented via a static inline function,
a program containing an extern inline function that calls isdigit
- may not work since the C standard prohibits extern inline functions
- from calling static functions (ISO C 99 section 6.7.4.(3).
- This bug is known to occur on:
+ may not work since C99 through C23 prohibit extern inline functions
+ from calling static functions (ISO C 23 § 6.7.5 ¶ 3)).
+ Although a future C standard will likely relax this restriction
+ ,
+ respect it for now. This bug is known to occur on:
OS X 10.8 and earlier; see:
https://lists.gnu.org/r/bug-gnulib/2012-12/msg00023.html
@@ -112,8 +114,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
suppress bogus "no previous prototype for 'FOO'"
and "no previous declaration for 'FOO'" diagnostics,
when FOO is an inline function in the header; see
- and
- . */
+ and
+ . */
#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
# define _GL_INLINE_HEADER_CONST_PRAGMA
diff --git a/gl/m4/fclose.m4 b/gl/m4/fclose.m4
index cfb92e28..65eb7705 100644
--- a/gl/m4/fclose.m4
+++ b/gl/m4/fclose.m4
@@ -1,6 +1,6 @@
# fclose.m4
# serial 12
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index 8020c481..a94fc557 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -1,6 +1,6 @@
# fcntl-o.m4
# serial 12
-dnl Copyright (C) 2006, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fcntl.m4 b/gl/m4/fcntl.m4
index 08ab936f..69ac76f9 100644
--- a/gl/m4/fcntl.m4
+++ b/gl/m4/fcntl.m4
@@ -1,6 +1,6 @@
# fcntl.m4
# serial 12
-dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4
index 1c9f9cce..946a0bd6 100644
--- a/gl/m4/fcntl_h.m4
+++ b/gl/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
# fcntl_h.m4
-# serial 20
-dnl Copyright (C) 2006-2007, 2009-2025 Free Software Foundation, Inc.
+# serial 21
+dnl Copyright (C) 2006-2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -26,7 +26,7 @@ AC_DEFUN_ONCE([gl_FCNTL_H],
dnl corresponding gnulib module is not in use, if it is not common
dnl enough to be declared everywhere.
gl_WARN_ON_USE_PREPARE([[#include
- ]], [fcntl openat])
+ ]], [fcntl openat openat2])
])
# gl_FCNTL_MODULE_INDICATOR([modulename])
@@ -53,6 +53,7 @@ AC_DEFUN([gl_FCNTL_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NONBLOCKING])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPEN])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OPENAT2])
dnl Support Microsoft deprecated alias function names by default.
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_CREAT], [1])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_OPEN], [1])
@@ -66,6 +67,7 @@ AC_DEFUN([gl_FCNTL_H_DEFAULTS],
dnl Assume proper GNU behavior unless another module says otherwise.
HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
+ HAVE_OPENAT2=0; AC_SUBST([HAVE_OPENAT2])
REPLACE_CREAT=0; AC_SUBST([REPLACE_CREAT])
REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
diff --git a/gl/m4/fflush.m4 b/gl/m4/fflush.m4
index 399065b6..c5913b23 100644
--- a/gl/m4/fflush.m4
+++ b/gl/m4/fflush.m4
@@ -1,6 +1,6 @@
# fflush.m4
# serial 20
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4
index 8580c9c9..c0ee7f8f 100644
--- a/gl/m4/float_h.m4
+++ b/gl/m4/float_h.m4
@@ -1,6 +1,6 @@
# float_h.m4
-# serial 15
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+# serial 17
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,7 +13,7 @@ AC_DEFUN([gl_FLOAT_H],
GL_GENERATE_FLOAT_H=false
REPLACE_FLOAT_LDBL=0
case "$host_os" in
- aix* | beos* | openbsd* | mirbsd* | irix*)
+ aix* | beos* | openbsd* | mirbsd*)
GL_GENERATE_FLOAT_H=true
;;
freebsd* | dragonfly*)
@@ -63,6 +63,7 @@ changequote([,])dnl
[AC_LANG_PROGRAM(
[[#include
int x[] = { FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG };
+ int y[] = { FLT_IS_IEC_60559, DBL_IS_IEC_60559, LDBL_IS_IEC_60559 };
float maxf = FLT_NORM_MAX;
double maxd = DBL_NORM_MAX;
long double maxl = LDBL_NORM_MAX;
diff --git a/gl/m4/floorf.m4 b/gl/m4/floorf.m4
index cb75fce9..731f0b0a 100644
--- a/gl/m4/floorf.m4
+++ b/gl/m4/floorf.m4
@@ -1,6 +1,6 @@
# floorf.m4
# serial 21
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fopen.m4 b/gl/m4/fopen.m4
index e27b3270..07779a16 100644
--- a/gl/m4/fopen.m4
+++ b/gl/m4/fopen.m4
@@ -1,6 +1,6 @@
# fopen.m4
# serial 16
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fpurge.m4 b/gl/m4/fpurge.m4
index 408a2579..a7cf67dc 100644
--- a/gl/m4/fpurge.m4
+++ b/gl/m4/fpurge.m4
@@ -1,6 +1,6 @@
# fpurge.m4
# serial 16
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/freading.m4 b/gl/m4/freading.m4
index 373d2bff..b5b54f40 100644
--- a/gl/m4/freading.m4
+++ b/gl/m4/freading.m4
@@ -1,6 +1,6 @@
# freading.m4
# serial 3
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/free.m4 b/gl/m4/free.m4
index 485d8243..c7a134ba 100644
--- a/gl/m4/free.m4
+++ b/gl/m4/free.m4
@@ -1,6 +1,6 @@
# free.m4
# serial 6
-dnl Copyright (C) 2003-2005, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2005, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -14,10 +14,10 @@ AC_DEFUN([gl_FUNC_FREE],
dnl In the next release of POSIX, free must preserve errno.
dnl https://www.austingroupbugs.net/view.php?id=385
- dnl https://sourceware.org/bugzilla/show_bug.cgi?id=17924
+ dnl https://sourceware.org/PR17924
dnl So far, we know of three platforms that do this:
dnl * glibc >= 2.33, thanks to the fix for this bug:
- dnl
+ dnl
dnl * OpenBSD >= 4.5, thanks to this commit:
dnl
dnl * Solaris, because its malloc() implementation is based on brk(),
diff --git a/gl/m4/fseek.m4 b/gl/m4/fseek.m4
index ce728f60..398fd5f8 100644
--- a/gl/m4/fseek.m4
+++ b/gl/m4/fseek.m4
@@ -1,6 +1,6 @@
# fseek.m4
# serial 4
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fseeko.m4 b/gl/m4/fseeko.m4
index c093d399..cd81961a 100644
--- a/gl/m4/fseeko.m4
+++ b/gl/m4/fseeko.m4
@@ -1,6 +1,6 @@
# fseeko.m4
# serial 21
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fseterr.m4 b/gl/m4/fseterr.m4
index 3a94c288..e5ad635b 100644
--- a/gl/m4/fseterr.m4
+++ b/gl/m4/fseterr.m4
@@ -1,6 +1,6 @@
# fseterr.m4
# serial 2
-dnl Copyright (C) 2012-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4
index e89bbc32..7db4e346 100644
--- a/gl/m4/fstat.m4
+++ b/gl/m4/fstat.m4
@@ -1,6 +1,6 @@
# fstat.m4
# serial 10
-dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fstypename.m4 b/gl/m4/fstypename.m4
index 4407b765..64122a73 100644
--- a/gl/m4/fstypename.m4
+++ b/gl/m4/fstypename.m4
@@ -1,6 +1,6 @@
# fstypename.m4
# serial 6
-dnl Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2025 Free Software
+dnl Copyright (C) 1998-1999, 2001, 2004, 2006, 2009-2026 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/fsusage.m4 b/gl/m4/fsusage.m4
index bb7b6e43..db6e0e3b 100644
--- a/gl/m4/fsusage.m4
+++ b/gl/m4/fsusage.m4
@@ -1,6 +1,6 @@
# fsusage.m4
-# serial 35
-dnl Copyright (C) 1997-1998, 2000-2001, 2003-2025 Free Software Foundation,
+# serial 37
+dnl Copyright (C) 1997-1998, 2000-2001, 2003-2026 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -48,16 +48,12 @@ AC_DEFUN([gl_FILE_SYSTEM_USAGE],
# is what it gets when this test fails.
if test $ac_fsusage_space = no; then
# glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0,
- # OpenBSD >= 4.4, AIX, HP-UX, IRIX, Solaris, Cygwin, Interix, BeOS.
+ # OpenBSD >= 4.4, AIX, HP-UX, Solaris, Cygwin, Interix, BeOS.
AC_CACHE_CHECK([for statvfs function (SVR4)],
[fu_cv_sys_stat_statvfs],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include
-#ifdef __osf__
-"Do not use Tru64's statvfs implementation"
-#endif
-
#include
struct statvfs fsd;
@@ -79,7 +75,7 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1];
if test $fu_cv_sys_stat_statvfs = yes; then
ac_fsusage_space=yes
# AIX >= 5.2 has statvfs64 that has a wider f_blocks field than statvfs.
- # glibc, HP-UX, IRIX, Solaris have statvfs64 as well, but on these systems
+ # glibc, HP-UX, Solaris have statvfs64 as well, but on these systems
# statvfs with large-file support is already equivalent to statvfs64.
AC_CACHE_CHECK([whether to use statvfs64],
[fu_cv_sys_stat_statvfs64],
@@ -140,38 +136,10 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1];
(glibc/Linux > 2.6)])
fi
- if test $ac_fsusage_space = no; then
- # DEC Alpha running OSF/1
- AC_CACHE_CHECK([for 3-argument statfs function (DEC OSF/1)],
- [fu_cv_sys_stat_statfs3_osf1],
- [AC_RUN_IFELSE([AC_LANG_SOURCE([[
-#include
-#include
-#include
- int
- main ()
- {
- struct statfs fsd;
- fsd.f_fsize = 0;
- return statfs (".", &fsd, sizeof (struct statfs)) != 0;
- }]])],
- [fu_cv_sys_stat_statfs3_osf1=yes],
- [fu_cv_sys_stat_statfs3_osf1=no],
- [fu_cv_sys_stat_statfs3_osf1=no])
- ])
- if test $fu_cv_sys_stat_statfs3_osf1 = yes; then
- ac_fsusage_space=yes
- AC_DEFINE([STAT_STATFS3_OSF1], [1],
- [Define if statfs takes 3 args. (DEC Alpha running OSF/1)])
- fi
- fi
-
if test $ac_fsusage_space = no; then
# glibc/Linux, Mac OS X, FreeBSD < 5.0, NetBSD < 3.0, OpenBSD < 4.4.
# (glibc/{Hurd,kFreeBSD}, FreeBSD >= 5.0, NetBSD >= 3.0,
- # OpenBSD >= 4.4, AIX, HP-UX, OSF/1, Cygwin already handled above.)
- # (On IRIX you need to include , not only and
- # .)
+ # OpenBSD >= 4.4, AIX, HP-UX, Cygwin already handled above.)
# (On Solaris, statfs has 4 arguments.)
AC_CACHE_CHECK([for two-argument statfs with statfs.f_bsize member (AIX, 4.3BSD)],
[fu_cv_sys_stat_statfs2_bsize],
@@ -225,13 +193,12 @@ int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1];
if test $fu_cv_sys_stat_statfs4 = yes; then
ac_fsusage_space=yes
AC_DEFINE([STAT_STATFS4], [1],
- [Define if statfs takes 4 args. (SVR3, old Irix)])
+ [Define if statfs takes 4 args. (SVR3)])
fi
fi
if test $ac_fsusage_space = no; then
# 4.4BSD and older NetBSD
- # (OSF/1 already handled above.)
# (On AIX, you need to include , not only .)
# (On Solaris, statfs has 4 arguments and 'struct statfs' is not declared in
# .)
diff --git a/gl/m4/ftell.m4 b/gl/m4/ftell.m4
index d5610b70..0b389f86 100644
--- a/gl/m4/ftell.m4
+++ b/gl/m4/ftell.m4
@@ -1,6 +1,6 @@
# ftell.m4
# serial 3
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ftello.m4 b/gl/m4/ftello.m4
index 35d30f98..ae0e884f 100644
--- a/gl/m4/ftello.m4
+++ b/gl/m4/ftello.m4
@@ -1,6 +1,6 @@
# ftello.m4
# serial 17
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/getaddrinfo.m4 b/gl/m4/getaddrinfo.m4
index 2931d526..8a63600b 100644
--- a/gl/m4/getaddrinfo.m4
+++ b/gl/m4/getaddrinfo.m4
@@ -1,6 +1,6 @@
# getaddrinfo.m4
-# serial 38
-dnl Copyright (C) 2004-2025 Free Software Foundation, Inc.
+# serial 39
+dnl Copyright (C) 2004-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -90,7 +90,7 @@ int getaddrinfo (const char *, const char *, const struct addrinfo *, struct add
fi
fi
if test $HAVE_GETADDRINFO != 0; then
- AC_CACHE_CHECK([whether getaddrinfo supports AI_NUMERICSERV],
+ AC_CACHE_CHECK([whether getaddrinfo supports AI_NUMERICHOST and AI_NUMERICSERV],
[gl_cv_func_getaddrinfo_works],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM([[
@@ -107,16 +107,30 @@ int getaddrinfo (const char *, const char *, const struct addrinfo *, struct add
#include
#include
]], [[
- struct addrinfo hints;
+ int result = 0;
struct addrinfo *ai;
- memset (&hints, 0, sizeof (hints));
- hints.ai_flags = AI_NUMERICSERV;
- return getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME;
+ {
+ struct addrinfo hints;
+ memset (&hints, 0, sizeof (hints));
+ hints.ai_flags = AI_NUMERICHOST;
+ if (getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME)
+ result |= 1;
+ }
+ {
+ struct addrinfo hints;
+ memset (&hints, 0, sizeof (hints));
+ hints.ai_flags = AI_NUMERICSERV;
+ if (getaddrinfo ("www.gnu.org", "http", &hints, &ai) != EAI_NONAME)
+ result |= 2;
+ }
+ return result;
]])
],
[gl_cv_func_getaddrinfo_works=yes],
[gl_cv_func_getaddrinfo_works=no],
[case "$host_os" in
+ # Guess no on Solaris.
+ solaris*) gl_cv_func_getaddrinfo_works="guessing no" ;;
# Guess no on native Windows.
mingw* | windows*) gl_cv_func_getaddrinfo_works="guessing no" ;;
# Guess yes otherwise.
diff --git a/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
index 63d88306..8b6eff47 100644
--- a/gl/m4/getdelim.m4
+++ b/gl/m4/getdelim.m4
@@ -1,7 +1,7 @@
# getdelim.m4
-# serial 19
+# serial 21
-dnl Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2026 Free Software Foundation, Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -37,6 +37,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
gl_cv_func_working_getdelim=no ;;
*)
echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
+ touch conftest.empty
AC_RUN_IFELSE([AC_LANG_SOURCE([[
# include
# include
@@ -44,6 +45,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
int main ()
{
FILE *in = fopen ("./conftest.data", "r");
+ int result = 0;
if (!in)
return 1;
{
@@ -53,7 +55,7 @@ AC_DEFUN([gl_FUNC_GETDELIM],
size_t siz = 0;
int len = getdelim (&line, &siz, '\n', in);
if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
- { free (line); fclose (in); return 2; }
+ result |= 2;
free (line);
}
{
@@ -62,35 +64,40 @@ AC_DEFUN([gl_FUNC_GETDELIM],
char *line = NULL;
size_t siz = (size_t)(~0) / 4;
if (getdelim (&line, &siz, '\n', in) == -1)
- { fclose (in); return 3; }
+ result |= 4;
free (line);
}
fclose (in);
- return 0;
+ {
+ /* Test that reading EOF as the first character sets the first byte
+ in the buffer to NUL. This fails on glibc 2.42 and earlier. */
+ in = fopen ("./conftest.empty", "r");
+ if (!in)
+ return 1;
+ char *line = malloc (1);
+ line[0] = 'A';
+ size_t siz = 1;
+ if (getdelim (&line, &siz, '\n', in) != -1 || line[0] != '\0')
+ result |= 8;
+ free (line);
+ }
+ fclose (in);
+ return result;
}
]])],
[gl_cv_func_working_getdelim=yes],
[gl_cv_func_working_getdelim=no],
- [dnl We're cross compiling.
- dnl Guess it works on glibc2 systems and musl systems.
- AC_EGREP_CPP([Lucky GNU user],
- [
-#include
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2) && !defined __UCLIBC__
- Lucky GNU user
- #endif
-#endif
- ],
- [gl_cv_func_working_getdelim="guessing yes"],
- [case "$host_os" in
- *-musl* | midipix*) gl_cv_func_working_getdelim="guessing yes" ;;
- *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
- esac
- ])
+ [case "$host_os" in
+ # Guess yes on musl.
+ *-musl* | midipix*) gl_cv_func_working_getdelim="guessing yes" ;;
+ # Guess no on glibc.
+ *-gnu* | gnu*) gl_cv_func_working_getdelim="guessing no" ;;
+ *) gl_cv_func_working_getdelim="$gl_cross_guess_normal" ;;
+ esac
])
;;
esac
+ rm -f conftest.data conftest.empty
])
case "$gl_cv_func_working_getdelim" in
*yes) ;;
diff --git a/gl/m4/getdtablesize.m4 b/gl/m4/getdtablesize.m4
index 112c1c4d..0b780110 100644
--- a/gl/m4/getdtablesize.m4
+++ b/gl/m4/getdtablesize.m4
@@ -1,6 +1,6 @@
# getdtablesize.m4
# serial 8
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/gethostname.m4 b/gl/m4/gethostname.m4
index be71ff78..33293521 100644
--- a/gl/m4/gethostname.m4
+++ b/gl/m4/gethostname.m4
@@ -1,6 +1,6 @@
# gethostname.m4
# serial 16
-dnl Copyright (C) 2002, 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index b97b8011..ed32fa10 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,7 +1,7 @@
# getline.m4
-# serial 33
+# serial 35
-dnl Copyright (C) 1998-2003, 2005-2007, 2009-2025 Free Software Foundation,
+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2026 Free Software Foundation,
dnl Inc.
dnl
dnl This file is free software; the Free Software Foundation
@@ -31,6 +31,7 @@ AC_DEFUN([gl_FUNC_GETLINE],
AC_CACHE_CHECK([for working getline function],
[am_cv_func_working_getline],
[echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
+ touch conftest.empty
AC_RUN_IFELSE([AC_LANG_SOURCE([[
# include
# include
@@ -38,6 +39,7 @@ AC_DEFUN([gl_FUNC_GETLINE],
int main ()
{
FILE *in = fopen ("./conftest.data", "r");
+ int result = 0;
if (!in)
return 1;
{
@@ -47,7 +49,7 @@ AC_DEFUN([gl_FUNC_GETLINE],
size_t siz = 0;
int len = getline (&line, &siz, in);
if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
- { free (line); fclose (in); return 2; }
+ result |= 2;
free (line);
}
{
@@ -56,33 +58,38 @@ AC_DEFUN([gl_FUNC_GETLINE],
char *line = NULL;
size_t siz = (size_t)(~0) / 4;
if (getline (&line, &siz, in) == -1)
- { fclose (in); return 3; }
+ result |= 4;
free (line);
}
fclose (in);
- return 0;
+ {
+ /* Test that reading EOF as the first character sets the first byte
+ in the buffer to NUL. This fails on glibc 2.42 and earlier. */
+ in = fopen ("./conftest.empty", "r");
+ if (!in)
+ return 1;
+ char *line = malloc (1);
+ line[0] = 'A';
+ size_t siz = 1;
+ if (getline (&line, &siz, in) != -1 || line[0] != '\0')
+ result |= 8;
+ free (line);
+ }
+ fclose (in);
+ return result;
}
]])],
[am_cv_func_working_getline=yes],
[am_cv_func_working_getline=no],
- [dnl We're cross compiling.
- dnl Guess it works on glibc2 systems and musl systems.
- AC_EGREP_CPP([Lucky GNU user],
- [
-#include
-#ifdef __GNU_LIBRARY__
- #if (__GLIBC__ >= 2) && !defined __UCLIBC__
- Lucky GNU user
- #endif
-#endif
- ],
- [am_cv_func_working_getline="guessing yes"],
- [case "$host_os" in
- *-musl* | midipix*) am_cv_func_working_getline="guessing yes" ;;
- *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
- esac
- ])
+ [case "$host_os" in
+ # Guess yes on musl.
+ *-musl* | midipix*) am_cv_func_working_getline="guessing yes" ;;
+ # Guess no on glibc.
+ *-gnu* | gnu*) am_cv_func_working_getline="guessing no" ;;
+ *) am_cv_func_working_getline="$gl_cross_guess_normal" ;;
+ esac
])
+ rm -f conftest.data conftest.empty
])
else
am_cv_func_working_getline=no
diff --git a/gl/m4/getloadavg.m4 b/gl/m4/getloadavg.m4
index 8ab613db..dc226168 100644
--- a/gl/m4/getloadavg.m4
+++ b/gl/m4/getloadavg.m4
@@ -1,6 +1,6 @@
# getloadavg.m4
-# serial 13
-dnl Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2025 Free
+# serial 14
+dnl Copyright (C) 1992-1996, 1999-2000, 2002-2003, 2006, 2008-2026 Free
dnl Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -124,8 +124,7 @@ if test $gl_func_getloadavg_done = no; then
fi
# We cannot check for , because Solaris 2 does not use dwarf (it
-# uses stabs), but it is still SVR4. We cannot check for because
-# Irix 4.0.5F has the header but not the library.
+# uses stabs), but it is still SVR4.
if test $gl_func_getloadavg_done = no && test "$ac_cv_lib_elf_elf_begin" = yes \
&& test "$ac_cv_lib_kvm_kvm_open" = yes; then
gl_func_getloadavg_done=yes
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index cb344c15..c620b2b7 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,6 +1,6 @@
# getopt.m4
-# serial 50
-dnl Copyright (C) 2002-2006, 2008-2025 Free Software Foundation, Inc.
+# serial 52
+dnl Copyright (C) 2002-2006, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -88,8 +88,8 @@ AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
dnl Merging these three different test programs into a single one
dnl would require a reset mechanism. On BSD systems, it can be done
dnl through 'optreset'; on some others (glibc), it can be done by
- dnl setting 'optind' to 0; on others again (HP-UX, IRIX, OSF/1,
- dnl Solaris 9, musl libc), there is no such mechanism.
+ dnl setting 'optind' to 0; on others again (HP-UX, Solaris 9,
+ dnl musl libc), there is no such mechanism.
if test $cross_compiling = no; then
dnl Sanity check. Succeeds everywhere (except on MSVC,
dnl which lacks and getopt() entirely).
@@ -238,8 +238,7 @@ dnl is ambiguous with environment values that contain newlines.
nocrash_init();
/* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
- and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
- OSF/1 5.1, Solaris 10. */
+ and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, Solaris 10. */
{
static char conftest[] = "conftest";
static char plus[] = "-+";
@@ -250,7 +249,7 @@ dnl is ambiguous with environment values that contain newlines.
}
/* This code succeeds on glibc 2.8, mingw,
and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
- IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
+ Solaris 10, Cygwin 1.5.x. */
{
static char program[] = "program";
static char p[] = "-p";
diff --git a/gl/m4/getprogname.m4 b/gl/m4/getprogname.m4
index 90f34c74..d60f3efb 100644
--- a/gl/m4/getprogname.m4
+++ b/gl/m4/getprogname.m4
@@ -1,6 +1,6 @@
# getprogname.m4
-# serial 8
-dnl Copyright (C) 2016-2025 Free Software Foundation, Inc.
+# serial 9
+dnl Copyright (C) 2016-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,6 +12,12 @@ AC_DEFUN([gl_FUNC_GETPROGNAME],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_HEADERS_ONCE([sys/process.h])
+ if test $ac_cv_header_sys_process_h = yes; then
+ HAVE_SYS_PROCESS_H=1
+ else
+ HAVE_SYS_PROCESS_H=0
+ fi
gl_CHECK_FUNCS_ANDROID([getprogname], [[#include ]])
if test $ac_cv_func_getprogname = no; then
HAVE_GETPROGNAME=0
diff --git a/gl/m4/gettext_h.m4 b/gl/m4/gettext_h.m4
new file mode 100644
index 00000000..7ef89541
--- /dev/null
+++ b/gl/m4/gettext_h.m4
@@ -0,0 +1,21 @@
+# gettext_h.m4
+# serial 1
+dnl Copyright (C) 2025-2026 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN_ONCE([gl_GETTEXT_H],
+[
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ AH_BOTTOM([
+/* The text domainname for Gnulib messages. Ordinarily this is "gnulib",
+ but packages that do their own translations of Gnulib can use something
+ different by defining GNULIB_TEXT_DOMAIN in their config.h file. */
+#ifndef GNULIB_TEXT_DOMAIN
+# define GNULIB_TEXT_DOMAIN/**/"gnulib"
+#endif
+])
+])
diff --git a/gl/m4/gl-openssl.m4 b/gl/m4/gl-openssl.m4
index 3cfea50f..70f43a55 100644
--- a/gl/m4/gl-openssl.m4
+++ b/gl/m4/gl-openssl.m4
@@ -1,6 +1,6 @@
# gl-openssl.m4
-# serial 7
-dnl Copyright (C) 2013-2025 Free Software Foundation, Inc.
+# serial 8
+dnl Copyright (C) 2013-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -58,12 +58,17 @@ AC_DEFUN([gl_CRYPTO_CHECK],
fi
if test "x$with_openssl" != xauto-gpl-compat ||
test "x$gl_cv_openssl_gpl_compat" = xyes; then
- AC_CHECK_LIB([crypto], [$1],
- [AC_CHECK_HEADERS(
- m4_if([$1], [MD5], [openssl/md5.h], [openssl/sha.h]),
+ m4_if([$1], [SHA3],
+ [AC_CHECK_LIB([crypto], [EVP_sha3_224],
[LIB_CRYPTO=-lcrypto
AC_DEFINE([HAVE_OPENSSL_$1], [1],
- [Define to 1 if libcrypto is used for $1.])])])
+ [Define to 1 if libcrypto is used for $1.])])],
+ [AC_CHECK_LIB([crypto], [$1],
+ [AC_CHECK_HEADERS(
+ m4_if([$1], [MD5], [openssl/md5.h], [openssl/sha.h]),
+ [LIB_CRYPTO=-lcrypto
+ AC_DEFINE([HAVE_OPENSSL_$1], [1],
+ [Define to 1 if libcrypto is used for $1.])])])])
fi
if test "x$LIB_CRYPTO" = x; then
message='openssl development library not found for $1.
diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4
index 6a6e8593..1b964b34 100644
--- a/gl/m4/gnulib-cache.m4
+++ b/gl/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2025 Free Software Foundation, Inc.
+# Copyright (C) 2002-2026 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index 034dae69..26eef771 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,6 +1,6 @@
# gnulib-common.m4
-# serial 113
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+# serial 115
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -168,7 +168,7 @@ AC_DEFUN([gl_COMMON_BODY], [
======================================================================
This gives a syntax error
- in C mode with gcc
- , and
+ , and
- in C++ mode with clang++ version < 16, and
- in C++ mode, inside extern "C" {}, still in newer clang++ versions
.
@@ -414,22 +414,25 @@ AC_DEFUN([gl_COMMON_BODY], [
#endif
/* _GL_ATTRIBUTE_CONST declares:
- It is OK for a compiler to move calls to the function and to omit
- calls to the function if another call has the same arguments or the
- result is not used.
- This attribute is safe for a function that neither depends on
- nor affects state, and always returns exactly once -
+ It is OK for a compiler to move a call, or omit a duplicate call
+ and reuse a cached return value, even if the state changes between calls.
+ It is also OK to omit a call if the result is not used.
+ This attribute is safe if the function does not change observable state,
+ returns a value determined solely by its arguments' values
+ without examining state, and always returns exactly once -
e.g., does not raise an exception, call longjmp, or loop forever.
(This attribute is stricter than _GL_ATTRIBUTE_PURE because the
- function cannot observe state. It is stricter than
- _GL_ATTRIBUTE_UNSEQUENCED because the function must return exactly
- once and cannot depend on state addressed by its arguments.) */
+ function cannot observe state. Unlike _GL_ATTRIBUTE_UNSEQUENCED
+ the function must return exactly once and cannot access state
+ addressed by its pointer arguments or that happens to have the same
+ value for all calls to the function, but the function is allowed to
+ return a pointer to storage that can be modified later. */
/* Applies to: functions. */
#ifndef _GL_ATTRIBUTE_CONST
# if _GL_HAS_ATTRIBUTE (const)
# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
# else
-# define _GL_ATTRIBUTE_CONST _GL_ATTRIBUTE_UNSEQUENCED
+# define _GL_ATTRIBUTE_CONST
# endif
#endif
@@ -451,7 +454,7 @@ AC_DEFUN([gl_COMMON_BODY], [
yet. */
#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
# if defined __cplusplus && defined __GNUC__ && !defined __clang__
-/* Work around GCC bug */
+/* Work around GCC bug */
# define _GL_ATTRIBUTE_DEALLOC_FREE \
_GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
# else
@@ -590,7 +593,9 @@ AC_DEFUN([gl_COMMON_BODY], [
/* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if
the entity is not used. The compiler should not warn if the entity is not
- used. */
+ used. However, 'int _GL_UNNAMED (i)' is preferable to
+ '_GL_ATTRIBUTE_MAYBE_UNUSED int i' when parameter I is unused
+ regardless of preprocessor macro settings. */
/* Applies to:
- function, variable,
- struct, union, struct/union member,
@@ -744,39 +749,40 @@ AC_DEFUN([gl_COMMON_BODY], [
#endif
/* _GL_ATTRIBUTE_PURE declares:
- It is OK for a compiler to move calls to the function and to omit
- calls to the function if another call has the same arguments or the
- result is not used, and if observable state is the same.
- This attribute is safe for a function that does not affect observable state
- and always returns exactly once.
+ It is OK for a compiler to move a call, or omit a duplicate call
+ and reuse a cached return value, if observable state is the same.
+ It is also OK to omit a call if the return value is not used.
+ This attribute is safe if the function does not change observable state,
+ returns a value determined solely by its arguments's values
+ together with observable state, and always returns exactly once.
(This attribute is looser than _GL_ATTRIBUTE_CONST because the function
- can depend on observable state. It is stricter than
- _GL_ATTRIBUTE_REPRODUCIBLE because the function must return exactly
- once and cannot affect state addressed by its arguments.) */
+ can depend on observable state.
+ Unlike _GL_ATTRIBUTE_REPRODUCIBLE the function must return exactly
+ once and cannot change state addressed by its arguments, but the
+ function can return a pointer to storage whose contents change later.) */
/* Applies to: functions. */
#ifndef _GL_ATTRIBUTE_PURE
# if _GL_HAS_ATTRIBUTE (pure)
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
-# define _GL_ATTRIBUTE_PURE _GL_ATTRIBUTE_REPRODUCIBLE
+# define _GL_ATTRIBUTE_PURE
# endif
#endif
/* _GL_ATTRIBUTE_REPRODUCIBLE declares:
- It is OK for a compiler to move calls to the function and to omit duplicate
- calls to the function with the same arguments, so long as the state
- addressed by its arguments is the same and is updated in time for
- the rest of the program.
- This attribute is safe for a function that is effectless and idempotent; see
- ISO C 23 § 6.7.12.7 for a definition of these terms.
+ It is OK for a compiler to move a call, or omit a duplicate call
+ and reuse a cached value returned either directly or indirectly via
+ a pointer, if other observable state is the same;
+ however, pointer arguments cannot alias.
+ This attribute is safe for a function that is effectless and idempotent;
+ see ISO C 23 § 6.7.13.8 for a definition of these terms.
(This attribute is looser than _GL_ATTRIBUTE_UNSEQUENCED because
- the function need not be stateless and idempotent. It is looser
- than _GL_ATTRIBUTE_PURE because the function need not return
- exactly once and can affect state addressed by its arguments.)
+ the function need not be stateless or independent.
+ Unlike _GL_ATTRIBUTE_PURE the function need not return exactly once
+ and can change state addressed by its pointer arguments, but the
+ function cannot return a pointer to storage whose contents change later.)
See also and
- .
- ATTENTION! Efforts are underway to change the meaning of this attribute.
- See . */
+ . */
/* Applies to: functions, pointer to functions, function types. */
#ifndef _GL_ATTRIBUTE_REPRODUCIBLE
/* This may be revisited when gcc and clang support [[reproducible]] or possibly
@@ -816,20 +822,22 @@ AC_DEFUN([gl_COMMON_BODY], [
#endif
/* _GL_ATTRIBUTE_UNSEQUENCED declares:
- It is OK for a compiler to move calls to the function and to omit duplicate
- calls to the function with the same arguments, so long as the state
- addressed by its arguments is the same.
+ It is OK for a compiler to move a call, or omit a duplicate call
+ and reuse a cached value returned either directly or indirectly via
+ a pointer, if the state addressed by its pointer arguments is the same;
+ however, pointer arguments cannot alias.
This attribute is safe for a function that is effectless, idempotent,
- stateless, and independent; see ISO C 23 § 6.7.12.7 for a definition of
+ stateless, and independent; see ISO C 23 § 6.7.13.8 for a definition of
these terms.
(This attribute is stricter than _GL_ATTRIBUTE_REPRODUCIBLE because
- the function must be stateless and independent. It is looser than
- _GL_ATTRIBUTE_CONST because the function need not return exactly
- once and can depend on state addressed by its arguments.)
+ the function must be stateless and independent. Unlike
+ _GL_ATTRIBUTE_CONST the function need not return exactly once, and
+ can depend on state accessed via its pointer arguments or that
+ happens to have the same value for all calls to the function, but
+ the function cannot return a pointer to storage whose contents
+ change later.)
See also and
- .
- ATTENTION! Efforts are underway to change the meaning of this attribute.
- See . */
+ . */
/* Applies to: functions, pointer to functions, function types. */
#ifndef _GL_ATTRIBUTE_UNSEQUENCED
/* This may be revisited when gcc and clang support [[unsequenced]] or possibly
@@ -869,6 +877,21 @@ AC_DEFUN([gl_COMMON_BODY], [
# endif
#endif
+/* _GL_UNNAMED (ID) is the "name" of an unnamed function parameter.
+ Each of the function's unnamed parameters should have a unique "name".
+ The "name" cannot be used. This ports both to C17 and earlier, which
+ lack unnamed parameters, and to C++ and later C, which have them. */
+/* Applies to:
+ - function parameters. */
+#ifndef _GL_UNNAMED
+# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 202311 \
+ && !defined __cplusplus)
+# define _GL_UNNAMED(id) unnamed_##id _GL_ATTRIBUTE_UNUSED
+# else
+# define _GL_UNNAMED(id)
+# endif
+#endif
+
/* The following attributes enable detection of multithread-safety problems
and resource leaks at compile-time, by clang ≥ 15, when the warning option
-Wthread-safety is enabled. For usage, see
@@ -1406,7 +1429,7 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
dnl -Wno-type-limits >= 4.3 >= 3.9
dnl -Wno-undef >= 3 >= 3.9
dnl -Wno-unsuffixed-float-constants >= 4.5
- dnl -Wno-unused-const-variable >= 4.4 >= 3.9
+ dnl -Wno-unused-const-variable >= 6.1 >= 3.9
dnl -Wno-unused-function >= 3 >= 3.9
dnl -Wno-unused-parameter >= 3 >= 3.9
dnl
@@ -1436,7 +1459,7 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
-Wno-sign-conversion
-Wno-type-limits
#endif
- #if (__GNUC__ + (__GNUC_MINOR__ >= 4) > 4 && !defined __clang__) || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ #if (__GNUC__ + (__GNUC_MINOR__ >= 1) > 6 && !defined __clang__) || (__clang_major__ + (__clang_minor__ >= 9) > 3)
-Wno-unused-const-variable
#endif
#if (__GNUC__ + (__GNUC_MINOR__ >= 5) > 4 && !defined __clang__)
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 50e98454..cdd46759 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2025 Free Software Foundation, Inc.
+# Copyright (C) 2002-2026 Free Software Foundation, Inc.
#
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -209,6 +209,7 @@ AC_DEFUN([gl_EARLY],
# Code from module stdint-h:
# Code from module stdio-h:
gl_STDIO_H_EARLY
+ # Code from module stdio-windows:
# Code from module stdlib-h:
# Code from module strcase:
# Code from module strcasecmp:
@@ -218,6 +219,7 @@ AC_DEFUN([gl_EARLY],
# Code from module strerror:
# Code from module strerror-override:
# Code from module string-h:
+ # Code from module stringeq:
# Code from module strings-h:
# Code from module strncasecmp:
# Code from module strncpy:
@@ -570,7 +572,8 @@ AC_DEFUN([gl_INIT],
])
gl_UNISTD_MODULE_INDICATOR([getdtablesize])
gl_FUNC_GETHOSTNAME
- gl_CONDITIONAL([GL_COND_OBJ_GETHOSTNAME], [test $HAVE_GETHOSTNAME = 0])
+ gl_CONDITIONAL([GL_COND_OBJ_GETHOSTNAME],
+ [test $HAVE_GETHOSTNAME = 0 || test $UNISTD_H_HAVE_WINSOCK2_H = 1])
AM_COND_IF([GL_COND_OBJ_GETHOSTNAME], [
gl_PREREQ_GETHOSTNAME
])
@@ -614,8 +617,7 @@ AC_DEFUN([gl_INIT],
gl_PREREQ_GETPROGNAME
])
gl_STDLIB_MODULE_INDICATOR([getprogname])
- AC_SUBST([LIBINTL])
- AC_SUBST([LTLIBINTL])
+ gl_GETTEXT_H
AC_PROG_MKDIR_P
GNULIB_I18N
AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
@@ -884,19 +886,6 @@ AC_DEFUN([gl_INIT],
gl_STDIO_H
gl_STDIO_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
- USES_MSVCRT=0
- case "$host_os" in
- mingw* | windows*)
- AC_EGREP_CPP([Special], [
- #ifndef _UCRT
- Special
- #endif
- ],
- [USES_MSVCRT=1])
- ;;
- esac
- gl_CONDITIONAL([GL_COND_OBJ_STDIO_CONSOLESAFE], [test $USES_MSVCRT = 1])
- AC_CHECK_FUNCS([vasprintf])
gl_CONDITIONAL([GL_COND_OBJ_STDIO_READ], [test $REPLACE_STDIO_READ_FUNCS = 1])
gl_CONDITIONAL([GL_COND_OBJ_STDIO_WRITE], [test $REPLACE_STDIO_WRITE_FUNCS = 1])
dnl No need to create extra modules for these functions. Everyone who uses
@@ -922,6 +911,20 @@ AC_DEFUN([gl_INIT],
gl_STDIO_MODULE_INDICATOR([fputs])
gl_STDIO_MODULE_INDICATOR([puts])
gl_STDIO_MODULE_INDICATOR([fwrite])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ USES_MSVCRT=0
+ case "$host_os" in
+ mingw* | windows*)
+ AC_EGREP_CPP([Special], [
+ #ifndef _UCRT
+ Special
+ #endif
+ ],
+ [USES_MSVCRT=1])
+ ;;
+ esac
+ gl_CONDITIONAL([GL_COND_OBJ_STDIO_CONSOLESAFE], [test $USES_MSVCRT = 1])
+ AC_CHECK_FUNCS([vasprintf])
gl_STDLIB_H
gl_STDLIB_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
@@ -957,6 +960,9 @@ AC_DEFUN([gl_INIT],
gl_STRING_H
gl_STRING_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
+ gl_FUNC_STREQ
+ gl_FUNC_MEMEQ
+ gl_STRING_MODULE_INDICATOR([stringeq])
gl_STRINGS_H
gl_STRINGS_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
@@ -1021,35 +1027,35 @@ AC_DEFUN([gl_INIT],
gl_UNICASE_H
gl_UNICASE_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
- gl_LIBUNISTRING_MODULE([1.3], [unicase/tolower])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/tolower])
gl_LIBUNISTRING_LIBHEADER([1.3], [unictype.h])
gl_UNICTYPE_H
gl_UNICTYPE_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-alnum])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-alnum])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-alpha])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-alpha])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-blank])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-blank])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-cntrl])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-cntrl])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-digit])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-digit])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-graph])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-graph])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-lower])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-lower])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-print])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-print])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-punct])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-punct])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-space])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-space])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.3], [unictype/ctype-upper])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-upper])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-xdigit])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-xdigit])
gl_LIBUNISTRING_LIBHEADER([1.2], [uninorm.h])
gl_UNINORM_H
gl_UNINORM_H_REQUIRE_DEFAULTS
@@ -1062,7 +1068,7 @@ AC_DEFUN([gl_INIT],
gl_UNITYPES_H
gl_LIBUNISTRING_LIBHEADER([0.9.11], [uniwidth.h])
AC_PROG_MKDIR_P
- gl_LIBUNISTRING_MODULE([1.3], [uniwidth/width])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwidth/width])
gl_FUNC_GLIBC_UNLOCKED_IO
gl_FUNC_UNSETENV
gl_CONDITIONAL([GL_COND_OBJ_UNSETENV],
@@ -1535,6 +1541,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/strerror-override.c
lib/strerror-override.h
lib/strerror.c
+ lib/string.c
lib/string.in.h
lib/strings.in.h
lib/stripslash.c
@@ -1677,6 +1684,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/getloadavg.m4
m4/getopt.m4
m4/getprogname.m4
+ m4/gettext_h.m4
m4/gl-openssl.m4
m4/gnulib-common.m4
m4/gnulib-i18n.m4
@@ -1773,6 +1781,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/strcasestr.m4
m4/strerror.m4
m4/string_h.m4
+ m4/stringeq.m4
m4/strings_h.m4
m4/strncasecmp.m4
m4/strncpy.m4
diff --git a/gl/m4/gnulib-i18n.m4 b/gl/m4/gnulib-i18n.m4
index 868043e7..9a389187 100644
--- a/gl/m4/gnulib-i18n.m4
+++ b/gl/m4/gnulib-i18n.m4
@@ -1,6 +1,6 @@
# gnulib-i18n.m4
# serial 1
-dnl Copyright (C) 2005-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4
index 8634a6e9..83d1e701 100644
--- a/gl/m4/gnulib-tool.m4
+++ b/gl/m4/gnulib-tool.m4
@@ -1,6 +1,6 @@
# gnulib-tool.m4
# serial 5
-dnl Copyright (C) 2004-2005, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2005, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/hostent.m4 b/gl/m4/hostent.m4
index 9278285c..0303ff80 100644
--- a/gl/m4/hostent.m4
+++ b/gl/m4/hostent.m4
@@ -1,6 +1,6 @@
# hostent.m4
# serial 5
-dnl Copyright (C) 2008, 2010-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/idpriv.m4 b/gl/m4/idpriv.m4
index 6e855e9a..a7091ad3 100644
--- a/gl/m4/idpriv.m4
+++ b/gl/m4/idpriv.m4
@@ -1,6 +1,6 @@
# idpriv.m4
# serial 1
-dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index 80de991e..a19f2dfd 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,6 +1,6 @@
# include_next.m4
# serial 27
-dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/inet_ntop.m4 b/gl/m4/inet_ntop.m4
index 693bd51b..62e7a575 100644
--- a/gl/m4/inet_ntop.m4
+++ b/gl/m4/inet_ntop.m4
@@ -1,6 +1,6 @@
# inet_ntop.m4
-# serial 22
-dnl Copyright (C) 2005-2006, 2008-2025 Free Software Foundation, Inc.
+# serial 23
+dnl Copyright (C) 2005-2006, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_INET_NTOP],
dnl Solaris 8..10 provide inet_ntop in libnsl instead.
dnl Solaris 2.6..7 provide inet_ntop in libresolv instead.
dnl Haiku provides it in -lnetwork.
+ dnl QNX provides it in -lsocket.
dnl Native Windows provides it in -lws2_32 instead, with a declaration in
dnl , and it uses stdcall calling convention, not cdecl
dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it).
@@ -39,7 +40,7 @@ AC_DEFUN([gl_FUNC_INET_NTOP],
fi
else
gl_saved_LIBS=$LIBS
- AC_SEARCH_LIBS([inet_ntop], [nsl resolv network], [],
+ AC_SEARCH_LIBS([inet_ntop], [nsl resolv network socket], [],
[AC_CHECK_FUNCS([inet_ntop])
if test $ac_cv_func_inet_ntop = no; then
HAVE_INET_NTOP=0
diff --git a/gl/m4/inet_pton.m4 b/gl/m4/inet_pton.m4
index b6e59a25..150c3a07 100644
--- a/gl/m4/inet_pton.m4
+++ b/gl/m4/inet_pton.m4
@@ -1,6 +1,6 @@
# inet_pton.m4
-# serial 20
-dnl Copyright (C) 2006, 2008-2025 Free Software Foundation, Inc.
+# serial 21
+dnl Copyright (C) 2006, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -19,6 +19,7 @@ AC_DEFUN([gl_FUNC_INET_PTON],
dnl Solaris 8..10 provide inet_pton in libnsl instead.
dnl Solaris 2.6..7 provide inet_pton in libresolv instead.
dnl Haiku provides it in -lnetwork.
+ dnl QNX provides it in -lsocket.
dnl Native Windows provides it in -lws2_32 instead, with a declaration in
dnl , and it uses stdcall calling convention, not cdecl
dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it).
@@ -39,7 +40,7 @@ AC_DEFUN([gl_FUNC_INET_PTON],
fi
else
gl_saved_LIBS=$LIBS
- AC_SEARCH_LIBS([inet_pton], [nsl resolv network], [],
+ AC_SEARCH_LIBS([inet_pton], [nsl resolv network socket], [],
[AC_CHECK_FUNCS([inet_pton])
if test $ac_cv_func_inet_pton = no; then
HAVE_INET_PTON=0
diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4
index c1df7b27..ad79536c 100644
--- a/gl/m4/intmax_t.m4
+++ b/gl/m4/intmax_t.m4
@@ -1,6 +1,6 @@
# intmax_t.m4
# serial 9
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2025 Free Software Foundation,
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2026 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4
index 63c82c61..ec17c237 100644
--- a/gl/m4/inttypes.m4
+++ b/gl/m4/inttypes.m4
@@ -1,6 +1,6 @@
# inttypes.m4
# serial 37
-dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4
index ad939a53..ed9e7033 100644
--- a/gl/m4/inttypes_h.m4
+++ b/gl/m4/inttypes_h.m4
@@ -1,6 +1,6 @@
# inttypes_h.m4
# serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/iswblank.m4 b/gl/m4/iswblank.m4
index d06b16a2..2c301a97 100644
--- a/gl/m4/iswblank.m4
+++ b/gl/m4/iswblank.m4
@@ -1,6 +1,6 @@
# iswblank.m4
# serial 7
-dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/iswctype.m4 b/gl/m4/iswctype.m4
index f5a3b760..3b179a76 100644
--- a/gl/m4/iswctype.m4
+++ b/gl/m4/iswctype.m4
@@ -1,6 +1,6 @@
# iswctype.m4
# serial 3
-dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/iswdigit.m4 b/gl/m4/iswdigit.m4
index 4582f598..7fca8167 100644
--- a/gl/m4/iswdigit.m4
+++ b/gl/m4/iswdigit.m4
@@ -1,6 +1,6 @@
# iswdigit.m4
# serial 9
-dnl Copyright (C) 2020-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/iswpunct.m4 b/gl/m4/iswpunct.m4
index d8e8d712..be312d6c 100644
--- a/gl/m4/iswpunct.m4
+++ b/gl/m4/iswpunct.m4
@@ -1,6 +1,6 @@
# iswpunct.m4
# serial 2
-dnl Copyright (C) 2023-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2023-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/iswxdigit.m4 b/gl/m4/iswxdigit.m4
index 95226fc4..2cb8e873 100644
--- a/gl/m4/iswxdigit.m4
+++ b/gl/m4/iswxdigit.m4
@@ -1,6 +1,6 @@
# iswxdigit.m4
# serial 9
-dnl Copyright (C) 2020-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4
index 69f936f0..3ed8d593 100644
--- a/gl/m4/langinfo_h.m4
+++ b/gl/m4/langinfo_h.m4
@@ -1,6 +1,6 @@
# langinfo_h.m4
-# serial 13
-dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
+# serial 14
+dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -18,18 +18,15 @@ AC_DEFUN_ONCE([gl_LANGINFO_H],
dnl Determine whether exists. It is missing on mingw and BeOS.
HAVE_LANGINFO_CODESET=0
- HAVE_LANGINFO_T_FMT_AMPM=0
HAVE_LANGINFO_ALTMON=0
HAVE_LANGINFO_ABALTMON=0
HAVE_LANGINFO_ERA=0
- HAVE_LANGINFO_YESEXPR=0
AC_CHECK_HEADERS_ONCE([langinfo.h])
if test $ac_cv_header_langinfo_h = yes; then
HAVE_LANGINFO_H=1
dnl Determine what defines.
dnl CODESET is missing on OpenBSD 3.8.
dnl ERA etc. are missing on OpenBSD 6.7.
- dnl T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
dnl ALTMON_* are missing on glibc 2.26 and many other systems.
dnl ABALTMON_* are missing on glibc 2.41 and many other systems.
AC_CACHE_CHECK([whether langinfo.h defines CODESET],
@@ -44,18 +41,6 @@ int a = CODESET;
if test $gl_cv_header_langinfo_codeset = yes; then
HAVE_LANGINFO_CODESET=1
fi
- AC_CACHE_CHECK([whether langinfo.h defines T_FMT_AMPM],
- [gl_cv_header_langinfo_t_fmt_ampm],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[#include
-int a = T_FMT_AMPM;
-]])],
- [gl_cv_header_langinfo_t_fmt_ampm=yes],
- [gl_cv_header_langinfo_t_fmt_ampm=no])
- ])
- if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
- HAVE_LANGINFO_T_FMT_AMPM=1
- fi
AC_CACHE_CHECK([whether langinfo.h defines ALTMON_1],
[gl_cv_header_langinfo_altmon],
[AC_COMPILE_IFELSE(
@@ -92,28 +77,14 @@ int a = ERA;
if test $gl_cv_header_langinfo_era = yes; then
HAVE_LANGINFO_ERA=1
fi
- AC_CACHE_CHECK([whether langinfo.h defines YESEXPR],
- [gl_cv_header_langinfo_yesexpr],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[#include
-int a = YESEXPR;
-]])],
- [gl_cv_header_langinfo_yesexpr=yes],
- [gl_cv_header_langinfo_yesexpr=no])
- ])
- if test $gl_cv_header_langinfo_yesexpr = yes; then
- HAVE_LANGINFO_YESEXPR=1
- fi
else
HAVE_LANGINFO_H=0
fi
AC_SUBST([HAVE_LANGINFO_H])
AC_SUBST([HAVE_LANGINFO_CODESET])
- AC_SUBST([HAVE_LANGINFO_T_FMT_AMPM])
AC_SUBST([HAVE_LANGINFO_ALTMON])
AC_SUBST([HAVE_LANGINFO_ABALTMON])
AC_SUBST([HAVE_LANGINFO_ERA])
- AC_SUBST([HAVE_LANGINFO_YESEXPR])
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4
index b24f657d..3134f336 100644
--- a/gl/m4/largefile.m4
+++ b/gl/m4/largefile.m4
@@ -1,6 +1,6 @@
# largefile.m4
-# serial 2
-dnl Copyright 1992-1996, 1998-2025 Free Software Foundation, Inc.
+# serial 4
+dnl Copyright 1992-1996, 1998-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -355,8 +355,7 @@ AC_DEFUN([gl_LARGEFILE],
*)
dnl Nothing to do on gnulib's side.
dnl A 64-bit off_t is
- dnl - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, IRIX,
- dnl OSF/1, Cygwin,
+ dnl - already the default on Mac OS X, FreeBSD, NetBSD, OpenBSD, Cygwin,
dnl - enabled by _FILE_OFFSET_BITS=64 (ensured by AC_SYS_LARGEFILE) on
dnl glibc, HP-UX, Solaris,
dnl - enabled by _LARGE_FILES=1 (ensured by AC_SYS_LARGEFILE) on AIX,
diff --git a/gl/m4/libunistring-base.m4 b/gl/m4/libunistring-base.m4
index 9b5795ed..f2f144ac 100644
--- a/gl/m4/libunistring-base.m4
+++ b/gl/m4/libunistring-base.m4
@@ -1,6 +1,6 @@
# libunistring-base.m4
# serial 10
-dnl Copyright (C) 2010-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/limits-h.m4 b/gl/m4/limits-h.m4
index 202df492..048c8fab 100644
--- a/gl/m4/limits-h.m4
+++ b/gl/m4/limits-h.m4
@@ -1,6 +1,6 @@
# limits-h.m4
# serial 1
-dnl Copyright 2016-2025 Free Software Foundation, Inc.
+dnl Copyright 2016-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/localcharset.m4 b/gl/m4/localcharset.m4
index 374a48f1..8e2c2755 100644
--- a/gl/m4/localcharset.m4
+++ b/gl/m4/localcharset.m4
@@ -1,6 +1,6 @@
# localcharset.m4
# serial 8
-dnl Copyright (C) 2002, 2004, 2006, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/locale-en.m4 b/gl/m4/locale-en.m4
index 4151428a..f5e035f3 100644
--- a/gl/m4/locale-en.m4
+++ b/gl/m4/locale-en.m4
@@ -1,6 +1,6 @@
# locale-en.m4
# serial 1
-dnl Copyright (C) 2003-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -19,7 +19,7 @@ AC_DEFUN_ONCE([gt_LOCALE_EN_UTF8],
*-musl* | midipix*)
dnl On musl libc, all kinds of ll_CC.UTF-8 locales exist, even without
dnl any locale file on disk. But they are effectively equivalent to the
- dnl C.UTF-8 locale, except for locale categories (such as LC_MESSSAGES)
+ dnl C.UTF-8 locale, except for locale categories (such as LC_MESSAGES)
dnl for which localizations (.mo files) have been installed.
gt_cv_locale_en_utf8=en_US.UTF-8
;;
diff --git a/gl/m4/locale-fr.m4 b/gl/m4/locale-fr.m4
index f504d5b5..097cefa6 100644
--- a/gl/m4/locale-fr.m4
+++ b/gl/m4/locale-fr.m4
@@ -1,6 +1,6 @@
# locale-fr.m4
-# serial 24
-dnl Copyright (C) 2003, 2005-2025 Free Software Foundation, Inc.
+# serial 25
+dnl Copyright (C) 2003, 2005-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -112,7 +112,7 @@ int main () {
if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=fr_FR.ISO-8859-1
else
- # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ # Test for the AIX, FreeBSD, NetBSD, OpenBSD locale name.
if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=fr_FR.ISO8859-1
else
@@ -156,7 +156,7 @@ AC_DEFUN_ONCE([gt_LOCALE_FR_UTF8],
*-musl* | midipix*)
dnl On musl libc, all kinds of ll_CC.UTF-8 locales exist, even without
dnl any locale file on disk. But they are effectively equivalent to the
- dnl C.UTF-8 locale, except for locale categories (such as LC_MESSSAGES)
+ dnl C.UTF-8 locale, except for locale categories (such as LC_MESSAGES)
dnl for which localizations (.mo files) have been installed.
gt_cv_locale_fr_utf8=fr_FR.UTF-8
;;
diff --git a/gl/m4/locale-ja.m4 b/gl/m4/locale-ja.m4
index 1c813b89..ee4309ed 100644
--- a/gl/m4/locale-ja.m4
+++ b/gl/m4/locale-ja.m4
@@ -1,6 +1,6 @@
# locale-ja.m4
-# serial 19
-dnl Copyright (C) 2003, 2005-2025 Free Software Foundation, Inc.
+# serial 21
+dnl Copyright (C) 2003, 2005-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -112,11 +112,11 @@ int main ()
if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_ja=ja_JP.EUC-JP
else
- # Test for the HP-UX, OSF/1, NetBSD locale name.
+ # Test for the HP-UX, NetBSD locale name.
if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_ja=ja_JP.eucJP
else
- # Test for the IRIX, FreeBSD locale name.
+ # Test for the FreeBSD locale name.
if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_ja=ja_JP.EUC
else
diff --git a/gl/m4/locale-zh.m4 b/gl/m4/locale-zh.m4
index 6f9374d2..98975bdd 100644
--- a/gl/m4/locale-zh.m4
+++ b/gl/m4/locale-zh.m4
@@ -1,6 +1,6 @@
# locale-zh.m4
# serial 20
-dnl Copyright (C) 2003, 2005-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/locale_h.m4 b/gl/m4/locale_h.m4
index e1afbc16..aeda9f9d 100644
--- a/gl/m4/locale_h.m4
+++ b/gl/m4/locale_h.m4
@@ -1,6 +1,6 @@
# locale_h.m4
-# serial 37
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+# serial 39
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -63,8 +63,8 @@ AC_DEFUN_ONCE([gl_LOCALE_H],
dnl Check whether 'struct lconv' is complete.
dnl Bionic libc's 'struct lconv' is just a dummy.
- dnl On OpenBSD 4.9, HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.x,
- dnl mingw, MSVC 9, it lacks the int_p_* and int_n_* members.
+ dnl On OpenBSD 4.9, HP-UX 11, Solaris 9, Cygwin 1.5.x, mingw, MSVC 9,
+ dnl it lacks the int_p_* and int_n_* members.
AC_CACHE_CHECK([whether struct lconv is properly defined],
[gl_cv_sys_struct_lconv_ok],
[AC_COMPILE_IFELSE(
diff --git a/gl/m4/localeconv.m4 b/gl/m4/localeconv.m4
index 55a669d0..9fa31de8 100644
--- a/gl/m4/localeconv.m4
+++ b/gl/m4/localeconv.m4
@@ -1,6 +1,6 @@
# localeconv.m4
# serial 3
-dnl Copyright (C) 2012-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4
index b1d3f435..7058fb30 100644
--- a/gl/m4/lock.m4
+++ b/gl/m4/lock.m4
@@ -1,6 +1,6 @@
# lock.m4
-# serial 14
-dnl Copyright (C) 2005-2025 Free Software Foundation, Inc.
+# serial 15
+dnl Copyright (C) 2005-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,8 +12,8 @@ AC_DEFUN([gl_LOCK],
[
AC_REQUIRE([gl_THREADLIB])
if test "$gl_threads_api" = posix; then
- # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
- # pthread_rwlock_* functions.
+ # Mac OS X 10.1 lacks the pthread_rwlock_t type and the pthread_rwlock_*
+ # functions.
has_rwlock=false
AC_CHECK_TYPE([pthread_rwlock_t],
[has_rwlock=true
diff --git a/gl/m4/lseek.m4 b/gl/m4/lseek.m4
index ddfadd38..342fc55b 100644
--- a/gl/m4/lseek.m4
+++ b/gl/m4/lseek.m4
@@ -1,6 +1,6 @@
# lseek.m4
# serial 15
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4
index efae2485..57df6fd9 100644
--- a/gl/m4/lstat.m4
+++ b/gl/m4/lstat.m4
@@ -1,6 +1,6 @@
# lstat.m4
# serial 36
-dnl Copyright (C) 1997-2001, 2003-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2001, 2003-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index 547b4e4d..a95e33db 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,6 +1,6 @@
# malloc.m4
-# serial 43.1
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+# serial 46
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -187,40 +187,42 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
[gl_cv_func_malloc_posix="guessing yes"],
[gl_cv_func_malloc_posix="guessing no"])
;;
- irix* | solaris*)
- dnl On IRIX 6.5, the three functions return NULL with errno unset
- dnl when the argument is larger than PTRDIFF_MAX.
- dnl On Solaris 11.3, the three functions return NULL with errno set
+ solaris*)
+ dnl On Solaris 11.3, the three functions might fail with errno set
dnl to EAGAIN, not ENOMEM, when the argument is larger than
- dnl PTRDIFF_MAX.
+ dnl PTRDIFF_MAX. See:
+ dnl https://lists.gnu.org/r/bug-gnulib/2021-05/msg00052.html
dnl Here is a test program:
+
m4_divert_push([KILL])
#include
+#include
#include
+#include
#include
-#define ptrdiff_t long
-#ifndef PTRDIFF_MAX
-# define PTRDIFF_MAX ((ptrdiff_t) ((1UL << (8 * sizeof (ptrdiff_t) - 1)) - 1))
-#endif
-int main ()
+#define TEST_CALL(call) \
+ do { \
+ void *p = call; \
+ if (p) \
+ fprintf (stderr, "returned %p (incorrect success)\n", p); \
+ else if (errno == ENOMEM) \
+ perror ("correct failure"); \
+ else \
+ perror ("incorrect failure (wrong errno)"); \
+ free (p); \
+ } while (0)
+
+int
+main ()
{
- void *p;
-
- fprintf (stderr, "PTRDIFF_MAX = %lu\n", (unsigned long) PTRDIFF_MAX);
-
- errno = 0;
- p = malloc ((unsigned long) PTRDIFF_MAX + 1);
- fprintf (stderr, "p=%p errno=%d\n", p, errno);
-
- errno = 0;
- p = calloc (PTRDIFF_MAX / 2 + 1, 2);
- fprintf (stderr, "p=%p errno=%d\n", p, errno);
-
- errno = 0;
- p = realloc (NULL, (unsigned long) PTRDIFF_MAX + 1);
- fprintf (stderr, "p=%p errno=%d\n", p, errno);
-
+ size_t big = PTRDIFF_MAX;
+ TEST_CALL (malloc (big + 1));
+ TEST_CALL (calloc (big / 2 + 1, 2));
+ TEST_CALL (realloc (NULL, big + 1));
+ void *small = malloc (1);
+ TEST_CALL (realloc (small, big + 1));
+ free (small);
return 0;
}
m4_divert_pop([KILL])
diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4
index cabe5fe7..2c0ed8ea 100644
--- a/gl/m4/malloca.m4
+++ b/gl/m4/malloca.m4
@@ -1,6 +1,6 @@
# malloca.m4
# serial 3
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2025 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2026 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index 8c27503b..4cf59671 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,6 +1,6 @@
# math_h.m4
-# serial 140.1
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+# serial 146
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -131,8 +131,11 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGBF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ILOGBL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISFINITE])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISFINITE_NO_CXX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISINF_NO_CXX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAN])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAN_NO_CXX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNAND])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISNANL])
@@ -177,6 +180,7 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT_NO_CXX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINHF])
@@ -220,14 +224,19 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_CBRTF=1; AC_SUBST([HAVE_CBRTF])
HAVE_CBRTL=1; AC_SUBST([HAVE_CBRTL])
HAVE_COPYSIGN=1; AC_SUBST([HAVE_COPYSIGN])
+ HAVE_COPYSIGNF=1; AC_SUBST([HAVE_COPYSIGNF])
HAVE_COPYSIGNL=1; AC_SUBST([HAVE_COPYSIGNL])
HAVE_COSF=1; AC_SUBST([HAVE_COSF])
HAVE_COSL=1; AC_SUBST([HAVE_COSL])
HAVE_COSHF=1; AC_SUBST([HAVE_COSHF])
HAVE_EXPF=1; AC_SUBST([HAVE_EXPF])
HAVE_EXPL=1; AC_SUBST([HAVE_EXPL])
+ HAVE_EXP2=1; AC_SUBST([HAVE_EXP2])
+ HAVE_EXP2F=1; AC_SUBST([HAVE_EXP2F])
+ HAVE_EXP2L=1; AC_SUBST([HAVE_EXP2L])
HAVE_EXPM1=1; AC_SUBST([HAVE_EXPM1])
HAVE_EXPM1F=1; AC_SUBST([HAVE_EXPM1F])
+ HAVE_EXPM1L=1; AC_SUBST([HAVE_EXPM1L])
HAVE_FABSF=1; AC_SUBST([HAVE_FABSF])
HAVE_FABSL=1; AC_SUBST([HAVE_FABSL])
HAVE_FMA=1; AC_SUBST([HAVE_FMA])
@@ -255,6 +264,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_LOG1P=1; AC_SUBST([HAVE_LOG1P])
HAVE_LOG1PF=1; AC_SUBST([HAVE_LOG1PF])
HAVE_LOG1PL=1; AC_SUBST([HAVE_LOG1PL])
+ HAVE_LOG2=1; AC_SUBST([HAVE_LOG2])
+ HAVE_LOG2F=1; AC_SUBST([HAVE_LOG2F])
+ HAVE_LOG2L=1; AC_SUBST([HAVE_LOG2L])
HAVE_LOGBF=1; AC_SUBST([HAVE_LOGBF])
HAVE_LOGBL=1; AC_SUBST([HAVE_LOGBL])
HAVE_LOGP1=1; AC_SUBST([HAVE_LOGP1])
@@ -265,8 +277,13 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_POWF=1; AC_SUBST([HAVE_POWF])
HAVE_REMAINDER=1; AC_SUBST([HAVE_REMAINDER])
HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF])
+ HAVE_REMAINDERL=1; AC_SUBST([HAVE_REMAINDERL])
HAVE_RINT=1; AC_SUBST([HAVE_RINT])
+ HAVE_RINTF=1; AC_SUBST([HAVE_RINTF])
HAVE_RINTL=1; AC_SUBST([HAVE_RINTL])
+ HAVE_ROUND=1; AC_SUBST([HAVE_ROUND])
+ HAVE_ROUNDF=1; AC_SUBST([HAVE_ROUNDF])
+ HAVE_ROUNDL=1; AC_SUBST([HAVE_ROUNDL])
HAVE_SETPAYLOAD=1; AC_SUBST([HAVE_SETPAYLOAD])
HAVE_SETPAYLOADF=1; AC_SUBST([HAVE_SETPAYLOADF])
HAVE_SETPAYLOADL=1; AC_SUBST([HAVE_SETPAYLOADL])
@@ -290,33 +307,17 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL])
HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL])
HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL])
- HAVE_DECL_CBRTF=1; AC_SUBST([HAVE_DECL_CBRTF])
- HAVE_DECL_CBRTL=1; AC_SUBST([HAVE_DECL_CBRTL])
HAVE_DECL_CEILF=1; AC_SUBST([HAVE_DECL_CEILF])
HAVE_DECL_CEILL=1; AC_SUBST([HAVE_DECL_CEILL])
- HAVE_DECL_COPYSIGNF=1; AC_SUBST([HAVE_DECL_COPYSIGNF])
HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL])
HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL])
- HAVE_DECL_EXP2=1; AC_SUBST([HAVE_DECL_EXP2])
- HAVE_DECL_EXP2F=1; AC_SUBST([HAVE_DECL_EXP2F])
- HAVE_DECL_EXP2L=1; AC_SUBST([HAVE_DECL_EXP2L])
- HAVE_DECL_EXPM1L=1; AC_SUBST([HAVE_DECL_EXPM1L])
HAVE_DECL_FLOORF=1; AC_SUBST([HAVE_DECL_FLOORF])
HAVE_DECL_FLOORL=1; AC_SUBST([HAVE_DECL_FLOORL])
HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL])
HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL])
HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL])
HAVE_DECL_LOG10L=1; AC_SUBST([HAVE_DECL_LOG10L])
- HAVE_DECL_LOG2=1; AC_SUBST([HAVE_DECL_LOG2])
- HAVE_DECL_LOG2F=1; AC_SUBST([HAVE_DECL_LOG2F])
- HAVE_DECL_LOG2L=1; AC_SUBST([HAVE_DECL_LOG2L])
HAVE_DECL_LOGB=1; AC_SUBST([HAVE_DECL_LOGB])
- HAVE_DECL_REMAINDER=1; AC_SUBST([HAVE_DECL_REMAINDER])
- HAVE_DECL_REMAINDERL=1; AC_SUBST([HAVE_DECL_REMAINDERL])
- HAVE_DECL_RINTF=1; AC_SUBST([HAVE_DECL_RINTF])
- HAVE_DECL_ROUND=1; AC_SUBST([HAVE_DECL_ROUND])
- HAVE_DECL_ROUNDF=1; AC_SUBST([HAVE_DECL_ROUNDF])
- HAVE_DECL_ROUNDL=1; AC_SUBST([HAVE_DECL_ROUNDL])
HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL])
HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL])
HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL])
diff --git a/gl/m4/mbchar.m4 b/gl/m4/mbchar.m4
index b76f1d7b..4251a84c 100644
--- a/gl/m4/mbchar.m4
+++ b/gl/m4/mbchar.m4
@@ -1,6 +1,6 @@
# mbchar.m4
# serial 9
-dnl Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mbiter.m4 b/gl/m4/mbiter.m4
index b51242e6..927876bc 100644
--- a/gl/m4/mbiter.m4
+++ b/gl/m4/mbiter.m4
@@ -1,6 +1,6 @@
# mbiter.m4
# serial 7
-dnl Copyright (C) 2005, 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mbrtoc32.m4 b/gl/m4/mbrtoc32.m4
index 1991529c..d1690fb4 100644
--- a/gl/m4/mbrtoc32.m4
+++ b/gl/m4/mbrtoc32.m4
@@ -1,6 +1,6 @@
# mbrtoc32.m4
# serial 21
-dnl Copyright (C) 2014-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2014-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mbrtowc.m4 b/gl/m4/mbrtowc.m4
index cc09a5fb..a49872fa 100644
--- a/gl/m4/mbrtowc.m4
+++ b/gl/m4/mbrtowc.m4
@@ -1,6 +1,6 @@
# mbrtowc.m4
-# serial 46
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2025 Free Software Foundation,
+# serial 47
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2026 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -33,7 +33,6 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
REPLACE_MBRTOWC=1
else
gl_MBRTOWC_NULL_ARG1
- gl_MBRTOWC_NULL_ARG2
gl_MBRTOWC_RETVAL
gl_MBRTOWC_NUL_RETVAL
gl_MBRTOWC_STORES_INCOMPLETE
@@ -46,13 +45,6 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
REPLACE_MBRTOWC=1
;;
esac
- case "$gl_cv_func_mbrtowc_null_arg2" in
- *yes) ;;
- *) AC_DEFINE([MBRTOWC_NULL_ARG2_BUG], [1],
- [Define if the mbrtowc function has the NULL string argument bug.])
- REPLACE_MBRTOWC=1
- ;;
- esac
case "$gl_cv_func_mbrtowc_retval" in
*yes) ;;
*) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1],
@@ -170,10 +162,10 @@ AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on AIX and OSF/1.
- aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ # Guess no on AIX.
+ aix*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
esac
changequote([,])dnl
if test $LOCALE_JA != none; then
@@ -346,57 +338,6 @@ int main ()
])
])
-dnl Test whether mbrtowc supports a NULL string argument correctly.
-dnl Result is gl_cv_func_mbrtowc_null_arg2.
-
-AC_DEFUN([gl_MBRTOWC_NULL_ARG2],
-[
- AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([gt_LOCALE_EN_UTF8])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
- AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument],
- [gl_cv_func_mbrtowc_null_arg2],
- [
- dnl Initial guess, used when cross-compiling or when no suitable locale
- dnl is present.
-changequote(,)dnl
- case "$host_os" in
- # Guess no on OSF/1.
- osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
- esac
-changequote([,])dnl
- if test "$LOCALE_EN_UTF8" != none; then
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include
-#include
-#include
-int main ()
-{
- if (setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
- {
- mbstate_t state;
- wchar_t wc;
- int ret;
-
- memset (&state, '\0', sizeof (mbstate_t));
- wc = (wchar_t) 0xBADFACE;
- mbrtowc (&wc, NULL, 5, &state);
- /* Check that wc was not modified. */
- if (wc != (wchar_t) 0xBADFACE)
- return 2;
- }
- return 0;
-}]])],
- [gl_cv_func_mbrtowc_null_arg2=yes],
- [gl_cv_func_mbrtowc_null_arg2=no],
- [:])
- fi
- ])
-])
-
dnl Test whether mbrtowc, when parsing the end of a multibyte character,
dnl correctly returns the number of bytes that were needed to complete the
dnl character (not the total number of bytes of the multibyte character).
@@ -716,7 +657,7 @@ AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
dnl Test whether mbrtowc reports encoding errors in the C locale.
dnl Although POSIX was never intended to allow this, the GNU C Library
dnl and other implementations do it. See:
-dnl https://sourceware.org/bugzilla/show_bug.cgi?id=19932
+dnl https://sourceware.org/PR19932
dnl POSIX has now clarified it:
dnl
dnl says: "In the POSIX locale an [EILSEQ] error cannot occur since all byte
diff --git a/gl/m4/mbsinit.m4 b/gl/m4/mbsinit.m4
index 69cfa574..757f2360 100644
--- a/gl/m4/mbsinit.m4
+++ b/gl/m4/mbsinit.m4
@@ -1,6 +1,6 @@
# mbsinit.m4
# serial 10
-dnl Copyright (C) 2008, 2010-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mbstate_t.m4 b/gl/m4/mbstate_t.m4
index 59df1e2e..88307d7a 100644
--- a/gl/m4/mbstate_t.m4
+++ b/gl/m4/mbstate_t.m4
@@ -1,6 +1,6 @@
# mbstate_t.m4
# serial 14
-dnl Copyright (C) 2000-2002, 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mbtowc.m4 b/gl/m4/mbtowc.m4
index 3e3f6ce0..9c5887d3 100644
--- a/gl/m4/mbtowc.m4
+++ b/gl/m4/mbtowc.m4
@@ -1,6 +1,6 @@
# mbtowc.m4
# serial 5
-dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4
index 1c2ecf1d..c5c74682 100644
--- a/gl/m4/memchr.m4
+++ b/gl/m4/memchr.m4
@@ -1,6 +1,6 @@
# memchr.m4
-# serial 20
-dnl Copyright (C) 2002-2004, 2009-2025 Free Software Foundation, Inc.
+# serial 21
+dnl Copyright (C) 2002-2004, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -21,7 +21,7 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
# https://bugzilla.redhat.com/show_bug.cgi?id=499689
# memchr should not dereference overestimated length after a match
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
- # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
+ # https://sourceware.org/PR10162
# memchr should cast the second argument to 'unsigned char'.
# This bug exists in Android 4.3.
# Assume that memchr works on platforms that lack mprotect.
@@ -33,31 +33,20 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
# include
# include
# include
-# ifndef MAP_FILE
-# define MAP_FILE 0
-# endif
#endif
]], [[
int result = 0;
char *fence = NULL;
#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
-# if HAVE_MAP_ANONYMOUS
- const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
- const int fd = -1;
-# else /* !HAVE_MAP_ANONYMOUS */
- const int flags = MAP_FILE | MAP_PRIVATE;
- int fd = open ("/dev/zero", O_RDONLY, 0666);
- if (fd >= 0)
-# endif
- {
- long int pagesize = sysconf (_SC_PAGESIZE);
- char *two_pages =
- (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
- flags, fd, 0);
- if (two_pages != (char *)(-1)
- && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
- fence = two_pages + pagesize;
- }
+ {
+ long int pagesize = sysconf (_SC_PAGESIZE);
+ char *two_pages =
+ (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+ MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
+ if (two_pages != (char *)(-1)
+ && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+ fence = two_pages + pagesize;
+ }
#endif
if (fence)
{
diff --git a/gl/m4/minmax.m4 b/gl/m4/minmax.m4
index 69c8a89f..3344e3f7 100644
--- a/gl/m4/minmax.m4
+++ b/gl/m4/minmax.m4
@@ -1,6 +1,6 @@
# minmax.m4
# serial 4
-dnl Copyright (C) 2005, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mktime.m4 b/gl/m4/mktime.m4
index eca6c4d8..fa32d138 100644
--- a/gl/m4/mktime.m4
+++ b/gl/m4/mktime.m4
@@ -1,6 +1,6 @@
# mktime.m4
-# serial 42
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2025 Free Software Foundation,
+# serial 43
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2026 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -112,22 +112,6 @@ mktime_test (time_t now)
&& mktime_test1 ((time_t) (time_t_min + now)));
}
-static int
-irix_6_4_bug ()
-{
- /* Based on code from Ariel Faigon. */
- struct tm tm;
- tm.tm_year = 96;
- tm.tm_mon = 3;
- tm.tm_mday = 0;
- tm.tm_hour = 0;
- tm.tm_min = 0;
- tm.tm_sec = 0;
- tm.tm_isdst = -1;
- mktime (&tm);
- return tm.tm_mon == 2 && tm.tm_mday == 31;
-}
-
static int
bigtime_test (int j)
{
@@ -255,12 +239,10 @@ main ()
if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
result |= 8;
}
- if (! irix_6_4_bug ())
- result |= 16;
if (! spring_forward_gap ())
- result |= 32;
+ result |= 16;
if (! year_2050_test () || ! indiana_test ())
- result |= 64;
+ result |= 32;
return result;
}]])],
[gl_cv_func_working_mktime=yes],
diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4
index 3f7a6656..b5e323d4 100644
--- a/gl/m4/mmap-anon.m4
+++ b/gl/m4/mmap-anon.m4
@@ -1,6 +1,6 @@
# mmap-anon.m4
-# serial 12
-dnl Copyright (C) 2005, 2007, 2009-2025 Free Software Foundation, Inc.
+# serial 15
+dnl Copyright (C) 2005, 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -8,12 +8,10 @@ dnl This file is offered as-is, without any warranty.
# Detect how mmap can be used to create anonymous (not file-backed) memory
# mappings.
-# - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS
-# and MAP_ANON exist and have the same value.
+# - On Linux, AIX, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS and
+# MAP_ANON exist and have the same value.
# - On HP-UX, only MAP_ANONYMOUS exists.
# - On Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, only MAP_ANON exists.
-# - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
-# used.
AC_DEFUN_ONCE([gl_FUNC_MMAP_ANON],
[
@@ -23,11 +21,13 @@ AC_DEFUN_ONCE([gl_FUNC_MMAP_ANON],
# Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
# fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
# irrelevant for anonymous mappings.
- AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no])
+ # Instead, assume that mmap() exists if and only if exists.
+ # Code needs to tests HAVE_SYS_MMAN_H, not HAVE_MMAP.
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
# Try to allow MAP_ANONYMOUS.
gl_have_mmap_anonymous=no
- if test $gl_have_mmap = yes; then
+ if test $ac_cv_header_sys_mman_h = yes; then
AC_MSG_CHECKING([for MAP_ANONYMOUS])
AC_EGREP_CPP([I cannot identify this map], [
#include
@@ -48,10 +48,5 @@ AC_DEFUN_ONCE([gl_FUNC_MMAP_ANON],
gl_have_mmap_anonymous=yes])
fi
AC_MSG_RESULT([$gl_have_mmap_anonymous])
- if test $gl_have_mmap_anonymous = yes; then
- AC_DEFINE([HAVE_MAP_ANONYMOUS], [1],
- [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
- config.h and .])
- fi
fi
])
diff --git a/gl/m4/mode_t.m4 b/gl/m4/mode_t.m4
index 7dae201b..4621813d 100644
--- a/gl/m4/mode_t.m4
+++ b/gl/m4/mode_t.m4
@@ -1,6 +1,6 @@
# mode_t.m4
# serial 2
-dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mountlist.m4 b/gl/m4/mountlist.m4
index e7eac2e9..311e00b2 100644
--- a/gl/m4/mountlist.m4
+++ b/gl/m4/mountlist.m4
@@ -1,6 +1,6 @@
# mountlist.m4
-# serial 18
-dnl Copyright (C) 2002-2006, 2009-2025 Free Software Foundation, Inc.
+# serial 20
+dnl Copyright (C) 2002-2006, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -75,7 +75,7 @@ $ac_includes_default
# Determine whether it's the one-argument variant or the two-argument one.
if test -z "$ac_list_mounted_fs"; then
- # glibc, HP-UX, IRIX, Cygwin, Android, also (obsolete) 4.3BSD, SunOS.
+ # glibc, HP-UX, Cygwin, Android, also (obsolete) 4.3BSD, SunOS.
AC_CACHE_CHECK([for one-argument getmntent function],
[fu_cv_sys_mounted_getmntent1],
[AC_COMPILE_IFELSE(
@@ -107,7 +107,7 @@ $ac_includes_default
AC_DEFINE([MOUNTED_GETMNTENT1], [1],
[Define if there is a function named getmntent for reading the list
of mounted file systems, and that function takes a single argument.
- (4.3BSD, SunOS, HP-UX, Irix)])
+ (4.3BSD, SunOS, HP-UX)])
gl_CHECK_FUNCS_ANDROID([setmntent],
[[#include
#include
@@ -159,7 +159,7 @@ $ac_includes_default
fi
if test -z "$ac_list_mounted_fs"; then
- # OSF/1, also (obsolete) Apple Darwin 1.3.
+ # (obsolete) Apple Darwin 1.3.
# powerpc-apple-darwin1.3.7 needs sys/param.h sys/ucred.h sys/fs_types.h
AC_CACHE_CHECK([for getfsstat function],
@@ -185,7 +185,7 @@ $getfsstat_includes
ac_list_mounted_fs=found
AC_DEFINE([MOUNTED_GETFSSTAT], [1],
[Define if there is a function named getfsstat for reading the
- list of mounted file systems. (DEC Alpha running OSF/1)])
+ list of mounted file systems. (obsolete Darwin)])
fi
fi
@@ -212,10 +212,9 @@ $getfsstat_includes
if test -z "$ac_list_mounted_fs"; then
# Mac OS X, FreeBSD, NetBSD, OpenBSD, Minix, also (obsolete) 4.4BSD.
- # OSF/1 also has getmntinfo but is already handled above.
# We cannot use AC_CHECK_FUNCS([getmntinfo]) here, because at the linker
# level the function is sometimes called getmntinfo64 or getmntinfo$INODE64
- # on Mac OS X, __getmntinfo13 on NetBSD and Minix, _F64_getmntinfo on OSF/1.
+ # on Mac OS X, __getmntinfo13 on NetBSD and Minix.
AC_CACHE_CHECK([for getmntinfo function],
[fu_cv_sys_mounted_getmntinfo],
[AC_LINK_IFELSE(
diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4
index bfbb983b..565c0d3a 100644
--- a/gl/m4/msvc-inval.m4
+++ b/gl/m4/msvc-inval.m4
@@ -1,6 +1,6 @@
# msvc-inval.m4
# serial 1
-dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4
index 6a470971..1c2b491e 100644
--- a/gl/m4/msvc-nothrow.m4
+++ b/gl/m4/msvc-nothrow.m4
@@ -1,6 +1,6 @@
# msvc-nothrow.m4
# serial 1
-dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4
index 817f01f1..4fb642b7 100644
--- a/gl/m4/multiarch.m4
+++ b/gl/m4/multiarch.m4
@@ -1,6 +1,6 @@
# multiarch.m4
# serial 9
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/musl.m4 b/gl/m4/musl.m4
index 6ff778cb..15b34466 100644
--- a/gl/m4/musl.m4
+++ b/gl/m4/musl.m4
@@ -1,6 +1,6 @@
# musl.m4
# serial 4
-dnl Copyright (C) 2019-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2019-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/netdb_h.m4 b/gl/m4/netdb_h.m4
index 88512546..bcf19b01 100644
--- a/gl/m4/netdb_h.m4
+++ b/gl/m4/netdb_h.m4
@@ -1,6 +1,6 @@
# netdb_h.m4
# serial 15
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/netinet_in_h.m4 b/gl/m4/netinet_in_h.m4
index b56e354c..6d9eaf97 100644
--- a/gl/m4/netinet_in_h.m4
+++ b/gl/m4/netinet_in_h.m4
@@ -1,6 +1,6 @@
# netinet_in_h.m4
# serial 6
-dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/nl_langinfo.m4 b/gl/m4/nl_langinfo.m4
index 9b1e0f32..a3ec57f7 100644
--- a/gl/m4/nl_langinfo.m4
+++ b/gl/m4/nl_langinfo.m4
@@ -1,6 +1,6 @@
# nl_langinfo.m4
-# serial 12.1
-dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
+# serial 14
+dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -16,31 +16,6 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
AC_REQUIRE([gl_PTHREADLIB])
AC_CHECK_HEADERS_ONCE([threads.h])
if test $ac_cv_func_nl_langinfo = yes; then
- # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
- AC_CACHE_CHECK([whether YESEXPR works],
- [gl_cv_func_nl_langinfo_yesexpr_works],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([[#include
-]], [[return !*nl_langinfo(YESEXPR);
-]])],
- [gl_cv_func_nl_langinfo_yesexpr_works=yes],
- [gl_cv_func_nl_langinfo_yesexpr_works=no],
- [
- case "$host_os" in
- # Guess no on irix systems.
- irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
- # Guess yes elsewhere.
- *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
- esac
- ])
- ])
- case $gl_cv_func_nl_langinfo_yesexpr_works in
- *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
- *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
- esac
- AC_DEFINE_UNQUOTED([FUNC_NL_LANGINFO_YESEXPR_WORKS],
- [$FUNC_NL_LANGINFO_YESEXPR_WORKS],
- [Define to 1 if nl_langinfo (YESEXPR) returns a non-empty string.])
# On macOS 26, Solaris 10, and Solaris 11.3, nl_langinfo is not
# multithread-safe.
case "$host_os" in
@@ -50,11 +25,9 @@ AC_DEFUN([gl_FUNC_NL_LANGINFO],
AC_DEFINE_UNQUOTED([NL_LANGINFO_MTSAFE], [$NL_LANGINFO_MTSAFE],
[Define to 1 if nl_langinfo is multithread-safe.])
if test $HAVE_LANGINFO_CODESET = 1 \
- && test $HAVE_LANGINFO_T_FMT_AMPM = 1 \
&& test $HAVE_LANGINFO_ALTMON = 1 \
&& test $HAVE_LANGINFO_ABALTMON = 1 \
&& test $HAVE_LANGINFO_ERA = 1 \
- && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1 \
&& test $NL_LANGINFO_MTSAFE = 1; then
:
else
diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4
index 662fb049..5c1af8c7 100644
--- a/gl/m4/nocrash.m4
+++ b/gl/m4/nocrash.m4
@@ -1,6 +1,6 @@
# nocrash.m4
# serial 5
-dnl Copyright (C) 2005, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/off64_t.m4 b/gl/m4/off64_t.m4
index 963d53e9..93d9e37b 100644
--- a/gl/m4/off64_t.m4
+++ b/gl/m4/off64_t.m4
@@ -1,6 +1,6 @@
# off64_t.m4
# serial 1
-dnl Copyright (C) 2024-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2024-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4
index f4f4bbf6..d7d6aa0c 100644
--- a/gl/m4/off_t.m4
+++ b/gl/m4/off_t.m4
@@ -1,6 +1,6 @@
# off_t.m4
# serial 1
-dnl Copyright (C) 2012-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/once.m4 b/gl/m4/once.m4
index 7876a8fe..a478d81a 100644
--- a/gl/m4/once.m4
+++ b/gl/m4/once.m4
@@ -1,6 +1,6 @@
# once.m4
# serial 1
-dnl Copyright (C) 2024-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2024-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/open-cloexec.m4 b/gl/m4/open-cloexec.m4
index 860541b0..9c9aef23 100644
--- a/gl/m4/open-cloexec.m4
+++ b/gl/m4/open-cloexec.m4
@@ -1,6 +1,6 @@
# open-cloexec.m4
# serial 1
-dnl Copyright 2017-2025 Free Software Foundation, Inc.
+dnl Copyright 2017-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/open-slash.m4 b/gl/m4/open-slash.m4
index 2cba48fe..c36bdced 100644
--- a/gl/m4/open-slash.m4
+++ b/gl/m4/open-slash.m4
@@ -1,6 +1,6 @@
# open-slash.m4
# serial 2
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/open.m4 b/gl/m4/open.m4
index dd3a805f..f5b2a91c 100644
--- a/gl/m4/open.m4
+++ b/gl/m4/open.m4
@@ -1,6 +1,6 @@
# open.m4
# serial 17
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4
index 0c3925df..d6bdf43e 100644
--- a/gl/m4/pathmax.m4
+++ b/gl/m4/pathmax.m4
@@ -1,6 +1,6 @@
# pathmax.m4
# serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2025 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2026 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/pid_t.m4 b/gl/m4/pid_t.m4
index a8bdabc2..314792ed 100644
--- a/gl/m4/pid_t.m4
+++ b/gl/m4/pid_t.m4
@@ -1,6 +1,6 @@
# pid_t.m4
# serial 4
-dnl Copyright (C) 2020-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4
index 4619a402..0de493b6 100644
--- a/gl/m4/printf.m4
+++ b/gl/m4/printf.m4
@@ -1,6 +1,6 @@
# printf.m4
-# serial 96
-dnl Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
+# serial 98
+dnl Copyright (C) 2003, 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -659,7 +659,7 @@ int main ()
&& strcmp (buf, "0x8.0p-2") != 0))
result |= 16;
/* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a
- glibc 2.4 bug
+ glibc 2.4 bug
and a FreeBSD 6.4, NetBSD 10.0 bug. */
if (sprintf (buf, "%.1La", 1.999L) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
@@ -937,7 +937,7 @@ int main ()
_CrtSetReportMode (_CRT_ASSERT, 0);
#endif
signal (SIGABRT, abort_handler);
- /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE >= 2)
support %n in format strings in read-only memory but not in writable
memory. */
strcpy (fmtstring, "%d %n");
@@ -994,7 +994,7 @@ int main ()
int result = 0;
char buf[100];
/* Test whether %ls works at all.
- This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
+ This test fails on OpenBSD 4.0, Solaris 2.6, Haiku, but not on
Cygwin 1.5. */
{
static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
@@ -1003,8 +1003,8 @@ int main ()
|| strcmp (buf, "abc") != 0)
result |= 1;
}
- /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
- assertion failure inside libc), but not on OpenBSD 4.0. */
+ /* This test fails on Solaris 2.6, Cygwin 1.5, Haiku (with an assertion
+ failure inside libc), but not on OpenBSD 4.0. */
{
static const wchar_t wstring[] = { 'a', 0 };
buf[0] = '\0';
@@ -1037,7 +1037,6 @@ changequote(,)dnl
# Guess yes on OpenBSD >= 6.0.
openbsd[1-5].*) gl_cv_func_printf_directive_ls="guessing no";;
openbsd*) gl_cv_func_printf_directive_ls="guessing yes";;
- irix*) gl_cv_func_printf_directive_ls="guessing no";;
solaris*) gl_cv_func_printf_directive_ls="guessing no";;
cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
@@ -1589,10 +1588,6 @@ changequote(,)dnl
*) gl_cv_func_printf_enomem="guessing no";;
esac
;;
- # Guess yes on IRIX.
- irix*) gl_cv_func_printf_enomem="guessing yes";;
- # Guess yes on OSF/1.
- osf*) gl_cv_func_printf_enomem="guessing yes";;
# Guess yes on BeOS.
beos*) gl_cv_func_printf_enomem="guessing yes";;
# Guess yes on Haiku.
@@ -1684,11 +1679,6 @@ changequote(,)dnl
# Guess yes on HP-UX >= 11.
hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
- # Guess yes on IRIX >= 6.5.
- irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
- # Guess yes on OSF/1 >= 5.
- osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
- osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on NetBSD >= 3.
netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
gl_cv_func_snprintf_truncation_c99="guessing no";;
@@ -1710,7 +1700,7 @@ changequote([,])dnl
dnl Test whether the return value of the snprintf function is the number
dnl of bytes (excluding the terminating NUL) that would have been produced
dnl if the buffer had been large enough. (ISO C99, POSIX:2001)
-dnl For example, this test program fails on IRIX 6.5:
+dnl For example, this test program fails on HP-UX 11.31 and Solaris 9:
dnl ---------------------------------------------------------------------
dnl #include
dnl int main()
@@ -1859,7 +1849,7 @@ int main ()
{
int count = -1;
signal (SIGABRT, abort_handler);
- /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE >= 2)
support %n in format strings in read-only memory but not in writable
memory. */
strcpy (fmtstring, "%d %n");
@@ -1899,11 +1889,6 @@ changequote(,)dnl
# Guess yes on AIX >= 4.
aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";;
aix*) gl_cv_func_snprintf_directive_n="guessing yes";;
- # Guess yes on IRIX >= 6.5.
- irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";;
- # Guess yes on OSF/1 >= 5.
- osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
- osf*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on NetBSD >= 3.
netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
gl_cv_func_snprintf_directive_n="guessing no";;
@@ -2058,8 +2043,6 @@ changequote(,)dnl
# Guess yes on AIX >= 4.
aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on IRIX >= 6.5.
- irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
# Guess yes on NetBSD >= 3.
netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
diff --git a/gl/m4/pthread-once.m4 b/gl/m4/pthread-once.m4
index 85549254..9080363d 100644
--- a/gl/m4/pthread-once.m4
+++ b/gl/m4/pthread-once.m4
@@ -1,6 +1,6 @@
# pthread-once.m4
# serial 6
-dnl Copyright (C) 2019-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2019-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/pthread-spin.m4 b/gl/m4/pthread-spin.m4
index aae2fb3b..17fa3b5e 100644
--- a/gl/m4/pthread-spin.m4
+++ b/gl/m4/pthread-spin.m4
@@ -1,6 +1,6 @@
# pthread-spin.m4
# serial 8
-dnl Copyright (C) 2019-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2019-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/pthread_h.m4 b/gl/m4/pthread_h.m4
index bb921386..f01dc3d3 100644
--- a/gl/m4/pthread_h.m4
+++ b/gl/m4/pthread_h.m4
@@ -1,6 +1,6 @@
# pthread_h.m4
# serial 11
-dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/pthread_rwlock_rdlock.m4 b/gl/m4/pthread_rwlock_rdlock.m4
index aec9f076..c16c781d 100644
--- a/gl/m4/pthread_rwlock_rdlock.m4
+++ b/gl/m4/pthread_rwlock_rdlock.m4
@@ -1,6 +1,6 @@
# pthread_rwlock_rdlock.m4
# serial 8
-dnl Copyright (C) 2017-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -32,7 +32,7 @@ dnl https://pubs.opengroup.org/onlinepubs/9699919799/functions/pthread_rwlock_rd
dnl but this test verifies the guarantee regardless of TPS and regardless of
dnl scheduling policy.
dnl Glibc does not provide this guarantee (and never will on Linux), see
-dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701
+dnl https://sourceware.org/PR13701
dnl https://bugzilla.redhat.com/show_bug.cgi?id=1410052
AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER],
[
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4
index 67c1476b..8938db92 100644
--- a/gl/m4/realloc.m4
+++ b/gl/m4/realloc.m4
@@ -1,6 +1,6 @@
# realloc.m4
-# serial 39.1
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+# serial 40
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/reallocarray.m4 b/gl/m4/reallocarray.m4
index 3970d9e1..e789967c 100644
--- a/gl/m4/reallocarray.m4
+++ b/gl/m4/reallocarray.m4
@@ -1,6 +1,6 @@
# reallocarray.m4
# serial 7
-dnl Copyright (C) 2017-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/regex.m4 b/gl/m4/regex.m4
index 49a8059f..45a10490 100644
--- a/gl/m4/regex.m4
+++ b/gl/m4/regex.m4
@@ -1,6 +1,6 @@
# regex.m4
# serial 81
-dnl Copyright (C) 1996-2001, 2003-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2001, 2003-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sched_h.m4 b/gl/m4/sched_h.m4
index 1ffd465f..92ebe1b7 100644
--- a/gl/m4/sched_h.m4
+++ b/gl/m4/sched_h.m4
@@ -1,6 +1,6 @@
# sched_h.m4
# serial 16
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/servent.m4 b/gl/m4/servent.m4
index ba6ebd1d..97bcad0f 100644
--- a/gl/m4/servent.m4
+++ b/gl/m4/servent.m4
@@ -1,6 +1,6 @@
# servent.m4
# serial 5
-dnl Copyright (C) 2008, 2010-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008, 2010-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4
index 727e35af..5faf28d2 100644
--- a/gl/m4/setenv.m4
+++ b/gl/m4/setenv.m4
@@ -1,6 +1,6 @@
# setenv.m4
-# serial 35
-dnl Copyright (C) 2001-2004, 2006-2025 Free Software Foundation, Inc.
+# serial 36
+dnl Copyright (C) 2001-2004, 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -85,8 +85,6 @@ AC_DEFUN([gl_FUNC_UNSETENV],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[
-#undef _BSD
-#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 */
#include
extern
#ifdef __cplusplus
diff --git a/gl/m4/setlocale_null.m4 b/gl/m4/setlocale_null.m4
index 3c8b693e..b6727245 100644
--- a/gl/m4/setlocale_null.m4
+++ b/gl/m4/setlocale_null.m4
@@ -1,6 +1,6 @@
# setlocale_null.m4
-# serial 10
-dnl Copyright (C) 2019-2025 Free Software Foundation, Inc.
+# serial 11
+dnl Copyright (C) 2019-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -32,8 +32,8 @@ AC_DEFUN_ONCE([gl_FUNC_SETLOCALE_NULL],
[gl_cv_func_setlocale_null_all_mtsafe=yes],
[gl_cv_func_setlocale_null_all_mtsafe=no])
;;
- # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
- *-gnu* | gnu* | hpux* | irix* | solaris* | mingw* | windows*)
+ # Guess yes on glibc, HP-UX, Solaris, native Windows.
+ *-gnu* | gnu* | hpux* | solaris* | mingw* | windows*)
gl_cv_func_setlocale_null_all_mtsafe=yes ;;
# If we don't know, obey --enable-cross-guesses.
*)
@@ -63,8 +63,8 @@ AC_DEFUN_ONCE([gl_FUNC_SETLOCALE_NULL],
# Guess no on OpenBSD, AIX.
openbsd* | aix*)
gl_cv_func_setlocale_null_one_mtsafe=no ;;
- # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
- *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw* | windows*)
+ # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, Solaris, Haiku, Cygwin, native Windows.
+ *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | solaris* | haiku* | cygwin* | mingw* | windows*)
gl_cv_func_setlocale_null_one_mtsafe=yes ;;
# If we don't know, obey --enable-cross-guesses.
*)
diff --git a/gl/m4/sha256.m4 b/gl/m4/sha256.m4
index 30e8deeb..a9bd7857 100644
--- a/gl/m4/sha256.m4
+++ b/gl/m4/sha256.m4
@@ -1,6 +1,6 @@
# sha256.m4
# serial 8
-dnl Copyright (C) 2005, 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4
index b0460d45..b7a5153a 100644
--- a/gl/m4/size_max.m4
+++ b/gl/m4/size_max.m4
@@ -1,6 +1,6 @@
# size_max.m4
# serial 12
-dnl Copyright (C) 2003, 2005-2006, 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/snprintf.m4 b/gl/m4/snprintf.m4
index 2c50cee9..6de225c2 100644
--- a/gl/m4/snprintf.m4
+++ b/gl/m4/snprintf.m4
@@ -1,6 +1,6 @@
# snprintf.m4
# serial 7
-dnl Copyright (C) 2002-2004, 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4
index e3509f81..f62ffcfd 100644
--- a/gl/m4/socketlib.m4
+++ b/gl/m4/socketlib.m4
@@ -1,6 +1,6 @@
# socketlib.m4
# serial 4
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sockets.m4 b/gl/m4/sockets.m4
index 54f4dc79..95800d2e 100644
--- a/gl/m4/sockets.m4
+++ b/gl/m4/sockets.m4
@@ -1,6 +1,6 @@
# sockets.m4
# serial 7
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4
index a8ac25b1..e5156511 100644
--- a/gl/m4/socklen.m4
+++ b/gl/m4/socklen.m4
@@ -1,6 +1,6 @@
# socklen.m4
-# serial 11
-dnl Copyright (C) 2005-2007, 2009-2025 Free Software Foundation, Inc.
+# serial 13
+dnl Copyright (C) 2005-2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -11,7 +11,7 @@ dnl From Albert Chin, Windows fixes from Simon Josefsson.
dnl Check for socklen_t: historically on BSD it is an int, and in
dnl POSIX 1g it is a type of its own, but some platforms use different
dnl types for the argument to getsockopt, getpeername, etc.:
-dnl HP-UX 10.20, IRIX 6.5, OSF/1 4.0, Interix 3.5, BeOS.
+dnl HP-UX 10.20, Interix 3.5, BeOS.
dnl So we have to test to find something that will work.
AC_DEFUN([gl_TYPE_SOCKLEN_T],
diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4
index 08ce843d..6379766d 100644
--- a/gl/m4/sockpfaf.m4
+++ b/gl/m4/sockpfaf.m4
@@ -1,6 +1,6 @@
# sockpfaf.m4
# serial 11
-dnl Copyright (C) 2004, 2006, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4
index a2ffd6fc..8710cb72 100644
--- a/gl/m4/ssize_t.m4
+++ b/gl/m4/ssize_t.m4
@@ -1,6 +1,6 @@
# ssize_t.m4
# serial 6
-dnl Copyright (C) 2001-2003, 2006, 2010-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stat-time.m4 b/gl/m4/stat-time.m4
index 4aa24e7f..10eb1dfa 100644
--- a/gl/m4/stat-time.m4
+++ b/gl/m4/stat-time.m4
@@ -1,6 +1,6 @@
# stat-time.m4
# serial 1
-dnl Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2025 Free Software
+dnl Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2026 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4
index 66876305..3764ec0b 100644
--- a/gl/m4/stat.m4
+++ b/gl/m4/stat.m4
@@ -1,6 +1,6 @@
# stat.m4
# serial 21
-dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/std-gnu11.m4 b/gl/m4/std-gnu11.m4
index 762764e0..0868a43a 100644
--- a/gl/m4/std-gnu11.m4
+++ b/gl/m4/std-gnu11.m4
@@ -16,7 +16,7 @@ m4_ifndef([_AC_C_C23_OPTIONS], [
m4_version_prereq([2.70], [], [
-# Copyright (C) 2001-2025 Free Software Foundation, Inc.
+# Copyright (C) 2001-2026 Free Software Foundation, Inc.
# This file is part of Autoconf. This program is free
# software; you can redistribute it and/or modify it under the
@@ -777,7 +777,7 @@ AC_DEFUN([_AC_CXX_CXX11_TEST_BODY],
}
{
// Unicode literals
- char const *utf8 = u8"UTF-8 string \u2500";
+ auto const *utf8 = u8"UTF-8 string \u2500"; // This is portable to C++20.
char16_t const *utf16 = u"UTF-8 string \u2500";
char32_t const *utf32 = U"UTF-32 string \u2500";
}
diff --git a/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4
index 885feafd..7177d034 100644
--- a/gl/m4/stdalign.m4
+++ b/gl/m4/stdalign.m4
@@ -1,6 +1,6 @@
# stdalign.m4
# serial 3
-dnl Copyright 2011-2025 Free Software Foundation, Inc.
+dnl Copyright 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -30,7 +30,7 @@ AC_DEFUN([gl_ALIGNASOF],
/* Test that alignof yields a result consistent with offsetof.
This catches GCC bug 52023
- . */
+ . */
#ifdef __cplusplus
template struct alignof_helper { char a; t b; };
# define ao(type) offsetof (alignof_helper, b)
@@ -82,8 +82,8 @@ AC_DEFUN([gl_ALIGNASOF],
References:
ISO C23 (latest free draft
- )
- sections 6.5.3.4, 6.7.5, 7.15.
+ )
+ sections 6.2.8, 6.7.6.
C++11 (latest free draft
)
section 18.10. */
@@ -103,7 +103,7 @@ AC_DEFUN([gl_ALIGNASOF],
want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */
/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
- .
+ .
clang versions < 8.0.0 have the same bug.
IBM XL C V16.1.0 cc (non-clang) has the same bug. */
# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
diff --git a/gl/m4/stdckdint_h.m4 b/gl/m4/stdckdint_h.m4
index d269faa5..eb8c858a 100644
--- a/gl/m4/stdckdint_h.m4
+++ b/gl/m4/stdckdint_h.m4
@@ -1,6 +1,6 @@
# stdckdint_h.m4
# serial 1
-dnl Copyright 2025 Free Software Foundation, Inc.
+dnl Copyright 2025-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index 127ec05b..299472b1 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,6 +1,6 @@
# stddef_h.m4
# serial 23
-dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -85,7 +85,7 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
dnl Provide gl_unreachable() unconditionally.
GL_GENERATE_STDDEF_H=true
- dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114869
+ dnl https://gcc.gnu.org/PR114869
AC_CACHE_CHECK([whether nullptr_t needs ],
[gl_cv_nullptr_t_needs_stddef],
[AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[nullptr_t x;]],
@@ -96,7 +96,7 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
GL_GENERATE_STDDEF_H=true
fi
- dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870
+ dnl https://gcc.gnu.org/PR114870
dnl affects GCC 13.3 and 14.2.
AC_CACHE_CHECK([whether is idempotent],
[gl_cv_stddef_idempotent],
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index 2d69088b..410da153 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,6 +1,6 @@
# stdint.m4
-# serial 64
-dnl Copyright (C) 2001-2025 Free Software Foundation, Inc.
+# serial 65
+dnl Copyright (C) 2001-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -391,9 +391,9 @@ AC_DEFUN([gl_STDINT_BITSIZEOF],
])
eval result=\$gl_cv_bitsizeof_${gltype}
if test $result = unknown; then
- dnl Use a nonempty default, because some compilers, such as IRIX 5 cc,
- dnl do a syntax check even on unused #if conditions and give an error
- dnl on valid C code like this:
+ dnl Use a nonempty default, because some old compilers do a syntax check
+ dnl even on unused #if conditions and give an error on valid C code like
+ dnl this:
dnl #if 0
dnl # if > 32
dnl # endif
diff --git a/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4
index d4f1acdd..7f60af20 100644
--- a/gl/m4/stdint_h.m4
+++ b/gl/m4/stdint_h.m4
@@ -1,6 +1,6 @@
# stdint_h.m4
# serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index 71d86180..9d4126f5 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,6 +1,6 @@
# stdio_h.m4
# serial 75
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index 2d25da37..f35d6611 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,6 +1,6 @@
# stdlib_h.m4
-# serial 84
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+# serial 86
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -205,7 +205,6 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_PTSNAME_R=1; AC_SUBST([HAVE_PTSNAME_R])
HAVE_QSORT_R=1; AC_SUBST([HAVE_QSORT_R])
HAVE_RANDOM=1; AC_SUBST([HAVE_RANDOM])
- HAVE_RANDOM_H=1; AC_SUBST([HAVE_RANDOM_H])
HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
HAVE_REALLOCARRAY=1; AC_SUBST([HAVE_REALLOCARRAY])
HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
@@ -224,6 +223,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
+ HAVE_SYS_PROCESS_H=0; AC_SUBST([HAVE_SYS_PROCESS_H])
HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV])
REPLACE__EXIT=0; AC_SUBST([REPLACE__EXIT])
diff --git a/gl/m4/strcasecmp.m4 b/gl/m4/strcasecmp.m4
index eb4345d9..f9f90928 100644
--- a/gl/m4/strcasecmp.m4
+++ b/gl/m4/strcasecmp.m4
@@ -1,6 +1,6 @@
# strcasecmp.m4
# serial 3
-dnl Copyright (C) 2002-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strcasestr.m4 b/gl/m4/strcasestr.m4
index eb2862f1..f56eed58 100644
--- a/gl/m4/strcasestr.m4
+++ b/gl/m4/strcasestr.m4
@@ -1,6 +1,6 @@
# strcasestr.m4
# serial 29
-dnl Copyright (C) 2005, 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -22,8 +22,8 @@ AC_DEFUN([gl_FUNC_STRCASESTR_SIMPLE],
if test $REPLACE_MEMCHR = 1; then
REPLACE_STRCASESTR=1
else
- dnl Detect https://sourceware.org/bugzilla/show_bug.cgi?id=12092
- dnl and https://sourceware.org/bugzilla/show_bug.cgi?id=23637.
+ dnl Detect https://sourceware.org/PR12092
+ dnl and https://sourceware.org/PR23637.
AC_CACHE_CHECK([whether strcasestr works],
[gl_cv_func_strcasestr_works_always],
[AC_RUN_IFELSE(
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4
index c8b3b207..9bb60c3f 100644
--- a/gl/m4/strerror.m4
+++ b/gl/m4/strerror.m4
@@ -1,6 +1,6 @@
# strerror.m4
# serial 25
-dnl Copyright (C) 2002, 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index fc73603a..2a6e4db4 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -1,6 +1,6 @@
# string_h.m4
-# serial 44.1
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+# serial 46
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -63,6 +63,7 @@ AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCHRNUL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRDUP])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRINGEQ])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCAT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNCPY])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNDUP])
@@ -115,6 +116,7 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
HAVE_EXPLICIT_BZERO=1; AC_SUBST([HAVE_EXPLICIT_BZERO])
HAVE_FFSL=1; AC_SUBST([HAVE_FFSL])
HAVE_FFSLL=1; AC_SUBST([HAVE_FFSLL])
+ HAVE_DECL_MEMEQ=0; AC_SUBST([HAVE_DECL_MEMEQ])
HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
HAVE_MEMSET_EXPLICIT=1; AC_SUBST([HAVE_MEMSET_EXPLICIT])
@@ -124,6 +126,7 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
+ HAVE_DECL_STREQ=0; AC_SUBST([HAVE_DECL_STREQ])
HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
diff --git a/gl/m4/stringeq.m4 b/gl/m4/stringeq.m4
new file mode 100644
index 00000000..ffea8afc
--- /dev/null
+++ b/gl/m4/stringeq.m4
@@ -0,0 +1,25 @@
+# stringeq.m4
+# serial 1
+dnl Copyright (C) 2025-2026 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_FUNC_STREQ],
+[
+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([streq])
+ if test $ac_cv_have_decl_streq != no; then
+ HAVE_DECL_STREQ=1
+ fi
+])
+
+AC_DEFUN([gl_FUNC_MEMEQ],
+[
+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([memeq])
+ if test $ac_cv_have_decl_memeq != no; then
+ HAVE_DECL_MEMEQ=1
+ fi
+])
diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4
index 18f30d4a..aec4f715 100644
--- a/gl/m4/strings_h.m4
+++ b/gl/m4/strings_h.m4
@@ -1,6 +1,6 @@
# strings_h.m4
# serial 14
-dnl Copyright (C) 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strncasecmp.m4 b/gl/m4/strncasecmp.m4
index c7c8b240..4314b603 100644
--- a/gl/m4/strncasecmp.m4
+++ b/gl/m4/strncasecmp.m4
@@ -1,6 +1,6 @@
# strncasecmp.m4
# serial 2
-dnl Copyright (C) 2002-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strncpy.m4 b/gl/m4/strncpy.m4
index 57876171..b94abede 100644
--- a/gl/m4/strncpy.m4
+++ b/gl/m4/strncpy.m4
@@ -1,6 +1,6 @@
# strncpy.m4
# serial 1
-dnl Copyright (C) 2002-2004, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strsep.m4 b/gl/m4/strsep.m4
index b018ff88..6afd34a9 100644
--- a/gl/m4/strsep.m4
+++ b/gl/m4/strsep.m4
@@ -1,6 +1,6 @@
# strsep.m4
# serial 11
-dnl Copyright (C) 2002-2004, 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strstr.m4 b/gl/m4/strstr.m4
index 1b5ef6c1..3a9e9c60 100644
--- a/gl/m4/strstr.m4
+++ b/gl/m4/strstr.m4
@@ -1,6 +1,6 @@
# strstr.m4
# serial 25
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -14,8 +14,8 @@ AC_DEFUN([gl_FUNC_STRSTR_SIMPLE],
if test $REPLACE_MEMCHR = 1; then
REPLACE_STRSTR=1
else
- dnl Detect https://sourceware.org/bugzilla/show_bug.cgi?id=12092
- dnl and https://sourceware.org/bugzilla/show_bug.cgi?id=23637.
+ dnl Detect https://sourceware.org/PR12092
+ dnl and https://sourceware.org/PR23637.
AC_CACHE_CHECK([whether strstr works],
[gl_cv_func_strstr_works_always],
[AC_RUN_IFELSE(
diff --git a/gl/m4/sys_cdefs_h.m4 b/gl/m4/sys_cdefs_h.m4
index d72796ca..a1398a29 100644
--- a/gl/m4/sys_cdefs_h.m4
+++ b/gl/m4/sys_cdefs_h.m4
@@ -1,6 +1,6 @@
# sys_cdefs_h.m4 - Is compatible enough with glibc?
# serial 2
-dnl Copyright 2024-2025 Free Software Foundation, Inc.
+dnl Copyright 2024-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index fb69209b..cdc374e4 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,6 +1,6 @@
# sys_socket_h.m4
-# serial 31
-dnl Copyright (C) 2005-2025 Free Software Foundation, Inc.
+# serial 32
+dnl Copyright (C) 2005-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,17 +13,6 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H],
AC_REQUIRE([gl_SYS_SOCKET_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
- dnl On OSF/1, the functions recv(), send(), recvfrom(), sendto() have
- dnl old-style declarations (with return type 'int' instead of 'ssize_t')
- dnl unless _POSIX_PII_SOCKET is defined.
- case "$host_os" in
- osf*)
- AC_DEFINE([_POSIX_PII_SOCKET], [1],
- [Define to 1 in order to get the POSIX compatible declarations
- of socket functions.])
- ;;
- esac
-
GL_GENERATE_SYS_SOCKET_H=false
AC_CACHE_CHECK([whether is self-contained],
[gl_cv_header_sys_socket_h_selfcontained],
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index fdcc8954..04dfce7e 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,6 +1,6 @@
# sys_stat_h.m4
-# serial 42 -*- Autoconf -*-
-dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
+# serial 44 -*- Autoconf -*-
+dnl Copyright (C) 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4
index e99fdcc6..b284e08e 100644
--- a/gl/m4/sys_types_h.m4
+++ b/gl/m4/sys_types_h.m4
@@ -1,6 +1,6 @@
# sys_types_h.m4
# serial 15
-dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_uio_h.m4 b/gl/m4/sys_uio_h.m4
index eb0e8424..59496e01 100644
--- a/gl/m4/sys_uio_h.m4
+++ b/gl/m4/sys_uio_h.m4
@@ -1,6 +1,6 @@
# sys_uio_h.m4
# serial 3
-dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/threadlib.m4 b/gl/m4/threadlib.m4
index 333c8fe0..bdea4b97 100644
--- a/gl/m4/threadlib.m4
+++ b/gl/m4/threadlib.m4
@@ -1,6 +1,6 @@
# threadlib.m4
-# serial 45.1
-dnl Copyright (C) 2005-2025 Free Software Foundation, Inc.
+# serial 49
+dnl Copyright (C) 2005-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -57,16 +57,6 @@ AC_DEFUN([gl_ANYTHREADLIB_EARLY],
[
AC_REQUIRE([AC_CANONICAL_HOST])
if test -z "$gl_anythreadlib_early_done"; then
- AS_CASE([$host_os],
- [osf*],
- [# On OSF/1, the compiler needs the flag -D_REENTRANT so that it
- # groks . cc also understands the flag -pthread, but
- # we do not use it because 1. gcc-2.95 does not understand -pthread,
- # 2. putting a flag into CPPFLAGS that has an effect on the linker
- # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
- # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
- CPPFLAGS="$CPPFLAGS -D_REENTRANT"
- ])
# Some systems optimize for single-threaded programs by default, and
# need special flags to disable these optimizations. For example, the
# definition of errno in .
@@ -190,17 +180,13 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
gl_pthread_api=no
LIBPTHREAD=
LIBPMULTITHREAD=
- # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
- # it groks . It is added above, in gl_ANYTHREADLIB_EARLY.
AC_CHECK_HEADER([pthread.h],
[gl_have_pthread_h=yes], [gl_have_pthread_h=no])
AS_IF([test "$gl_have_pthread_h" = yes], [
# Other possible tests:
# -lpthreads (FSU threads, PCthreads)
# -lgthreads
- # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
- # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
- # the second one only in libpthread, and lock.c needs it.
+ # Test whether both pthread_mutex_lock exists in libc.
#
# If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
# needs -pthread for some reason. See:
@@ -212,10 +198,8 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
[AC_LANG_PROGRAM(
[[#include
pthread_mutex_t m;
- pthread_mutexattr_t ma;
]],
- [[pthread_mutex_lock (&m);
- pthread_mutexattr_init (&ma);]])],
+ [[pthread_mutex_lock (&m);]])],
[gl_pthread_api=yes
LIBPTHREAD=$gl_pthread
LIBPMULTITHREAD=$gl_pthread])
@@ -244,8 +228,7 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
])
echo "$as_me:__oline__: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&AS_MESSAGE_LOG_FD
- # Test for libpthread by looking for pthread_kill. (Not pthread_self,
- # since it is defined as a macro on OSF/1.)
+ # Test for libpthread by looking for pthread_kill.
AS_IF([test $gl_pthread_api = yes && test -z "$LIBPTHREAD"], [
# The program links fine without libpthread. But it may actually
# need to link with libpthread in order to create multiple threads.
@@ -451,18 +434,19 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
dnl gl_use_winpthreads_default defaults to "no", because in mingw 10, like
dnl in mingw 5, the use of libwinpthread still makes test-pthread-tss crash.
m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=no])
+ dnl Don't display the --disable-threads option
+ dnl - if the package builds one or more libraries, because libraries must
+ dnl always be multithread-safe (as far as possible),
+ dnl - if the package defines gl_THREADLIB_DEFAULT_NO, because the option
+ dnl would then be a no-op.
AC_ARG_ENABLE([threads],
-AS_HELP_STRING([[--enable-threads={isoc|posix|isoc+posix|windows}]], [specify multithreading API])m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
-AS_HELP_STRING([[--disable-threads]], [build without multithread safety])]),
+AS_HELP_STRING([[--enable-threads={isoc|posix|isoc+posix|windows}]], [specify multithreading API])m4_ifdef([LT_INIT], [], [m4_ifdef([gl_THREADLIB_DEFAULT_NO], [], [
+AS_HELP_STRING([[--disable-threads]], [build without multithread safety])])]),
[gl_use_threads=$enableval],
[if test -n "$gl_use_threads_default"; then
gl_use_threads="$gl_use_threads_default"
else
AS_CASE([$host_os],
- dnl Disable multithreading by default on OSF/1, because it interferes
- dnl with fork()/exec(): When msgexec is linked with -lpthread, its
- dnl child process gets an endless segmentation fault inside execvp().
- [osf*], [gl_use_threads=no],
dnl Disable multithreading by default on Cygwin 1.5.x, because it has
dnl bugs that lead to endless loops or crashes. See
dnl .
@@ -665,13 +649,8 @@ dnl
dnl HP-UX 11 posix -lpthread N (cc) OK
dnl Y (gcc)
dnl
-dnl IRIX 6.5 posix -lpthread Y 0.5
-dnl
dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
dnl
-dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
-dnl -lpthread (gcc) Y
-dnl
dnl Cygwin posix -lpthread Y OK
dnl
dnl Mingw windows N OK
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index f4d8e20f..8d896ea5 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -1,6 +1,6 @@
# time_h.m4
# serial 27
-dnl Copyright (C) 2000-2001, 2003-2007, 2009-2025 Free Software Foundation,
+dnl Copyright (C) 2000-2001, 2003-2007, 2009-2026 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/time_r.m4 b/gl/m4/time_r.m4
index 96f5c5b5..59477e3b 100644
--- a/gl/m4/time_r.m4
+++ b/gl/m4/time_r.m4
@@ -1,6 +1,6 @@
# time_r.m4
# serial 1
-dnl Copyright (C) 2003, 2006-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/timegm.m4 b/gl/m4/timegm.m4
index cb6da6da..50a98b25 100644
--- a/gl/m4/timegm.m4
+++ b/gl/m4/timegm.m4
@@ -1,6 +1,6 @@
# timegm.m4
# serial 16
-dnl Copyright (C) 2003, 2007, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/uchar_h.m4 b/gl/m4/uchar_h.m4
index b2309385..20b63b6c 100644
--- a/gl/m4/uchar_h.m4
+++ b/gl/m4/uchar_h.m4
@@ -1,6 +1,6 @@
# uchar_h.m4
# serial 32
-dnl Copyright (C) 2019-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2019-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ungetc.m4 b/gl/m4/ungetc.m4
index 969b60e8..299c43f2 100644
--- a/gl/m4/ungetc.m4
+++ b/gl/m4/ungetc.m4
@@ -1,6 +1,6 @@
# ungetc.m4
# serial 12
-dnl Copyright (C) 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/unicase_h.m4 b/gl/m4/unicase_h.m4
index bf5d4c2e..71dccf06 100644
--- a/gl/m4/unicase_h.m4
+++ b/gl/m4/unicase_h.m4
@@ -1,6 +1,6 @@
# unicase_h.m4
# serial 1
-dnl Copyright (C) 2023-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2023-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/unictype_h.m4 b/gl/m4/unictype_h.m4
index 68ddaf6c..ba5a3688 100644
--- a/gl/m4/unictype_h.m4
+++ b/gl/m4/unictype_h.m4
@@ -1,6 +1,6 @@
# unictype_h.m4
# serial 4
-dnl Copyright (C) 2023-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2023-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/uninorm_h.m4 b/gl/m4/uninorm_h.m4
index d416f73b..5ec9ea67 100644
--- a/gl/m4/uninorm_h.m4
+++ b/gl/m4/uninorm_h.m4
@@ -1,6 +1,6 @@
# uninorm_h.m4
# serial 1
-dnl Copyright (C) 2023-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2023-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 6ec16286..8000e888 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,6 +1,6 @@
# unistd_h.m4
# serial 97
-dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/unitypes_h.m4 b/gl/m4/unitypes_h.m4
index 264e61be..733b9ee2 100644
--- a/gl/m4/unitypes_h.m4
+++ b/gl/m4/unitypes_h.m4
@@ -1,6 +1,6 @@
# unitypes_h.m4
# serial 1
-dnl Copyright (C) 2021-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2021-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/unlocked-io.m4 b/gl/m4/unlocked-io.m4
index 97f43f4b..16ab6e9a 100644
--- a/gl/m4/unlocked-io.m4
+++ b/gl/m4/unlocked-io.m4
@@ -1,6 +1,6 @@
# unlocked-io.m4
-# serial 16
-dnl Copyright (C) 1998-2006, 2009-2025 Free Software Foundation, Inc.
+# serial 17
+dnl Copyright (C) 1998-2006, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -25,6 +25,7 @@ AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO],
AC_CHECK_DECLS_ONCE([ferror_unlocked])
AC_CHECK_DECLS_ONCE([fflush_unlocked])
AC_CHECK_DECLS_ONCE([fgets_unlocked])
+ AC_CHECK_DECLS_ONCE([fileno_unlocked])
AC_CHECK_DECLS_ONCE([fputc_unlocked])
AC_CHECK_DECLS_ONCE([fputs_unlocked])
AC_CHECK_DECLS_ONCE([fread_unlocked])
diff --git a/gl/m4/vararrays.m4 b/gl/m4/vararrays.m4
index 086e409f..3dd8e68f 100644
--- a/gl/m4/vararrays.m4
+++ b/gl/m4/vararrays.m4
@@ -1,6 +1,6 @@
# vararrays.m4
# serial 6
-dnl Copyright (C) 2001, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2001, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4
index 1d040d6e..4e01fbc9 100644
--- a/gl/m4/vasnprintf.m4
+++ b/gl/m4/vasnprintf.m4
@@ -1,6 +1,6 @@
# vasnprintf.m4
# serial 56
-dnl Copyright (C) 2002-2004, 2006-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4
index 6ea602bd..3e6913e2 100644
--- a/gl/m4/vasprintf.m4
+++ b/gl/m4/vasprintf.m4
@@ -1,6 +1,6 @@
# vasprintf.m4
# serial 6
-dnl Copyright (C) 2002-2003, 2006-2007, 2009-2025 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2026 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/visibility.m4 b/gl/m4/visibility.m4
index c2cd38d0..55ceb672 100644
--- a/gl/m4/visibility.m4
+++ b/gl/m4/visibility.m4
@@ -1,6 +1,6 @@
# visibility.m4
# serial 9
-dnl Copyright (C) 2005, 2008, 2010-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2010-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/vsnprintf.m4 b/gl/m4/vsnprintf.m4
index 68ab757d..df767486 100644
--- a/gl/m4/vsnprintf.m4
+++ b/gl/m4/vsnprintf.m4
@@ -1,6 +1,6 @@
# vsnprintf.m4
# serial 7
-dnl Copyright (C) 2002-2004, 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4
index 73cf16fb..3765368c 100644
--- a/gl/m4/warn-on-use.m4
+++ b/gl/m4/warn-on-use.m4
@@ -1,6 +1,6 @@
# warn-on-use.m4
# serial 11
-dnl Copyright (C) 2010-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index 722fcfc2..42338a00 100644
--- a/gl/m4/wchar_h.m4
+++ b/gl/m4/wchar_h.m4
@@ -1,6 +1,6 @@
# wchar_h.m4
-# serial 65
-dnl Copyright (C) 2007-2025 Free Software Foundation, Inc.
+# serial 66
+dnl Copyright (C) 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -65,8 +65,8 @@ dnl Check whether is usable at all.
AC_DEFUN([gl_WCHAR_H_INLINE_OK],
[
dnl Test whether suffers due to the transition from '__inline' to
- dnl 'gnu_inline'. See
- dnl and . In summary,
+ dnl 'gnu_inline'. See
+ dnl and . In summary,
dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
dnl the option -std=c99 or -std=gnu99, leads to a broken .
AC_REQUIRE([AC_CANONICAL_HOST])
@@ -239,7 +239,7 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
HAVE_WCSTOK=1; AC_SUBST([HAVE_WCSTOK])
HAVE_WCSWIDTH=1; AC_SUBST([HAVE_WCSWIDTH])
HAVE_WCSFTIME=1; AC_SUBST([HAVE_WCSFTIME])
- HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
+ HAVE_WCTOB=1; AC_SUBST([HAVE_WCTOB])
HAVE_DECL_WCSDUP=1; AC_SUBST([HAVE_DECL_WCSDUP])
HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
diff --git a/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4
index 91530176..a69f17c4 100644
--- a/gl/m4/wcrtomb.m4
+++ b/gl/m4/wcrtomb.m4
@@ -1,6 +1,6 @@
# wcrtomb.m4
-# serial 21
-dnl Copyright (C) 2008-2025 Free Software Foundation, Inc.
+# serial 22
+dnl Copyright (C) 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -33,7 +33,7 @@ AC_DEFUN([gl_FUNC_WCRTOMB],
dnl fi
if test $REPLACE_WCRTOMB = 0; then
dnl On Android 4.3, wcrtomb produces wrong characters in the C locale.
- dnl On AIX 4.3, OSF/1 5.1 and Solaris <= 11.3, wcrtomb (NULL, 0, NULL)
+ dnl On AIX 4.3 and Solaris <= 11.3, wcrtomb (NULL, 0, NULL)
dnl sometimes returns 0 instead of 1.
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gt_LOCALE_FR])
@@ -83,8 +83,8 @@ int main ()
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on AIX 4, OSF/1, Solaris, native Windows.
- aix4* | osf* | solaris* | mingw* | windows*)
+ # Guess no on AIX 4, Solaris, native Windows.
+ aix4* | solaris* | mingw* | windows*)
gl_cv_func_wcrtomb_retval="guessing no" ;;
# Guess yes otherwise.
*)
diff --git a/gl/m4/wctype.m4 b/gl/m4/wctype.m4
index 56593cd5..6a6cb3a4 100644
--- a/gl/m4/wctype.m4
+++ b/gl/m4/wctype.m4
@@ -1,6 +1,6 @@
# wctype.m4
# serial 6
-dnl Copyright (C) 2011-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wctype_h.m4 b/gl/m4/wctype_h.m4
index 8e54678d..12b4c618 100644
--- a/gl/m4/wctype_h.m4
+++ b/gl/m4/wctype_h.m4
@@ -3,7 +3,7 @@
dnl A placeholder for ISO C99 , for platforms that lack it.
-dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wcwidth.m4 b/gl/m4/wcwidth.m4
index 2cc6ebb1..515076ba 100644
--- a/gl/m4/wcwidth.m4
+++ b/gl/m4/wcwidth.m4
@@ -1,6 +1,6 @@
# wcwidth.m4
-# serial 38
-dnl Copyright (C) 2006-2025 Free Software Foundation, Inc.
+# serial 39
+dnl Copyright (C) 2006-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -44,7 +44,7 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
dnl On macOS 12.5, NetBSD 9.3, OpenBSD 5.0, MidnightBSD 1.1,
dnl wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1.
- dnl On macOS 12.5, NetBSD 9.3, MidnightBSD 1.1, OSF/1 5.1,
+ dnl On macOS 12.5, NetBSD 9.3, MidnightBSD 1.1,
dnl wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
dnl On OpenBSD 5.8, wcwidth(0xFF1A) (FULLWIDTH COLON) returns 0.
dnl This leads to bugs in 'ls' (coreutils).
diff --git a/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4
index 8a3c7944..384462d2 100644
--- a/gl/m4/wint_t.m4
+++ b/gl/m4/wint_t.m4
@@ -1,6 +1,6 @@
# wint_t.m4
# serial 11
-dnl Copyright (C) 2003, 2007-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xalloc.m4 b/gl/m4/xalloc.m4
index c10c4189..a0d0f060 100644
--- a/gl/m4/xalloc.m4
+++ b/gl/m4/xalloc.m4
@@ -1,6 +1,6 @@
# xalloc.m4
# serial 18
-dnl Copyright (C) 2002-2006, 2009-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4
index 157d635c..4e35a5fe 100644
--- a/gl/m4/xsize.m4
+++ b/gl/m4/xsize.m4
@@ -1,6 +1,6 @@
# xsize.m4
# serial 5
-dnl Copyright (C) 2003-2004, 2008-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/zzgnulib.m4 b/gl/m4/zzgnulib.m4
index 343bda5c..fed091ca 100644
--- a/gl/m4/zzgnulib.m4
+++ b/gl/m4/zzgnulib.m4
@@ -1,6 +1,6 @@
# zzgnulib.m4
# serial 1
-dnl Copyright (C) 2020-2025 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2026 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/malloc.c b/gl/malloc.c
index 5642c83c..f7d11921 100644
--- a/gl/malloc.c
+++ b/gl/malloc.c
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/malloc/dynarray-skeleton.c b/gl/malloc/dynarray-skeleton.c
index 6b0585c1..9d83658e 100644
--- a/gl/malloc/dynarray-skeleton.c
+++ b/gl/malloc/dynarray-skeleton.c
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray.h b/gl/malloc/dynarray.h
index 6cbbe50e..e6a998d3 100644
--- a/gl/malloc/dynarray.h
+++ b/gl/malloc/dynarray.h
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically. Shared definitions.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray_at_failure.c b/gl/malloc/dynarray_at_failure.c
index b94ac3df..c05807f0 100644
--- a/gl/malloc/dynarray_at_failure.c
+++ b/gl/malloc/dynarray_at_failure.c
@@ -1,5 +1,5 @@
/* Report an dynamic array index out of bounds condition.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray_emplace_enlarge.c b/gl/malloc/dynarray_emplace_enlarge.c
index 53126863..d3bb0447 100644
--- a/gl/malloc/dynarray_emplace_enlarge.c
+++ b/gl/malloc/dynarray_emplace_enlarge.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array in preparation of an emplace operation.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray_finalize.c b/gl/malloc/dynarray_finalize.c
index 3178c687..b2e37837 100644
--- a/gl/malloc/dynarray_finalize.c
+++ b/gl/malloc/dynarray_finalize.c
@@ -1,5 +1,5 @@
/* Copy the dynamically-allocated area to an explicitly-sized heap allocation.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray_resize.c b/gl/malloc/dynarray_resize.c
index 3cd1626a..d890b253 100644
--- a/gl/malloc/dynarray_resize.c
+++ b/gl/malloc/dynarray_resize.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloc/dynarray_resize_clear.c b/gl/malloc/dynarray_resize_clear.c
index 7bfc0005..34d01062 100644
--- a/gl/malloc/dynarray_resize_clear.c
+++ b/gl/malloc/dynarray_resize_clear.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array and clear the new part.
- Copyright (C) 2017-2025 Free Software Foundation, Inc.
+ Copyright (C) 2017-2026 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gl/malloca.c b/gl/malloca.c
index 4bce9a3d..943140c8 100644
--- a/gl/malloca.c
+++ b/gl/malloca.c
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible , 2003, 2018.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/malloca.h b/gl/malloca.h
index f131fd5a..1ebe6916 100644
--- a/gl/malloca.h
+++ b/gl/malloca.h
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003-2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2026 Free Software Foundation, Inc.
Written by Bruno Haible , 2003.
This file is free software: you can redistribute it and/or modify
diff --git a/gl/math.c b/gl/math.c
index febdf82a..8f0c9d78 100644
--- a/gl/math.c
+++ b/gl/math.c
@@ -1,6 +1,6 @@
/* Inline functions for .
- Copyright (C) 2012-2025 Free Software Foundation, Inc.
+ Copyright (C) 2012-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gl/math.in.h b/gl/math.in.h
index f4e80c53..14218ea0 100644
--- a/gl/math.in.h
+++ b/gl/math.in.h
@@ -1,6 +1,6 @@
/* A GNU-like .
- Copyright (C) 2002-2003, 2007-2025 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2007-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -251,8 +251,8 @@ _NaN ()
#if !(defined FP_ILOGB0 && defined FP_ILOGBNAN)
/* Ensure FP_ILOGB0 and FP_ILOGBNAN are defined. */
-# if defined __NetBSD__ || defined __sgi
- /* NetBSD, IRIX 6.5: match what ilogb() does */
+# if defined __NetBSD__
+ /* NetBSD: match what ilogb() does */
# define FP_ILOGB0 (- 2147483647 - 1) /* INT_MIN */
# define FP_ILOGBNAN (- 2147483647 - 1) /* INT_MIN */
# elif defined _AIX
@@ -288,7 +288,6 @@ _GL_CXXALIAS_SYS (acosf, float, (float x));
# endif
_GL_CXXALIASWARN (acosf);
#elif defined GNULIB_POSIXCHECK
-# undef acosf
# if HAVE_RAW_DECL_ACOSF
_GL_WARN_ON_USE (acosf, "acosf is unportable - "
"use gnulib module acosf for portability");
@@ -305,7 +304,6 @@ _GL_CXXALIAS_SYS (acosl, long double, (long double x));
_GL_CXXALIASWARN (acosl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef acosl
# if HAVE_RAW_DECL_ACOSL
_GL_WARN_ON_USE (acosl, "acosl is unportable - "
"use gnulib module acosl for portability");
@@ -330,7 +328,6 @@ _GL_CXXALIAS_SYS (asinf, float, (float x));
# endif
_GL_CXXALIASWARN (asinf);
#elif defined GNULIB_POSIXCHECK
-# undef asinf
# if HAVE_RAW_DECL_ASINF
_GL_WARN_ON_USE (asinf, "asinf is unportable - "
"use gnulib module asinf for portability");
@@ -347,7 +344,6 @@ _GL_CXXALIAS_SYS (asinl, long double, (long double x));
_GL_CXXALIASWARN (asinl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef asinl
# if HAVE_RAW_DECL_ASINL
_GL_WARN_ON_USE (asinl, "asinl is unportable - "
"use gnulib module asinl for portability");
@@ -372,7 +368,6 @@ _GL_CXXALIAS_SYS (atanf, float, (float x));
# endif
_GL_CXXALIASWARN (atanf);
#elif defined GNULIB_POSIXCHECK
-# undef atanf
# if HAVE_RAW_DECL_ATANF
_GL_WARN_ON_USE (atanf, "atanf is unportable - "
"use gnulib module atanf for portability");
@@ -389,7 +384,6 @@ _GL_CXXALIAS_SYS (atanl, long double, (long double x));
_GL_CXXALIASWARN (atanl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef atanl
# if HAVE_RAW_DECL_ATANL
_GL_WARN_ON_USE (atanl, "atanl is unportable - "
"use gnulib module atanl for portability");
@@ -414,7 +408,6 @@ _GL_CXXALIAS_SYS (atan2f, float, (float y, float x));
# endif
_GL_CXXALIASWARN (atan2f);
#elif defined GNULIB_POSIXCHECK
-# undef atan2f
# if HAVE_RAW_DECL_ATAN2F
_GL_WARN_ON_USE (atan2f, "atan2f is unportable - "
"use gnulib module atan2f for portability");
@@ -431,14 +424,13 @@ _GL_WARN_ON_USE (atan2f, "atan2f is unportable - "
_GL_FUNCDECL_RPL (cbrtf, float, (float x), );
_GL_CXXALIAS_RPL (cbrtf, float, (float x));
# else
-# if !@HAVE_DECL_CBRTF@
+# if !@HAVE_CBRTF@
_GL_FUNCDECL_SYS (cbrtf, float, (float x), );
# endif
_GL_CXXALIAS_SYS (cbrtf, float, (float x));
# endif
_GL_CXXALIASWARN (cbrtf);
#elif defined GNULIB_POSIXCHECK
-# undef cbrtf
# if HAVE_RAW_DECL_CBRTF
_GL_WARN_ON_USE (cbrtf, "cbrtf is unportable - "
"use gnulib module cbrtf for portability");
@@ -454,7 +446,6 @@ _GL_CXXALIAS_SYS (cbrt, double, (double x));
_GL_CXXALIASWARN1 (cbrt, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef cbrt
# if HAVE_RAW_DECL_CBRT
_GL_WARN_ON_USE (cbrt, "cbrt is unportable - "
"use gnulib module cbrt for portability");
@@ -470,7 +461,7 @@ _GL_WARN_ON_USE (cbrt, "cbrt is unportable - "
_GL_FUNCDECL_RPL (cbrtl, long double, (long double x), );
_GL_CXXALIAS_RPL (cbrtl, long double, (long double x));
# else
-# if !@HAVE_DECL_CBRTL@
+# if !@HAVE_CBRTL@
_GL_FUNCDECL_SYS (cbrtl, long double, (long double x), );
# endif
_GL_CXXALIAS_SYS (cbrtl, long double, (long double x));
@@ -479,7 +470,6 @@ _GL_CXXALIAS_SYS (cbrtl, long double, (long double x));
_GL_CXXALIASWARN (cbrtl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef cbrtl
# if HAVE_RAW_DECL_CBRTL
_GL_WARN_ON_USE (cbrtl, "cbrtl is unportable - "
"use gnulib module cbrtl for portability");
@@ -504,7 +494,6 @@ _GL_CXXALIAS_SYS (ceilf, float, (float x));
# endif
_GL_CXXALIASWARN (ceilf);
#elif defined GNULIB_POSIXCHECK
-# undef ceilf
# if HAVE_RAW_DECL_CEILF
_GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
"use gnulib module ceilf for portability");
@@ -546,7 +535,6 @@ _GL_CXXALIAS_SYS (ceill, long double, (long double x));
_GL_CXXALIASWARN (ceill);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef ceill
# if HAVE_RAW_DECL_CEILL
_GL_WARN_ON_USE (ceill, "ceill is unportable - "
"use gnulib module ceill for portability");
@@ -555,14 +543,13 @@ _GL_WARN_ON_USE (ceill, "ceill is unportable - "
#if @GNULIB_COPYSIGNF@
-# if !@HAVE_DECL_COPYSIGNF@
+# if !@HAVE_COPYSIGNF@
# undef copysignf
_GL_FUNCDECL_SYS (copysignf, float, (float x, float y), );
# endif
_GL_CXXALIAS_SYS (copysignf, float, (float x, float y));
_GL_CXXALIASWARN (copysignf);
#elif defined GNULIB_POSIXCHECK
-# undef copysignf
# if HAVE_RAW_DECL_COPYSIGNF
_GL_WARN_ON_USE (copysignf, "copysignf is unportable - "
"use gnulib module copysignf for portability");
@@ -578,7 +565,6 @@ _GL_CXXALIAS_SYS (copysign, double, (double x, double y));
_GL_CXXALIASWARN1 (copysign, double, (double x, double y));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef copysign
# if HAVE_RAW_DECL_COPYSIGN
_GL_WARN_ON_USE (copysign, "copysign is unportable - "
"use gnulib module copysign for portability");
@@ -594,7 +580,6 @@ _GL_CXXALIAS_SYS (copysignl, long double, (long double x, long double y));
_GL_CXXALIASWARN (copysignl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef copysignl
# if HAVE_RAW_DECL_COPYSIGNL
_GL_WARN_ON_USE (copysign, "copysignl is unportable - "
"use gnulib module copysignl for portability");
@@ -619,7 +604,6 @@ _GL_CXXALIAS_SYS (cosf, float, (float x));
# endif
_GL_CXXALIASWARN (cosf);
#elif defined GNULIB_POSIXCHECK
-# undef cosf
# if HAVE_RAW_DECL_COSF
_GL_WARN_ON_USE (cosf, "cosf is unportable - "
"use gnulib module cosf for portability");
@@ -636,7 +620,6 @@ _GL_CXXALIAS_SYS (cosl, long double, (long double x));
_GL_CXXALIASWARN (cosl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef cosl
# if HAVE_RAW_DECL_COSL
_GL_WARN_ON_USE (cosl, "cosl is unportable - "
"use gnulib module cosl for portability");
@@ -661,7 +644,6 @@ _GL_CXXALIAS_SYS (coshf, float, (float x));
# endif
_GL_CXXALIASWARN (coshf);
#elif defined GNULIB_POSIXCHECK
-# undef coshf
# if HAVE_RAW_DECL_COSHF
_GL_WARN_ON_USE (coshf, "coshf is unportable - "
"use gnulib module coshf for portability");
@@ -686,7 +668,6 @@ _GL_CXXALIAS_SYS (expf, float, (float x));
# endif
_GL_CXXALIASWARN (expf);
#elif defined GNULIB_POSIXCHECK
-# undef expf
# if HAVE_RAW_DECL_EXPF
_GL_WARN_ON_USE (expf, "expf is unportable - "
"use gnulib module expf for portability");
@@ -712,7 +693,6 @@ _GL_CXXALIAS_SYS (expl, long double, (long double x));
_GL_CXXALIASWARN (expl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef expl
# if HAVE_RAW_DECL_EXPL
_GL_WARN_ON_USE (expl, "expl is unportable - "
"use gnulib module expl for portability");
@@ -721,13 +701,12 @@ _GL_WARN_ON_USE (expl, "expl is unportable - "
#if @GNULIB_EXP2F@
-# if !@HAVE_DECL_EXP2F@
+# if !@HAVE_EXP2F@
_GL_FUNCDECL_SYS (exp2f, float, (float x), );
# endif
_GL_CXXALIAS_SYS (exp2f, float, (float x));
_GL_CXXALIASWARN (exp2f);
#elif defined GNULIB_POSIXCHECK
-# undef exp2f
# if HAVE_RAW_DECL_EXP2F
_GL_WARN_ON_USE (exp2f, "exp2f is unportable - "
"use gnulib module exp2f for portability");
@@ -743,7 +722,7 @@ _GL_WARN_ON_USE (exp2f, "exp2f is unportable - "
_GL_FUNCDECL_RPL (exp2, double, (double x), );
_GL_CXXALIAS_RPL (exp2, double, (double x));
# else
-# if !@HAVE_DECL_EXP2@
+# if !@HAVE_EXP2@
_GL_FUNCDECL_SYS (exp2, double, (double x), );
# endif
_GL_CXXALIAS_SYS (exp2, double, (double x));
@@ -752,7 +731,6 @@ _GL_CXXALIAS_SYS (exp2, double, (double x));
_GL_CXXALIASWARN1 (exp2, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef exp2
# if HAVE_RAW_DECL_EXP2
_GL_WARN_ON_USE (exp2, "exp2 is unportable - "
"use gnulib module exp2 for portability");
@@ -768,7 +746,7 @@ _GL_WARN_ON_USE (exp2, "exp2 is unportable - "
_GL_FUNCDECL_RPL (exp2l, long double, (long double x), );
_GL_CXXALIAS_RPL (exp2l, long double, (long double x));
# else
-# if !@HAVE_DECL_EXP2L@
+# if !@HAVE_EXP2L@
# undef exp2l
_GL_FUNCDECL_SYS (exp2l, long double, (long double x), );
# endif
@@ -778,7 +756,6 @@ _GL_CXXALIAS_SYS (exp2l, long double, (long double x));
_GL_CXXALIASWARN (exp2l);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef exp2l
# if HAVE_RAW_DECL_EXP2L
_GL_WARN_ON_USE (exp2l, "exp2l is unportable - "
"use gnulib module exp2l for portability");
@@ -802,7 +779,6 @@ _GL_CXXALIAS_SYS (expm1f, float, (float x));
# endif
_GL_CXXALIASWARN (expm1f);
#elif defined GNULIB_POSIXCHECK
-# undef expm1f
# if HAVE_RAW_DECL_EXPM1F
_GL_WARN_ON_USE (expm1f, "expm1f is unportable - "
"use gnulib module expm1f for portability");
@@ -827,7 +803,6 @@ _GL_CXXALIAS_SYS (expm1, double, (double x));
_GL_CXXALIASWARN1 (expm1, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef expm1
# if HAVE_RAW_DECL_EXPM1
_GL_WARN_ON_USE (expm1, "expm1 is unportable - "
"use gnulib module expm1 for portability");
@@ -843,7 +818,7 @@ _GL_WARN_ON_USE (expm1, "expm1 is unportable - "
_GL_FUNCDECL_RPL (expm1l, long double, (long double x), );
_GL_CXXALIAS_RPL (expm1l, long double, (long double x));
# else
-# if !@HAVE_DECL_EXPM1L@
+# if !@HAVE_EXPM1L@
# undef expm1l
# if !(defined __cplusplus && defined _AIX)
_GL_FUNCDECL_SYS (expm1l, long double, (long double x), );
@@ -855,7 +830,6 @@ _GL_CXXALIAS_SYS (expm1l, long double, (long double x));
_GL_CXXALIASWARN (expm1l);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef expm1l
# if HAVE_RAW_DECL_EXPM1L
_GL_WARN_ON_USE (expm1l, "expm1l is unportable - "
"use gnulib module expm1l for portability");
@@ -873,7 +847,6 @@ _GL_CXXALIAS_SYS (fabsf, float, (float x));
_GL_CXXALIASWARN (fabsf);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef fabsf
# if HAVE_RAW_DECL_FABSF
_GL_WARN_ON_USE (fabsf, "fabsf is unportable - "
"use gnulib module fabsf for portability");
@@ -899,7 +872,6 @@ _GL_CXXALIAS_SYS (fabsl, long double, (long double x));
_GL_CXXALIASWARN (fabsl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef fabsl
# if HAVE_RAW_DECL_FABSL
_GL_WARN_ON_USE (fabsl, "fabsl is unportable - "
"use gnulib module fabsl for portability");
@@ -924,7 +896,6 @@ _GL_CXXALIAS_SYS (floorf, float, (float x));
# endif
_GL_CXXALIASWARN (floorf);
#elif defined GNULIB_POSIXCHECK
-# undef floorf
# if HAVE_RAW_DECL_FLOORF
_GL_WARN_ON_USE (floorf, "floorf is unportable - "
"use gnulib module floorf for portability");
@@ -966,7 +937,6 @@ _GL_CXXALIAS_SYS (floorl, long double, (long double x));
_GL_CXXALIASWARN (floorl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef floorl
# if HAVE_RAW_DECL_FLOORL
_GL_WARN_ON_USE (floorl, "floorl is unportable - "
"use gnulib module floorl for portability");
@@ -991,7 +961,6 @@ _GL_CXXALIAS_SYS (fmaf, float, (float x, float y, float z));
# endif
_GL_CXXALIASWARN (fmaf);
#elif defined GNULIB_POSIXCHECK
-# undef fmaf
# if HAVE_RAW_DECL_FMAF
_GL_WARN_ON_USE (fmaf, "fmaf is unportable - "
"use gnulib module fmaf for portability");
@@ -1017,7 +986,6 @@ _GL_CXXALIAS_SYS (fma, double, (double x, double y, double z));
_GL_CXXALIASWARN1 (fma, double, (double x, double y, double z));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef fma
# if HAVE_RAW_DECL_FMA
_GL_WARN_ON_USE (fma, "fma is unportable - "
"use gnulib module fma for portability");
@@ -1049,7 +1017,6 @@ _GL_CXXALIAS_SYS (fmal, long double,
_GL_CXXALIASWARN (fmal);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef fmal
# if HAVE_RAW_DECL_FMAL
_GL_WARN_ON_USE (fmal, "fmal is unportable - "
"use gnulib module fmal for portability");
@@ -1074,7 +1041,6 @@ _GL_CXXALIAS_SYS (fmodf, float, (float x, float y));
# endif
_GL_CXXALIASWARN (fmodf);
#elif defined GNULIB_POSIXCHECK
-# undef fmodf
# if HAVE_RAW_DECL_FMODF
_GL_WARN_ON_USE (fmodf, "fmodf is unportable - "
"use gnulib module fmodf for portability");
@@ -1096,7 +1062,6 @@ _GL_CXXALIAS_SYS (fmod, double, (double x, double y));
_GL_CXXALIASWARN1 (fmod, double, (double x, double y));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef fmod
# if HAVE_RAW_DECL_FMOD
_GL_WARN_ON_USE (fmod, "fmod has portability problems - "
"use gnulib module fmod for portability");
@@ -1122,7 +1087,6 @@ _GL_CXXALIAS_SYS (fmodl, long double, (long double x, long double y));
_GL_CXXALIASWARN (fmodl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef fmodl
# if HAVE_RAW_DECL_FMODL
_GL_WARN_ON_USE (fmodl, "fmodl is unportable - "
"use gnulib module fmodl for portability");
@@ -1156,7 +1120,6 @@ _GL_CXXALIAS_SYS (frexpf, float, (float x, int *expptr));
_GL_CXXALIASWARN (frexpf);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef frexpf
# if HAVE_RAW_DECL_FREXPF
_GL_WARN_ON_USE (frexpf, "frexpf is unportable - "
"use gnulib module frexpf for portability");
@@ -1224,7 +1187,6 @@ _GL_CXXALIASWARN (frexpl);
# endif
#endif
#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
-# undef frexpl
# if HAVE_RAW_DECL_FREXPL
_GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
"use gnulib module frexpl for portability");
@@ -1251,7 +1213,6 @@ _GL_CXXALIAS_SYS (hypotf, float, (float x, float y));
_GL_CXXALIASWARN (hypotf);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef hypotf
# if HAVE_RAW_DECL_HYPOTF
_GL_WARN_ON_USE (hypotf, "hypotf is unportable - "
"use gnulib module hypotf for portability");
@@ -1274,7 +1235,6 @@ _GL_CXXALIAS_SYS (hypot, double, (double x, double y));
_GL_CXXALIASWARN1 (hypot, double, (double x, double y));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef hypot
# if HAVE_RAW_DECL_HYPOT
_GL_WARN_ON_USE (hypotf, "hypot has portability problems - "
"use gnulib module hypot for portability");
@@ -1300,7 +1260,6 @@ _GL_CXXALIAS_SYS (hypotl, long double, (long double x, long double y));
_GL_CXXALIASWARN (hypotl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef hypotl
# if HAVE_RAW_DECL_HYPOTL
_GL_WARN_ON_USE (hypotl, "hypotl is unportable - "
"use gnulib module hypotl for portability");
@@ -1324,7 +1283,6 @@ _GL_CXXALIAS_SYS (ilogbf, int, (float x));
# endif
_GL_CXXALIASWARN (ilogbf);
#elif defined GNULIB_POSIXCHECK
-# undef ilogbf
# if HAVE_RAW_DECL_ILOGBF
_GL_WARN_ON_USE (ilogbf, "ilogbf is unportable - "
"use gnulib module ilogbf for portability");
@@ -1349,7 +1307,6 @@ _GL_CXXALIAS_SYS (ilogb, int, (double x));
_GL_CXXALIASWARN1 (ilogb, int, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef ilogb
# if HAVE_RAW_DECL_ILOGB
_GL_WARN_ON_USE (ilogb, "ilogb is unportable - "
"use gnulib module ilogb for portability");
@@ -1375,7 +1332,6 @@ _GL_CXXALIAS_SYS (ilogbl, int, (long double x));
_GL_CXXALIASWARN (ilogbl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef ilogbl
# if HAVE_RAW_DECL_ILOGBL
_GL_WARN_ON_USE (ilogbl, "ilogbl is unportable - "
"use gnulib module ilogbl for portability");
@@ -1443,7 +1399,6 @@ _GL_CXXALIAS_SYS (ldexpf, float, (float x, int exp));
_GL_CXXALIASWARN (ldexpf);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef ldexpf
# if HAVE_RAW_DECL_LDEXPF
_GL_WARN_ON_USE (ldexpf, "ldexpf is unportable - "
"use gnulib module ldexpf for portability");
@@ -1497,7 +1452,6 @@ _GL_CXXALIASWARN (ldexpl);
# endif
#endif
#if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
-# undef ldexpl
# if HAVE_RAW_DECL_LDEXPL
_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - "
"use gnulib module ldexpl for portability");
@@ -1522,7 +1476,6 @@ _GL_CXXALIAS_SYS (logf, float, (float x));
# endif
_GL_CXXALIASWARN (logf);
#elif defined GNULIB_POSIXCHECK
-# undef logf
# if HAVE_RAW_DECL_LOGF
_GL_WARN_ON_USE (logf, "logf is unportable - "
"use gnulib module logf for portability");
@@ -1544,7 +1497,6 @@ _GL_CXXALIAS_SYS (log, double, (double x));
_GL_CXXALIASWARN1 (log, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef log
# if HAVE_RAW_DECL_LOG
_GL_WARN_ON_USE (log, "log has portability problems - "
"use gnulib module log for portability");
@@ -1570,7 +1522,6 @@ _GL_CXXALIAS_SYS (logl, long double, (long double x));
_GL_CXXALIASWARN (logl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef logl
# if HAVE_RAW_DECL_LOGL
_GL_WARN_ON_USE (logl, "logl is unportable - "
"use gnulib module logl for portability");
@@ -1595,7 +1546,6 @@ _GL_CXXALIAS_SYS (log10f, float, (float x));
# endif
_GL_CXXALIASWARN (log10f);
#elif defined GNULIB_POSIXCHECK
-# undef log10f
# if HAVE_RAW_DECL_LOG10F
_GL_WARN_ON_USE (log10f, "log10f is unportable - "
"use gnulib module log10f for portability");
@@ -1617,7 +1567,6 @@ _GL_CXXALIAS_SYS (log10, double, (double x));
_GL_CXXALIASWARN1 (log10, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef log10
# if HAVE_RAW_DECL_LOG10
_GL_WARN_ON_USE (log10, "log10 has portability problems - "
"use gnulib module log10 for portability");
@@ -1643,7 +1592,6 @@ _GL_CXXALIAS_SYS (log10l, long double, (long double x));
_GL_CXXALIASWARN (log10l);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef log10l
# if HAVE_RAW_DECL_LOG10L
_GL_WARN_ON_USE (log10l, "log10l is unportable - "
"use gnulib module log10l for portability");
@@ -1667,7 +1615,6 @@ _GL_CXXALIAS_SYS (log1pf, float, (float x));
# endif
_GL_CXXALIASWARN (log1pf);
#elif defined GNULIB_POSIXCHECK
-# undef log1pf
# if HAVE_RAW_DECL_LOG1PF
_GL_WARN_ON_USE (log1pf, "log1pf is unportable - "
"use gnulib module log1pf for portability");
@@ -1692,7 +1639,6 @@ _GL_CXXALIAS_SYS (log1p, double, (double x));
_GL_CXXALIASWARN1 (log1p, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef log1p
# if HAVE_RAW_DECL_LOG1P
_GL_WARN_ON_USE (log1p, "log1p has portability problems - "
"use gnulib module log1p for portability");
@@ -1717,7 +1663,6 @@ _GL_CXXALIAS_SYS (log1pl, long double, (long double x));
_GL_CXXALIASWARN (log1pl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef log1pl
# if HAVE_RAW_DECL_LOG1PL
_GL_WARN_ON_USE (log1pl, "log1pl has portability problems - "
"use gnulib module log1pl for portability");
@@ -1734,7 +1679,7 @@ _GL_WARN_ON_USE (log1pl, "log1pl has portability problems - "
_GL_FUNCDECL_RPL (log2f, float, (float x), );
_GL_CXXALIAS_RPL (log2f, float, (float x));
# else
-# if !@HAVE_DECL_LOG2F@
+# if !@HAVE_LOG2F@
# undef log2f
_GL_FUNCDECL_SYS (log2f, float, (float x), );
# endif
@@ -1744,7 +1689,6 @@ _GL_CXXALIAS_SYS (log2f, float, (float x));
_GL_CXXALIASWARN (log2f);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef log2f
# if HAVE_RAW_DECL_LOG2F
_GL_WARN_ON_USE (log2f, "log2f is unportable - "
"use gnulib module log2f for portability");
@@ -1760,7 +1704,7 @@ _GL_WARN_ON_USE (log2f, "log2f is unportable - "
_GL_FUNCDECL_RPL (log2, double, (double x), );
_GL_CXXALIAS_RPL (log2, double, (double x));
# else
-# if !@HAVE_DECL_LOG2@
+# if !@HAVE_LOG2@
# undef log2
_GL_FUNCDECL_SYS (log2, double, (double x), );
# endif
@@ -1770,7 +1714,6 @@ _GL_CXXALIAS_SYS (log2, double, (double x));
_GL_CXXALIASWARN1 (log2, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef log2
# if HAVE_RAW_DECL_LOG2
_GL_WARN_ON_USE (log2, "log2 is unportable - "
"use gnulib module log2 for portability");
@@ -1786,7 +1729,7 @@ _GL_WARN_ON_USE (log2, "log2 is unportable - "
_GL_FUNCDECL_RPL (log2l, long double, (long double x), );
_GL_CXXALIAS_RPL (log2l, long double, (long double x));
# else
-# if !@HAVE_DECL_LOG2L@
+# if !@HAVE_LOG2L@
_GL_FUNCDECL_SYS (log2l, long double, (long double x), );
# endif
_GL_CXXALIAS_SYS (log2l, long double, (long double x));
@@ -1795,7 +1738,6 @@ _GL_CXXALIAS_SYS (log2l, long double, (long double x));
_GL_CXXALIASWARN (log2l);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef log2l
# if HAVE_RAW_DECL_LOG2L
_GL_WARN_ON_USE (log2l, "log2l is unportable - "
"use gnulib module log2l for portability");
@@ -1819,7 +1761,6 @@ _GL_CXXALIAS_SYS (logbf, float, (float x));
# endif
_GL_CXXALIASWARN (logbf);
#elif defined GNULIB_POSIXCHECK
-# undef logbf
# if HAVE_RAW_DECL_LOGBF
_GL_WARN_ON_USE (logbf, "logbf is unportable - "
"use gnulib module logbf for portability");
@@ -1844,7 +1785,6 @@ _GL_CXXALIAS_SYS (logb, double, (double x));
_GL_CXXALIASWARN1 (logb, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef logb
# if HAVE_RAW_DECL_LOGB
_GL_WARN_ON_USE (logb, "logb is unportable - "
"use gnulib module logb for portability");
@@ -1869,7 +1809,6 @@ _GL_CXXALIAS_SYS (logbl, long double, (long double x));
_GL_CXXALIASWARN (logbl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef logbl
# if HAVE_RAW_DECL_LOGBL
_GL_WARN_ON_USE (logbl, "logbl is unportable - "
"use gnulib module logbl for portability");
@@ -1886,7 +1825,6 @@ _GL_CXXALIAS_SYS (logp1f, float, (float x));
_GL_CXXALIASWARN1 (logp1f, float, (float x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef logp1f
# if HAVE_RAW_DECL_LOGP1F
_GL_WARN_ON_USE (logp1f, "logp1f is unportable - "
"use gnulib module logp1f for portability");
@@ -1902,7 +1840,6 @@ _GL_CXXALIAS_SYS (logp1, double, (double x));
_GL_CXXALIASWARN1 (logp1, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef logp1
# if HAVE_RAW_DECL_LOGP1
_GL_WARN_ON_USE (logp1, "logp1 is unportable - "
"use gnulib module logp1 for portability");
@@ -1918,7 +1855,6 @@ _GL_CXXALIAS_SYS (logp1l, long double, (long double x));
_GL_CXXALIASWARN1 (logp1l, long double, (long double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef logp1l
# if HAVE_RAW_DECL_LOGP1L
_GL_WARN_ON_USE (logp1l, "logp1l is unportable - "
"use gnulib module logp1l for portability");
@@ -1943,7 +1879,6 @@ _GL_CXXALIAS_SYS (modff, float, (float x, float *iptr));
# endif
_GL_CXXALIASWARN (modff);
#elif defined GNULIB_POSIXCHECK
-# undef modff
# if HAVE_RAW_DECL_MODFF
_GL_WARN_ON_USE (modff, "modff is unportable - "
"use gnulib module modff for portability");
@@ -1966,7 +1901,6 @@ _GL_CXXALIAS_SYS (modf, double, (double x, double *iptr));
_GL_CXXALIASWARN1 (modf, double, (double x, double *iptr));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef modf
# if HAVE_RAW_DECL_MODF
_GL_WARN_ON_USE (modf, "modf has portability problems - "
"use gnulib module modf for portability");
@@ -1994,7 +1928,6 @@ _GL_CXXALIAS_SYS (modfl, long double, (long double x, long double *iptr));
_GL_CXXALIASWARN (modfl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef modfl
# if HAVE_RAW_DECL_MODFL
_GL_WARN_ON_USE (modfl, "modfl is unportable - "
"use gnulib module modfl for portability");
@@ -2010,7 +1943,6 @@ _GL_FUNCDECL_SYS (powf, float, (float x, float y), );
_GL_CXXALIAS_SYS (powf, float, (float x, float y));
_GL_CXXALIASWARN (powf);
#elif defined GNULIB_POSIXCHECK
-# undef powf
# if HAVE_RAW_DECL_POWF
_GL_WARN_ON_USE (powf, "powf is unportable - "
"use gnulib module powf for portability");
@@ -2034,7 +1966,6 @@ _GL_CXXALIAS_SYS (remainderf, float, (float x, float y));
# endif
_GL_CXXALIASWARN (remainderf);
#elif defined GNULIB_POSIXCHECK
-# undef remainderf
# if HAVE_RAW_DECL_REMAINDERF
_GL_WARN_ON_USE (remainderf, "remainderf is unportable - "
"use gnulib module remainderf for portability");
@@ -2050,7 +1981,7 @@ _GL_WARN_ON_USE (remainderf, "remainderf is unportable - "
_GL_FUNCDECL_RPL (remainder, double, (double x, double y), );
_GL_CXXALIAS_RPL (remainder, double, (double x, double y));
# else
-# if !@HAVE_REMAINDER@ || !@HAVE_DECL_REMAINDER@
+# if !@HAVE_REMAINDER@
_GL_FUNCDECL_SYS (remainder, double, (double x, double y), );
# endif
_GL_CXXALIAS_SYS (remainder, double, (double x, double y));
@@ -2059,7 +1990,6 @@ _GL_CXXALIAS_SYS (remainder, double, (double x, double y));
_GL_CXXALIASWARN1 (remainder, double, (double x, double y));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef remainder
# if HAVE_RAW_DECL_REMAINDER
_GL_WARN_ON_USE (remainder, "remainder is unportable - "
"use gnulib module remainder for portability");
@@ -2075,7 +2005,7 @@ _GL_WARN_ON_USE (remainder, "remainder is unportable - "
_GL_FUNCDECL_RPL (remainderl, long double, (long double x, long double y), );
_GL_CXXALIAS_RPL (remainderl, long double, (long double x, long double y));
# else
-# if !@HAVE_DECL_REMAINDERL@
+# if !@HAVE_REMAINDERL@
# undef remainderl
# if !(defined __cplusplus && defined _AIX)
_GL_FUNCDECL_SYS (remainderl, long double, (long double x, long double y), );
@@ -2087,7 +2017,6 @@ _GL_CXXALIAS_SYS (remainderl, long double, (long double x, long double y));
_GL_CXXALIASWARN (remainderl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef remainderl
# if HAVE_RAW_DECL_REMAINDERL
_GL_WARN_ON_USE (remainderl, "remainderl is unportable - "
"use gnulib module remainderl for portability");
@@ -2096,13 +2025,12 @@ _GL_WARN_ON_USE (remainderl, "remainderl is unportable - "
#if @GNULIB_RINTF@
-# if !@HAVE_DECL_RINTF@
+# if !@HAVE_RINTF@
_GL_FUNCDECL_SYS (rintf, float, (float x), );
# endif
_GL_CXXALIAS_SYS (rintf, float, (float x));
_GL_CXXALIASWARN (rintf);
#elif defined GNULIB_POSIXCHECK
-# undef rintf
# if HAVE_RAW_DECL_RINTF
_GL_WARN_ON_USE (rintf, "rintf is unportable - "
"use gnulib module rintf for portability");
@@ -2118,7 +2046,6 @@ _GL_CXXALIAS_SYS (rint, double, (double x));
_GL_CXXALIASWARN1 (rint, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef rint
# if HAVE_RAW_DECL_RINT
_GL_WARN_ON_USE (rint, "rint is unportable - "
"use gnulib module rint for portability");
@@ -2143,7 +2070,6 @@ _GL_CXXALIAS_SYS (rintl, long double, (long double x));
_GL_CXXALIASWARN (rintl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef rintl
# if HAVE_RAW_DECL_RINTL
_GL_WARN_ON_USE (rintl, "rintl is unportable - "
"use gnulib module rintl for portability");
@@ -2160,14 +2086,13 @@ _GL_WARN_ON_USE (rintl, "rintl is unportable - "
_GL_FUNCDECL_RPL (roundf, float, (float x), );
_GL_CXXALIAS_RPL (roundf, float, (float x));
# else
-# if !@HAVE_DECL_ROUNDF@
+# if !@HAVE_ROUNDF@
_GL_FUNCDECL_SYS (roundf, float, (float x), );
# endif
_GL_CXXALIAS_SYS (roundf, float, (float x));
# endif
_GL_CXXALIASWARN (roundf);
#elif defined GNULIB_POSIXCHECK
-# undef roundf
# if HAVE_RAW_DECL_ROUNDF
_GL_WARN_ON_USE (roundf, "roundf is unportable - "
"use gnulib module roundf for portability");
@@ -2183,7 +2108,7 @@ _GL_WARN_ON_USE (roundf, "roundf is unportable - "
_GL_FUNCDECL_RPL (round, double, (double x), );
_GL_CXXALIAS_RPL (round, double, (double x));
# else
-# if !@HAVE_DECL_ROUND@
+# if !@HAVE_ROUND@
_GL_FUNCDECL_SYS (round, double, (double x), );
# endif
_GL_CXXALIAS_SYS (round, double, (double x));
@@ -2192,7 +2117,6 @@ _GL_CXXALIAS_SYS (round, double, (double x));
_GL_CXXALIASWARN1 (round, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef round
# if HAVE_RAW_DECL_ROUND
_GL_WARN_ON_USE (round, "round is unportable - "
"use gnulib module round for portability");
@@ -2208,7 +2132,7 @@ _GL_WARN_ON_USE (round, "round is unportable - "
_GL_FUNCDECL_RPL (roundl, long double, (long double x), );
_GL_CXXALIAS_RPL (roundl, long double, (long double x));
# else
-# if !@HAVE_DECL_ROUNDL@
+# if !@HAVE_ROUNDL@
# undef roundl
# if !(defined __cplusplus && defined _AIX)
_GL_FUNCDECL_SYS (roundl, long double, (long double x), );
@@ -2220,7 +2144,6 @@ _GL_CXXALIAS_SYS (roundl, long double, (long double x));
_GL_CXXALIASWARN (roundl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef roundl
# if HAVE_RAW_DECL_ROUNDL
_GL_WARN_ON_USE (roundl, "roundl is unportable - "
"use gnulib module roundl for portability");
@@ -2245,7 +2168,6 @@ _GL_CXXALIAS_SYS (sinf, float, (float x));
# endif
_GL_CXXALIASWARN (sinf);
#elif defined GNULIB_POSIXCHECK
-# undef sinf
# if HAVE_RAW_DECL_SINF
_GL_WARN_ON_USE (sinf, "sinf is unportable - "
"use gnulib module sinf for portability");
@@ -2271,7 +2193,6 @@ _GL_CXXALIAS_SYS (sinl, long double, (long double x));
_GL_CXXALIASWARN (sinl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef sinl
# if HAVE_RAW_DECL_SINL
_GL_WARN_ON_USE (sinl, "sinl is unportable - "
"use gnulib module sinl for portability");
@@ -2296,7 +2217,6 @@ _GL_CXXALIAS_SYS (sinhf, float, (float x));
# endif
_GL_CXXALIASWARN (sinhf);
#elif defined GNULIB_POSIXCHECK
-# undef sinhf
# if HAVE_RAW_DECL_SINHF
_GL_WARN_ON_USE (sinhf, "sinhf is unportable - "
"use gnulib module sinhf for portability");
@@ -2321,7 +2241,6 @@ _GL_CXXALIAS_SYS (sqrtf, float, (float x));
# endif
_GL_CXXALIASWARN (sqrtf);
#elif defined GNULIB_POSIXCHECK
-# undef sqrtf
# if HAVE_RAW_DECL_SQRTF
_GL_WARN_ON_USE (sqrtf, "sqrtf is unportable - "
"use gnulib module sqrtf for portability");
@@ -2347,7 +2266,6 @@ _GL_CXXALIAS_SYS (sqrtl, long double, (long double x));
_GL_CXXALIASWARN (sqrtl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef sqrtl
# if HAVE_RAW_DECL_SQRTL
_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
"use gnulib module sqrtl for portability");
@@ -2372,7 +2290,6 @@ _GL_CXXALIAS_SYS (tanf, float, (float x));
# endif
_GL_CXXALIASWARN (tanf);
#elif defined GNULIB_POSIXCHECK
-# undef tanf
# if HAVE_RAW_DECL_TANF
_GL_WARN_ON_USE (tanf, "tanf is unportable - "
"use gnulib module tanf for portability");
@@ -2389,7 +2306,6 @@ _GL_CXXALIAS_SYS (tanl, long double, (long double x));
_GL_CXXALIASWARN (tanl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef tanl
# if HAVE_RAW_DECL_TANL
_GL_WARN_ON_USE (tanl, "tanl is unportable - "
"use gnulib module tanl for portability");
@@ -2414,7 +2330,6 @@ _GL_CXXALIAS_SYS (tanhf, float, (float x));
# endif
_GL_CXXALIASWARN (tanhf);
#elif defined GNULIB_POSIXCHECK
-# undef tanhf
# if HAVE_RAW_DECL_TANHF
_GL_WARN_ON_USE (tanhf, "tanhf is unportable - "
"use gnulib module tanhf for portability");
@@ -2438,7 +2353,6 @@ _GL_CXXALIAS_SYS (truncf, float, (float x));
# endif
_GL_CXXALIASWARN (truncf);
#elif defined GNULIB_POSIXCHECK
-# undef truncf
# if HAVE_RAW_DECL_TRUNCF
_GL_WARN_ON_USE (truncf, "truncf is unportable - "
"use gnulib module truncf for portability");
@@ -2463,7 +2377,6 @@ _GL_CXXALIAS_SYS (trunc, double, (double x));
_GL_CXXALIASWARN1 (trunc, double, (double x));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef trunc
# if HAVE_RAW_DECL_TRUNC
_GL_WARN_ON_USE (trunc, "trunc is unportable - "
"use gnulib module trunc for portability");
@@ -2488,7 +2401,6 @@ _GL_CXXALIAS_SYS (truncl, long double, (long double x));
_GL_CXXALIASWARN (truncl);
# endif
#elif defined GNULIB_POSIXCHECK
-# undef truncl
# if HAVE_RAW_DECL_TRUNCL
_GL_WARN_ON_USE (truncl, "truncl is unportable - "
"use gnulib module truncl for portability");
@@ -2549,18 +2461,25 @@ _GL_CXXALIASWARN (yn);
declarations. */
-#if @GNULIB_ISFINITE@
+#if @GNULIB_ISFINITE@ || @GNULIB_ISFINITE_NO_CXX@
# if @REPLACE_ISFINITE@
_GL_EXTERN_C int gl_isfinitef (float x);
_GL_EXTERN_C int gl_isfinited (double x);
_GL_EXTERN_C int gl_isfinitel (long double x);
-# undef isfinite
-# define isfinite(x) \
- (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
- sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
- gl_isfinitef (x))
+# ifdef __cplusplus
+template int isfinite (T);
+template <> inline int isfinite (float x) { return gl_isfinitef (x); }
+template <> inline int isfinite (double x) { return gl_isfinited (x); }
+template <> inline int isfinite (long double x) { return gl_isfinitel (x); }
+# else
+# undef isfinite
+# define isfinite(x) \
+ (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
+ sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
+ gl_isfinitef (x))
+# endif
# endif
-# ifdef __cplusplus
+# if @GNULIB_ISFINITE@ && defined __cplusplus
# if defined isfinite || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isfinite)
# undef isfinite
@@ -2584,18 +2503,25 @@ _GL_WARN_REAL_FLOATING_DECL (isfinite);
#endif
-#if @GNULIB_ISINF@
+#if @GNULIB_ISINF@ || @GNULIB_ISINF_NO_CXX@
# if @REPLACE_ISINF@
_GL_EXTERN_C int gl_isinff (float x);
_GL_EXTERN_C int gl_isinfd (double x);
_GL_EXTERN_C int gl_isinfl (long double x);
-# undef isinf
-# define isinf(x) \
- (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
- sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
- gl_isinff (x))
+# ifdef __cplusplus
+template int isinf (T);
+template <> inline int isinf (float x) { return gl_isinff (x); }
+template <> inline int isinf (double x) { return gl_isinfd (x); }
+template <> inline int isinf (long double x) { return gl_isinfl (x); }
+# else
+# undef isinf
+# define isinf(x) \
+ (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
+ sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
+ gl_isinff (x))
+# endif
# endif
-# ifdef __cplusplus
+# if @GNULIB_ISINF@ && defined __cplusplus
# if defined isinf || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isinf)
# undef isinf
@@ -2622,9 +2548,9 @@ _GL_WARN_REAL_FLOATING_DECL (isinf);
#if @GNULIB_ISNANF@
/* Test for NaN for 'float' numbers. */
# if @HAVE_ISNANF@
-# if defined __sun || defined __sgi
-/* Solaris and IRIX have isnanf() and declare it in . We cannot
- define isnanf as a macro, because that would conflict with . */
+# if defined __sun
+/* Solaris has isnanf() and declares it in . We cannot define isnanf
+ as a macro, because that would conflict with . */
_GL_EXTERN_C int isnanf (float x);
# else
/* The original included above provides a declaration of isnan macro
@@ -2652,9 +2578,9 @@ _GL_EXTERN_C int isnanf (float x);
This function is a gnulib extension, unlike isnan() which applied only
to 'double' numbers earlier but now is a type-generic macro. */
# if @HAVE_ISNAND@
-# if defined __sun || defined __sgi
-/* Solaris and IRIX have isnand() and declare it in . We cannot
- define isnand as a macro, because that would conflict with . */
+# if defined __sun
+/* Solaris has isnand() and declares it in . We cannot define isnand
+ as a macro, because that would conflict with . */
_GL_EXTERN_C int isnand (double x);
# else
/* The original included above provides a declaration of isnan
@@ -2699,7 +2625,7 @@ _GL_EXTERN_C int isnanl (long double x) _GL_ATTRIBUTE_CONST;
#endif
/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
-#if @GNULIB_ISNAN@
+#if @GNULIB_ISNAN@ || @GNULIB_ISNAN_NO_CXX@
# if @REPLACE_ISNAN@
/* We can't just use the isnanf macro (e.g.) as exposed by
isnanf.h (e.g.) here, because those may end up being macros
@@ -2723,19 +2649,35 @@ _GL_EXTERN_C int rpl_isnand (double x);
_GL_EXTERN_C int rpl_isnanl (long double x) _GL_ATTRIBUTE_CONST;
# define gl_isnan_l(x) rpl_isnanl (x)
# endif
-# undef isnan
-# define isnan(x) \
- (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
- sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
- gl_isnan_f (x))
+# ifdef __cplusplus
+# undef isnan
+template int isnan (T);
+template <> inline int isnan (float x) { return gl_isnan_f (x); }
+template <> inline int isnan (double x) { return gl_isnan_d (x); }
+template <> inline int isnan (long double x) { return gl_isnan_l (x); }
+# else
+# undef isnan
+# define isnan(x) \
+ (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
+ sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
+ gl_isnan_f (x))
+# endif
# elif (__GNUC__ >= 4) || (__clang_major__ >= 4)
-# undef isnan
-# define isnan(x) \
- (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \
- sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
- __builtin_isnan ((float)(x)))
+# ifdef __cplusplus
+# undef isnan
+template int isnan (T);
+template <> inline int isnan (float x) { return __builtin_isnan (x); }
+template <> inline int isnan (double x) { return __builtin_isnan (x); }
+template <> inline int isnan (long double x) { return __builtin_isnan (x); }
+# else
+# undef isnan
+# define isnan(x) \
+ (sizeof (x) == sizeof (long double) ? __builtin_isnan ((long double)(x)) : \
+ sizeof (x) == sizeof (double) ? __builtin_isnan ((double)(x)) : \
+ __builtin_isnan ((float)(x)))
+# endif
# endif
-# ifdef __cplusplus
+# if @GNULIB_ISNAN@ && defined __cplusplus
# if defined isnan || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (isnan)
# undef isnan
@@ -2769,15 +2711,22 @@ _GL_WARN_REAL_FLOATING_DECL (isnan);
#endif
-#if @GNULIB_SIGNBIT@
+#if @GNULIB_SIGNBIT@ || @GNULIB_SIGNBIT_NO_CXX@
# if (@REPLACE_SIGNBIT_USING_BUILTINS@ \
&& (!defined __cplusplus || __cplusplus < 201103))
# undef signbit
/* GCC >= 4.0 and clang provide three built-ins for signbit. */
-# define signbit(x) \
- (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
- sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
- __builtin_signbitf (x))
+# if defined __cplusplus && !defined __clang__
+template int signbit (T);
+template <> inline int signbit (float x) { return __builtin_signbitf (x); }
+template <> inline int signbit (double x) { return __builtin_signbit (x); }
+template <> inline int signbit (long double x) { return __builtin_signbitl (x); }
+# else
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
+ __builtin_signbitf (x))
+# endif
# endif
# if @REPLACE_SIGNBIT@ && !GNULIB_defined_signbit
# undef signbit
@@ -2821,13 +2770,20 @@ _GL_EXTERN_C int gl_signbitl (long double arg);
})
# endif
# endif
-# define signbit(x) \
- (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
- sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
- gl_signbitf (x))
+# if defined __cplusplus && !defined __clang__
+template int signbit (T);
+template <> inline int signbit (float x) { return gl_signbitf (x); }
+template <> inline int signbit (double x) { return gl_signbitd (x); }
+template <> inline int signbit (long double x) { return gl_signbitl (x); }
+# else
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
+ gl_signbitf (x))
+# endif
# define GNULIB_defined_signbit 1
# endif
-# ifdef __cplusplus
+# if @GNULIB_SIGNBIT@ && defined __cplusplus
# if defined signbit || defined GNULIB_NAMESPACE
_GL_MATH_CXX_REAL_FLOATING_DECL_1 (signbit)
# undef signbit
@@ -2867,7 +2823,6 @@ _GL_CXXALIAS_SYS (getpayloadf, float, (const float *));
# endif
_GL_CXXALIASWARN (getpayloadf);
#elif defined GNULIB_POSIXCHECK
-# undef getpayloadf
# if HAVE_RAW_DECL_GETPAYLOADF
_GL_WARN_ON_USE (getpayloadf, "getpayloadf is unportable - "
"use gnulib module getpayloadf for portability");
@@ -2890,7 +2845,6 @@ _GL_CXXALIAS_SYS (getpayload, double, (const double *));
# endif
_GL_CXXALIASWARN (getpayload);
#elif defined GNULIB_POSIXCHECK
-# undef getpayload
# if HAVE_RAW_DECL_GETPAYLOAD
_GL_WARN_ON_USE (getpayload, "getpayload is unportable - "
"use gnulib module getpayload for portability");
@@ -2913,7 +2867,6 @@ _GL_CXXALIAS_SYS (getpayloadl, long double, (const long double *));
# endif
_GL_CXXALIASWARN (getpayloadl);
#elif defined GNULIB_POSIXCHECK
-# undef getpayloadl
# if HAVE_RAW_DECL_GETPAYLOADL
_GL_WARN_ON_USE (getpayloadl, "getpayloadl is unportable - "
"use gnulib module getpayloadl for portability");
@@ -2928,7 +2881,6 @@ _GL_FUNCDECL_SYS (setpayloadf, int, (float *, float), );
_GL_CXXALIAS_SYS (setpayloadf, int, (float *, float));
_GL_CXXALIASWARN (setpayloadf);
#elif defined GNULIB_POSIXCHECK
-# undef setpayloadf
# if HAVE_RAW_DECL_SETPAYLOADF
_GL_WARN_ON_USE (setpayloadf, "setpayloadf is unportable - "
"use gnulib module setpayloadf for portability");
@@ -2942,7 +2894,6 @@ _GL_FUNCDECL_SYS (setpayload, int, (double *, double), );
_GL_CXXALIAS_SYS (setpayload, int, (double *, double));
_GL_CXXALIASWARN (setpayload);
#elif defined GNULIB_POSIXCHECK
-# undef setpayload
# if HAVE_RAW_DECL_SETPAYLOAD
_GL_WARN_ON_USE (setpayload, "setpayload is unportable - "
"use gnulib module setpayload for portability");
@@ -2956,7 +2907,6 @@ _GL_FUNCDECL_SYS (setpayloadl, int, (long double *, long double), );
_GL_CXXALIAS_SYS (setpayloadl, int, (long double *, long double));
_GL_CXXALIASWARN (setpayloadl);
#elif defined GNULIB_POSIXCHECK
-# undef setpayloadl
# if HAVE_RAW_DECL_SETPAYLOADL
_GL_WARN_ON_USE (setpayloadl, "setpayloadl is unportable - "
"use gnulib module setpayloadl for portability");
@@ -2971,7 +2921,6 @@ _GL_FUNCDECL_SYS (setpayloadsigf, int, (float *, float), );
_GL_CXXALIAS_SYS (setpayloadsigf, int, (float *, float));
_GL_CXXALIASWARN (setpayloadsigf);
#elif defined GNULIB_POSIXCHECK
-# undef setpayloadsigf
# if HAVE_RAW_DECL_SETPAYLOADSIGF
_GL_WARN_ON_USE (setpayloadsigf, "setpayloadsigf is unportable - "
"use gnulib module setpayloadsigf for portability");
@@ -2985,7 +2934,6 @@ _GL_FUNCDECL_SYS (setpayloadsig, int, (double *, double), );
_GL_CXXALIAS_SYS (setpayloadsig, int, (double *, double));
_GL_CXXALIASWARN (setpayloadsig);
#elif defined GNULIB_POSIXCHECK
-# undef setpayloadsig
# if HAVE_RAW_DECL_SETPAYLOADSIG
_GL_WARN_ON_USE (setpayloadsig, "setpayloadsig is unportable - "
"use gnulib module setpayloadsig for portability");
@@ -2999,7 +2947,6 @@ _GL_FUNCDECL_SYS (setpayloadsigl, int, (long double *, long double), );
_GL_CXXALIAS_SYS (setpayloadsigl, int, (long double *, long double));
_GL_CXXALIASWARN (setpayloadsigl);
#elif defined GNULIB_POSIXCHECK
-# undef setpayloadsigl
# if HAVE_RAW_DECL_SETPAYLOADSIGL
_GL_WARN_ON_USE (setpayloadsigl, "setpayloadsigl is unportable - "
"use gnulib module setpayloadsigl for portability");
@@ -3023,7 +2970,6 @@ _GL_CXXALIAS_SYS (totalorderf, int, (float const *, float const *));
# endif
_GL_CXXALIASWARN (totalorderf);
#elif defined GNULIB_POSIXCHECK
-# undef totalorderf
# if HAVE_RAW_DECL_TOTALORDERF
_GL_WARN_ON_USE (totalorderf, "totalorderf is unportable - "
"use gnulib module totalorderf for portability");
@@ -3048,7 +2994,6 @@ _GL_CXXALIAS_SYS (totalorder, int, (double const *, double const *));
_GL_CXXALIASWARN1 (totalorder, int, (double const *, double const *));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef totalorder
# if HAVE_RAW_DECL_TOTALORDER
_GL_WARN_ON_USE (totalorder, "totalorder is unportable - "
"use gnulib module totalorder for portability");
@@ -3075,7 +3020,6 @@ _GL_CXXALIAS_SYS (totalorderl, int,
# endif
_GL_CXXALIASWARN (totalorderl);
#elif defined GNULIB_POSIXCHECK
-# undef totalorderl
# if HAVE_RAW_DECL_TOTALORDERL
_GL_WARN_ON_USE (totalorderl, "totalorderl is unportable - "
"use gnulib module totalorderl for portability");
@@ -3101,7 +3045,6 @@ _GL_CXXALIAS_SYS (totalordermagf, int, (float const *, float const *));
_GL_CXXALIASWARN1 (totalordermagf, int, (float const *, float const *));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef totalordermagf
# if HAVE_RAW_DECL_TOTALORDERMAGF
_GL_WARN_ON_USE (totalordermagf, "totalordermagf is unportable - "
"use gnulib module totalordermagf for portability");
@@ -3126,7 +3069,6 @@ _GL_CXXALIAS_SYS (totalordermag, int, (double const *, double const *));
_GL_CXXALIASWARN1 (totalordermag, int, (double const *, double const *));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef totalordermag
# if HAVE_RAW_DECL_TOTALORDERMAG
_GL_WARN_ON_USE (totalordermag, "totalordermag is unportable - "
"use gnulib module totalordermag for portability");
@@ -3156,7 +3098,6 @@ _GL_CXXALIASWARN1 (totalordermagl, int,
(long double const *, long double const *));
# endif
#elif defined GNULIB_POSIXCHECK
-# undef totalordermagl
# if HAVE_RAW_DECL_TOTALORDERMAGL
_GL_WARN_ON_USE (totalordermagl, "totalordermagl is unportable - "
"use gnulib module totalordermagl for portability");
diff --git a/gl/mbchar.c b/gl/mbchar.c
index 713c2f74..db9e2718 100644
--- a/gl/mbchar.c
+++ b/gl/mbchar.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2006, 2009-2025 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2006, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -14,9 +14,8 @@
along with this program. If not, see . */
-#include
-
#define MBCHAR_INLINE _GL_EXTERN_INLINE
+#include
#include
diff --git a/gl/mbchar.h b/gl/mbchar.h
index d77168e7..20e28e5f 100644
--- a/gl/mbchar.h
+++ b/gl/mbchar.h
@@ -1,5 +1,5 @@
/* Multibyte character data type.
- Copyright (C) 2001, 2005-2007, 2009-2025 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005-2007, 2009-2026 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -217,12 +217,12 @@ typedef struct mbchar mbchar_t;
((mbc1).wc_valid && (mbc2).wc_valid \
? (mbc1).wc == (mbc2).wc \
: (mbc1).bytes == (mbc2).bytes \
- && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0)
+ && memeq ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes))
#define mb_caseequal(mbc1, mbc2) \
((mbc1).wc_valid && (mbc2).wc_valid \
? c32tolower ((mbc1).wc) == c32tolower ((mbc2).wc) \
: (mbc1).bytes == (mbc2).bytes \
- && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0)
+ && memeq ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes))
/* ,