summaryrefslogtreecommitdiff
path: root/gnulib-m4
diff options
context:
space:
mode:
Diffstat (limited to 'gnulib-m4')
-rw-r--r--gnulib-m4/00gnulib.m414
-rw-r--r--gnulib-m4/__inline.m426
-rw-r--r--gnulib-m4/absolute-header.m48
-rw-r--r--gnulib-m4/alloca.m46
-rw-r--r--gnulib-m4/arpa_inet_h.m410
-rw-r--r--gnulib-m4/assert_h.m490
-rw-r--r--gnulib-m4/btowc.m4103
-rw-r--r--gnulib-m4/build-to-host.m4274
-rw-r--r--gnulib-m4/builtin-expect.m412
-rw-r--r--gnulib-m4/c-bool.m424
-rw-r--r--gnulib-m4/c32rtomb.m4187
-rw-r--r--gnulib-m4/calloc.m481
-rw-r--r--gnulib-m4/close.m48
-rw-r--r--gnulib-m4/codeset.m46
-rw-r--r--gnulib-m4/ctype_h.m440
-rw-r--r--gnulib-m4/double-slash-root.m46
-rw-r--r--gnulib-m4/dup2.m48
-rw-r--r--gnulib-m4/eealloc.m431
-rw-r--r--gnulib-m4/environ.m46
-rw-r--r--gnulib-m4/errno_h.m469
-rw-r--r--gnulib-m4/error.m424
-rw-r--r--gnulib-m4/error_h.m4129
-rw-r--r--gnulib-m4/exponentd.m410
-rw-r--r--gnulib-m4/exponentf.m48
-rw-r--r--gnulib-m4/exponentl.m4130
-rw-r--r--gnulib-m4/extensions-aix.m426
-rw-r--r--gnulib-m4/extensions.m434
-rw-r--r--gnulib-m4/extern-inline.m425
-rw-r--r--gnulib-m4/fcntl-o.m498
-rw-r--r--gnulib-m4/fcntl.m48
-rw-r--r--gnulib-m4/fcntl_h.m413
-rw-r--r--gnulib-m4/fdopen.m410
-rw-r--r--gnulib-m4/flexmember.m412
-rw-r--r--gnulib-m4/float_h.m441
-rw-r--r--gnulib-m4/fpieee.m46
-rw-r--r--gnulib-m4/free.m416
-rw-r--r--gnulib-m4/frexp.m431
-rw-r--r--gnulib-m4/frexpl.m424
-rw-r--r--gnulib-m4/fseterr.m411
-rw-r--r--gnulib-m4/fstat.m410
-rw-r--r--gnulib-m4/ftruncate.m421
-rw-r--r--gnulib-m4/getcwd.m427
-rw-r--r--gnulib-m4/getdtablesize.m46
-rw-r--r--gnulib-m4/getlocalename_l.m4136
-rw-r--r--gnulib-m4/getpagesize.m449
-rw-r--r--gnulib-m4/getprogname.m440
-rw-r--r--gnulib-m4/gettext_h.m421
-rw-r--r--gnulib-m4/gettimeofday.m416
-rw-r--r--gnulib-m4/gnulib-cache.m430
-rw-r--r--gnulib-m4/gnulib-common.m41169
-rw-r--r--gnulib-m4/gnulib-comp.m42154
-rw-r--r--gnulib-m4/gnulib-i18n.m461
-rw-r--r--gnulib-m4/host-cpu-c-abi.m4254
-rw-r--r--gnulib-m4/iconv.m463
-rw-r--r--gnulib-m4/iconv_h.m46
-rw-r--r--gnulib-m4/iconv_open.m411
-rw-r--r--gnulib-m4/include_next.m414
-rw-r--r--gnulib-m4/inet_pton.m413
-rw-r--r--gnulib-m4/init-package-version.m4128
-rw-r--r--gnulib-m4/inline.m410
-rw-r--r--gnulib-m4/intl-thread-locale.m497
-rw-r--r--gnulib-m4/intlmacosx.m420
-rw-r--r--gnulib-m4/intmax_t.m46
-rw-r--r--gnulib-m4/inttypes.m410
-rw-r--r--gnulib-m4/inttypes_h.m46
-rw-r--r--gnulib-m4/ioctl.m46
-rw-r--r--gnulib-m4/isblank.m46
-rw-r--r--gnulib-m4/isnand.m415
-rw-r--r--gnulib-m4/isnanf.m459
-rw-r--r--gnulib-m4/isnanl.m433
-rw-r--r--gnulib-m4/iswblank.m414
-rw-r--r--gnulib-m4/iswdigit.m435
-rw-r--r--gnulib-m4/iswpunct.m450
-rw-r--r--gnulib-m4/iswxdigit.m430
-rw-r--r--gnulib-m4/langinfo_h.m4137
-rw-r--r--gnulib-m4/largefile.m4374
-rw-r--r--gnulib-m4/lcmessage.m46
-rw-r--r--gnulib-m4/ldexpl.m422
-rw-r--r--gnulib-m4/lib-ld.m416
-rw-r--r--gnulib-m4/lib-link.m438
-rw-r--r--gnulib-m4/lib-prefix.m433
-rw-r--r--gnulib-m4/libdl.m446
-rw-r--r--gnulib-m4/libunistring-base.m465
-rw-r--r--gnulib-m4/limits-h.m432
-rw-r--r--gnulib-m4/localcharset.m46
-rw-r--r--gnulib-m4/locale-ar.m423
-rw-r--r--gnulib-m4/locale-en.m4138
-rw-r--r--gnulib-m4/locale-fr.m4161
-rw-r--r--gnulib-m4/locale-ja.m427
-rw-r--r--gnulib-m4/locale-tr.m423
-rw-r--r--gnulib-m4/locale-zh.m435
-rw-r--r--gnulib-m4/locale_h.m463
-rw-r--r--gnulib-m4/localeconv.m461
-rw-r--r--gnulib-m4/localename.m449
-rw-r--r--gnulib-m4/lock.m410
-rw-r--r--gnulib-m4/lstat.m421
-rw-r--r--gnulib-m4/malloc.m4193
-rw-r--r--gnulib-m4/malloca.m48
-rw-r--r--gnulib-m4/math_h.m4103
-rw-r--r--gnulib-m4/mbchar.m46
-rw-r--r--gnulib-m4/mbiter.m46
-rw-r--r--gnulib-m4/mbrtoc32.m4326
-rw-r--r--gnulib-m4/mbrtowc.m4215
-rw-r--r--gnulib-m4/mbsinit.m48
-rw-r--r--gnulib-m4/mbstate_t.m46
-rw-r--r--gnulib-m4/mbtowc.m411
-rw-r--r--gnulib-m4/memchr.m449
-rw-r--r--gnulib-m4/minmax.m46
-rw-r--r--gnulib-m4/mkfifo.m475
-rw-r--r--gnulib-m4/mmap-anon.m423
-rw-r--r--gnulib-m4/mode_t.m46
-rw-r--r--gnulib-m4/msvc-inval.m46
-rw-r--r--gnulib-m4/msvc-nothrow.m46
-rw-r--r--gnulib-m4/multiarch.m46
-rw-r--r--gnulib-m4/musl.m410
-rw-r--r--gnulib-m4/nan-mips.m491
-rw-r--r--gnulib-m4/nanosleep.m465
-rw-r--r--gnulib-m4/netinet_in_h.m46
-rw-r--r--gnulib-m4/nocrash.m46
-rw-r--r--gnulib-m4/off64_t.m432
-rw-r--r--gnulib-m4/off_t.m46
-rw-r--r--gnulib-m4/once.m414
-rw-r--r--gnulib-m4/open-cloexec.m49
-rw-r--r--gnulib-m4/open-slash.m46
-rw-r--r--gnulib-m4/open.m411
-rw-r--r--gnulib-m4/pathmax.m46
-rw-r--r--gnulib-m4/perror.m425
-rw-r--r--gnulib-m4/pipe.m46
-rw-r--r--gnulib-m4/printf-frexp.m46
-rw-r--r--gnulib-m4/printf-frexpl.m46
-rw-r--r--gnulib-m4/printf.m41098
-rw-r--r--gnulib-m4/pselect.m48
-rw-r--r--gnulib-m4/pthread-cond.m438
-rw-r--r--gnulib-m4/pthread-mutex.m473
-rw-r--r--gnulib-m4/pthread-once.m483
-rw-r--r--gnulib-m4/pthread-rwlock.m4462
-rw-r--r--gnulib-m4/pthread-spin.m472
-rw-r--r--gnulib-m4/pthread-thread.m48
-rw-r--r--gnulib-m4/pthread_h.m418
-rw-r--r--gnulib-m4/pthread_mutex_timedlock.m449
-rw-r--r--gnulib-m4/pthread_rwlock_rdlock.m446
-rw-r--r--gnulib-m4/pthread_sigmask.m494
-rw-r--r--gnulib-m4/putenv.m424
-rw-r--r--gnulib-m4/raise.m46
-rw-r--r--gnulib-m4/random.m481
-rw-r--r--gnulib-m4/random_r.m442
-rw-r--r--gnulib-m4/realloc.m4153
-rw-r--r--gnulib-m4/reallocarray.m422
-rw-r--r--gnulib-m4/relocatable-lib.m420
-rw-r--r--gnulib-m4/sched_h.m416
-rw-r--r--gnulib-m4/sched_yield.m48
-rw-r--r--gnulib-m4/select.m417
-rw-r--r--gnulib-m4/semaphore.m414
-rw-r--r--gnulib-m4/setenv.m425
-rw-r--r--gnulib-m4/setlocale.m446
-rw-r--r--gnulib-m4/setlocale_null.m453
-rw-r--r--gnulib-m4/signal_h.m412
-rw-r--r--gnulib-m4/signalblocking.m46
-rw-r--r--gnulib-m4/signbit.m450
-rw-r--r--gnulib-m4/size_max.m46
-rw-r--r--gnulib-m4/sleep.m426
-rw-r--r--gnulib-m4/snan.m416
-rw-r--r--gnulib-m4/socketlib.m420
-rw-r--r--gnulib-m4/sockets.m46
-rw-r--r--gnulib-m4/socklen.m48
-rw-r--r--gnulib-m4/sockpfaf.m416
-rw-r--r--gnulib-m4/ssize_t.m432
-rw-r--r--gnulib-m4/stat-time.m416
-rw-r--r--gnulib-m4/stat.m424
-rw-r--r--gnulib-m4/stdalign.m4202
-rw-r--r--gnulib-m4/stdckdint_h.m4136
-rw-r--r--gnulib-m4/stddef_h.m478
-rw-r--r--gnulib-m4/stdint.m427
-rw-r--r--gnulib-m4/stdint_h.m46
-rw-r--r--gnulib-m4/stdio_h.m452
-rw-r--r--gnulib-m4/stdlib_h.m488
-rw-r--r--gnulib-m4/stpcpy.m430
-rw-r--r--gnulib-m4/strerror.m434
-rw-r--r--gnulib-m4/strerror_r.m416
-rw-r--r--gnulib-m4/string_h.m442
-rw-r--r--gnulib-m4/stringeq.m425
-rw-r--r--gnulib-m4/strncat.m449
-rw-r--r--gnulib-m4/strncpy.m494
-rw-r--r--gnulib-m4/strstr.m412
-rw-r--r--gnulib-m4/symlink.m412
-rw-r--r--gnulib-m4/sys_cdefs_h.m426
-rw-r--r--gnulib-m4/sys_ioctl_h.m46
-rw-r--r--gnulib-m4/sys_select_h.m415
-rw-r--r--gnulib-m4/sys_socket_h.m460
-rw-r--r--gnulib-m4/sys_stat_h.m46
-rw-r--r--gnulib-m4/sys_time_h.m412
-rw-r--r--gnulib-m4/sys_types_h.m417
-rw-r--r--gnulib-m4/sys_uio_h.m46
-rw-r--r--gnulib-m4/thread.m412
-rw-r--r--gnulib-m4/threadlib.m4434
-rw-r--r--gnulib-m4/time.m452
-rw-r--r--gnulib-m4/time_h.m456
-rw-r--r--gnulib-m4/uchar_h.m4279
-rw-r--r--gnulib-m4/unicase_h.m445
-rw-r--r--gnulib-m4/unictype_h.m4179
-rw-r--r--gnulib-m4/unimetadata_h.m444
-rw-r--r--gnulib-m4/uninorm_h.m447
-rw-r--r--gnulib-m4/unistd_h.m414
-rw-r--r--gnulib-m4/unitypes_h.m426
-rw-r--r--gnulib-m4/usleep.m424
-rw-r--r--gnulib-m4/vasnprintf.m4275
-rw-r--r--gnulib-m4/visibility.m414
-rw-r--r--gnulib-m4/warn-on-use.m410
-rw-r--r--gnulib-m4/wchar_h.m433
-rw-r--r--gnulib-m4/wchar_t.m424
-rw-r--r--gnulib-m4/wcrtomb.m432
-rw-r--r--gnulib-m4/wctob.m419
-rw-r--r--gnulib-m4/wctomb.m46
-rw-r--r--gnulib-m4/wctype_h.m410
-rw-r--r--gnulib-m4/wcwidth.m425
-rw-r--r--gnulib-m4/windows-rc.m421
-rw-r--r--gnulib-m4/wint_t.m46
-rw-r--r--gnulib-m4/xalloc.m46
-rw-r--r--gnulib-m4/xgetcwd.m412
-rw-r--r--gnulib-m4/xsize.m46
-rw-r--r--gnulib-m4/year2038.m4132
-rw-r--r--gnulib-m4/yield.m48
-rw-r--r--gnulib-m4/zzgnulib.m46
223 files changed, 10994 insertions, 3769 deletions
diff --git a/gnulib-m4/00gnulib.m4 b/gnulib-m4/00gnulib.m4
index dea34e83..a4b32403 100644
--- a/gnulib-m4/00gnulib.m4
+++ b/gnulib-m4/00gnulib.m4
@@ -1,8 +1,10 @@
-# 00gnulib.m4 serial 8
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# 00gnulib.m4
+# serial 9
+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.
+dnl This file is offered as-is, without any warranty.
dnl This file must be named something that sorts before all other
dnl gnulib-provided .m4 files. It is needed until the clang fix has
@@ -49,14 +51,14 @@ dnl AC_REQUIRE([gl_COMPILER_CLANG])
[if test $gl_cv_compiler_clang = yes; then
dnl Test whether the compiler supports the option
dnl '-Werror=implicit-function-declaration'.
- save_ac_compile="$ac_compile"
+ saved_ac_compile="$ac_compile"
ac_compile="$ac_compile -Werror=implicit-function-declaration"
dnl Use _AC_COMPILE_IFELSE instead of AC_COMPILE_IFELSE, to avoid a
dnl warning "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'],
[gl_cv_compiler_check_decl_option=none])
- ac_compile="$save_ac_compile"
+ ac_compile="$saved_ac_compile"
else
gl_cv_compiler_check_decl_option=none
fi
@@ -71,11 +73,11 @@ dnl Redefine _AC_CHECK_DECL_BODY so that it references ac_compile_for_check_decl
dnl instead of ac_compile. If, for whatever reason, the override of AC_PROG_CC
dnl in zzgnulib.m4 is inactive, use the original ac_compile.
m4_define([_AC_CHECK_DECL_BODY],
-[ ac_save_ac_compile="$ac_compile"
+[ ac_saved_ac_compile="$ac_compile"
if test -n "$ac_compile_for_check_decl"; then
ac_compile="$ac_compile_for_check_decl"
fi]
-m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_save_ac_compile"
+m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_saved_ac_compile"
])
# gl_00GNULIB
diff --git a/gnulib-m4/__inline.m4 b/gnulib-m4/__inline.m4
new file mode 100644
index 00000000..4dedc0d4
--- /dev/null
+++ b/gnulib-m4/__inline.m4
@@ -0,0 +1,26 @@
+# __inline.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+# Test for __inline keyword
+
+AC_DEFUN([gl___INLINE],
+[
+ AC_CACHE_CHECK([whether the compiler supports the __inline keyword],
+ [gl_cv_c___inline],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[typedef int foo_t;
+ static __inline foo_t foo (void) { return 0; }]],
+ [[return foo ();]])],
+ [gl_cv_c___inline=yes],
+ [gl_cv_c___inline=no])])
+ if test $gl_cv_c___inline = yes; then
+ AC_DEFINE([HAVE___INLINE], [1],
+ [Define to 1 if the compiler supports the keyword '__inline'.])
+ fi
+])
diff --git a/gnulib-m4/absolute-header.m4 b/gnulib-m4/absolute-header.m4
index 67d6507c..94ecc510 100644
--- a/gnulib-m4/absolute-header.m4
+++ b/gnulib-m4/absolute-header.m4
@@ -1,8 +1,10 @@
-# absolute-header.m4 serial 17
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# absolute-header.m4
+# serial 18
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Derek Price.
@@ -66,7 +68,7 @@ AC_DEFUN([gl_ABSOLUTE_HEADER_ONE],
esac
changequote(,)
case "$host_os" in
- mingw*)
+ mingw* | windows*)
dnl For the sake of native Windows compilers (excluding gcc),
dnl treat backslash as a directory separator, like /.
dnl Actually, these compilers use a double-backslash as
diff --git a/gnulib-m4/alloca.m4 b/gnulib-m4/alloca.m4
index dc6f47e3..ff0c59dd 100644
--- a/gnulib-m4/alloca.m4
+++ b/gnulib-m4/alloca.m4
@@ -1,9 +1,11 @@
-# alloca.m4 serial 21
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2022 Free Software Foundation,
+# alloca.m4
+# serial 21
+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,
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_ALLOCA],
[
diff --git a/gnulib-m4/arpa_inet_h.m4 b/gnulib-m4/arpa_inet_h.m4
index 057e13fc..63634c30 100644
--- a/gnulib-m4/arpa_inet_h.m4
+++ b/gnulib-m4/arpa_inet_h.m4
@@ -1,8 +1,10 @@
-# arpa_inet_h.m4 serial 17
-dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+# arpa_inet_h.m4
+# serial 18
+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.
+dnl This file is offered as-is, without any warranty.
dnl Written by Simon Josefsson and Bruno Haible
@@ -67,8 +69,12 @@ AC_DEFUN([gl_ARPA_INET_H_REQUIRE_DEFAULTS],
AC_DEFUN([gl_ARPA_INET_H_DEFAULTS],
[
dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_HTONL=1; AC_SUBST([HAVE_DECL_HTONL])
+ HAVE_DECL_HTONS=1; AC_SUBST([HAVE_DECL_HTONS])
HAVE_DECL_INET_NTOP=1; AC_SUBST([HAVE_DECL_INET_NTOP])
HAVE_DECL_INET_PTON=1; AC_SUBST([HAVE_DECL_INET_PTON])
+ HAVE_DECL_NTOHL=1; AC_SUBST([HAVE_DECL_NTOHL])
+ HAVE_DECL_NTOHS=1; AC_SUBST([HAVE_DECL_NTOHS])
REPLACE_INET_NTOP=0; AC_SUBST([REPLACE_INET_NTOP])
REPLACE_INET_PTON=0; AC_SUBST([REPLACE_INET_PTON])
])
diff --git a/gnulib-m4/assert_h.m4 b/gnulib-m4/assert_h.m4
index c1306dae..d9433ef7 100644
--- a/gnulib-m4/assert_h.m4
+++ b/gnulib-m4/assert_h.m4
@@ -1,40 +1,43 @@
-# assert-h.m4
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# assert_h.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert.
AC_DEFUN([gl_ASSERT_H],
[
AC_CACHE_CHECK([for static_assert], [gl_cv_static_assert],
- [gl_save_CFLAGS=$CFLAGS
+ [gl_saved_CFLAGS=$CFLAGS
for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
- AS_CASE([$gl_working],
- [*assert.h*], [CFLAGS="$gl_save_CFLAGS -DINCLUDE_ASSERT_H"])
-
- AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#if defined __clang__ && __STDC_VERSION__ < 202311
- #pragma clang diagnostic error "-Wc2x-extensions"
- #pragma clang diagnostic error "-Wc++17-extensions"
- #endif
- #ifdef INCLUDE_ASSERT_H
- #include <assert.h>
- #endif
- static_assert (2 + 2 == 4, "arithmetic does not work");
- static_assert (2 + 2 == 4);
- ]],
- [[
- static_assert (sizeof (char) == 1, "sizeof does not work");
- static_assert (sizeof (char) == 1);
- ]])],
- [gl_cv_static_assert=$gl_working],
- [gl_cv_static_assert=no])
- CFLAGS=$gl_save_CFLAGS
- test "$gl_cv_static_assert" != no && break
- done])
+ AS_CASE([$gl_working],
+ [*assert.h*], [CFLAGS="$gl_saved_CFLAGS -DINCLUDE_ASSERT_H"])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if defined __clang__ && __STDC_VERSION__ < 202311
+ #pragma clang diagnostic error "-Wc2x-extensions"
+ #pragma clang diagnostic error "-Wc++1z-extensions"
+ #endif
+ #ifdef INCLUDE_ASSERT_H
+ #include <assert.h>
+ #endif
+ static_assert (2 + 2 == 4, "arithmetic does not work");
+ static_assert (2 + 2 == 4);
+ ]],
+ [[
+ static_assert (sizeof (char) == 1, "sizeof does not work");
+ static_assert (sizeof (char) == 1);
+ ]])
+ ],
+ [gl_cv_static_assert=$gl_working],
+ [gl_cv_static_assert=no])
+ CFLAGS=$gl_saved_CFLAGS
+ test "$gl_cv_static_assert" != no && break
+ done
+ ])
GL_GENERATE_ASSERT_H=false
AS_CASE([$gl_cv_static_assert],
@@ -46,16 +49,39 @@ AC_DEFUN([gl_ASSERT_H],
gl_NEXT_HEADERS([assert.h])])
dnl The "zz" puts this toward config.h's end, to avoid potential
- dnl collisions with other definitions. #undef assert so that
- dnl programs are not tempted to use it without specifically
- dnl including assert.h. Break the #undef apart with a comment
- dnl so that 'configure' does not comment it out.
+ dnl collisions with other definitions.
+ dnl Hardcode the known configuration results for GCC and clang, so that
+ dnl a configuration made with the C compiler works also with the C++ compiler
+ dnl and vice versa.
+ 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 Break the #undef_s apart with a comment so that 'configure' does
+ dnl not comment them out.
AH_VERBATIM([zzstatic_assert],
-[#if (!defined HAVE_C_STATIC_ASSERT && !defined assert \
+[#if (!(defined __clang__ \
+ ? (defined __cplusplus \
+ ? __cplusplus >= 201703L \
+ : __STDC_VERSION__ >= 202000L && __clang_major__ >= 16 \
+ && !defined __sun) \
+ : (defined __GNUC__ \
+ ? (defined __cplusplus \
+ ? __cplusplus >= 201103L && __GNUG__ >= 6 \
+ : __STDC_VERSION__ >= 202000L && __GNUC__ >= 13 \
+ && !defined __sun) \
+ : defined HAVE_C_STATIC_ASSERT)) \
+ && !defined assert \
&& (!defined __cplusplus \
|| (__cpp_static_assert < 201411 \
&& __GNUG__ < 6 && __clang_major__ < 6)))
#include <assert.h>
#undef/**/assert
+ /* Solaris 11.4 <assert.h> defines static_assert as a macro with 2 arguments.
+ We need it also to be invocable with a single argument.
+ Haiku 2022 <assert.h> does not define static_assert at all. */
+ #if (__STDC_VERSION__ - 0 >= 201112L) && !defined __cplusplus
+ #undef/**/static_assert
+ #define static_assert _Static_assert
+ #endif
#endif])
])
diff --git a/gnulib-m4/btowc.m4 b/gnulib-m4/btowc.m4
index 45a61f5e..93c9d769 100644
--- a/gnulib-m4/btowc.m4
+++ b/gnulib-m4/btowc.m4
@@ -1,16 +1,19 @@
-# btowc.m4 serial 12
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# btowc.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_BTOWC],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_REQUIRE([gt_TYPE_WINT_T])
dnl Check whether <wchar.h> is usable at all, first. Otherwise the test
dnl program below may lead to an endless loop. See
- dnl <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>.
+ dnl <https://gcc.gnu.org/PR42440>.
AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
AC_CHECK_FUNCS_ONCE([btowc])
@@ -40,66 +43,88 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- # Guess no on Cygwin.
- cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_btowc_nul="guessing yes" ;;
- # Guess yes otherwise.
- *) gl_cv_func_btowc_nul="guessing yes" ;;
+ # Guess no on Cygwin.
+ cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_btowc_nul="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_nul="guessing yes" ;;
esac
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 On mingw, in the C locale, btowc is inconsistent with mbrtowc:
+ dnl mbrtowc avoids calling MultiByteToWideChar when MB_CUR_MAX is 1 and
+ dnl ___lc_codepage_func() is 0, but btowc is lacking this special case.
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
+ AC_CACHE_CHECK([whether btowc is consistent with mbrtowc in the C locale],
+ [gl_cv_func_btowc_consistent],
[
- 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*) 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 <locale.h>
-#include <stdio.h>
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdlib.h>
+#include <string.h>
#include <wchar.h>
int main ()
{
- if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
- {
- if (btowc (EOF) != WEOF)
- return 1;
- }
+#if HAVE_MBRTOWC
+ wint_t wc1 = btowc (0x80);
+ wchar_t wc2 = (wchar_t) 0xbadface;
+ char buf[1] = { 0x80 };
+ mbstate_t state;
+ memset (&state, 0, sizeof (mbstate_t));
+ if (mbrtowc (&wc2, buf, 1, &state) != 1 || wc1 != wc2)
+ return 1;
+#endif
return 0;
}]])],
- [gl_cv_func_btowc_eof=yes],
- [gl_cv_func_btowc_eof=no],
- [:])
- fi
+ [gl_cv_func_btowc_consistent=yes],
+ [gl_cv_func_btowc_consistent=no],
+ [case "$host_os" in
+ # Guess no on mingw.
+ mingw* | windows*)
+ AC_EGREP_CPP([Problem], [
+#ifdef __MINGW32__
+ Problem
+#endif
+ ],
+ [gl_cv_func_btowc_consistent="guessing no"],
+ [gl_cv_func_btowc_consistent="guessing yes"])
+ ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_consistent="guessing yes" ;;
+ esac
+ ])
])
+ if test $GNULIBHEADERS_OVERRIDE_WINT_T = 1; then
+ dnl On mingw/ucrt, we override the return type of btowc().
+ dnl While the original wint_t (= unsigned short) and the overridden wint_t
+ dnl (= unsigned int) are equivalent in function parameters, this is not
+ dnl the case for function return types.
+ REPLACE_BTOWC=1
+ fi
case "$gl_cv_func_btowc_nul" in
*yes) ;;
*) REPLACE_BTOWC=1 ;;
esac
- case "$gl_cv_func_btowc_eof" in
+ case "$gl_cv_func_btowc_consistent" in
*yes) ;;
*) REPLACE_BTOWC=1 ;;
esac
+ if test $REPLACE_BTOWC = 0; then
+ gl_MBRTOWC_C_LOCALE
+ case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ fi
fi
])
# Prerequisites of lib/btowc.c.
AC_DEFUN([gl_PREREQ_BTOWC], [
:
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
])
diff --git a/gnulib-m4/build-to-host.m4 b/gnulib-m4/build-to-host.m4
new file mode 100644
index 00000000..d3b93ce1
--- /dev/null
+++ b/gnulib-m4/build-to-host.m4
@@ -0,0 +1,274 @@
+# build-to-host.m4
+# serial 5
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl Written by Bruno Haible.
+
+dnl When the build environment ($build_os) is different from the target runtime
+dnl environment ($host_os), file names may need to be converted from the build
+dnl environment syntax to the target runtime environment syntax. This is
+dnl because the Makefiles are executed (mostly) by build environment tools and
+dnl therefore expect file names in build environment syntax, whereas the runtime
+dnl expects file names in target runtime environment syntax.
+dnl
+dnl For example, if $build_os = cygwin and $host_os = mingw32, filenames need
+dnl be converted from Cygwin syntax to native Windows syntax:
+dnl /cygdrive/c/foo/bar -> C:\foo\bar
+dnl /usr/local/share -> C:\cygwin64\usr\local\share
+dnl
+dnl gl_BUILD_TO_HOST([somedir])
+dnl This macro takes as input an AC_SUBSTed variable 'somedir', which must
+dnl already have its final value assigned, and produces two additional
+dnl AC_SUBSTed variables 'somedir_c' and 'somedir_c_make', that designate the
+dnl same file name value, just in different syntax:
+dnl - somedir_c is the file name in target runtime environment syntax,
+dnl as a C string (starting and ending with a double-quote,
+dnl and with escaped backslashes and double-quotes in
+dnl between).
+dnl - somedir_c_make is the same thing, escaped for use in a Makefile.
+
+AC_DEFUN([gl_BUILD_TO_HOST],
+[
+ AC_REQUIRE([AC_CANONICAL_BUILD])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_BUILD_TO_HOST_INIT])
+
+ dnl Define somedir_c.
+ gl_final_[$1]="$[$1]"
+ dnl Translate it from build syntax to host syntax.
+ case "$build_os" in
+ cygwin*)
+ case "$host_os" in
+ mingw* | windows*)
+ gl_final_[$1]=`cygpath -w "$gl_final_[$1]"` ;;
+ esac
+ ;;
+ esac
+ dnl Convert it to C string syntax.
+ [$1]_c=`printf '%s\n' "$gl_final_[$1]" | sed -e "$gl_sed_double_backslashes" -e "$gl_sed_escape_doublequotes" | tr -d "$gl_tr_cr"`
+ [$1]_c='"'"$[$1]_c"'"'
+ AC_SUBST([$1_c])
+
+ dnl Define somedir_c_make.
+ [$1]_c_make=`printf '%s\n' "$[$1]_c" | sed -e "$gl_sed_escape_for_make_1" -e "$gl_sed_escape_for_make_2" | tr -d "$gl_tr_cr"`
+ dnl Use the substituted somedir variable, when possible, so that the user
+ dnl may adjust somedir a posteriori when there are no special characters.
+ if test "$[$1]_c_make" = '\"'"${gl_final_[$1]}"'\"'; then
+ [$1]_c_make='\"$([$1])\"'
+ fi
+ AC_SUBST([$1_c_make])
+])
+
+dnl Some initializations for gl_BUILD_TO_HOST.
+AC_DEFUN([gl_BUILD_TO_HOST_INIT],
+[
+ gl_sed_double_backslashes='s/\\/\\\\/g'
+ gl_sed_escape_doublequotes='s/"/\\"/g'
+changequote(,)dnl
+ gl_sed_escape_for_make_1="s,\\([ \"&'();<>\\\\\`|]\\),\\\\\\1,g"
+changequote([,])dnl
+ gl_sed_escape_for_make_2='s,\$,\\$$,g'
+ dnl Find out how to remove carriage returns from output. Solaris /usr/ucb/tr
+ dnl does not understand '\r'.
+ case `echo r | tr -d '\r'` in
+ '') gl_tr_cr='\015' ;;
+ *) gl_tr_cr='\r' ;;
+ esac
+])
+
+
+dnl The following macros are convenience invocations of gl_BUILD_TO_HOST
+dnl for some of the variables that are defined by Autoconf.
+dnl To do so for _all_ the possible variables, use the module 'configmake'.
+
+dnl Defines bindir_c and bindir_c_make.
+AC_DEFUN_ONCE([gl_BUILD_TO_HOST_BINDIR],
+[
+ dnl Find the final value of bindir.
+ gl_saved_prefix="${prefix}"
+ gl_saved_exec_prefix="${exec_prefix}"
+ gl_saved_bindir="${bindir}"
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ exec_prefix='${prefix}'
+ fi
+ eval exec_prefix="$exec_prefix"
+ eval bindir="$bindir"
+ gl_BUILD_TO_HOST([bindir])
+ bindir="${gl_saved_bindir}"
+ exec_prefix="${gl_saved_exec_prefix}"
+ prefix="${gl_saved_prefix}"
+])
+
+dnl Defines datadir_c and datadir_c_make,
+dnl where datadir = $(datarootdir)
+AC_DEFUN_ONCE([gl_BUILD_TO_HOST_DATADIR],
+[
+ dnl Find the final value of datadir.
+ gl_saved_prefix="${prefix}"
+ gl_saved_datarootdir="${datarootdir}"
+ gl_saved_datadir="${datadir}"
+ dnl Unfortunately, prefix gets only finally determined at the end of
+ dnl configure.
+ if test "X$prefix" = "XNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ eval datarootdir="$datarootdir"
+ eval datadir="$datadir"
+ gl_BUILD_TO_HOST([datadir])
+ datadir="${gl_saved_datadir}"
+ datarootdir="${gl_saved_datarootdir}"
+ prefix="${gl_saved_prefix}"
+])
+
+dnl Defines libdir_c and libdir_c_make.
+AC_DEFUN_ONCE([gl_BUILD_TO_HOST_LIBDIR],
+[
+ dnl Find the final value of libdir.
+ gl_saved_prefix="${prefix}"
+ gl_saved_exec_prefix="${exec_prefix}"
+ gl_saved_libdir="${libdir}"
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ exec_prefix='${prefix}'
+ fi
+ eval exec_prefix="$exec_prefix"
+ eval libdir="$libdir"
+ gl_BUILD_TO_HOST([libdir])
+ libdir="${gl_saved_libdir}"
+ exec_prefix="${gl_saved_exec_prefix}"
+ prefix="${gl_saved_prefix}"
+])
+
+dnl Defines libexecdir_c and libexecdir_c_make.
+AC_DEFUN_ONCE([gl_BUILD_TO_HOST_LIBEXECDIR],
+[
+ dnl Find the final value of libexecdir.
+ gl_saved_prefix="${prefix}"
+ gl_saved_exec_prefix="${exec_prefix}"
+ gl_saved_libexecdir="${libexecdir}"
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ exec_prefix='${prefix}'
+ fi
+ eval exec_prefix="$exec_prefix"
+ eval libexecdir="$libexecdir"
+ gl_BUILD_TO_HOST([libexecdir])
+ libexecdir="${gl_saved_libexecdir}"
+ exec_prefix="${gl_saved_exec_prefix}"
+ prefix="${gl_saved_prefix}"
+])
+
+dnl Defines localedir_c and localedir_c_make.
+AC_DEFUN_ONCE([gl_BUILD_TO_HOST_LOCALEDIR],
+[
+ dnl Find the final value of localedir.
+ gl_saved_prefix="${prefix}"
+ gl_saved_datarootdir="${datarootdir}"
+ gl_saved_localedir="${localedir}"
+ dnl Unfortunately, prefix gets only finally determined at the end of
+ dnl configure.
+ if test "X$prefix" = "XNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ eval datarootdir="$datarootdir"
+ eval localedir="$localedir"
+ gl_BUILD_TO_HOST([localedir])
+ localedir="${gl_saved_localedir}"
+ datarootdir="${gl_saved_datarootdir}"
+ prefix="${gl_saved_prefix}"
+])
+
+dnl Defines pkgdatadir_c and pkgdatadir_c_make,
+dnl where pkgdatadir = $(datadir)/$(PACKAGE)
+AC_DEFUN_ONCE([gl_BUILD_TO_HOST_PKGDATADIR],
+[
+ dnl Find the final value of pkgdatadir.
+ gl_saved_prefix="${prefix}"
+ gl_saved_datarootdir="${datarootdir}"
+ gl_saved_datadir="${datadir}"
+ gl_saved_pkgdatadir="${pkgdatadir}"
+ dnl Unfortunately, prefix gets only finally determined at the end of
+ dnl configure.
+ if test "X$prefix" = "XNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ eval datarootdir="$datarootdir"
+ eval datadir="$datadir"
+ eval pkgdatadir="$pkgdatadir"
+ gl_BUILD_TO_HOST([pkgdatadir])
+ pkgdatadir="${gl_saved_pkgdatadir}"
+ datadir="${gl_saved_datadir}"
+ datarootdir="${gl_saved_datarootdir}"
+ prefix="${gl_saved_prefix}"
+])
+
+dnl Defines pkglibdir_c and pkglibdir_c_make,
+dnl where pkglibdir = $(libdir)/$(PACKAGE)
+AC_DEFUN_ONCE([gl_BUILD_TO_HOST_PKGLIBDIR],
+[
+ dnl Find the final value of pkglibdir.
+ gl_saved_prefix="${prefix}"
+ gl_saved_exec_prefix="${exec_prefix}"
+ gl_saved_libdir="${libdir}"
+ gl_saved_pkglibdir="${pkglibdir}"
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ exec_prefix='${prefix}'
+ fi
+ eval exec_prefix="$exec_prefix"
+ eval libdir="$libdir"
+ eval pkglibdir="$pkglibdir"
+ gl_BUILD_TO_HOST([pkglibdir])
+ pkglibdir="${gl_saved_pkglibdir}"
+ libdir="${gl_saved_libdir}"
+ exec_prefix="${gl_saved_exec_prefix}"
+ prefix="${gl_saved_prefix}"
+])
+
+dnl Defines pkglibexecdir_c and pkglibexecdir_c_make,
+dnl where pkglibexecdir = $(libexecdir)/$(PACKAGE)
+AC_DEFUN_ONCE([gl_BUILD_TO_HOST_PKGLIBEXECDIR],
+[
+ dnl Find the final value of pkglibexecdir.
+ gl_saved_prefix="${prefix}"
+ gl_saved_exec_prefix="${exec_prefix}"
+ gl_saved_libexecdir="${libexecdir}"
+ gl_saved_pkglibexecdir="${pkglibexecdir}"
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ exec_prefix='${prefix}'
+ fi
+ eval exec_prefix="$exec_prefix"
+ eval libexecdir="$libexecdir"
+ eval pkglibexecdir="$pkglibexecdir"
+ gl_BUILD_TO_HOST([pkglibexecdir])
+ pkglibexecdir="${gl_saved_pkglibexecdir}"
+ libexecdir="${gl_saved_libexecdir}"
+ exec_prefix="${gl_saved_exec_prefix}"
+ prefix="${gl_saved_prefix}"
+])
diff --git a/gnulib-m4/builtin-expect.m4 b/gnulib-m4/builtin-expect.m4
index b1fb12a3..cf96977e 100644
--- a/gnulib-m4/builtin-expect.m4
+++ b/gnulib-m4/builtin-expect.m4
@@ -1,9 +1,12 @@
-dnl Check for __builtin_expect.
-
-dnl Copyright 2016-2022 Free Software Foundation, Inc.
+# builtin-expect.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl Provide a GCC-compatible __builtin_expect macro in <config.h>.
dnl Written by Paul Eggert.
@@ -45,5 +48,4 @@ AC_DEFUN([gl___BUILTIN_EXPECT],
#elif HAVE___BUILTIN_EXPECT == 2
# include <builtins.h>
#endif
- ])
-])
+])])
diff --git a/gnulib-m4/c-bool.m4 b/gnulib-m4/c-bool.m4
index bb109b77..f04041a4 100644
--- a/gnulib-m4/c-bool.m4
+++ b/gnulib-m4/c-bool.m4
@@ -1,9 +1,12 @@
-# Check for bool that conforms to C2023.
-
-dnl Copyright 2022 Free Software Foundation, Inc.
+# c-bool.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
+
+# Check for bool that conforms to C2023.
AC_DEFUN([gl_C_BOOL],
[
@@ -27,12 +30,23 @@ AC_DEFUN([gl_C_BOOL],
dnl The "zz" puts this toward config.h's end, to avoid potential
dnl collisions with other definitions.
dnl If 'bool', 'true' and 'false' do not work, arrange for them to work.
- dnl In C, this means including <stdbool.h> if it is not already included.
+ dnl Hardcode the known configuration results for GCC and clang, so that
+ dnl a configuration made with the C compiler works also with the C++ compiler
+ dnl and vice versa.
+ dnl The seemingly redundant parentheses are necessary for MSVC 14.
+ dnl "Arrange for them to work", in C, means including <stdbool.h> if it is
+ dnl not already included.
dnl However, if the preprocessor mistakenly treats 'true' as 0,
dnl define it to a bool expression equal to 1; this is needed in
dnl Sun C++ 5.11 (Oracle Solaris Studio 12.2, 2010) and older.
AH_VERBATIM([zzbool],
-[#ifndef HAVE_C_BOOL
+[#if !(defined __cplusplus \
+ ? 1 \
+ : (defined __clang__ \
+ ? __STDC_VERSION__ >= 202000L && __clang_major__ >= 15 \
+ : (defined __GNUC__ \
+ ? __STDC_VERSION__ >= 202000L && __GNUC__ >= 13 \
+ : defined HAVE_C_BOOL)))
# if !defined __cplusplus && !defined __bool_true_false_are_defined
# if HAVE_STDBOOL_H
# include <stdbool.h>
diff --git a/gnulib-m4/c32rtomb.m4 b/gnulib-m4/c32rtomb.m4
new file mode 100644
index 00000000..b7a0d44c
--- /dev/null
+++ b/gnulib-m4/c32rtomb.m4
@@ -0,0 +1,187 @@
+# c32rtomb.m4
+# serial 8
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_FUNC_C32RTOMB],
+[
+ AC_REQUIRE([gl_UCHAR_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+
+ AC_REQUIRE([gl_CHECK_FUNC_C32RTOMB])
+ if test $gl_cv_func_c32rtomb = no; then
+ HAVE_C32RTOMB=0
+ else
+ dnl When we override mbrtoc32, redefining the meaning of the char32_t
+ dnl values, we need to override c32rtomb as well, for consistency.
+ if test $HAVE_WORKING_MBRTOC32 = 0; then
+ REPLACE_C32RTOMB=1
+ fi
+ AC_CACHE_CHECK([whether c32rtomb return value is correct],
+ [gl_cv_func_c32rtomb_retval],
+ [
+ dnl Initial guess, used when cross-compiling.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX.
+ aix*) gl_cv_func_c32rtomb_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_c32rtomb_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stddef.h>
+#ifdef __HAIKU__
+ #include <stdint.h>
+#endif
+#include <uchar.h>
+int main ()
+{
+ int result = 0;
+ if (c32rtomb (NULL, 0, NULL) != 1)
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_c32rtomb_retval=yes],
+ [gl_cv_func_c32rtomb_retval=no],
+ [:])
+ ])
+ case "$gl_cv_func_c32rtomb_retval" in
+ *yes) ;;
+ *) AC_DEFINE([C32RTOMB_RETVAL_BUG], [1],
+ [Define if the c32rtomb function has an incorrect return value.])
+ REPLACE_C32RTOMB=1 ;;
+ esac
+ if test $HAVE_WORKING_C32RTOMB = 0; then
+ REPLACE_C32RTOMB=1
+ fi
+ fi
+])
+
+AC_DEFUN([gl_CHECK_FUNC_C32RTOMB],
+[
+ dnl Cf. gl_CHECK_FUNCS_ANDROID
+ AC_CHECK_DECL([c32rtomb], , ,
+ [[#ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ ]])
+ if test $ac_cv_have_decl_c32rtomb = yes; then
+ dnl We can't use AC_CHECK_FUNC here, because c32rtomb() is defined as a
+ dnl static inline function on Haiku 2020.
+ AC_CACHE_CHECK([for c32rtomb], [gl_cv_func_c32rtomb],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ #ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ ]],
+ [[char buf[8];
+ return c32rtomb (buf, 0, NULL) == 0;
+ ]])
+ ],
+ [gl_cv_func_c32rtomb=yes],
+ [gl_cv_func_c32rtomb=no])
+ ])
+ else
+ gl_cv_func_c32rtomb=no
+ fi
+])
+
+dnl Test whether c32rtomb works not worse than wcrtomb.
+dnl Result is HAVE_WORKING_C32RTOMB.
+
+AC_DEFUN([gl_C32RTOMB_SANITYCHECK],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_TYPE_CHAR32_T])
+ AC_REQUIRE([gl_CHECK_FUNC_C32RTOMB])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ if test $GNULIBHEADERS_OVERRIDE_CHAR32_T = 1 || test $gl_cv_func_c32rtomb = no; then
+ HAVE_WORKING_C32RTOMB=0
+ else
+ AC_CACHE_CHECK([whether c32rtomb works as well as wcrtomb],
+ [gl_cv_func_c32rtomb_sanitycheck],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris derivatives.
+ solaris*)
+ if test -f /etc/release && grep 'Oracle Solaris' /etc/release >/dev/null; then
+ gl_cv_func_c32rtomb_sanitycheck="guessing yes"
+ else
+ gl_cv_func_c32rtomb_sanitycheck="guessing no"
+ fi
+ ;;
+ # Guess yes otherwise.
+ *)
+ gl_cv_func_c32rtomb_sanitycheck="guessing yes"
+ ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_ZH_CN != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#ifdef __HAIKU__
+ #include <stdint.h>
+#endif
+#include <uchar.h>
+int main ()
+{
+ int result = 0;
+ /* This fails on Solaris 11 OmniOS:
+ c32rtomb returns (size_t)-1.
+ wcrtomb returns 4 (correct). */
+ if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ char buf[16];
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\201\060\211\070", 4, &state) == 4
+ && wcrtomb (buf, wc, NULL) == 4
+ && memcmp (buf, "\201\060\211\070", 4) == 0)
+ {
+ char32_t c32 = (wchar_t) 0xBADFACE;
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtoc32 (&c32, "\201\060\211\070", 4, &state) == 4
+ && c32rtomb (buf, c32, NULL) != 4)
+ result |= 1;
+ }
+ }
+ return result;
+}]])],
+ [gl_cv_func_c32rtomb_sanitycheck=yes],
+ [gl_cv_func_c32rtomb_sanitycheck=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_c32rtomb_sanitycheck" in
+ *yes)
+ HAVE_WORKING_C32RTOMB=1
+ AC_DEFINE([HAVE_WORKING_C32RTOMB], [1],
+ [Define if the c32rtomb function basically works.])
+ ;;
+ *) HAVE_WORKING_C32RTOMB=0 ;;
+ esac
+ fi
+ AC_SUBST([HAVE_WORKING_C32RTOMB])
+])
diff --git a/gnulib-m4/calloc.m4 b/gnulib-m4/calloc.m4
index c01520e5..2ed64332 100644
--- a/gnulib-m4/calloc.m4
+++ b/gnulib-m4/calloc.m4
@@ -1,9 +1,10 @@
-# calloc.m4 serial 29
-
-# Copyright (C) 2004-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# calloc.m4
+# serial 36
+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.
+dnl This file is offered as-is, without any warranty.
# Written by Jim Meyering.
@@ -12,42 +13,35 @@
# If so, define HAVE_CALLOC. Otherwise, define calloc to rpl_calloc
# and arrange to use a calloc wrapper function that does work in that case.
-# _AC_FUNC_CALLOC_IF([IF-WORKS], [IF-NOT])
-# -------------------------------------
+# gl_FUNC_CALLOC_IF([IF-WORKS], [IF-NOT])
+# ---------------------------------------
# If calloc is compatible with GNU calloc, run IF-WORKS, otherwise, IF-NOT.
-AC_DEFUN([_AC_FUNC_CALLOC_IF],
+AC_DEFUN([gl_FUNC_CALLOC_IF],
[
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether calloc (0, n) and calloc (n, 0) return nonnull],
- [ac_cv_func_calloc_0_nonnull],
- [if test $cross_compiling != yes; then
- ac_cv_func_calloc_0_nonnull=yes
- AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [AC_INCLUDES_DEFAULT],
- [[int result = 0;
- char * volatile p = calloc (0, 0);
- if (!p)
- result |= 1;
- free (p);
- return result;
- ]])],
- [],
- [ac_cv_func_calloc_0_nonnull=no])
- else
- case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) ac_cv_func_calloc_0_nonnull="$gl_cross_guess_normal" ;;
- esac
- fi
- ])
- AS_CASE([$ac_cv_func_calloc_0_nonnull], [*yes], [$1], [$2])
+ [gl_cv_func_calloc_0_nonnull],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ /* Use pcalloc to test; "volatile" prevents the compiler
+ from optimizing the calloc call away. */
+ void *(*volatile pcalloc) (size_t, size_t) = calloc;]],
+ [[void *p = pcalloc (0, 0);
+ int result = !p;
+ free (p);
+ return result;]])],
+ [gl_cv_func_calloc_0_nonnull=yes],
+ [gl_cv_func_calloc_0_nonnull=no],
+ [AS_CASE([$host_os],
+ [# Guess yes on platforms where we know the result.
+ *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+ | gnu* | *-musl* | midipix* | midnightbsd* \
+ | hpux* | solaris* | cygwin* | mingw* | windows* | msys*],
+ [gl_cv_func_calloc_0_nonnull="guessing yes"],
+ [# If we don't know, obey --enable-cross-guesses.
+ gl_cv_func_calloc_0_nonnull="$gl_cross_guess_normal"])])])
+ AS_CASE([$gl_cv_func_calloc_0_nonnull], [*yes], [$1], [$2])
])
@@ -58,9 +52,14 @@ AC_DEFUN([gl_FUNC_CALLOC_GNU],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_CALLOC_POSIX])
+
+ dnl Through the dependency on module extensions-aix, _LINUX_SOURCE_COMPAT
+ dnl gets defined already before this macro gets invoked. This helps
+ dnl if !(__VEC__ || __AIXVEC), and doesn't hurt otherwise.
+
REPLACE_CALLOC_FOR_CALLOC_GNU="$REPLACE_CALLOC_FOR_CALLOC_POSIX"
if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 0; then
- _AC_FUNC_CALLOC_IF([], [REPLACE_CALLOC_FOR_CALLOC_GNU=1])
+ gl_FUNC_CALLOC_IF([], [REPLACE_CALLOC_FOR_CALLOC_GNU=1])
fi
])# gl_FUNC_CALLOC_GNU
@@ -73,9 +72,7 @@ AC_DEFUN([gl_FUNC_CALLOC_POSIX],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
- if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
- REPLACE_CALLOC_FOR_CALLOC_POSIX=1
- fi
+ REPLACE_CALLOC_FOR_CALLOC_POSIX=$REPLACE_MALLOC_FOR_MALLOC_POSIX
dnl Although in theory we should also test for size_t overflow,
dnl in practice testing for ptrdiff_t overflow suffices
dnl since PTRDIFF_MAX <= SIZE_MAX on all known Gnulib porting targets.
diff --git a/gnulib-m4/close.m4 b/gnulib-m4/close.m4
index f95dbc9d..9b498643 100644
--- a/gnulib-m4/close.m4
+++ b/gnulib-m4/close.m4
@@ -1,10 +1,12 @@
-# close.m4 serial 9
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# close.m4
+# serial 10
+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.
+dnl This file is offered as-is, without any warranty.
-AC_DEFUN([gl_FUNC_CLOSE],
+AC_DEFUN_ONCE([gl_FUNC_CLOSE],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
m4_ifdef([gl_MSVC_INVAL], [
diff --git a/gnulib-m4/codeset.m4 b/gnulib-m4/codeset.m4
index eb732601..4ab542f4 100644
--- a/gnulib-m4/codeset.m4
+++ b/gnulib-m4/codeset.m4
@@ -1,9 +1,11 @@
-# codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2022 Free Software
+# codeset.m4
+# serial 5 (gettext-0.18.2)
+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,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
diff --git a/gnulib-m4/ctype_h.m4 b/gnulib-m4/ctype_h.m4
index 6f420de3..b6414d37 100644
--- a/gnulib-m4/ctype_h.m4
+++ b/gnulib-m4/ctype_h.m4
@@ -1,8 +1,10 @@
-# ctype_h.m4 serial 9
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# ctype_h.m4
+# serial 23
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_CTYPE_H],
[
@@ -14,7 +16,9 @@ AC_DEFUN_ONCE([gl_CTYPE_H],
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[#include <ctype.h>
- ]], [isblank])
+ ]], [isalnum_l isalpha_l isblank isblank_l iscntrl_l isdigit_l isgraph_l
+ islower_l isprint_l ispunct_l isspace_l isupper_l isxdigit_l
+ tolower_l toupper_l])
])
# gl_CTYPE_MODULE_INDICATOR([modulename])
@@ -34,7 +38,21 @@ AC_DEFUN([gl_CTYPE_MODULE_INDICATOR],
AC_DEFUN([gl_CTYPE_H_REQUIRE_DEFAULTS],
[
m4_defun(GL_MODULE_INDICATOR_PREFIX[_CTYPE_H_MODULE_INDICATOR_DEFAULTS], [
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISALNUM_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISALPHA_L])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISBLANK])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISBLANK_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISCNTRL_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISDIGIT_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISGRAPH_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISLOWER_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISPRINT_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISPUNCT_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISSPACE_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISUPPER_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISXDIGIT_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOLOWER_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOUPPER_L])
])
m4_require(GL_MODULE_INDICATOR_PREFIX[_CTYPE_H_MODULE_INDICATOR_DEFAULTS])
AC_REQUIRE([gl_CTYPE_H_DEFAULTS])
@@ -43,5 +61,19 @@ AC_DEFUN([gl_CTYPE_H_REQUIRE_DEFAULTS],
AC_DEFUN([gl_CTYPE_H_DEFAULTS],
[
dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK])
+ HAVE_ISALNUM_L=1; AC_SUBST([HAVE_ISALNUM_L])
+ HAVE_ISALPHA_L=1; AC_SUBST([HAVE_ISALPHA_L])
+ HAVE_ISBLANK=1; AC_SUBST([HAVE_ISBLANK])
+ HAVE_ISBLANK_L=1; AC_SUBST([HAVE_ISBLANK_L])
+ HAVE_ISCNTRL_L=1; AC_SUBST([HAVE_ISCNTRL_L])
+ HAVE_ISDIGIT_L=1; AC_SUBST([HAVE_ISDIGIT_L])
+ HAVE_ISGRAPH_L=1; AC_SUBST([HAVE_ISGRAPH_L])
+ HAVE_ISLOWER_L=1; AC_SUBST([HAVE_ISLOWER_L])
+ HAVE_ISPRINT_L=1; AC_SUBST([HAVE_ISPRINT_L])
+ HAVE_ISPUNCT_L=1; AC_SUBST([HAVE_ISPUNCT_L])
+ HAVE_ISSPACE_L=1; AC_SUBST([HAVE_ISSPACE_L])
+ HAVE_ISUPPER_L=1; AC_SUBST([HAVE_ISUPPER_L])
+ HAVE_ISXDIGIT_L=1; AC_SUBST([HAVE_ISXDIGIT_L])
+ HAVE_TOLOWER_L=1; AC_SUBST([HAVE_TOLOWER_L])
+ HAVE_TOUPPER_L=1; AC_SUBST([HAVE_TOUPPER_L])
])
diff --git a/gnulib-m4/double-slash-root.m4 b/gnulib-m4/double-slash-root.m4
index 09ff5f0d..957adca6 100644
--- a/gnulib-m4/double-slash-root.m4
+++ b/gnulib-m4/double-slash-root.m4
@@ -1,8 +1,10 @@
-# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+# double-slash-root.m4
+# serial 4 -*- Autoconf -*-
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
[
diff --git a/gnulib-m4/dup2.m4 b/gnulib-m4/dup2.m4
index 7e777cde..e1d51898 100644
--- a/gnulib-m4/dup2.m4
+++ b/gnulib-m4/dup2.m4
@@ -1,8 +1,10 @@
-#serial 27
-dnl Copyright (C) 2002, 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+# dup2.m4
+# serial 28
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_DUP2],
[
@@ -67,7 +69,7 @@ AC_DEFUN([gl_FUNC_DUP2],
],
[gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
[case "$host_os" in
- mingw*) # on this platform, dup2 always returns 0 for success
+ mingw* | windows*) # on this platform, dup2 always returns 0 for success
gl_cv_func_dup2_works="guessing no" ;;
cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
gl_cv_func_dup2_works="guessing no" ;;
diff --git a/gnulib-m4/eealloc.m4 b/gnulib-m4/eealloc.m4
deleted file mode 100644
index a6aa2f88..00000000
--- a/gnulib-m4/eealloc.m4
+++ /dev/null
@@ -1,31 +0,0 @@
-# eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2022 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_EEALLOC],
-[
- AC_REQUIRE([gl_EEMALLOC])
- AC_REQUIRE([gl_EEREALLOC])
-])
-
-AC_DEFUN([gl_EEMALLOC],
-[
- _AC_FUNC_MALLOC_IF(
- [gl_cv_func_malloc_0_nonnull=1],
- [gl_cv_func_malloc_0_nonnull=0])
- AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull],
- [If malloc(0) is != NULL, define this to 1. Otherwise define this
- to 0.])
-])
-
-AC_DEFUN([gl_EEREALLOC],
-[
- _AC_FUNC_REALLOC_IF(
- [gl_cv_func_realloc_0_nonnull=1],
- [gl_cv_func_realloc_0_nonnull=0])
- AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull],
- [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this
- to 0.])
-])
diff --git a/gnulib-m4/environ.m4 b/gnulib-m4/environ.m4
index 583dac39..5c0644ab 100644
--- a/gnulib-m4/environ.m4
+++ b/gnulib-m4/environ.m4
@@ -1,8 +1,10 @@
-# environ.m4 serial 8
-dnl Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc.
+# environ.m4
+# serial 8
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_ENVIRON],
[
diff --git a/gnulib-m4/errno_h.m4 b/gnulib-m4/errno_h.m4
index 4be9780a..ade19b6f 100644
--- a/gnulib-m4/errno_h.m4
+++ b/gnulib-m4/errno_h.m4
@@ -1,14 +1,21 @@
-# errno_h.m4 serial 14
-dnl Copyright (C) 2004, 2006, 2008-2022 Free Software Foundation, Inc.
+# errno_h.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.61])
AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
[
AC_REQUIRE([AC_PROG_CC])
+
+ dnl Through the dependency on module extensions-aix, _LINUX_SOURCE_COMPAT
+ dnl gets defined already before this macro gets invoked. This persuades
+ dnl AIX 7.3 errno.h to assign ENOTEMPTY a value different than EEXIST.
+
AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
AC_EGREP_CPP([booboo],[
#include <errno.h>
@@ -63,6 +70,9 @@ booboo
#if !defined EILSEQ
booboo
#endif
+#if !defined ESOCKTNOSUPPORT
+booboo
+#endif
],
[gl_cv_header_errno_h_complete=no],
[gl_cv_header_errno_h_complete=yes])
@@ -73,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 <errno.h>, 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 <errno.h>
-#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 <errno.h>
-#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 <errno.h>
-/* The following two lines are a workaround against an autoconf-2.52 bug. */
-#include <stdio.h>
-#include <stdlib.h>
-])
- 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/gnulib-m4/error.m4 b/gnulib-m4/error.m4
index 7a103446..f14b9ceb 100644
--- a/gnulib-m4/error.m4
+++ b/gnulib-m4/error.m4
@@ -1,22 +1,14 @@
-#serial 15
-
-# Copyright (C) 1996-1998, 2001-2004, 2009-2022 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# error.m4
+# serial 16
+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,
+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_ERROR],
[
- dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
- dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
- AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <error.h>]],
- [[error_at_line (0, 0, "", 0, "an error occurred");]])],
- [ac_cv_lib_error_at_line=yes],
- [ac_cv_lib_error_at_line=no])])
])
# Prerequisites of lib/error.c.
diff --git a/gnulib-m4/error_h.m4 b/gnulib-m4/error_h.m4
new file mode 100644
index 00000000..73e96943
--- /dev/null
+++ b/gnulib-m4/error_h.m4
@@ -0,0 +1,129 @@
+# error_h.m4
+# serial 5
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl From Bruno Haible.
+dnl Provide a working <error.h>.
+
+AC_DEFUN_ONCE([gl_ERROR_H],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ gl_CHECK_NEXT_HEADERS([error.h])
+ if test $ac_cv_header_error_h = yes; then
+ HAVE_ERROR_H=1
+ else
+ HAVE_ERROR_H=0
+ fi
+ AC_SUBST([HAVE_ERROR_H])
+
+ REPLACE_ERROR=0
+
+ gl_CHECK_FUNCS_ANDROID([error], [[#include <error.h>]])
+ if test $ac_cv_func_error = yes; then
+ HAVE_ERROR=1
+ else
+ HAVE_ERROR=0
+ case "$gl_cv_onwards_func_error" in
+ future*) REPLACE_ERROR=1 ;;
+ esac
+ fi
+
+ dnl We don't use AC_FUNC_ERROR_AT_LINE any more, because it is no longer
+ dnl maintained in Autoconf and because it invokes AC_LIBOBJ.
+ dnl We need to notice a missing declaration, like gl_CHECK_FUNCS_ANDROID does.
+ AC_CHECK_DECL([error_at_line], , , [[#include <error.h>]])
+ if test $ac_cv_have_decl_error_at_line = yes; then
+ AC_CACHE_CHECK([for error_at_line], [ac_cv_lib_error_at_line],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <error.h>]],
+ [[error_at_line (0, 0, "", 0, "an error occurred");]])],
+ [ac_cv_lib_error_at_line=yes],
+ [ac_cv_lib_error_at_line=no])])
+ else
+ ac_cv_lib_error_at_line=no
+ fi
+ if test $ac_cv_lib_error_at_line = yes; then
+ HAVE_ERROR_AT_LINE=1
+ else
+ HAVE_ERROR_AT_LINE=0
+ fi
+ REPLACE_ERROR_AT_LINE=0
+
+ if test $ac_cv_func_error = yes && test $ac_cv_lib_error_at_line = yes; then
+ dnl On Android 11, when error_print_progname is set, the output of the
+ dnl error() function contains an extra space.
+ AC_CACHE_CHECK([for working error function],
+ [gl_cv_func_working_error],
+ [if test $cross_compiling != yes; then
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <error.h>
+ static void print_no_progname (void) {}
+ ]], [[
+ error_print_progname = print_no_progname;
+ error (0, 0, "foo");
+ ]])
+ ],
+ [rm -f conftest.out
+ if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext 2> conftest.out; then
+ if grep ' ' conftest.out >/dev/null; then
+ gl_cv_func_working_error=no
+ else
+ gl_cv_func_working_error=yes
+ fi
+ else
+ gl_cv_func_working_error=no
+ fi
+ rm -f conftest.out
+ ],
+ [gl_cv_func_working_error=no])
+ else
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <error.h>
+ ]], [[
+ error (0, 0, "foo");
+ ]])
+ ],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_working_error="guessing yes" ;;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_working_error="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_working_error="$gl_cross_guess_normal" ;;
+ esac
+ ],
+ [gl_cv_func_working_error=no])
+ fi
+ ])
+ case "$gl_cv_func_working_error" in
+ *no)
+ REPLACE_ERROR=1
+ REPLACE_ERROR_AT_LINE=1
+ ;;
+ esac
+ fi
+
+ m4_ifdef([gl_HAVE_MODULE_VERROR],
+ [COMPILE_ERROR_C=1],
+ [if test $HAVE_ERROR = 0 || test $REPLACE_ERROR = 1 \
+ || test $HAVE_ERROR_AT_LINE = 0 \
+ || test $REPLACE_ERROR_AT_LINE = 1; then
+ COMPILE_ERROR_C=1
+ else
+ COMPILE_ERROR_C=0
+ fi])
+
+ AC_SUBST([HAVE_ERROR])
+ AC_SUBST([HAVE_ERROR_AT_LINE])
+ AC_SUBST([REPLACE_ERROR])
+ AC_SUBST([REPLACE_ERROR_AT_LINE])
+])
diff --git a/gnulib-m4/exponentd.m4 b/gnulib-m4/exponentd.m4
index 83ac08bf..bff98570 100644
--- a/gnulib-m4/exponentd.m4
+++ b/gnulib-m4/exponentd.m4
@@ -1,9 +1,11 @@
-# exponentd.m4 serial 3
-dnl Copyright (C) 2007-2008, 2010-2022 Free Software Foundation, Inc.
+# exponentd.m4
+# serial 5
+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.
-AC_DEFUN([gl_DOUBLE_EXPONENT_LOCATION],
+dnl This file is offered as-is, without any warranty.
+AC_DEFUN_ONCE([gl_DOUBLE_EXPONENT_LOCATION],
[
AC_CACHE_CHECK([where to find the exponent in a 'double'],
[gl_cv_cc_double_expbit0],
@@ -83,7 +85,7 @@ int main ()
dnl The newer VFP instructions assume little-endian order
dnl consistently.
AC_EGREP_CPP([mixed_endianness], [
-#if defined arm || defined __arm || defined __arm__
+#if defined __arm__
mixed_endianness
#endif
],
diff --git a/gnulib-m4/exponentf.m4 b/gnulib-m4/exponentf.m4
index 32fdb6a2..aab59669 100644
--- a/gnulib-m4/exponentf.m4
+++ b/gnulib-m4/exponentf.m4
@@ -1,9 +1,11 @@
-# exponentf.m4 serial 2
-dnl Copyright (C) 2007-2008, 2010-2022 Free Software Foundation, Inc.
+# exponentf.m4
+# serial 3
+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.
-AC_DEFUN([gl_FLOAT_EXPONENT_LOCATION],
+dnl This file is offered as-is, without any warranty.
+AC_DEFUN_ONCE([gl_FLOAT_EXPONENT_LOCATION],
[
AC_CACHE_CHECK([where to find the exponent in a 'float'],
[gl_cv_cc_float_expbit0],
diff --git a/gnulib-m4/exponentl.m4 b/gnulib-m4/exponentl.m4
index 653ad5a9..af36db3e 100644
--- a/gnulib-m4/exponentl.m4
+++ b/gnulib-m4/exponentl.m4
@@ -1,9 +1,11 @@
-# exponentl.m4 serial 5
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# exponentl.m4
+# serial 8
+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.
-AC_DEFUN([gl_LONG_DOUBLE_EXPONENT_LOCATION],
+dnl This file is offered as-is, without any warranty.
+AC_DEFUN_ONCE([gl_LONG_DOUBLE_EXPONENT_LOCATION],
[
AC_REQUIRE([gl_BIGENDIAN])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -79,23 +81,111 @@ int main ()
[gl_cv_cc_long_double_expbit0="unknown"],
[
dnl When cross-compiling, in general we don't know. It depends on the
- dnl ABI and compiler version. There are too many cases.
- gl_cv_cc_long_double_expbit0="unknown"
- case "$host_os" in
- mingw*) # On native Windows (little-endian), we know the result
- # in two cases: mingw, MSVC.
- AC_EGREP_CPP([Known], [
-#ifdef __MINGW32__
- Known
-#endif
- ], [gl_cv_cc_long_double_expbit0="word 2 bit 0"])
- AC_EGREP_CPP([Known], [
-#ifdef _MSC_VER
- Known
-#endif
- ], [gl_cv_cc_long_double_expbit0="word 1 bit 20"])
- ;;
- esac
+ dnl ABI and compiler version. But we know the results for specific
+ dnl CPUs.
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+ if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
+ gl_DOUBLE_EXPONENT_LOCATION
+ gl_cv_cc_long_double_expbit0="$gl_cv_cc_double_expbit0"
+ if test "$gl_cv_cc_double_expbit0" = unknown; then
+ case "$host_cpu" in
+ arm*)
+ # See the comments in exponentd.m4.
+ ;;
+ aarch64 | sh4)
+ # little-endian IEEE 754 double-precision
+ gl_cv_cc_long_double_expbit0='word 1 bit 20'
+ ;;
+ hppa*)
+ # big-endian IEEE 754 double-precision
+ gl_cv_cc_long_double_expbit0='word 0 bit 20'
+ ;;
+ mips*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #if defined _MIPSEB /* equivalent: __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ */
+ int big;
+ #else
+ #error little
+ #endif
+ ]], [[]])
+ ],
+ [# big-endian IEEE 754 double-precision
+ gl_cv_cc_long_double_expbit0='word 0 bit 20'
+ ],
+ [# little-endian IEEE 754 double-precision
+ gl_cv_cc_long_double_expbit0='word 1 bit 20'
+ ])
+ ;;
+ esac
+ fi
+ else
+ case "$host_cpu" in
+changequote(,)dnl
+ i[34567]86 | x86_64 | ia64*)
+changequote([,])dnl
+ # 80-bits "extended precision"
+ gl_cv_cc_long_double_expbit0='word 2 bit 0'
+ ;;
+ m68k*)
+ # big-endian, 80-bits padded to 96 bits, non-IEEE exponent
+ gl_cv_cc_long_double_expbit0='word 0 bit 16'
+ ;;
+ alpha* | aarch64 | loongarch64 | riscv32 | riscv64 | sh4)
+ # little-endian IEEE 754 quadruple-precision
+ gl_cv_cc_long_double_expbit0='word 3 bit 16'
+ ;;
+ s390* | sparc | sparc64)
+ # big-endian IEEE 754 quadruple-precision
+ gl_cv_cc_long_double_expbit0='word 0 bit 16'
+ ;;
+ arm*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #if defined _ARMEL
+ int little;
+ #else
+ #error big
+ #endif
+ ]], [[]])
+ ],
+ [# little-endian IEEE 754 quadruple-precision
+ gl_cv_cc_long_double_expbit0='word 3 bit 16'
+ ],
+ [# big-endian IEEE 754 quadruple-precision
+ gl_cv_cc_long_double_expbit0='word 0 bit 16'
+ ])
+ ;;
+ mips*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #if defined _MIPSEB /* equivalent: __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ */
+ int big;
+ #else
+ #error little
+ #endif
+ ]], [[]])
+ ],
+ [# big-endian IEEE 754 quadruple-precision
+ gl_cv_cc_long_double_expbit0='word 0 bit 16'
+ ],
+ [# little-endian IEEE 754 quadruple-precision
+ gl_cv_cc_long_double_expbit0='word 3 bit 16'
+ ])
+ ;;
+ powerpc64le)
+ # little-endian double-double
+ gl_cv_cc_long_double_expbit0='word 1 bit 20'
+ ;;
+ powerpc* | rs6000)
+ # big-endian double-double
+ gl_cv_cc_long_double_expbit0='word 0 bit 20'
+ ;;
+ *)
+ gl_cv_cc_long_double_expbit0="unknown"
+ ;;
+ esac
+ fi
])
rm -f conftest.out
])
diff --git a/gnulib-m4/extensions-aix.m4 b/gnulib-m4/extensions-aix.m4
new file mode 100644
index 00000000..9036d7bb
--- /dev/null
+++ b/gnulib-m4/extensions-aix.m4
@@ -0,0 +1,26 @@
+# extensions-aix.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+# On AIX, most extensions are already enabled through the _ALL_SOURCE macro,
+# defined by gl_USE_SYSTEM_EXTENSIONS. gl_USE_AIX_EXTENSIONS additionally
+# activates more GNU and Linux-like behaviours, affecting
+# - the time_t type,
+# - errno values in <errno.h>: ENOTEMPTY
+# - functions in <stdlib.h>: malloc calloc realloc valloc
+# <https://www.ibm.com/docs/en/aix/7.3?topic=m-malloc-free-realloc-calloc-mallopt-mallinfo-mallinfo-heap-alloca-valloc-posix-memalign-subroutine>
+# - functions in <string.h>: strerror_r (returns 'char *', like glibc)
+# - functions in <dirent.h>: scandir, alphasort, readdir_r
+# - functions in <netdb.h>: gethostbyname_r gethostbyaddr_r
+# - declarations in <unistd.h>: sbrk
+# and a couple of secondary <sys/*> header files.
+
+AC_DEFUN_ONCE([gl_USE_AIX_EXTENSIONS],
+[
+ AC_DEFINE([_LINUX_SOURCE_COMPAT], [1],
+ [Define so that AIX headers are more compatible with GNU/Linux.])
+])
diff --git a/gnulib-m4/extensions.m4 b/gnulib-m4/extensions.m4
index 0b3e4b5a..01a8e5f9 100644
--- a/gnulib-m4/extensions.m4
+++ b/gnulib-m4/extensions.m4
@@ -1,10 +1,12 @@
-# serial 22 -*- Autoconf -*-
-# Enable extensions on systems that normally disable them.
+# extensions.m4
+# serial 25 -*- Autoconf -*-
+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.
+dnl This file is offered as-is, without any warranty.
-# Copyright (C) 2003, 2006-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Enable extensions on systems that normally disable them.
dnl Define to empty for the benefit of Autoconf 2.69 and earlier, so that
dnl AC_USE_SYSTEM_EXTENSIONS (below) can be used unchanged from Autoconf 2.70+.
@@ -31,7 +33,7 @@ m4_ifndef([AC_CHECK_INCLUDES_DEFAULT],
# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
# invocation occurs in gl_EARLY, not in gl_INIT.
-m4_version_prereq([2.70.1], [], [
+m4_version_prereq([2.72], [], [
# AC_USE_SYSTEM_EXTENSIONS
# ------------------------
@@ -113,11 +115,15 @@ AH_VERBATIM([USE_SYSTEM_EXTENSIONS],
#ifndef __STDC_WANT_IEC_60559_DFP_EXT__
# undef __STDC_WANT_IEC_60559_DFP_EXT__
#endif
+/* Enable extensions specified by C23 Annex F. */
+#ifndef __STDC_WANT_IEC_60559_EXT__
+# undef __STDC_WANT_IEC_60559_EXT__
+#endif
/* Enable extensions specified by ISO/IEC TS 18661-4:2015. */
#ifndef __STDC_WANT_IEC_60559_FUNCS_EXT__
# undef __STDC_WANT_IEC_60559_FUNCS_EXT__
#endif
-/* Enable extensions specified by ISO/IEC TS 18661-3:2015. */
+/* Enable extensions specified by C23 Annex H and ISO/IEC TS 18661-3:2015. */
#ifndef __STDC_WANT_IEC_60559_TYPES_EXT__
# undef __STDC_WANT_IEC_60559_TYPES_EXT__
#endif
@@ -187,6 +193,7 @@ dnl it should only be defined when necessary.
AC_DEFINE([__STDC_WANT_IEC_60559_ATTRIBS_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_BFP_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_DFP_EXT__])
+ AC_DEFINE([__STDC_WANT_IEC_60559_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_FUNCS_EXT__])
AC_DEFINE([__STDC_WANT_IEC_60559_TYPES_EXT__])
AC_DEFINE([__STDC_WANT_LIB_EXT2__])
@@ -224,4 +231,15 @@ AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
[Define to enable the declarations of ISO C 11 types and functions.])
;;
esac
+
+ dnl On OpenSolaris derivatives, the include files contains a couple of
+ dnl declarations that are only activated with an explicit
+ dnl -D__STDC_WANT_LIB_EXT1__.
+ AH_VERBATIM([USE_ISO_C_23_ANNEX_K_EXTENSIONS],
+[/* Define to enable the declarations of ISO C 23 Annex K types and functions. */
+#if !(defined __STDC_WANT_LIB_EXT1__ && __STDC_WANT_LIB_EXT1__)
+#undef/**/__STDC_WANT_LIB_EXT1__
+#define __STDC_WANT_LIB_EXT1__ 1
+#endif
+])
])
diff --git a/gnulib-m4/extern-inline.m4 b/gnulib-m4/extern-inline.m4
index 8a12bddd..4ccc4a95 100644
--- a/gnulib-m4/extern-inline.m4
+++ b/gnulib-m4/extern-inline.m4
@@ -1,9 +1,12 @@
-dnl 'extern inline' a la ISO C99.
-
-dnl Copyright 2012-2022 Free Software Foundation, Inc.
+# extern-inline.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
+
+dnl 'extern inline' a la ISO C99.
AC_DEFUN([gl_EXTERN_INLINE],
[
@@ -40,9 +43,11 @@ AC_DEFUN([gl_EXTERN_INLINE],
functions or macros in standard C headers like <ctype.h>. 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
+ <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3622.txt>,
+ 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
@@ -79,7 +84,8 @@ AC_DEFUN([gl_EXTERN_INLINE],
# define _GL_EXTERN_INLINE_STDHEADER_BUG
#endif
#if ((__GNUC__ \
- ? defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ ? (defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__ \
+ && !defined __PCC__) \
: (199901L <= __STDC_VERSION__ \
&& !defined __HP_cc \
&& !defined __PGI \
@@ -89,6 +95,7 @@ AC_DEFUN([gl_EXTERN_INLINE],
# define _GL_EXTERN_INLINE extern inline
# define _GL_EXTERN_INLINE_IN_USE
#elif (2 < __GNUC__ + (7 <= __GNUC_MINOR__) && !defined __STRICT_ANSI__ \
+ && !defined __PCC__ \
&& !defined _GL_EXTERN_INLINE_STDHEADER_BUG)
# if defined __GNUC_GNU_INLINE__ && __GNUC_GNU_INLINE__
/* __gnu_inline__ suppresses a GCC 4.2 diagnostic. */
@@ -107,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
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=54113> and
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63877>. */
+ <https://gcc.gnu.org/PR54113> and
+ <https://gcc.gnu.org/PR63877>. */
#if __GNUC__ == 4 && 6 <= __GNUC_MINOR__
# if defined __GNUC_STDC_INLINE__ && __GNUC_STDC_INLINE__
# define _GL_INLINE_HEADER_CONST_PRAGMA
diff --git a/gnulib-m4/fcntl-o.m4 b/gnulib-m4/fcntl-o.m4
index 4dcde9e0..a94fc557 100644
--- a/gnulib-m4/fcntl-o.m4
+++ b/gnulib-m4/fcntl-o.m4
@@ -1,14 +1,17 @@
-# fcntl-o.m4 serial 7
-dnl Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+# fcntl-o.m4
+# serial 12
+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.
+dnl This file is offered as-is, without any warranty.
dnl Written by Paul Eggert.
AC_PREREQ([2.60])
-# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
+# Test whether the flags O_DIRECTORY, O_NOATIME and O_NOFOLLOW actually work.
+# Define HAVE_WORKING_O_DIRECTORY to 1 if O_DIRECTORY works, or to 0 otherwise.
# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
AC_DEFUN([gl_FCNTL_O_FLAGS],
@@ -29,16 +32,23 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
#else /* on Windows with MSVC */
# include <io.h>
# include <stdlib.h>
- # defined sleep(n) _sleep ((n) * 1000)
+ # define sleep(n) _sleep ((n) * 1000)
#endif
+ #include <errno.h>
#include <fcntl.h>
]GL_MDA_DEFINES[
+ #ifndef O_DIRECTORY
+ #define O_DIRECTORY 0
+ #endif
#ifndef O_NOATIME
#define O_NOATIME 0
#endif
#ifndef O_NOFOLLOW
#define O_NOFOLLOW 0
#endif
+ #ifndef O_SEARCH
+ #define O_SEARCH O_RDONLY
+ #endif
static int const constants[] =
{
O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
@@ -51,31 +61,38 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
{
static char const sym[] = "conftest.sym";
if (symlink ("/dev/null", sym) != 0)
- result |= 2;
+ result |= 1;
else
{
int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
if (fd >= 0)
{
close (fd);
- result |= 4;
+ result |= 3;
}
}
if (unlink (sym) != 0 || symlink (".", sym) != 0)
- result |= 2;
+ result |= 1;
else
{
int fd = open (sym, O_RDONLY | O_NOFOLLOW);
if (fd >= 0)
{
close (fd);
- result |= 4;
+ result |= 3;
}
}
unlink (sym);
}
#endif
{
+ int fd = open ("confdefs.h", O_SEARCH | O_DIRECTORY);
+ if (!(fd < 0 && errno == ENOTDIR))
+ result |= 4;
+ if (0 <= fd)
+ close (fd);
+ }
+ {
static char const file[] = "confdefs.h";
int fd = open (file, O_RDONLY | O_NOATIME);
if (fd < 0)
@@ -110,31 +127,46 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
}
return result;]])],
[gl_cv_header_working_fcntl_h=yes],
- [case $? in #(
- 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
- 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
- 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
- *) gl_cv_header_working_fcntl_h='no';;
- esac],
- [case "$host_os" in
- # Guess 'no' on native Windows.
- mingw*) gl_cv_header_working_fcntl_h='no' ;;
- *) gl_cv_header_working_fcntl_h=cross-compiling ;;
- esac
- ])
- ])
+ [AS_CASE([$?],
+ dnl We cannot catch exit code 1 or 2 here, because
+ dnl - exit code 1 can occur through a compilation error on mingw (e.g.
+ dnl when O_NOCTTY, O_NONBLOCK, O_SYNC are not defined) or when
+ dnl result = 1, whereas
+ dnl - exit code 2 can occur through a compilation error on MSVC (e.g.
+ dnl again when O_NOCTTY, O_NONBLOCK, O_SYNC are not defined) or when
+ dnl result = 2.
+ [ 3], [gl_cv_header_working_fcntl_h="no (bad O_NOFOLLOW)"],
+ [ 4], [gl_cv_header_working_fcntl_h="no (bad O_DIRECTORY)"],
+ [ 7], [gl_cv_header_working_fcntl_h="no (bad O_NOFOLLOW, O_DIRECTORY)"],
+ [64], [gl_cv_header_working_fcntl_h="no (bad O_NOATIME)"],
+ [67], [gl_cv_header_working_fcntl_h="no (bad O_NOFOLLOW, O_NOATIME)"],
+ [68], [gl_cv_header_working_fcntl_h="no (bad O_DIRECTORY, O_NOATIME)"],
+ [71], [gl_cv_header_working_fcntl_h="no (bad O_NOFOLLOW, O_DIRECTORY, O_NOATIME)"],
+ [gl_cv_header_working_fcntl_h="no"])],
+ [AS_CASE([$host_os,$gl_cross_guess_normal],
+ # The O_DIRECTORY test is known to fail on Mac OS X 10.4.11 (2007)
+ # (see <https://bugs.gnu.org/78509#95>)
+ # and to succeed on Mac OS X 10.5.8 [darwin9.8.0] (2009).
+ # Guess it fails on Mac OS X 10.4.x and earlier.
+ [darwin[[0-8]].*yes],
+ [gl_cv_header_working_fcntl_h="guessing no (bad O_DIRECTORY)"],
+ # Known to be "no" on native MS-Windows.
+ [mingw* | windows*],
+ [gl_cv_header_working_fcntl_h=no],
+ [gl_cv_header_working_fcntl_h=$gl_cross_guess_normal])])])
+
+ AS_CASE([$gl_cv_header_working_fcntl_h],
+ [*O_DIRECTORY* | *no], [gl_val=0], [gl_val=1])
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_DIRECTORY], [$gl_val],
+ [Define to 1 if O_DIRECTORY works, 0 otherwise.])
- case $gl_cv_header_working_fcntl_h in #(
- *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
- *) ac_val=1;;
- esac
- AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
- [Define to 1 if O_NOATIME works.])
+ AS_CASE([$gl_cv_header_working_fcntl_h],
+ [*O_NOATIME* | *no], [gl_val=0], [gl_val=1])
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$gl_val],
+ [Define to 1 if O_NOATIME works, 0 otherwise.])
- case $gl_cv_header_working_fcntl_h in #(
- *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
- *) ac_val=1;;
- esac
- AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
- [Define to 1 if O_NOFOLLOW works.])
+ AS_CASE([$gl_cv_header_working_fcntl_h],
+ [*O_NOFOLLOW* | *no], [gl_val=0], [gl_val=1])
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$gl_val],
+ [Define to 1 if O_NOFOLLOW works, 0 otherwise.])
])
diff --git a/gnulib-m4/fcntl.m4 b/gnulib-m4/fcntl.m4
index 428e5709..69ac76f9 100644
--- a/gnulib-m4/fcntl.m4
+++ b/gnulib-m4/fcntl.m4
@@ -1,8 +1,10 @@
-# fcntl.m4 serial 11
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# fcntl.m4
+# serial 12
+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.
+dnl This file is offered as-is, without any warranty.
# For now, this module ensures that fcntl()
# - supports F_DUPFD correctly
@@ -82,7 +84,7 @@ AC_DEFUN([gl_FUNC_FCNTL],
esac
dnl Many systems lack F_DUPFD_CLOEXEC.
- dnl NetBSD 9.0 declares F_DUPFD_CLOEXEC but it works only like F_DUPFD.
+ dnl NetBSD 10.0 declares F_DUPFD_CLOEXEC but it works only like F_DUPFD.
AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC],
[gl_cv_func_fcntl_f_dupfd_cloexec],
[AC_RUN_IFELSE(
diff --git a/gnulib-m4/fcntl_h.m4 b/gnulib-m4/fcntl_h.m4
index 267f98bf..946a0bd6 100644
--- a/gnulib-m4/fcntl_h.m4
+++ b/gnulib-m4/fcntl_h.m4
@@ -1,9 +1,12 @@
-# serial 20
-# Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2022 Free Software Foundation, Inc.
+# fcntl_h.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
+
+# Configure fcntl.h.
dnl Written by Paul Eggert.
@@ -23,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.h>
- ]], [fcntl openat])
+ ]], [fcntl openat openat2])
])
# gl_FCNTL_MODULE_INDICATOR([modulename])
@@ -50,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])
@@ -63,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/gnulib-m4/fdopen.m4 b/gnulib-m4/fdopen.m4
index 32e0e1d8..8c3752b1 100644
--- a/gnulib-m4/fdopen.m4
+++ b/gnulib-m4/fdopen.m4
@@ -1,8 +1,10 @@
-# fdopen.m4 serial 5
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# fdopen.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_FDOPEN],
[
@@ -36,8 +38,8 @@ main (void)
[gl_cv_func_fdopen_works=yes],
[gl_cv_func_fdopen_works=no],
[case "$host_os" in
- mingw*) gl_cv_func_fdopen_works="guessing no" ;;
- *) gl_cv_func_fdopen_works="guessing yes" ;;
+ mingw* | windows*) gl_cv_func_fdopen_works="guessing no" ;;
+ *) gl_cv_func_fdopen_works="guessing yes" ;;
esac
])
])
diff --git a/gnulib-m4/flexmember.m4 b/gnulib-m4/flexmember.m4
index 3b4237e9..b2d9994c 100644
--- a/gnulib-m4/flexmember.m4
+++ b/gnulib-m4/flexmember.m4
@@ -1,10 +1,12 @@
+# flexmember.m4
# serial 5
-# Check for flexible array member support.
+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.
+dnl This file is offered as-is, without any warranty.
-# Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Check for flexible array member support.
# Written by Paul Eggert.
diff --git a/gnulib-m4/float_h.m4 b/gnulib-m4/float_h.m4
index 0e845726..8af5bbff 100644
--- a/gnulib-m4/float_h.m4
+++ b/gnulib-m4/float_h.m4
@@ -1,8 +1,10 @@
-# float_h.m4 serial 13
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# float_h.m4
+# serial 16
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FLOAT_H],
[
@@ -11,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*)
@@ -53,6 +55,31 @@ changequote([,])dnl
;;
esac
+ dnl Test for completeness w.r.t. ISO C 23.
+ REPLACE_FLOAT_SNAN=0
+ AC_CACHE_CHECK([whether float.h conforms to ISO C23],
+ [gl_cv_header_float_h_isoc23],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <float.h>
+ int x[] = { FLT_DECIMAL_DIG, DBL_DECIMAL_DIG, LDBL_DECIMAL_DIG };
+ float maxf = FLT_NORM_MAX;
+ double maxd = DBL_NORM_MAX;
+ long double maxl = LDBL_NORM_MAX;
+ ]],
+ [[float sf = FLT_SNAN;
+ double sd = DBL_SNAN;
+ long double sl = LDBL_SNAN;
+ return (sf != 0) + (sd != 0) + (sl != 0);
+ ]])],
+ [gl_cv_header_float_h_isoc23=yes],
+ [gl_cv_header_float_h_isoc23=no])
+ ])
+ if test $gl_cv_header_float_h_isoc23 != yes; then
+ GL_GENERATE_FLOAT_H=true
+ REPLACE_FLOAT_SNAN=1
+ fi
+
dnl Test against glibc-2.7 Linux/SPARC64 bug.
REPLACE_ITOLD=0
AC_CACHE_CHECK([whether conversion from 'int' to 'long double' works],
@@ -84,9 +111,11 @@ int main ()
[gl_cv_func_itold_works="guessing no"],
[gl_cv_func_itold_works="guessing yes"])
;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_itold_works="guessing yes" ;;
- *) gl_cv_func_itold_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*)
+ gl_cv_func_itold_works="guessing yes" ;;
+ *)
+ gl_cv_func_itold_works="guessing yes" ;;
esac
])
])
diff --git a/gnulib-m4/fpieee.m4 b/gnulib-m4/fpieee.m4
index c0c23e95..3fe97042 100644
--- a/gnulib-m4/fpieee.m4
+++ b/gnulib-m4/fpieee.m4
@@ -1,8 +1,10 @@
-# fpieee.m4 serial 2 -*- coding: utf-8 -*-
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# fpieee.m4
+# serial 2
+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.
+dnl This file is offered as-is, without any warranty.
dnl IEEE 754 standardized three items:
dnl - The formats of single-float and double-float - nowadays commonly
diff --git a/gnulib-m4/free.m4 b/gnulib-m4/free.m4
index dfeecd2b..c7a134ba 100644
--- a/gnulib-m4/free.m4
+++ b/gnulib-m4/free.m4
@@ -1,8 +1,10 @@
-# free.m4 serial 6
-# Copyright (C) 2003-2005, 2009-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# free.m4
+# serial 6
+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.
+dnl This file is offered as-is, without any warranty.
# Written by Paul Eggert and Bruno Haible.
@@ -12,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 <https://sourceware.org/bugzilla/show_bug.cgi?id=17924>
+ dnl <https://sourceware.org/PR17924>
dnl * OpenBSD >= 4.5, thanks to this commit:
dnl <https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdlib/malloc.c.diff?r1=1.100&r2=1.101&f=h>
dnl * Solaris, because its malloc() implementation is based on brk(),
diff --git a/gnulib-m4/frexp.m4 b/gnulib-m4/frexp.m4
index d8f3cef4..5d8cc2e4 100644
--- a/gnulib-m4/frexp.m4
+++ b/gnulib-m4/frexp.m4
@@ -1,8 +1,10 @@
-# frexp.m4 serial 16
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# frexp.m4
+# serial 21
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_FREXP],
[
@@ -13,7 +15,7 @@ AC_DEFUN([gl_FUNC_FREXP],
AC_CACHE_CHECK([whether frexp() can be used with libm],
[gl_cv_func_frexp_in_libm],
[
- save_LIBS="$LIBS"
+ saved_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -22,7 +24,7 @@ AC_DEFUN([gl_FUNC_FREXP],
[[int e; return frexp (x, &e) > 0;]])],
[gl_cv_func_frexp_in_libm=yes],
[gl_cv_func_frexp_in_libm=no])
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
])
if test $gl_cv_func_frexp_in_libm = yes; then
FREXP_LIBM=-lm
@@ -30,10 +32,10 @@ AC_DEFUN([gl_FUNC_FREXP],
fi
if test $gl_cv_func_frexp_no_libm = yes \
|| test $gl_cv_func_frexp_in_libm = yes; then
- save_LIBS="$LIBS"
+ saved_LIBS="$LIBS"
LIBS="$LIBS $FREXP_LIBM"
gl_FUNC_FREXP_WORKS
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
case "$gl_cv_func_frexp_works" in
*yes) gl_func_frexp=yes ;;
*) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
@@ -87,8 +89,8 @@ AC_DEFUN([gl_CHECK_FREXP_NO_LIBM],
])
dnl Test whether frexp() works also on denormalized numbers (this fails e.g. on
-dnl NetBSD 3.0), on infinite numbers (this fails e.g. on IRIX 6.5 and mingw),
-dnl and on negative zero (this fails e.g. on NetBSD 4.99 and mingw).
+dnl NetBSD 3.0), on infinite numbers (this fails e.g. on mingw), and on negative
+dnl zero (this fails e.g. on NetBSD 4.99 and mingw).
AC_DEFUN([gl_FUNC_FREXP_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
@@ -109,7 +111,7 @@ AC_DEFUN([gl_FUNC_FREXP_WORKS],
ICC 10.0 has a bug when optimizing the expression -zero.
The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
to PowerPC on Mac OS X 10.5. */
-#if defined __hpux || defined __sgi || defined __ICC
+#if defined __hpux || defined __ICC
static double
compute_minus_zero (void)
{
@@ -156,7 +158,8 @@ int main()
{
int exp;
double y = frexp (x, &exp);
- if (memcmp (&y, &x, sizeof x))
+ double x1 = x;
+ if (memcmp (&y, &x1, sizeof x1))
result |= 4;
}
return result;
@@ -164,8 +167,12 @@ int main()
[gl_cv_func_frexp_works=yes],
[gl_cv_func_frexp_works=no],
[case "$host_os" in
- netbsd* | irix*) gl_cv_func_frexp_works="guessing no" ;;
- mingw*) # Guess yes with MSVC, no with mingw.
+ netbsd*) gl_cv_func_frexp_works="guessing no" ;;
+ # Guess yes with MSVC, no with mingw.
+ windows*-msvc*)
+ gl_cv_func_frexp_works="guessing yes"
+ ;;
+ mingw* | windows*)
AC_EGREP_CPP([Good], [
#ifdef _MSC_VER
Good
diff --git a/gnulib-m4/frexpl.m4 b/gnulib-m4/frexpl.m4
index 45576131..a519a42e 100644
--- a/gnulib-m4/frexpl.m4
+++ b/gnulib-m4/frexpl.m4
@@ -1,8 +1,10 @@
-# frexpl.m4 serial 22
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# frexpl.m4
+# serial 25
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_FREXPL],
[
@@ -23,7 +25,7 @@ AC_DEFUN([gl_FUNC_FREXPL],
AC_CACHE_CHECK([whether frexpl() can be used with libm],
[gl_cv_func_frexpl_in_libm],
[
- save_LIBS="$LIBS"
+ saved_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -32,7 +34,7 @@ AC_DEFUN([gl_FUNC_FREXPL],
[[int e; return frexpl (x, &e) > 0;]])],
[gl_cv_func_frexpl_in_libm=yes],
[gl_cv_func_frexpl_in_libm=no])
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
])
if test $gl_cv_func_frexpl_in_libm = yes; then
FREXPL_LIBM=-lm
@@ -40,10 +42,10 @@ AC_DEFUN([gl_FUNC_FREXPL],
fi
if test $gl_cv_func_frexpl_no_libm = yes \
|| test $gl_cv_func_frexpl_in_libm = yes; then
- save_LIBS="$LIBS"
+ saved_LIBS="$LIBS"
LIBS="$LIBS $FREXPL_LIBM"
gl_FUNC_FREXPL_WORKS
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
case "$gl_cv_func_frexpl_works" in
*yes) gl_func_frexpl=yes ;;
*) gl_func_frexpl=no; REPLACE_FREXPL=1 ;;
@@ -115,7 +117,7 @@ AC_DEFUN([gl_CHECK_FREXPL_NO_LIBM],
dnl Test whether frexpl() works on finite numbers (this fails on
dnl Mac OS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers
dnl (this fails on Mac OS X 10.5/i386), and also on infinite numbers (this
-dnl fails e.g. on IRIX 6.5 and mingw).
+dnl fails e.g. on mingw).
AC_DEFUN([gl_FUNC_FREXPL_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
@@ -139,12 +141,6 @@ AC_DEFUN([gl_FUNC_FREXPL_WORKS],
# undef LDBL_MIN_EXP
# define LDBL_MIN_EXP DBL_MIN_EXP
#endif
-#if defined __sgi && (LDBL_MANT_DIG >= 106)
-# if defined __GNUC__
-# undef LDBL_MIN_EXP
-# define LDBL_MIN_EXP DBL_MIN_EXP
-# endif
-#endif
extern
#ifdef __cplusplus
"C"
@@ -223,7 +219,7 @@ int main()
[
changequote(,)dnl
case "$host_os" in
- aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*)
+ aix | aix[3-6]* | beos* | darwin* | mingw* | windows* | pw*)
gl_cv_func_frexpl_works="guessing no";;
*) gl_cv_func_frexpl_works="guessing yes";;
esac
diff --git a/gnulib-m4/fseterr.m4 b/gnulib-m4/fseterr.m4
index 1596bbc0..e5ad635b 100644
--- a/gnulib-m4/fseterr.m4
+++ b/gnulib-m4/fseterr.m4
@@ -1,10 +1,15 @@
-# fseterr.m4 serial 1
-dnl Copyright (C) 2012-2022 Free Software Foundation, Inc.
+# fseterr.m4
+# serial 2
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_FSETERR],
[
- AC_CHECK_FUNCS_ONCE([__fseterr])
+ gl_CHECK_FUNCS_ANDROID([__fseterr],
+ [[#include <stdio.h>
+ #include <stdio_ext.h>
+ ]])
])
diff --git a/gnulib-m4/fstat.m4 b/gnulib-m4/fstat.m4
index 9e61bcce..7db4e346 100644
--- a/gnulib-m4/fstat.m4
+++ b/gnulib-m4/fstat.m4
@@ -1,8 +1,10 @@
-# fstat.m4 serial 8
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# fstat.m4
+# serial 10
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_FSTAT],
[
@@ -10,10 +12,10 @@ AC_DEFUN([gl_FUNC_FSTAT],
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
case "$host_os" in
- mingw* | solaris*)
+ darwin* | mingw* | windows* | solaris*)
+ dnl macOS and Solaris stat can return a negative tv_nsec.
dnl On MinGW, the original stat() returns st_atime, st_mtime,
dnl st_ctime values that are affected by the time zone.
- dnl Solaris stat can return a negative tv_nsec.
REPLACE_FSTAT=1
;;
esac
diff --git a/gnulib-m4/ftruncate.m4 b/gnulib-m4/ftruncate.m4
index 2697e0eb..17bae949 100644
--- a/gnulib-m4/ftruncate.m4
+++ b/gnulib-m4/ftruncate.m4
@@ -1,21 +1,23 @@
-# serial 21
+# ftruncate.m4
+# serial 24
+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,
+dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
# See if we need to emulate a missing ftruncate function using _chsize.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
AC_DEFUN([gl_FUNC_FTRUNCATE],
[
AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_CHECK_FUNCS_ONCE([ftruncate])
+ gl_CHECK_FUNCS_ANDROID([ftruncate], [[#include <unistd.h>]])
if test $ac_cv_func_ftruncate = yes; then
m4_ifdef([gl_LARGEFILE], [
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
- mingw*)
+ mingw* | windows*)
dnl Native Windows, and Large File Support is requested.
dnl The MSVCRT _chsize() function only accepts a 32-bit file size,
dnl and the mingw64 ftruncate64() function is unreliable (it may
@@ -30,6 +32,9 @@ AC_DEFUN([gl_FUNC_FTRUNCATE],
])
else
HAVE_FTRUNCATE=0
+ case "$gl_cv_onwards_func_ftruncate" in
+ future*) REPLACE_FTRUNCATE=1 ;;
+ esac
fi
])
diff --git a/gnulib-m4/getcwd.m4 b/gnulib-m4/getcwd.m4
index 076ca314..28189485 100644
--- a/gnulib-m4/getcwd.m4
+++ b/gnulib-m4/getcwd.m4
@@ -1,12 +1,14 @@
-# getcwd.m4 - check for working getcwd that is compatible with glibc
-
-# Copyright (C) 2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# getcwd.m4
+# serial 22
+dnl Copyright (C) 2001, 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.
+dnl This file is offered as-is, without any warranty.
# Written by Paul Eggert.
-# serial 19
+
+# Check for working getcwd that is compatible with glibc
AC_DEFUN([gl_FUNC_GETCWD_NULL],
[
@@ -21,11 +23,8 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
# else /* on Windows with MSVC */
# include <direct.h>
# endif
- ]GL_MDA_DEFINES[
-# ifndef getcwd
- char *getcwd ();
-# endif
-]], [[
+ ]GL_MDA_DEFINES],
+ [[
#if defined _WIN32 && ! defined __CYGWIN__
/* mingw cwd does not start with '/', but _getcwd does allocate.
However, mingw fails to honor non-zero size. */
@@ -53,6 +52,8 @@ AC_DEFUN([gl_FUNC_GETCWD_NULL],
*-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";;
# Guess yes on musl systems.
*-musl*) gl_cv_func_getcwd_null="guessing yes";;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_getcwd_null="guessing yes";;
# Guess yes on Cygwin.
cygwin*) gl_cv_func_getcwd_null="guessing yes";;
# If we don't know, obey --enable-cross-guesses.
@@ -114,7 +115,7 @@ AC_DEFUN([gl_FUNC_GETCWD],
gl_abort_bug=no
case "$host_os" in
- mingw*)
+ mingw* | windows*)
gl_cv_func_getcwd_path_max=yes
;;
*)
diff --git a/gnulib-m4/getdtablesize.m4 b/gnulib-m4/getdtablesize.m4
index 6134eaac..0b780110 100644
--- a/gnulib-m4/getdtablesize.m4
+++ b/gnulib-m4/getdtablesize.m4
@@ -1,8 +1,10 @@
-# getdtablesize.m4 serial 8
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# getdtablesize.m4
+# serial 8
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_GETDTABLESIZE],
[
diff --git a/gnulib-m4/getlocalename_l.m4 b/gnulib-m4/getlocalename_l.m4
new file mode 100644
index 00000000..2b648ee4
--- /dev/null
+++ b/gnulib-m4/getlocalename_l.m4
@@ -0,0 +1,136 @@
+# getlocalename_l.m4
+# serial 5
+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_GETLOCALENAME_L_SIMPLE],
+[
+ AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+
+ dnl Persuade glibc <locale.h> to declare getlocalename_l().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_FUNC_GETLOCALENAME_L_UNSAFE])
+])
+
+# Prerequisites of lib/getlocalename_l.c.
+AC_DEFUN([gl_PREREQ_GETLOCALENAME_L_SIMPLE],
+[
+ :
+])
+
+AC_DEFUN_ONCE([gl_FUNC_GETLOCALENAME_L_UNSAFE],
+[
+ AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+ AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
+ AC_CHECK_FUNCS_ONCE([getlocalename_l])
+ if test $ac_cv_func_getlocalename_l = yes; then
+ dnl Check against the Cygwin 3.6.0 bug: It returns an invalid pointer when
+ dnl the second argument is LC_GLOBAL_LOCALE.
+ dnl Check against a Haiku >= hrev59293 oddity: It returns "POSIX" instead
+ dnl of "C". We prefer "C".
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([whether getlocalename_l works],
+ [gl_cv_func_getlocalename_l_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <string.h>
+int main ()
+{
+ int result = 0;
+ /* Check against the Cygwin bug. */
+ {
+ const char *ret = getlocalename_l (LC_COLLATE, LC_GLOBAL_LOCALE);
+ if (strlen (ret) == 0)
+ result |= 1;
+ }
+ /* Check against the Haiku oddity. */
+ {
+ const char *ret =
+ getlocalename_l (LC_COLLATE, newlocale (LC_ALL_MASK, "C", NULL));
+ if (strcmp (ret, "C") != 0)
+ result |= 2;
+ }
+ return result;
+}]])],
+ [gl_cv_func_getlocalename_l_works=yes],
+ [gl_cv_func_getlocalename_l_works=no],
+ [case "$host_os" in
+ cygwin*) # Guess no on Cygwin.
+ gl_cv_func_getlocalename_l_works="guessing no" ;;
+ haiku*) # Guess no on Haiku.
+ gl_cv_func_getlocalename_l_works="guessing no" ;;
+ *) # Guess yes otherwise.
+ gl_cv_func_getlocalename_l_works="guessing yes" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_getlocalename_l_works" in
+ *yes) ;;
+ *) REPLACE_GETLOCALENAME_L=1 ;;
+ esac
+ else
+ HAVE_GETLOCALENAME_L=0
+ fi
+ if test $HAVE_GETLOCALENAME_L = 0 || test $REPLACE_GETLOCALENAME_L = 1; then
+ GETLOCALENAME_L_LIB="$SETLOCALE_NULL_LIB"
+ else
+ GETLOCALENAME_L_LIB=
+ fi
+ dnl GETLOCALENAME_L_LIB is expected to be '-pthread' or '-lpthread' on AIX
+ dnl with gcc or xlc, and empty otherwise.
+ AC_SUBST([GETLOCALENAME_L_LIB])
+])
+
+# Prerequisites of lib/getlocalename_l-unsafe.c.
+AC_DEFUN([gl_PREREQ_GETLOCALENAME_L_UNSAFE],
+[
+ AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+ AC_REQUIRE([gl_LOCALE_T])
+ AC_REQUIRE([gt_INTL_THREAD_LOCALE_NAME])
+ AC_CHECK_HEADERS_ONCE([langinfo.h])
+ if test $HAVE_LOCALE_T = 1; then
+ gl_CHECK_FUNCS_ANDROID([newlocale], [[#include <locale.h>]])
+ gl_CHECK_FUNCS_ANDROID([duplocale], [[#include <locale.h>]])
+ gl_CHECK_FUNCS_ANDROID([freelocale], [[#include <locale.h>]])
+ gl_func_newlocale="$ac_cv_func_newlocale"
+ gl_func_duplocale="$ac_cv_func_duplocale"
+ gl_func_freelocale="$ac_cv_func_freelocale"
+ else
+ dnl In 2019, some versions of z/OS lack the locale_t type and have broken
+ dnl newlocale, duplocale, freelocale functions.
+ gl_cv_onwards_func_newlocale='future OS version'
+ gl_cv_onwards_func_duplocale='future OS version'
+ gl_cv_onwards_func_freelocale='future OS version'
+ gl_func_newlocale=no
+ gl_func_duplocale=no
+ gl_func_freelocale=no
+ fi
+ if test $gl_func_newlocale != yes; then
+ HAVE_NEWLOCALE=0
+ case "$gl_cv_onwards_func_newlocale" in
+ future*) REPLACE_NEWLOCALE=1 ;;
+ esac
+ fi
+ if test $gl_func_duplocale != yes; then
+ HAVE_DUPLOCALE=0
+ case "$gl_cv_onwards_func_duplocale" in
+ future*) REPLACE_DUPLOCALE=1 ;;
+ esac
+ fi
+ if test $gl_func_freelocale != yes; then
+ HAVE_FREELOCALE=0
+ case "$gl_cv_onwards_func_freelocale" in
+ future*) REPLACE_FREELOCALE=1 ;;
+ esac
+ fi
+ if test $gt_localename_enhances_locale_funcs = yes; then
+ REPLACE_NEWLOCALE=1
+ REPLACE_DUPLOCALE=1
+ REPLACE_FREELOCALE=1
+ fi
+])
diff --git a/gnulib-m4/getpagesize.m4 b/gnulib-m4/getpagesize.m4
deleted file mode 100644
index 19f894ca..00000000
--- a/gnulib-m4/getpagesize.m4
+++ /dev/null
@@ -1,49 +0,0 @@
-# getpagesize.m4 serial 10
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2022 Free Software Foundation,
-dnl Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN([gl_FUNC_GETPAGESIZE],
-[
- AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
- AC_REQUIRE([AC_CANONICAL_HOST])
- gl_CHECK_FUNC_GETPAGESIZE
- if test $gl_cv_func_getpagesize = no; then
- HAVE_GETPAGESIZE=0
- AC_CHECK_HEADERS([OS.h])
- if test $ac_cv_header_OS_h = yes; then
- HAVE_OS_H=1
- fi
- AC_CHECK_HEADERS([sys/param.h])
- if test $ac_cv_header_sys_param_h = yes; then
- HAVE_SYS_PARAM_H=1
- fi
- fi
- case "$host_os" in
- mingw*)
- REPLACE_GETPAGESIZE=1
- ;;
- esac
- dnl Also check whether it's declared.
- dnl mingw has getpagesize() in libgcc.a but doesn't declare it.
- AC_CHECK_DECL([getpagesize], , [HAVE_DECL_GETPAGESIZE=0])
-])
-
-dnl Tests whether the function getpagesize() exists.
-dnl Sets gl_cv_func_getpagesize.
-AC_DEFUN([gl_CHECK_FUNC_GETPAGESIZE],
-[
- dnl We can't use AC_CHECK_FUNC here, because getpagesize() is defined as a
- dnl static inline function when compiling for Android 4.4 or older.
- AC_CACHE_CHECK([for getpagesize], [gl_cv_func_getpagesize],
- [AC_LINK_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <unistd.h>]],
- [[return getpagesize();]])
- ],
- [gl_cv_func_getpagesize=yes],
- [gl_cv_func_getpagesize=no])
- ])
-])
diff --git a/gnulib-m4/getprogname.m4 b/gnulib-m4/getprogname.m4
index b26146e9..d60f3efb 100644
--- a/gnulib-m4/getprogname.m4
+++ b/gnulib-m4/getprogname.m4
@@ -1,16 +1,40 @@
-# getprogname.m4 - check for getprogname or replacements for it
+# getprogname.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
-# Copyright (C) 2016-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# serial 4
+# Check for getprogname or replacements for it
AC_DEFUN([gl_FUNC_GETPROGNAME],
[
- AC_CHECK_FUNCS_ONCE([getprogname getexecname])
+ 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 <stdlib.h>]])
+ if test $ac_cv_func_getprogname = no; then
+ HAVE_GETPROGNAME=0
+ case "$gl_cv_onwards_func_getprogname" in
+ future*) REPLACE_GETPROGNAME=1 ;;
+ esac
+ fi
+ AC_CHECK_DECLS([program_invocation_name],
+ [],
+ [HAVE_DECL_PROGRAM_INVOCATION_NAME=0],
+ [[#include <errno.h>]])
+])
+
+AC_DEFUN([gl_PREREQ_GETPROGNAME],
+[
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([getexecname])
ac_found=0
AC_CHECK_DECLS([program_invocation_name], [ac_found=1], [],
[#include <errno.h>])
diff --git a/gnulib-m4/gettext_h.m4 b/gnulib-m4/gettext_h.m4
new file mode 100644
index 00000000..7ef89541
--- /dev/null
+++ b/gnulib-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/gnulib-m4/gettimeofday.m4 b/gnulib-m4/gettimeofday.m4
index f729601b..3728c13e 100644
--- a/gnulib-m4/gettimeofday.m4
+++ b/gnulib-m4/gettimeofday.m4
@@ -1,9 +1,11 @@
-# serial 29
-
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# gettimeofday.m4
+# serial 30
+dnl Copyright (C) 2001-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,
+dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
@@ -57,7 +59,7 @@ int gettimeofday (struct timeval *restrict, struct timezone *restrict);
dnl On mingw, the original gettimeofday has only a precision of 15.6
dnl milliseconds. So override it.
case "$host_os" in
- mingw*) REPLACE_GETTIMEOFDAY=1 ;;
+ mingw* | windows*) REPLACE_GETTIMEOFDAY=1 ;;
esac
fi
AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
diff --git a/gnulib-m4/gnulib-cache.m4 b/gnulib-m4/gnulib-cache.m4
index a28477a8..9441c414 100644
--- a/gnulib-m4/gnulib-cache.m4
+++ b/gnulib-m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# Copyright (C) 2002-2022 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
@@ -27,7 +27,8 @@
# Specification in the form of a command-line invocation:
-# gnulib-tool --import --local-dir=gnulib-local \
+# gnulib-tool --import \
+# --local-dir=gnulib-local \
# --lib=libunistring \
# --source-base=lib \
# --m4-base=gnulib-m4 \
@@ -40,7 +41,11 @@
# --no-conditional-dependencies \
# --libtool \
# --macro-prefix=gl \
+# --avoid=float-h-tests \
+# gitlog-to-changelog \
+# package-version \
# relocatable-lib-lgpl \
+# test-xfail \
# unicase/base \
# unicase/empty-prefix-context \
# unicase/empty-suffix-context \
@@ -143,6 +148,7 @@
# unictype/ctype-xdigit \
# unictype/decimal-digit \
# unictype/digit \
+# unictype/incb-all \
# unictype/joininggroup-all \
# unictype/joiningtype-all \
# unictype/mirror \
@@ -176,6 +182,8 @@
# unilbrk/u8-width-linebreaks \
# unilbrk/ulc-possible-linebreaks \
# unilbrk/ulc-width-linebreaks \
+# unimetadata/base \
+# unimetadata/u-version \
# uniname/base \
# uniname/uniname \
# uninorm/base \
@@ -273,6 +281,7 @@
# unistr/u16-mbtoucr \
# unistr/u16-move \
# unistr/u16-next \
+# unistr/u16-pcpy \
# unistr/u16-prev \
# unistr/u16-set \
# unistr/u16-startswith \
@@ -314,6 +323,7 @@
# unistr/u32-mbtoucr \
# unistr/u32-move \
# unistr/u32-next \
+# unistr/u32-pcpy \
# unistr/u32-prev \
# unistr/u32-set \
# unistr/u32-startswith \
@@ -355,6 +365,7 @@
# unistr/u8-mbtoucr \
# unistr/u8-move \
# unistr/u8-next \
+# unistr/u8-pcpy \
# unistr/u8-prev \
# unistr/u8-set \
# unistr/u8-startswith \
@@ -382,7 +393,7 @@
# unistr/u8-to-u16 \
# unistr/u8-to-u32 \
# unistr/u8-uctomb \
-# unitypes \
+# unitypes-h \
# uniwbrk/base \
# uniwbrk/u16-wordbreaks \
# uniwbrk/u32-wordbreaks \
@@ -401,7 +412,10 @@
# Specification in the form of a few gnulib-tool.m4 macro invocations:
gl_LOCAL_DIR([gnulib-local])
gl_MODULES([
+ gitlog-to-changelog
+ package-version
relocatable-lib-lgpl
+ test-xfail
unicase/base
unicase/empty-prefix-context
unicase/empty-suffix-context
@@ -504,6 +518,7 @@ gl_MODULES([
unictype/ctype-xdigit
unictype/decimal-digit
unictype/digit
+ unictype/incb-all
unictype/joininggroup-all
unictype/joiningtype-all
unictype/mirror
@@ -537,6 +552,8 @@ gl_MODULES([
unilbrk/u8-width-linebreaks
unilbrk/ulc-possible-linebreaks
unilbrk/ulc-width-linebreaks
+ unimetadata/base
+ unimetadata/u-version
uniname/base
uniname/uniname
uninorm/base
@@ -634,6 +651,7 @@ gl_MODULES([
unistr/u16-mbtoucr
unistr/u16-move
unistr/u16-next
+ unistr/u16-pcpy
unistr/u16-prev
unistr/u16-set
unistr/u16-startswith
@@ -675,6 +693,7 @@ gl_MODULES([
unistr/u32-mbtoucr
unistr/u32-move
unistr/u32-next
+ unistr/u32-pcpy
unistr/u32-prev
unistr/u32-set
unistr/u32-startswith
@@ -716,6 +735,7 @@ gl_MODULES([
unistr/u8-mbtoucr
unistr/u8-move
unistr/u8-next
+ unistr/u8-pcpy
unistr/u8-prev
unistr/u8-set
unistr/u8-startswith
@@ -743,7 +763,7 @@ gl_MODULES([
unistr/u8-to-u16
unistr/u8-to-u32
unistr/u8-uctomb
- unitypes
+ unitypes-h
uniwbrk/base
uniwbrk/u16-wordbreaks
uniwbrk/u32-wordbreaks
@@ -759,7 +779,7 @@ gl_MODULES([
uniwidth/u8-width
uniwidth/width
])
-gl_AVOID([])
+gl_AVOID([float-h-tests])
gl_SOURCE_BASE([lib])
gl_M4_BASE([gnulib-m4])
gl_PO_BASE([])
diff --git a/gnulib-m4/gnulib-common.m4 b/gnulib-m4/gnulib-common.m4
index d17cbec5..26eef771 100644
--- a/gnulib-m4/gnulib-common.m4
+++ b/gnulib-m4/gnulib-common.m4
@@ -1,8 +1,10 @@
-# gnulib-common.m4 serial 74
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# gnulib-common.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.62])
@@ -15,38 +17,65 @@ AC_DEFUN([gl_COMMON], [
AC_REQUIRE([gl_ZZGNULIB])
])
AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([0witness],
+[/* Witness that <config.h> has been included. */
+#define _GL_CONFIG_H_INCLUDED 1
+])
+ dnl Avoid warnings from gcc -Wtrailing-whitespace.
+ dnl This is a temporary workaround until Autoconf fixes it.
+ dnl Test case:
+ dnl empty1=; empty2=; AC_DEFINE_UNQUOTED([FOO], [$empty1$empty2], [...])
+ dnl should produce "#define FOO /**/", not "#define FOO ".
+ AH_TOP([#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
+# pragma GCC diagnostic push
+# pragma GCC diagnostic ignored "-Wtrailing-whitespace"
+#endif
+])
+ AH_BOTTOM([#if defined __GNUC__ && __GNUC__ >= 15 && !defined __clang__
+# pragma GCC diagnostic pop
+#endif
+])
AH_VERBATIM([_GL_GNUC_PREREQ],
-[/* True if the compiler says it groks GNU C version MAJOR.MINOR. */
-#if defined __GNUC__ && defined __GNUC_MINOR__
+[/* True if the compiler says it groks GNU C version MAJOR.MINOR.
+ Except that
+ - clang groks GNU C 4.2, even on Windows, where it does not define
+ __GNUC__.
+ - The OpenMandriva-modified clang compiler pretends that it groks
+ GNU C version 13.1, but it doesn't: It does not support
+ __attribute__ ((__malloc__ (f, i))), nor does it support
+ __attribute__ ((__warning__ (message))) on a function redeclaration.
+ - Users can make clang lie as well, through the -fgnuc-version option. */
+#if defined __GNUC__ && defined __GNUC_MINOR__ && !defined __clang__
# define _GL_GNUC_PREREQ(major, minor) \
((major) < __GNUC__ + ((minor) <= __GNUC_MINOR__))
+#elif defined __clang__
+ /* clang really only groks GNU C 4.2. */
+# define _GL_GNUC_PREREQ(major, minor) \
+ ((major) < 4 + ((minor) <= 2))
#else
# define _GL_GNUC_PREREQ(major, minor) 0
#endif
])
AH_VERBATIM([_Noreturn],
-[/* The _Noreturn keyword of C11. */
+[/* The _Noreturn keyword of C11.
+ Do not use [[noreturn]], because with it the syntax
+ extern _Noreturn void func (...);
+ would not be valid; such a declaration would be valid only with 'extern'
+ and '_Noreturn' swapped, or without the 'extern' keyword. However, some
+ AIX system header files and several gnulib header files use precisely
+ this syntax with 'extern'. So even though C23 deprecates _Noreturn,
+ it is currently more portable to prefer it to [[noreturn]].
+
+ Also, do not try to work around LLVM bug 59792 (clang 15 or earlier).
+ This rare bug can be worked around by compiling with 'clang -D_Noreturn=',
+ though the workaround may generate many false-alarm warnings. */
#ifndef _Noreturn
-# if (defined __cplusplus \
- && ((201103 <= __cplusplus && !(__GNUC__ == 4 && __GNUC_MINOR__ == 7)) \
- || (defined _MSC_VER && 1900 <= _MSC_VER)) \
- && 0)
- /* [[noreturn]] is not practically usable, because with it the syntax
- extern _Noreturn void func (...);
- would not be valid; such a declaration would only be valid with 'extern'
- and '_Noreturn' swapped, or without the 'extern' keyword. However, some
- AIX system header files and several gnulib header files use precisely
- this syntax with 'extern'. */
-# define _Noreturn [[noreturn]]
-# elif ((!defined __cplusplus || defined __clang__) \
- && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) \
- || (!defined __STRICT_ANSI__ \
- && (_GL_GNUC_PREREQ (4, 7) \
- || (defined __apple_build_version__ \
- ? 6000000 <= __apple_build_version__ \
- : 3 < __clang_major__ + (5 <= __clang_minor__))))))
+# if ((!defined __cplusplus || defined __clang__) \
+ && (201112 <= (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0)))
/* _Noreturn works as-is. */
# elif _GL_GNUC_PREREQ (2, 8) || defined __clang__ || 0x5110 <= __SUNPRO_C
+ /* Prefer __attribute__ ((__noreturn__)) to plain _Noreturn even if the
+ latter works, as 'gcc -std=gnu99 -Wpedantic' warns about _Noreturn. */
# define _Noreturn __attribute__ ((__noreturn__))
# elif 1200 <= (defined _MSC_VER ? _MSC_VER : 0)
# define _Noreturn __declspec (noreturn)
@@ -67,54 +96,267 @@ AC_DEFUN([gl_COMMON_BODY], [
#endif])
AH_VERBATIM([attribute],
[/* Attributes. */
-#if (defined __has_attribute \
- && (!defined __clang_minor__ \
- || (defined __apple_build_version__ \
- ? 6000000 <= __apple_build_version__ \
- : 3 < __clang_major__ + (5 <= __clang_minor__))))
-# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
-#else
-# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
-# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
-# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
-# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
-# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
-# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
-# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
-# define _GL_ATTR_diagnose_if 0
-# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
-# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
-# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
-# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7)
-# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6)
-# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0)
-# ifdef _ICC
-# define _GL_ATTR_may_alias 0
+/* Define _GL_HAS_ATTRIBUTE only once, because on FreeBSD, with gcc < 5, if
+ <config.h> gets included once again after <sys/cdefs.h>, __has_attribute(x)
+ expands to 0 always, and redefining _GL_HAS_ATTRIBUTE would turn off all
+ attributes. */
+#ifndef _GL_HAS_ATTRIBUTE
+# if (defined __has_attribute \
+ && (!defined __clang_minor__ \
+ || (defined __apple_build_version__ \
+ ? 7000000 <= __apple_build_version__ \
+ : 5 <= __clang_major__)))
+# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
# else
-# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3)
+# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
+/* The following lines list the first GCC version that supports the attribute.
+ Although the lines are not used in GCC 5 and later (as GCC 5 introduced
+ __has_attribute support), list GCC versions 5+ anyway for completeness. */
+# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
+# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
+# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_diagnose_if 0
+# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
+# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
+# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6)
+# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0)
+# ifdef _ICC
+# define _GL_ATTR_may_alias 0
+# else
+# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3)
+# endif
+# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3)
+# define _GL_ATTR_nonnull_if_nonzero _GL_GNUC_PREREQ (15, 1)
+# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0)
+# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3)
+# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96)
+# define _GL_ATTR_reproducible _GL_GNUC_PREREQ (15, 1)
+# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9)
+# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0)
+# define _GL_ATTR_unsequenced _GL_GNUC_PREREQ (15, 1)
+# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
# endif
-# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1)
-# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3)
-# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0)
-# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3)
-# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7)
-# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96)
-# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9)
-# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0)
-# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7)
-# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
#endif
-#ifdef __has_c_attribute
-# if ((defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710 \
- && _GL_GNUC_PREREQ (4, 6))
-# pragma GCC diagnostic ignored "-Wpedantic"
+/* Use __has_c_attribute if available. However, do not use with
+ pre-C23 GCC, which can issue false positives if -Wpedantic. */
+#if (defined __has_c_attribute \
+ && ! (_GL_GNUC_PREREQ (4, 6) \
+ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710))
+# define _GL_HAVE___HAS_C_ATTRIBUTE 1
+#else
+# define _GL_HAVE___HAS_C_ATTRIBUTE 0
+#endif
+
+/* Attributes in bracket syntax [[...]] vs. attributes in __attribute__((...))
+ syntax, in function declarations. There are two problems here.
+ (Last tested with gcc/g++ 14 and clang/clang++ 18.)
+
+ 1) We want that the _GL_ATTRIBUTE_* can be cumulated on the same declaration
+ in any order.
+ =========================== foo.c = foo.cc ===========================
+ __attribute__ ((__deprecated__)) [[__nodiscard__]] int bar1 (int);
+ [[__nodiscard__]] __attribute__ ((__deprecated__)) int bar2 (int);
+ ======================================================================
+ This gives a syntax error
+ - in C mode with gcc
+ <https://gcc.gnu.org/PR108796>, and
+ - in C++ mode with clang++ version < 16, and
+ - in C++ mode, inside extern "C" {}, still in newer clang++ versions
+ <https://github.com/llvm/llvm-project/issues/101990>.
+ */
+/* Define if, in a function declaration, the attributes in bracket syntax
+ [[...]] must come before the attributes in __attribute__((...)) syntax.
+ If this is defined, it is best to avoid the bracket syntax, so that the
+ various _GL_ATTRIBUTE_* can be cumulated on the same declaration in any
+ order. */
+#ifdef __cplusplus
+# if defined __clang__
+# define _GL_BRACKET_BEFORE_ATTRIBUTE 1
# endif
-# define _GL_HAS_C_ATTRIBUTE(attr) __has_c_attribute (__##attr##__)
#else
-# define _GL_HAS_C_ATTRIBUTE(attr) 0
+# if defined __GNUC__ && !defined __clang__
+# define _GL_BRACKET_BEFORE_ATTRIBUTE 1
+# endif
#endif
+/*
+ 2) We want that the _GL_ATTRIBUTE_* can be placed in a declaration
+ - without 'extern', in C as well as in C++,
+ - with 'extern', in C,
+ - with 'extern "C"', in C++
+ in the same position. That is, we don't want to be forced to use a
+ macro which arranges for the attribute to come before 'extern' in
+ one case and after 'extern' in the other case, because such a macro
+ would make the source code of .h files pretty ugly.
+ =========================== foo.c = foo.cc ===========================
+ #ifdef __cplusplus
+ # define CC "C"
+ #else
+ # define CC
+ #endif
+
+ #define ND [[__nodiscard__]]
+ #define WUR __attribute__((__warn_unused_result__))
+
+ #ifdef __cplusplus
+ extern "C" {
+ #endif
+ // gcc clang g++ clang++
+
+ ND int foo (int);
+ int ND foo (int); // warn error warn error
+ int foo ND (int);
+ int foo (int) ND; // warn error warn error
+
+ WUR int foo (int);
+ int WUR foo (int);
+ int fo1 WUR (int); // error error error error
+ int foo (int) WUR;
+
+ #ifdef __cplusplus
+ }
+ #endif
+
+ // gcc clang g++ clang++
+
+ ND extern CC int foo (int); // error error
+ extern CC ND int foo (int); // error error
+ extern CC int ND foo (int); // warn error warn error
+ extern CC int foo ND (int);
+ extern CC int foo (int) ND; // warn error warn error
+ WUR extern CC int foo (int); // warn
+ extern CC WUR int foo (int);
+ extern CC int WUR foo (int);
+ extern CC int foo WUR (int); // error error error error
+ extern CC int foo (int) WUR;
+
+ ND EXTERN_C_FUNC int foo (int); // error error
+ EXTERN_C_FUNC ND int foo (int);
+ EXTERN_C_FUNC int ND foo (int); // warn error warn error
+ EXTERN_C_FUNC int foo ND (int);
+ EXTERN_C_FUNC int foo (int) ND; // warn error warn error
+
+ WUR EXTERN_C_FUNC int foo (int); // warn
+ EXTERN_C_FUNC WUR int foo (int);
+ EXTERN_C_FUNC int WUR foo (int);
+ EXTERN_C_FUNC int fo2 WUR (int); // error error error error
+ EXTERN_C_FUNC int foo (int) WUR;
+ ======================================================================
+ So, if we insist on using the 'extern' keyword ('extern CC' idiom):
+ * If _GL_ATTRIBUTE_* expands to bracket syntax [[...]]
+ in both C and C++, there is one available position:
+ - between the function name and the parameter list.
+ * If _GL_ATTRIBUTE_* expands to __attribute__((...)) syntax
+ in both C and C++, there are several available positions:
+ - before the return type,
+ - between return type and function name,
+ - at the end of the declaration.
+ * If _GL_ATTRIBUTE_* expands to bracket syntax [[...]] in C and to
+ __attribute__((...)) syntax in C++, there is no available position:
+ it would need to come before 'extern' in C but after 'extern "C"'
+ in C++.
+ * If _GL_ATTRIBUTE_* expands to __attribute__((...)) syntax in C and
+ to bracket syntax [[...]] in C++, there is one available position:
+ - before the return type.
+ Whereas, if we use the 'EXTERN_C_FUNC' idiom, which conditionally
+ omits the 'extern' keyword:
+ * If _GL_ATTRIBUTE_* expands to bracket syntax [[...]]
+ in both C and C++, there are two available positions:
+ - before the return type,
+ - between the function name and the parameter list.
+ * If _GL_ATTRIBUTE_* expands to __attribute__((...)) syntax
+ in both C and C++, there are several available positions:
+ - before the return type,
+ - between return type and function name,
+ - at the end of the declaration.
+ * If _GL_ATTRIBUTE_* expands to bracket syntax [[...]] in C and to
+ __attribute__((...)) syntax in C++, there is one available position:
+ - before the return type.
+ * If _GL_ATTRIBUTE_* expands to __attribute__((...)) syntax in C and
+ to bracket syntax [[...]] in C++, there is one available position:
+ - before the return type.
+ The best choice is therefore to use the 'EXTERN_C_FUNC' idiom and
+ put the attributes before the return type. This works regardless
+ to what the _GL_ATTRIBUTE_* macros expand.
+ */
+
+/* Attributes in bracket syntax [[...]] vs. attributes in __attribute__((...))
+ syntax, in static/inline function definitions.
+
+ There are similar constraints as for function declarations. However, here,
+ we cannot omit the storage-class specifier. Therefore, the following rule
+ applies:
+ * The macros
+ _GL_ATTRIBUTE_CONST
+ _GL_ATTRIBUTE_DEPRECATED
+ _GL_ATTRIBUTE_MAYBE_UNUSED
+ _GL_ATTRIBUTE_NODISCARD
+ _GL_ATTRIBUTE_PURE
+ _GL_ATTRIBUTE_REPRODUCIBLE
+ _GL_ATTRIBUTE_UNSEQUENCED
+ which may expand to bracket syntax [[...]], must come first, before the
+ storage-class specifier.
+ * Other _GL_ATTRIBUTE_* macros, that expand to __attribute__((...)) syntax,
+ are better placed between the storage-class specifier and the return
+ type.
+ */
+
+/* Attributes in bracket syntax [[...]] vs. attributes in __attribute__((...))
+ syntax, in variable declarations.
+
+ At which position can they be placed?
+ (Last tested with gcc/g++ 14 and clang/clang++ 18.)
+
+ =========================== foo.c = foo.cc ===========================
+ #ifdef __cplusplus
+ # define CC "C"
+ #else
+ # define CC
+ #endif
+
+ #define BD [[__deprecated__]]
+ #define AD __attribute__ ((__deprecated__))
+
+ // gcc clang g++ clang++
+
+ BD extern CC int var; // error error
+ extern CC BD int var; // error error
+ extern CC int BD var; // warn error warn error
+ extern CC int var BD;
+
+ AD extern CC int var; // warn
+ extern CC AD int var;
+ extern CC int AD var;
+ extern CC int var AD;
+
+ BD extern CC int z[]; // error error
+ extern CC BD int z[]; // error error
+ extern CC int BD z[]; // warn error warn error
+ extern CC int z1 BD [];
+ extern CC int z[] BD; // warn error error
+
+ AD extern CC int z[]; // warn
+ extern CC AD int z[];
+ extern CC int AD z[];
+ extern CC int z2 AD []; // error error error error
+ extern CC int z[] AD;
+ ======================================================================
+
+ * For non-array variables, the only good position is after the variable name,
+ that is, at the end of the declaration.
+ * For array variables, you will need to distinguish C and C++:
+ - In C, before the 'extern' keyword.
+ - In C++, between the 'extern "C"' and the variable's type.
+ */
]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's alignas instead.
[
/* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function
@@ -122,30 +364,36 @@ AC_DEFUN([gl_COMMON_BODY], [
_GL_ATTRIBUTE_ALLOC_SIZE ((M, N)) declares that the Mth argument multiplied
by the Nth argument of the function is the size of the returned memory block.
*/
-/* Applies to: function, pointer to function, function types. */
-#if _GL_HAS_ATTRIBUTE (alloc_size)
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
-#else
-# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+/* Applies to: functions, pointer to functions, function types. */
+#ifndef _GL_ATTRIBUTE_ALLOC_SIZE
+# if _GL_HAS_ATTRIBUTE (alloc_size)
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
+# else
+# define _GL_ATTRIBUTE_ALLOC_SIZE(args)
+# endif
#endif
/* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the
function and report an error if it cannot do so. */
-/* Applies to: function. */
-#if _GL_HAS_ATTRIBUTE (always_inline)
-# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
-#else
-# define _GL_ATTRIBUTE_ALWAYS_INLINE
+/* Applies to: functions. */
+#ifndef _GL_ATTRIBUTE_ALWAYS_INLINE
+# if _GL_HAS_ATTRIBUTE (always_inline)
+# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
+# else
+# define _GL_ATTRIBUTE_ALWAYS_INLINE
+# endif
#endif
/* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show
in stack traces when debugging. The compiler should omit the function from
stack traces. */
-/* Applies to: function. */
-#if _GL_HAS_ATTRIBUTE (artificial)
-# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
-#else
-# define _GL_ATTRIBUTE_ARTIFICIAL
+/* Applies to: functions. */
+#ifndef _GL_ATTRIBUTE_ARTIFICIAL
+# if _GL_HAS_ATTRIBUTE (artificial)
+# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
+# else
+# define _GL_ATTRIBUTE_ARTIFICIAL
+# endif
#endif
/* _GL_ATTRIBUTE_COLD declares that the function is rarely executed. */
@@ -153,27 +401,39 @@ AC_DEFUN([gl_COMMON_BODY], [
/* Avoid __attribute__ ((cold)) on MinGW; see thread starting at
<https://lists.gnu.org/r/emacs-devel/2019-04/msg01152.html>.
Also, Oracle Studio 12.6 requires 'cold' not '__cold__'. */
-#if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
-# ifndef __SUNPRO_C
-# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+#ifndef _GL_ATTRIBUTE_COLD
+# if _GL_HAS_ATTRIBUTE (cold) && !defined __MINGW32__
+# ifndef __SUNPRO_C
+# define _GL_ATTRIBUTE_COLD __attribute__ ((__cold__))
+# else
+# define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+# endif
# else
-# define _GL_ATTRIBUTE_COLD __attribute__ ((cold))
+# define _GL_ATTRIBUTE_COLD
# endif
-#else
-# define _GL_ATTRIBUTE_COLD
#endif
-/* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate
- calls to the function with the same arguments.
- This attribute is safe for a function that neither depends on nor affects
- observable state, and always returns exactly once - e.g., does not loop
- forever, and does not call longjmp.
- (This attribute is stricter than _GL_ATTRIBUTE_PURE.) */
+/* _GL_ATTRIBUTE_CONST declares:
+ 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. 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. */
-#if _GL_HAS_ATTRIBUTE (const)
-# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
-#else
-# define _GL_ATTRIBUTE_CONST
+#ifndef _GL_ATTRIBUTE_CONST
+# if _GL_HAS_ATTRIBUTE (const)
+# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
+# else
+# define _GL_ATTRIBUTE_CONST
+# endif
#endif
/* _GL_ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
@@ -182,16 +442,25 @@ AC_DEFUN([gl_COMMON_BODY], [
_GL_ATTRIBUTE_DEALLOC_FREE declares that the function returns pointers that
can be freed via 'free'; it can be used only after declaring 'free'. */
/* Applies to: functions. Cannot be used on inline functions. */
-#if _GL_GNUC_PREREQ (11, 0)
-# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
-#else
-# define _GL_ATTRIBUTE_DEALLOC(f, i)
+#ifndef _GL_ATTRIBUTE_DEALLOC
+# if _GL_GNUC_PREREQ (11, 0)
+# define _GL_ATTRIBUTE_DEALLOC(f, i) __attribute__ ((__malloc__ (f, i)))
+# else
+# define _GL_ATTRIBUTE_DEALLOC(f, i)
+# endif
#endif
/* If gnulib's <string.h> or <wchar.h> has already defined this macro, continue
to use this earlier definition, since <stdlib.h> may not have been included
yet. */
#ifndef _GL_ATTRIBUTE_DEALLOC_FREE
-# define _GL_ATTRIBUTE_DEALLOC_FREE _GL_ATTRIBUTE_DEALLOC (free, 1)
+# if defined __cplusplus && defined __GNUC__ && !defined __clang__
+/* Work around GCC bug <https://gcc.gnu.org/PR108231> */
+# define _GL_ATTRIBUTE_DEALLOC_FREE \
+ _GL_ATTRIBUTE_DEALLOC ((void (*) (void *)) free, 1)
+# else
+# define _GL_ATTRIBUTE_DEALLOC_FREE \
+ _GL_ATTRIBUTE_DEALLOC (free, 1)
+# endif
#endif
/* _GL_ATTRIBUTE_DEPRECATED: Declares that an entity is deprecated.
@@ -202,12 +471,20 @@ AC_DEFUN([gl_COMMON_BODY], [
- enumeration, enumeration item,
- typedef,
in C++ also: namespace, class, template specialization. */
-#if _GL_HAS_C_ATTRIBUTE (deprecated)
-# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
-#elif _GL_HAS_ATTRIBUTE (deprecated)
-# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
-#else
-# define _GL_ATTRIBUTE_DEPRECATED
+#ifndef _GL_ATTRIBUTE_DEPRECATED
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if _GL_HAVE___HAS_C_ATTRIBUTE
+# if __has_c_attribute (__deprecated__)
+# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
+# endif
+# endif
+# endif
+# if !defined _GL_ATTRIBUTE_DEPRECATED && _GL_HAS_ATTRIBUTE (deprecated)
+# define _GL_ATTRIBUTE_DEPRECATED __attribute__ ((__deprecated__))
+# endif
+# ifndef _GL_ATTRIBUTE_DEPRECATED
+# define _GL_ATTRIBUTE_DEPRECATED
+# endif
#endif
/* _GL_ATTRIBUTE_ERROR(msg) requests an error if a function is called and
@@ -215,24 +492,28 @@ AC_DEFUN([gl_COMMON_BODY], [
_GL_ATTRIBUTE_WARNING(msg) requests a warning if a function is called and
the function call is not optimized away. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (error)
-# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
-# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
-#elif _GL_HAS_ATTRIBUTE (diagnose_if)
-# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
-# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
-#else
-# define _GL_ATTRIBUTE_ERROR(msg)
-# define _GL_ATTRIBUTE_WARNING(msg)
+#if !(defined _GL_ATTRIBUTE_ERROR && defined _GL_ATTRIBUTE_WARNING)
+# if _GL_HAS_ATTRIBUTE (error)
+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__error__ (msg)))
+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__warning__ (msg)))
+# elif _GL_HAS_ATTRIBUTE (diagnose_if)
+# define _GL_ATTRIBUTE_ERROR(msg) __attribute__ ((__diagnose_if__ (1, msg, "error")))
+# define _GL_ATTRIBUTE_WARNING(msg) __attribute__ ((__diagnose_if__ (1, msg, "warning")))
+# else
+# define _GL_ATTRIBUTE_ERROR(msg)
+# define _GL_ATTRIBUTE_WARNING(msg)
+# endif
#endif
/* _GL_ATTRIBUTE_EXTERNALLY_VISIBLE declares that the entity should remain
visible to debuggers etc., even with '-fwhole-program'. */
/* Applies to: functions, variables. */
-#if _GL_HAS_ATTRIBUTE (externally_visible)
-# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
-#else
-# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+#ifndef _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+# if _GL_HAS_ATTRIBUTE (externally_visible)
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE __attribute__ ((externally_visible))
+# else
+# define _GL_ATTRIBUTE_EXTERNALLY_VISIBLE
+# endif
#endif
/* _GL_ATTRIBUTE_FALLTHROUGH declares that it is not a programming mistake if
@@ -240,12 +521,18 @@ AC_DEFUN([gl_COMMON_BODY], [
'default' label. The compiler should not warn in this case. */
/* Applies to: Empty statement (;), inside a 'switch' statement. */
/* Always expands to something. */
-#if _GL_HAS_C_ATTRIBUTE (fallthrough)
-# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
-#elif _GL_HAS_ATTRIBUTE (fallthrough)
-# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
-#else
-# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
+#ifndef _GL_ATTRIBUTE_FALLTHROUGH
+# if _GL_HAVE___HAS_C_ATTRIBUTE
+# if __has_c_attribute (__fallthrough__)
+# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
+# endif
+# endif
+# if !defined _GL_ATTRIBUTE_FALLTHROUGH && _GL_HAS_ATTRIBUTE (fallthrough)
+# define _GL_ATTRIBUTE_FALLTHROUGH __attribute__ ((__fallthrough__))
+# endif
+# ifndef _GL_ATTRIBUTE_FALLTHROUGH
+# define _GL_ATTRIBUTE_FALLTHROUGH ((void) 0)
+# endif
#endif
/* _GL_ATTRIBUTE_FORMAT ((ARCHETYPE, STRING-INDEX, FIRST-TO-CHECK))
@@ -259,10 +546,12 @@ AC_DEFUN([gl_COMMON_BODY], [
If FIRST-TO-CHECK is not 0, arguments starting at FIRST-TO_CHECK
are suitable for the format string. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (format)
-# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
-#else
-# define _GL_ATTRIBUTE_FORMAT(spec)
+#ifndef _GL_ATTRIBUTE_FORMAT
+# if _GL_HAS_ATTRIBUTE (format)
+# define _GL_ATTRIBUTE_FORMAT(spec) __attribute__ ((__format__ spec))
+# else
+# define _GL_ATTRIBUTE_FORMAT(spec)
+# endif
#endif
/* _GL_ATTRIBUTE_LEAF declares that if the function is called from some other
@@ -270,19 +559,23 @@ AC_DEFUN([gl_COMMON_BODY], [
exception handling. This declaration lets the compiler optimize that unit
more aggressively. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (leaf)
-# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
-#else
-# define _GL_ATTRIBUTE_LEAF
+#ifndef _GL_ATTRIBUTE_LEAF
+# if _GL_HAS_ATTRIBUTE (leaf)
+# define _GL_ATTRIBUTE_LEAF __attribute__ ((__leaf__))
+# else
+# define _GL_ATTRIBUTE_LEAF
+# endif
#endif
/* _GL_ATTRIBUTE_MALLOC declares that the function returns a pointer to freshly
allocated memory. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (malloc)
-# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
-#else
-# define _GL_ATTRIBUTE_MALLOC
+#ifndef _GL_ATTRIBUTE_MALLOC
+# if _GL_HAS_ATTRIBUTE (malloc)
+# define _GL_ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+# define _GL_ATTRIBUTE_MALLOC
+# endif
#endif
/* _GL_ATTRIBUTE_MAY_ALIAS declares that pointers to the type may point to the
@@ -290,28 +583,45 @@ AC_DEFUN([gl_COMMON_BODY], [
strict aliasing optimization. */
/* Applies to: types. */
/* Oracle Studio 12.6 mishandles may_alias despite __has_attribute OK. */
-#if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
-# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
-#else
-# define _GL_ATTRIBUTE_MAY_ALIAS
+#ifndef _GL_ATTRIBUTE_MAY_ALIAS
+# if _GL_HAS_ATTRIBUTE (may_alias) && !defined __SUNPRO_C
+# define _GL_ATTRIBUTE_MAY_ALIAS __attribute__ ((__may_alias__))
+# else
+# define _GL_ATTRIBUTE_MAY_ALIAS
+# endif
#endif
/* _GL_ATTRIBUTE_MAYBE_UNUSED declares that it is not a programming mistake if
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,
- enumeration, enumeration item,
- typedef,
in C++ also: class. */
-/* In C++ and C2x, this is spelled [[__maybe_unused__]].
+/* In C++ and C23, this is spelled [[__maybe_unused__]].
GCC's syntax is __attribute__ ((__unused__)).
- clang supports both syntaxes. */
-#if _GL_HAS_C_ATTRIBUTE (maybe_unused)
-# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
-#else
-# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
+ clang supports both syntaxes. Except that with clang ≥ 6, < 10, in C++ mode,
+ __has_c_attribute (__maybe_unused__) yields true but the use of
+ [[__maybe_unused__]] nevertheless produces a warning. */
+#ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if defined __clang__ && defined __cplusplus
+# if !defined __apple_build_version__ && __clang_major__ >= 10
+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+# endif
+# elif _GL_HAVE___HAS_C_ATTRIBUTE
+# if __has_c_attribute (__maybe_unused__)
+# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
+# endif
+# endif
+# endif
+# ifndef _GL_ATTRIBUTE_MAYBE_UNUSED
+# define _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_UNUSED
+# endif
#endif
/* Alternative spelling of this macro, for convenience and for
compatibility with glibc/include/libc-symbols.h. */
@@ -323,21 +633,40 @@ AC_DEFUN([gl_COMMON_BODY], [
discard the return value. The compiler may warn if the caller does not use
the return value, unless the caller uses something like ignore_value. */
/* Applies to: function, enumeration, class. */
-#if _GL_HAS_C_ATTRIBUTE (nodiscard)
-# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
-#elif _GL_HAS_ATTRIBUTE (warn_unused_result)
-# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
-#else
-# define _GL_ATTRIBUTE_NODISCARD
+#ifndef _GL_ATTRIBUTE_NODISCARD
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if defined __clang__ && defined __cplusplus
+ /* With clang up to 15.0.6 (at least), in C++ mode, [[__nodiscard__]] produces
+ a warning.
+ The 1000 below means a yet unknown threshold. When clang++ version X
+ starts supporting [[__nodiscard__]] without warning about it, you can
+ replace the 1000 with X. */
+# if __clang_major__ >= 1000
+# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+# endif
+# elif _GL_HAVE___HAS_C_ATTRIBUTE
+# if __has_c_attribute (__nodiscard__)
+# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
+# endif
+# endif
+# endif
+# if !defined _GL_ATTRIBUTE_NODISCARD && _GL_HAS_ATTRIBUTE (warn_unused_result)
+# define _GL_ATTRIBUTE_NODISCARD __attribute__ ((__warn_unused_result__))
+# endif
+# ifndef _GL_ATTRIBUTE_NODISCARD
+# define _GL_ATTRIBUTE_NODISCARD
+# endif
#endif
/* _GL_ATTRIBUTE_NOINLINE tells that the compiler should not inline the
function. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (noinline)
-# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
-#else
-# define _GL_ATTRIBUTE_NOINLINE
+#ifndef _GL_ATTRIBUTE_NOINLINE
+# if _GL_HAS_ATTRIBUTE (noinline)
+# define _GL_ATTRIBUTE_NOINLINE __attribute__ ((__noinline__))
+# else
+# define _GL_ATTRIBUTE_NOINLINE
+# endif
#endif
/* _GL_ATTRIBUTE_NONNULL ((N1, N2,...)) declares that the arguments N1, N2,...
@@ -345,20 +674,35 @@ AC_DEFUN([gl_COMMON_BODY], [
_GL_ATTRIBUTE_NONNULL () declares that all pointer arguments must not be
null. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (nonnull)
-# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
-#else
-# define _GL_ATTRIBUTE_NONNULL(args)
+#ifndef _GL_ATTRIBUTE_NONNULL
+# if _GL_HAS_ATTRIBUTE (nonnull)
+# define _GL_ATTRIBUTE_NONNULL(args) __attribute__ ((__nonnull__ args))
+# else
+# define _GL_ATTRIBUTE_NONNULL(args)
+# endif
+#endif
+
+/* _GL_ATTRIBUTE_NONNULL_IF_NONZERO (NP, NI) declares that the argument NP
+ (a pointer) must not be NULL if the argument NI (an integer) is != 0. */
+/* Applies to: functions. */
+#ifndef _GL_ATTRIBUTE_NONNULL_IF_NONZERO
+# if _GL_HAS_ATTRIBUTE (nonnull_if_nonzero)
+# define _GL_ATTRIBUTE_NONNULL_IF_NONZERO(np, ni) __attribute__ ((__nonnull_if_nonzero__ (np, ni)))
+# else
+# define _GL_ATTRIBUTE_NONNULL_IF_NONZERO(np, ni)
+# endif
#endif
/* _GL_ATTRIBUTE_NONSTRING declares that the contents of a character array is
not meant to be NUL-terminated. */
/* Applies to: struct/union members and variables that are arrays of element
type '[[un]signed] char'. */
-#if _GL_HAS_ATTRIBUTE (nonstring)
-# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
-#else
-# define _GL_ATTRIBUTE_NONSTRING
+#ifndef _GL_ATTRIBUTE_NONSTRING
+# if _GL_HAS_ATTRIBUTE (nonstring)
+# define _GL_ATTRIBUTE_NONSTRING __attribute__ ((__nonstring__))
+# else
+# define _GL_ATTRIBUTE_NONSTRING
+# endif
#endif
/* There is no _GL_ATTRIBUTE_NORETURN; use _Noreturn instead. */
@@ -366,10 +710,26 @@ AC_DEFUN([gl_COMMON_BODY], [
/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
*/
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
-# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
-#else
-# define _GL_ATTRIBUTE_NOTHROW
+/* After a function's parameter list, this attribute must come first, before
+ other attributes. */
+#ifndef _GL_ATTRIBUTE_NOTHROW
+# if defined __cplusplus
+# if _GL_GNUC_PREREQ (2, 8) || __clang_major__ >= 4
+# if __cplusplus >= 201103L
+# define _GL_ATTRIBUTE_NOTHROW noexcept (true)
+# else
+# define _GL_ATTRIBUTE_NOTHROW throw ()
+# endif
+# else
+# define _GL_ATTRIBUTE_NOTHROW
+# endif
+# else
+# if _GL_HAS_ATTRIBUTE (nothrow)
+# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
+# else
+# define _GL_ATTRIBUTE_NOTHROW
+# endif
+# endif
#endif
/* _GL_ATTRIBUTE_PACKED declares:
@@ -378,32 +738,74 @@ AC_DEFUN([gl_COMMON_BODY], [
minimizing the memory required. */
/* Applies to: struct members, struct, union,
in C++ also: class. */
-#if _GL_HAS_ATTRIBUTE (packed)
-# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
-#else
-# define _GL_ATTRIBUTE_PACKED
+#ifndef _GL_ATTRIBUTE_PACKED
+/* Oracle Studio 12.6 miscompiles code with __attribute__ ((__packed__)) despite
+ __has_attribute OK. */
+# if _GL_HAS_ATTRIBUTE (packed) && !defined __SUNPRO_C
+# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
+# else
+# define _GL_ATTRIBUTE_PACKED
+# endif
#endif
-/* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate
- calls to the function with the same arguments if observable state is not
- changed between calls.
- This attribute is safe for a function that does not affect
- observable state, and always returns exactly once.
- (This attribute is looser than _GL_ATTRIBUTE_CONST.) */
+/* _GL_ATTRIBUTE_PURE declares:
+ 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. */
-#if _GL_HAS_ATTRIBUTE (pure)
-# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
-#else
-# define _GL_ATTRIBUTE_PURE
+#ifndef _GL_ATTRIBUTE_PURE
+# if _GL_HAS_ATTRIBUTE (pure)
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define _GL_ATTRIBUTE_PURE
+# endif
+#endif
+
+/* _GL_ATTRIBUTE_REPRODUCIBLE declares:
+ 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 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
+ <https://stackoverflow.com/questions/76847905/>. */
+/* Applies to: functions, pointer to functions, function types. */
+#ifndef _GL_ATTRIBUTE_REPRODUCIBLE
+/* This may be revisited when gcc and clang support [[reproducible]] or possibly
+ __attribute__ ((__reproducible__)). */
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if _GL_HAS_ATTRIBUTE (reproducible)
+# define _GL_ATTRIBUTE_REPRODUCIBLE [[reproducible]]
+# endif
+# endif
+# ifndef _GL_ATTRIBUTE_REPRODUCIBLE
+# define _GL_ATTRIBUTE_REPRODUCIBLE
+# endif
#endif
/* _GL_ATTRIBUTE_RETURNS_NONNULL declares that the function's return value is
a non-NULL pointer. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (returns_nonnull)
-# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
-#else
-# define _GL_ATTRIBUTE_RETURNS_NONNULL
+#ifndef _GL_ATTRIBUTE_RETURNS_NONNULL
+# if _GL_HAS_ATTRIBUTE (returns_nonnull)
+# define _GL_ATTRIBUTE_RETURNS_NONNULL __attribute__ ((__returns_nonnull__))
+# else
+# define _GL_ATTRIBUTE_RETURNS_NONNULL
+# endif
#endif
/* _GL_ATTRIBUTE_SENTINEL(pos) declares that the variadic function expects a
@@ -411,17 +813,52 @@ AC_DEFUN([gl_COMMON_BODY], [
_GL_ATTRIBUTE_SENTINEL () - The last argument is NULL (requires C99).
_GL_ATTRIBUTE_SENTINEL ((N)) - The (N+1)st argument from the end is NULL. */
/* Applies to: functions. */
-#if _GL_HAS_ATTRIBUTE (sentinel)
-# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
-#else
-# define _GL_ATTRIBUTE_SENTINEL(pos)
+#ifndef _GL_ATTRIBUTE_SENTINEL
+# if _GL_HAS_ATTRIBUTE (sentinel)
+# define _GL_ATTRIBUTE_SENTINEL(pos) __attribute__ ((__sentinel__ pos))
+# else
+# define _GL_ATTRIBUTE_SENTINEL(pos)
+# endif
+#endif
+
+/* _GL_ATTRIBUTE_UNSEQUENCED declares:
+ 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.13.8 for a definition of
+ these terms.
+ (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 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
+ <https://stackoverflow.com/questions/76847905/>. */
+/* Applies to: functions, pointer to functions, function types. */
+#ifndef _GL_ATTRIBUTE_UNSEQUENCED
+/* This may be revisited when gcc and clang support [[unsequenced]] or possibly
+ __attribute__ ((__unsequenced__)). */
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if _GL_HAS_ATTRIBUTE (unsequenced)
+# define _GL_ATTRIBUTE_UNSEQUENCED [[unsequenced]]
+# endif
+# endif
+# ifndef _GL_ATTRIBUTE_UNSEQUENCED
+# define _GL_ATTRIBUTE_UNSEQUENCED
+# endif
#endif
/* A helper macro. Don't use it directly. */
-#if _GL_HAS_ATTRIBUTE (unused)
-# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
-#else
-# define _GL_ATTRIBUTE_UNUSED
+#ifndef _GL_ATTRIBUTE_UNUSED
+# if _GL_HAS_ATTRIBUTE (unused)
+# define _GL_ATTRIBUTE_UNUSED __attribute__ ((__unused__))
+# else
+# define _GL_ATTRIBUTE_UNUSED
+# endif
#endif
]dnl There is no _GL_ATTRIBUTE_VISIBILITY; see m4/visibility.m4 instead.
@@ -432,10 +869,68 @@ AC_DEFUN([gl_COMMON_BODY], [
/* Applies to: label (both in C and C++). */
/* Note that g++ < 4.5 does not support the '__attribute__ ((__unused__)) ;'
syntax. But clang does. */
-#if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__
-# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
+#ifndef _GL_UNUSED_LABEL
+# if !(defined __cplusplus && !_GL_GNUC_PREREQ (4, 5)) || defined __clang__
+# define _GL_UNUSED_LABEL _GL_ATTRIBUTE_UNUSED
+# else
+# define _GL_UNUSED_LABEL
+# endif
+#endif
+
+/* _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
+ <https://clang.llvm.org/docs/ThreadSafetyAnalysis.html>. */
+#ifndef _GL_ATTRIBUTE_CAPABILITY_TYPE
+# if __clang_major__ >= 15
+# define _GL_ATTRIBUTE_CAPABILITY_TYPE(concept) \
+ __attribute__ ((__capability__ (concept)))
+# else
+# define _GL_ATTRIBUTE_CAPABILITY_TYPE(concept)
+# endif
+#endif
+#ifndef _GL_ATTRIBUTE_ACQUIRE_CAPABILITY
+# if __clang_major__ >= 15
+# define _GL_ATTRIBUTE_ACQUIRE_CAPABILITY(resource) \
+ __attribute__ ((__acquire_capability__ (resource)))
+# else
+# define _GL_ATTRIBUTE_ACQUIRE_CAPABILITY(resource)
+# endif
+#endif
+#ifndef _GL_ATTRIBUTE_RELEASE_CAPABILITY
+# if __clang_major__ >= 15
+# define _GL_ATTRIBUTE_RELEASE_CAPABILITY(resource) \
+ __attribute__ ((__release_capability__ (resource)))
+# else
+# define _GL_ATTRIBUTE_RELEASE_CAPABILITY(resource)
+# endif
+#endif
+])
+ AH_VERBATIM([c_linkage],
+[/* In C++, there is the concept of "language linkage", that encompasses
+ name mangling and function calling conventions.
+ The following macros start and end a block of "C" linkage. */
+#ifdef __cplusplus
+# define _GL_BEGIN_C_LINKAGE extern "C" {
+# define _GL_END_C_LINKAGE }
#else
-# define _GL_UNUSED_LABEL
+# define _GL_BEGIN_C_LINKAGE
+# define _GL_END_C_LINKAGE
#endif
])
AH_VERBATIM([async_safe],
@@ -475,8 +970,8 @@ AC_DEFUN([gl_COMMON_BODY], [
-1 if n1 < n2
The naïve code (n1 > n2 ? 1 : n1 < n2 ? -1 : 0) produces a conditional
jump with nearly all GCC versions up to GCC 10.
- This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional with many
- GCC versions up to GCC 9.
+ This variant (n1 < n2 ? -1 : n1 > n2) produces a conditional jump with
+ many GCC versions up to GCC 9.
The better code (n1 > n2) - (n1 < n2) from Hacker's Delight § 2-9
avoids conditional jumps in all GCC versions >= 3.4. */
#define _GL_CMP(n1, n2) (((n1) > (n2)) - ((n1) < (n2)))
@@ -493,7 +988,7 @@ AC_DEFUN([gl_COMMON_BODY], [
dnl gl_cross_guess_normal (to be used when 'yes' is good and 'no' is bad),
dnl gl_cross_guess_inverted (to be used when 'no' is good and 'yes' is bad).
AC_ARG_ENABLE([cross-guesses],
- [AS_HELP_STRING([--enable-cross-guesses={conservative|risky}],
+ [AS_HELP_STRING([[--enable-cross-guesses={conservative|risky}]],
[specify policy for cross-compilation guesses])],
[if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then
AC_MSG_WARN([invalid argument supplied to --enable-cross-guesses])
@@ -853,7 +1348,7 @@ AC_DEFUN([gl_CC_ALLOW_WARNINGS],
AC_REQUIRE([AC_PROG_CC])
AC_CACHE_CHECK([for C compiler option to allow warnings],
[gl_cv_cc_wallow],
- [rm -f conftest*
+ [rm -fr conftest*
echo 'int dummy;' > conftest.c
AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c 2>conftest1.err]) >/dev/null
AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS -Wno-error -c conftest.c 2>conftest2.err]) >/dev/null
@@ -866,7 +1361,7 @@ AC_DEFUN([gl_CC_ALLOW_WARNINGS],
else
gl_cv_cc_wallow=none
fi
- rm -f conftest*
+ rm -fr conftest*
])
case "$gl_cv_cc_wallow" in
none) GL_CFLAG_ALLOW_WARNINGS='' ;;
@@ -884,7 +1379,7 @@ AC_DEFUN([gl_CXX_ALLOW_WARNINGS],
if test -n "$CXX" && test "$CXX" != no; then
AC_CACHE_CHECK([for C++ compiler option to allow warnings],
[gl_cv_cxx_wallow],
- [rm -f conftest*
+ [rm -fr conftest*
echo 'int dummy;' > conftest.cc
AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -c conftest.cc 2>conftest1.err]) >/dev/null
AC_TRY_COMMAND([${CXX-c++} $CXXFLAGS $CPPFLAGS -Wno-error -c conftest.cc 2>conftest2.err]) >/dev/null
@@ -897,7 +1392,7 @@ AC_DEFUN([gl_CXX_ALLOW_WARNINGS],
else
gl_cv_cxx_wallow=none
fi
- rm -f conftest*
+ rm -fr conftest*
])
case "$gl_cv_cxx_wallow" in
none) GL_CXXFLAG_ALLOW_WARNINGS='' ;;
@@ -930,14 +1425,16 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
dnl -Wno-pedantic >= 4.8 >= 3.9
dnl -Wno-sign-compare >= 3 >= 3.9
dnl -Wno-sign-conversion >= 4.3 >= 3.9
+ dnl -Wno-tautological-out-of-range-compare - >= 3.9
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 >= 6.1 >= 3.9
dnl -Wno-unused-function >= 3 >= 3.9
dnl -Wno-unused-parameter >= 3 >= 3.9
dnl
cat > conftest.c <<\EOF
- #if __GNUC__ >= 3 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ #if (__GNUC__ >= 3 && !defined __clang__) || (__clang_major__ + (__clang_minor__ >= 9) > 3)
-Wno-cast-qual
-Wno-conversion
-Wno-float-equal
@@ -946,20 +1443,26 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
-Wno-unused-function
-Wno-unused-parameter
#endif
- #if __GNUC__ + (__GNUC_MINOR__ >= 9) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ #if (__GNUC__ + (__GNUC_MINOR__ >= 9) > 4 && !defined __clang__) || (__clang_major__ + (__clang_minor__ >= 9) > 3)
-Wno-float-conversion
#endif
- #if __GNUC__ >= 7 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ #if (__GNUC__ >= 7 && !defined __clang__) || (__clang_major__ + (__clang_minor__ >= 9) > 3)
-Wimplicit-fallthrough
#endif
- #if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ #if (__GNUC__ + (__GNUC_MINOR__ >= 8) > 4 && !defined __clang__) || (__clang_major__ + (__clang_minor__ >= 9) > 3)
-Wno-pedantic
#endif
- #if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
+ #if 3 < __clang_major__ + (9 <= __clang_minor__)
+ -Wno-tautological-constant-out-of-range-compare
+ #endif
+ #if (__GNUC__ + (__GNUC_MINOR__ >= 3) > 4 && !defined __clang__) || (__clang_major__ + (__clang_minor__ >= 9) > 3)
-Wno-sign-conversion
-Wno-type-limits
#endif
- #if __GNUC__ + (__GNUC_MINOR__ >= 5) > 4
+ #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__)
-Wno-unsuffixed-float-constants
#endif
EOF
@@ -1005,6 +1508,250 @@ AC_DEFUN([gl_CONDITIONAL_HEADER],
m4_popdef([gl_header_name])
])
+dnl Preparations for gl_CHECK_FUNCS_MACOS.
+AC_DEFUN([gl_PREPARE_CHECK_FUNCS_MACOS],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_COMPILER_CLANG])
+ AC_CACHE_CHECK([for compiler option needed when checking for future declarations],
+ [gl_cv_compiler_check_future_option],
+ [case "$host_os" in
+ dnl This is only needed on macOS.
+ darwin*)
+ if test $gl_cv_compiler_clang = yes; then
+ dnl Test whether the compiler supports the option
+ dnl '-Werror=unguarded-availability-new'.
+ saved_ac_compile="$ac_compile"
+ ac_compile="$ac_compile -Werror=unguarded-availability-new"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
+ [gl_cv_compiler_check_future_option='-Werror=unguarded-availability-new'],
+ [gl_cv_compiler_check_future_option=none])
+ ac_compile="$saved_ac_compile"
+ else
+ gl_cv_compiler_check_future_option=none
+ fi
+ ;;
+ *) gl_cv_compiler_check_future_option=none ;;
+ esac
+ ])
+])
+
+dnl Pieces of the expansion of
+dnl gl_CHECK_FUNCS_ANDROID
+dnl gl_CHECK_FUNCS_MACOS
+dnl gl_CHECK_FUNCS_ANDROID_MACOS
+
+AC_DEFUN([gl_CHECK_FUNCS_DEFAULT_CASE],
+[
+ *)
+ AC_CHECK_FUNC([$1])
+ [gl_cv_onwards_func_][$1]=$[ac_cv_func_][$1]
+ ;;
+])
+
+AC_DEFUN([gl_CHECK_FUNCS_CASE_FOR_ANDROID],
+[
+ linux*-android*)
+ AC_CHECK_DECL([$1], , , [$2])
+ if test $[ac_cv_have_decl_][$1] = yes; then
+ AC_CHECK_FUNC([[$1]])
+ if test $[ac_cv_func_][$1] = yes; then
+ [gl_cv_onwards_func_][$1]=yes
+ else
+ dnl The function is declared but does not exist. This should not
+ dnl happen normally. But anyway, we know that a future version
+ dnl of Android will have the function.
+ [gl_cv_onwards_func_][$1]='future OS version'
+ fi
+ else
+ [gl_cv_onwards_func_][$1]='future OS version'
+ fi
+ ;;
+])
+
+AC_DEFUN([gl_CHECK_FUNCS_CASE_FOR_MACOS],
+[
+ darwin*)
+ if test "x$gl_cv_compiler_check_future_option" != "xnone"; then
+ dnl Use a compile test, not a link test.
+ saved_ac_compile="$ac_compile"
+ ac_compile="$ac_compile $gl_cv_compiler_check_future_option"
+ saved_ac_compile_for_check_decl="$ac_compile_for_check_decl"
+ ac_compile_for_check_decl="$ac_compile_for_check_decl $gl_cv_compiler_check_future_option"
+ unset [ac_cv_have_decl_][$1]
+ AC_CHECK_DECL([$1], , , [$2])
+ ac_compile="$saved_ac_compile"
+ ac_compile_for_check_decl="$saved_ac_compile_for_check_decl"
+ [ac_cv_func_][$1]="$[ac_cv_have_decl_][$1]"
+ if test $[ac_cv_func_][$1] = yes; then
+ [gl_cv_onwards_func_][$1]=yes
+ else
+ dnl This is a bit complicated, because here we need the behaviour
+ dnl of AC_CHECK_DECL before the
+ dnl commit e1bbc9b93cdff61d70719c224b37970e065008bb (2025-05-26).
+ [ac_cv_have_decl_][$1][_saved]="$[ac_cv_have_decl_][$1]"
+ unset [ac_cv_have_decl_][$1]
+ ac_c_future_darwin_options_saved="$ac_c_future_darwin_options"
+ ac_cxx_future_darwin_options_saved="$ac_cxx_future_darwin_options"
+ ac_c_future_darwin_options=
+ ac_cxx_future_darwin_options=
+ AC_CHECK_DECL([$1], , , [$2])
+ ac_c_future_darwin_options="$ac_c_future_darwin_options_saved"
+ ac_cxx_future_darwin_options="$ac_cxx_future_darwin_options_saved"
+ if test $[ac_cv_have_decl_][$1] = yes; then
+ [gl_cv_onwards_func_][$1]='future OS version'
+ else
+ [gl_cv_onwards_func_][$1]=no
+ fi
+ [ac_cv_have_decl_][$1]="$[ac_cv_have_decl_][$1][_saved]"
+ unset [ac_cv_have_decl_][$1][_saved]
+ fi
+ else
+ AC_CHECK_FUNC([$1])
+ [gl_cv_onwards_func_][$1]=$[ac_cv_func_][$1]
+ fi
+ ;;
+])
+
+AC_DEFUN([gl_CHECK_FUNCS_SET_RESULTS],
+[
+ case "$[gl_cv_onwards_func_][$1]" in
+ future*) [ac_cv_func_][$1]=no ;;
+ *) [ac_cv_func_][$1]=$[gl_cv_onwards_func_][$1] ;;
+ esac
+ if test $[ac_cv_func_][$1] = yes; then
+ AC_DEFINE([HAVE_]m4_translit([[$1]],
+ [abcdefghijklmnopqrstuvwxyz],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ]),
+ [1], [Define to 1 if you have the `$1' function.])
+ fi
+])
+
+dnl gl_CHECK_FUNCS_ANDROID([func], [[#include <foo.h>]])
+dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem
+dnl on Android.
+dnl
+dnl When code is compiled on Android, it is in the context of a certain
+dnl "Android API level", which indicates the minimum version of Android on
+dnl which the app can be installed. In other words, you don't compile for a
+dnl specific version of Android. You compile for all versions of Android,
+dnl onwards from the given API level.
+dnl Thus, the question "does the OS have the function func" has three possible
+dnl answers:
+dnl - yes, in all versions starting from the given API level,
+dnl - no, in no version,
+dnl - not in the given API level, but in a later version of Android.
+dnl
+dnl In detail, this works as follows:
+dnl If func was added to Android API level, say, 28, then the libc.so has the
+dnl symbol func always, whereas the header file <foo.h> declares func
+dnl conditionally:
+dnl #if __ANDROID_API__ >= 28
+dnl ... func (...) __INTRODUCED_IN(28);
+dnl #endif
+dnl Thus, when compiling with "clang -target armv7a-unknown-linux-android28",
+dnl the function func is declared and exists in libc.
+dnl Whereas when compiling with "clang -target armv7a-unknown-linux-android27",
+dnl the function func is not declared but exists in libc.
+dnl
+dnl This macro sets two variables:
+dnl - gl_cv_onwards_func_<func> to yes / no / "future OS version"
+dnl - ac_cv_func_<func> to yes / no / no
+dnl The first variable allows distinguishing all three cases.
+dnl The second variable is set, so that an invocation
+dnl gl_CHECK_FUNCS_ANDROID([func], [[#include <foo.h>]])
+dnl can be used as a drop-in replacement for
+dnl AC_CHECK_FUNCS([func]).
+AC_DEFUN([gl_CHECK_FUNCS_ANDROID],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([for [$1]],
+ [[gl_cv_onwards_func_][$1]],
+ [gl_SILENT([
+ case "$host_os" in
+ gl_CHECK_FUNCS_CASE_FOR_ANDROID([$1], [$2])
+ gl_CHECK_FUNCS_DEFAULT_CASE([$1])
+ esac
+ ])
+ ])
+ gl_CHECK_FUNCS_SET_RESULTS([$1])
+])
+
+dnl gl_CHECK_FUNCS_MACOS([func], [[#include <foo.h>]])
+dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem
+dnl on macOS.
+dnl
+dnl When code is compiled on macOS, it is in the context of a certain minimum
+dnl macOS version, that can be set through the option '-mmacosx-version-min='.
+dnl In other words, you don't compile for a specific version of macOS. You
+dnl compile for all versions of macOS, onwards from the given version.
+dnl Thus, the question "does the OS have the function func" has three possible
+dnl answers:
+dnl - yes, in all versions starting from the given version,
+dnl - no, in no version,
+dnl - not in the given version, but in a later version of macOS.
+dnl
+dnl In detail, this works as follows:
+dnl If func was added to, say, macOS version 13, then the libc has the
+dnl symbol func always, whereas the header file <foo.h> declares func
+dnl conditionally with a special availability attribute:
+dnl ... func (...) __attribute__((availability(macos,introduced=13.0)));
+dnl Thus, when compiling with "clang mmacosx-version-min=13", there is no
+dnl warning about the use of func, and the resulting binary
+dnl - runs fine on macOS 13,
+dnl - aborts with a dyld "Symbol not found" message on macOS 12.
+dnl Whereas, when compiling with "clang mmacosx-version-min=12", there is a
+dnl warning: 'func' is only available on macOS 13.0 or newer
+dnl [-Wunguarded-availability-new],
+dnl and the resulting binary
+dnl - runs fine on macOS 13,
+dnl - crashes with a SIGSEGV (signal 11) on macOS 12.
+dnl
+dnl This macro sets two variables:
+dnl - gl_cv_onwards_func_<func> to yes / no / "future OS version"
+dnl - ac_cv_func_<func> to yes / no / no
+dnl The first variable allows distinguishing all three cases.
+dnl The second variable is set, so that an invocation
+dnl gl_CHECK_FUNCS_MACOS([func], [[#include <foo.h>]])
+dnl can be used as a drop-in replacement for
+dnl AC_CHECK_FUNCS([func]).
+AC_DEFUN([gl_CHECK_FUNCS_MACOS],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_PREPARE_CHECK_FUNCS_MACOS])
+ AC_CACHE_CHECK([for [$1]],
+ [[gl_cv_onwards_func_][$1]],
+ [gl_SILENT([
+ case "$host_os" in
+ gl_CHECK_FUNCS_CASE_FOR_MACOS([$1], [$2])
+ gl_CHECK_FUNCS_DEFAULT_CASE([$1])
+ esac
+ ])
+ ])
+ gl_CHECK_FUNCS_SET_RESULTS([$1])
+])
+
+dnl gl_CHECK_FUNCS_ANDROID_MACOS([func], [[#include <foo.h>]])
+dnl is like AC_CHECK_FUNCS([func]), taking into account a portability problem
+dnl on Android and on macOS.
+dnl It is the combination of gl_CHECK_FUNCS_ANDROID and gl_CHECK_FUNCS_MACOS.
+AC_DEFUN([gl_CHECK_FUNCS_ANDROID_MACOS],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_PREPARE_CHECK_FUNCS_MACOS])
+ AC_CACHE_CHECK([for [$1]],
+ [[gl_cv_onwards_func_][$1]],
+ [gl_SILENT([
+ case "$host_os" in
+ gl_CHECK_FUNCS_CASE_FOR_ANDROID([$1], [$2])
+ gl_CHECK_FUNCS_CASE_FOR_MACOS([$1], [$2])
+ gl_CHECK_FUNCS_DEFAULT_CASE([$1])
+ esac
+ ])
+ ])
+ gl_CHECK_FUNCS_SET_RESULTS([$1])
+])
+
dnl Expands to some code for use in .c programs that, on native Windows, defines
dnl the Microsoft deprecated alias function names to the underscore-prefixed
dnl actual function names. With this macro, these function names are available
diff --git a/gnulib-m4/gnulib-comp.m4 b/gnulib-m4/gnulib-comp.m4
index 7bad3983..6ae83ecd 100644
--- a/gnulib-m4/gnulib-comp.m4
+++ b/gnulib-m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2022 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
@@ -45,12 +45,14 @@ AC_DEFUN([gl_EARLY],
# Code from module absolute-header:
# Code from module accept:
# Code from module accept-tests:
+ # Code from module alignasof:
+ # Code from module alignasof-tests:
# Code from module alloca:
# Code from module alloca-opt:
# Code from module alloca-opt-tests:
# Code from module amemxfrm:
- # Code from module arpa_inet:
- # Code from module arpa_inet-tests:
+ # Code from module arpa_inet-h:
+ # Code from module arpa_inet-h-tests:
# Code from module array-mergesort:
# Code from module array-mergesort-tests:
# Code from module assert-h:
@@ -61,36 +63,79 @@ AC_DEFUN([gl_EARLY],
# Code from module binary-io-tests:
# Code from module bind:
# Code from module bind-tests:
+ # Code from module bool:
+ # Code from module bool-tests:
+ # Code from module btoc32:
+ # Code from module btoc32-tests:
# Code from module btowc:
# Code from module btowc-tests:
# Code from module builtin-expect:
# Code from module c-ctype:
# Code from module c-ctype-tests:
- # Code from module c-strcase:
- # Code from module c-strcase-tests:
+ # Code from module c-strcasecmp:
+ # Code from module c-strcasecmp-tests:
# Code from module c-strcaseeq:
+ # Code from module c32isalnum:
+ # Code from module c32isalnum-tests:
+ # Code from module c32isalpha:
+ # Code from module c32isalpha-tests:
+ # Code from module c32isblank:
+ # Code from module c32isblank-tests:
+ # Code from module c32iscntrl:
+ # Code from module c32iscntrl-tests:
+ # Code from module c32isdigit:
+ # Code from module c32isdigit-tests:
+ # Code from module c32isgraph:
+ # Code from module c32isgraph-tests:
+ # Code from module c32islower:
+ # Code from module c32islower-tests:
+ # Code from module c32isprint:
+ # Code from module c32isprint-tests:
+ # Code from module c32ispunct:
+ # Code from module c32ispunct-tests:
+ # Code from module c32isspace:
+ # Code from module c32isspace-tests:
+ # Code from module c32isupper:
+ # Code from module c32isupper-tests:
+ # Code from module c32isxdigit:
+ # Code from module c32isxdigit-tests:
+ # Code from module c32rtomb:
+ # Code from module c32rtomb-tests:
+ # Code from module c32tob:
+ # Code from module c32tolower:
+ # Code from module c32tolower-tests:
+ # Code from module c32width:
+ # Code from module c32width-tests:
# Code from module c99:
# Code from module calloc-gnu:
# Code from module calloc-gnu-tests:
# Code from module calloc-posix:
+ # Code from module calloc-posix-tests:
# Code from module cloexec:
# Code from module cloexec-tests:
# Code from module close:
# Code from module close-tests:
+ # Code from module concat-filename:
# Code from module connect:
# Code from module connect-tests:
- # Code from module ctype:
- # Code from module ctype-tests:
+ # Code from module ctype-h:
+ # Code from module ctype-h-tests:
# Code from module double-slash-root:
# Code from module dup2:
# Code from module dup2-tests:
# Code from module environ:
# Code from module environ-tests:
- # Code from module errno:
- # Code from module errno-tests:
+ # Code from module errno-h:
+ # Code from module errno-h-tests:
# Code from module error:
+ # Code from module error-h:
+ # Code from module error-tests:
# Code from module exitfail:
# Code from module extensions:
+ # This is actually already done in the pre-early phase.
+ # AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ # Code from module extensions-aix:
+ AC_REQUIRE([gl_USE_AIX_EXTENSIONS])
# Code from module extern-inline:
# Code from module fcntl:
# Code from module fcntl-h:
@@ -102,8 +147,7 @@ AC_DEFUN([gl_EARLY],
# Code from module fgetc-tests:
# Code from module filename:
# Code from module flexmember:
- # Code from module float:
- # Code from module float-tests:
+ # Code from module float-h:
# Code from module fpieee:
AC_REQUIRE([gl_FP_IEEE])
# Code from module fpucw:
@@ -127,12 +171,16 @@ AC_DEFUN([gl_EARLY],
# Code from module getcwd-lgpl-tests:
# Code from module getdtablesize:
# Code from module getdtablesize-tests:
- # Code from module getpagesize:
+ # Code from module getlocalename_l-unsafe:
+ # Code from module getlocalename_l-unsafe-limited:
# Code from module getprogname:
# Code from module getprogname-tests:
# Code from module gettext-h:
+ # Code from module gettext-h-tests:
# Code from module gettimeofday:
# Code from module gettimeofday-tests:
+ # Code from module gitlog-to-changelog:
+ # Code from module gnulib-i18n:
# Code from module gperf:
# Code from module hard-locale:
# Code from module hard-locale-tests:
@@ -152,9 +200,9 @@ AC_DEFUN([gl_EARLY],
# Code from module inline:
# Code from module intprops:
# Code from module intprops-tests:
- # Code from module inttypes:
- # Code from module inttypes-incomplete:
- # Code from module inttypes-tests:
+ # Code from module inttypes-h:
+ # Code from module inttypes-h-incomplete:
+ # Code from module inttypes-h-tests:
# Code from module ioctl:
# Code from module ioctl-tests:
# Code from module isblank:
@@ -169,23 +217,29 @@ AC_DEFUN([gl_EARLY],
# Code from module iswblank-tests:
# Code from module iswdigit:
# Code from module iswdigit-tests:
+ # Code from module iswpunct:
+ # Code from module iswpunct-tests:
# Code from module iswxdigit:
# Code from module iswxdigit-tests:
- # Code from module langinfo:
- # Code from module langinfo-tests:
# Code from module largefile:
- AC_REQUIRE([gl_YEAR2038_EARLY])
AC_REQUIRE([AC_SYS_LARGEFILE])
+ # Code from module largefile-tests:
+ # Code from module libc-config:
# Code from module limits-h:
# Code from module limits-h-tests:
# Code from module listen:
# Code from module listen-tests:
# Code from module localcharset:
# Code from module localcharset-tests:
- # Code from module locale:
- # Code from module locale-tests:
+ # Code from module locale-h:
+ # Code from module locale-h-tests:
+ # Code from module localeconv:
+ # Code from module localeconv-tests:
# Code from module localename:
+ # Code from module localename-environ:
# Code from module localename-tests:
+ # Code from module localename-unsafe:
+ # Code from module localename-unsafe-limited:
# Code from module lock:
# Code from module lock-tests:
# Code from module lstat:
@@ -193,32 +247,44 @@ AC_DEFUN([gl_EARLY],
# Code from module malloc-gnu:
# Code from module malloc-gnu-tests:
# Code from module malloc-posix:
+ # Code from module malloc-posix-tests:
# Code from module malloca:
# Code from module malloca-tests:
- # Code from module math:
- # Code from module math-tests:
+ # Code from module math-h:
+ # Code from module math-h-tests:
# Code from module mbchar:
- # Code from module mbiter:
+ # Code from module mbiterf:
+ # Code from module mbrtoc32:
+ # Code from module mbrtoc32-tests:
# Code from module mbrtowc:
# Code from module mbrtowc-tests:
# Code from module mbsinit:
# Code from module mbsinit-tests:
# Code from module mbsnlen:
+ # Code from module mbsnlen-tests:
+ # Code from module mbszero:
# Code from module mbtowc:
# Code from module memchr:
# Code from module memchr-tests:
# Code from module memcmp2:
# Code from module minmax:
+ # Code from module mixin/printf-posix:
+ # Code from module mkfifo:
+ # Code from module mkfifo-tests:
# Code from module msvc-inval:
# Code from module msvc-nothrow:
# Code from module multiarch:
+ # Code from module nan:
# Code from module nanosleep:
# Code from module nanosleep-tests:
- # Code from module netinet_in:
- # Code from module netinet_in-tests:
+ # Code from module netinet_in-h:
+ # Code from module netinet_in-h-tests:
# Code from module nocrash:
+ # Code from module once:
+ # Code from module once-tests:
# Code from module open:
# Code from module open-tests:
+ # Code from module package-version:
# Code from module pathmax:
# Code from module pathmax-tests:
# Code from module perror:
@@ -232,45 +298,64 @@ AC_DEFUN([gl_EARLY],
# Code from module printf-safe:
# Code from module pselect:
# Code from module pselect-tests:
+ # Code from module pthread-cond:
+ # Code from module pthread-cond-tests:
# Code from module pthread-h:
gl_ANYTHREADLIB_EARLY
# Code from module pthread-h-tests:
+ # Code from module pthread-mutex:
+ # Code from module pthread-mutex-tests:
+ # Code from module pthread-once:
+ # Code from module pthread-once-tests:
+ # Code from module pthread-rwlock:
+ # Code from module pthread-rwlock-tests:
# Code from module pthread-thread:
# Code from module pthread-thread-tests:
+ # Code from module pthread_mutex_timedlock:
# Code from module pthread_sigmask:
# Code from module pthread_sigmask-tests:
- # Code from module putenv:
+ # Code from module putenv-gnu:
+ # Code from module putenv-gnu-tests:
# Code from module raise:
# Code from module raise-tests:
- # Code from module realloc-gnu:
- # Code from module realloc-gnu-tests:
+ # Code from module random:
+ # Code from module random-tests:
+ # Code from module random_r:
+ # Code from module random_r-tests:
# Code from module realloc-posix:
+ # Code from module realloc-posix-tests:
# Code from module reallocarray:
# Code from module reallocarray-tests:
# Code from module relocatable-lib-lgpl:
# Code from module same-inode:
- # Code from module sched:
- # Code from module sched-tests:
+ # Code from module sched-h:
+ # Code from module sched-h-tests:
# Code from module sched_yield:
# Code from module select:
# Code from module select-tests:
# Code from module setenv:
# Code from module setenv-tests:
# Code from module setlocale:
+ # Code from module setlocale-fixes:
# Code from module setlocale-null:
# Code from module setlocale-null-tests:
+ # Code from module setlocale-null-unlocked:
+ # Code from module setlocale-null-unlocked-tests:
# Code from module setlocale-tests:
# Code from module setsockopt:
# Code from module setsockopt-tests:
# Code from module signal-h:
# Code from module signal-h-tests:
- # Code from module signbit:
- # Code from module signbit-tests:
+ # Code from module signbit-no-c++:
+ # Code from module signbit-no-c++-tests:
+ # Code from module signed-nan:
+ # Code from module signed-snan:
# Code from module sigprocmask:
# Code from module sigprocmask-tests:
# Code from module size_max:
# Code from module sleep:
# Code from module sleep-tests:
+ # Code from module snan:
# Code from module snippet/_Noreturn:
# Code from module snippet/arg-nonnull:
# Code from module snippet/c++defs:
@@ -286,21 +371,24 @@ AC_DEFUN([gl_EARLY],
# Code from module stat-time:
# Code from module stat-time-tests:
# Code from module std-gnu11:
- # Code from module stdalign:
- # Code from module stdalign-tests:
- # Code from module stdbool:
- # Code from module stdbool-tests:
- # Code from module stdckdint:
- # Code from module stdckdint-tests:
- # Code from module stddef:
- # Code from module stddef-tests:
- # Code from module stdint:
- # Code from module stdint-tests:
- # Code from module stdio:
- # Code from module stdio-tests:
- # Code from module stdlib:
- # Code from module stdlib-tests:
- # Code from module streq:
+ # Code from module stdckdint-h:
+ # Code from module stdckdint-h-tests:
+ # Code from module stddef-h:
+ # Code from module stddef-h-tests:
+ # Code from module stdint-h:
+ # Code from module stdint-h-tests:
+ # Code from module stdio-h:
+ gl_STDIO_H_EARLY
+ # Code from module stdio-h-tests:
+ # Code from module stdio-windows:
+ # Code from module stdlib-h:
+ # Code from module stdlib-h-tests:
+ # Code from module stpcpy:
+ # Code from module str_endswith:
+ # Code from module str_endswith-tests:
+ # Code from module str_startswith:
+ # Code from module str_startswith-tests:
+ # Code from module streq-opt:
# Code from module strerror:
# Code from module strerror-override:
# Code from module strerror-tests:
@@ -310,39 +398,49 @@ AC_DEFUN([gl_EARLY],
# Code from module striconveh-tests:
# Code from module striconveha:
# Code from module striconveha-tests:
- # Code from module string:
- # Code from module string-tests:
+ # Code from module string-h:
+ # Code from module string-h-tests:
+ # Code from module stringeq:
# Code from module strncat:
# Code from module strncat-tests:
+ # Code from module strncpy:
+ # Code from module strncpy-tests:
# Code from module strstr:
# Code from module strstr-simple:
# Code from module strstr-tests:
# Code from module symlink:
# Code from module symlink-tests:
- # Code from module sys_ioctl:
- # Code from module sys_ioctl-tests:
- # Code from module sys_select:
- # Code from module sys_select-tests:
- # Code from module sys_socket:
- # Code from module sys_socket-tests:
- # Code from module sys_stat:
- # Code from module sys_stat-tests:
- # Code from module sys_time:
- # Code from module sys_time-tests:
- # Code from module sys_types:
- # Code from module sys_types-tests:
- # Code from module sys_uio:
- # Code from module sys_uio-tests:
+ # Code from module sys_ioctl-h:
+ # Code from module sys_ioctl-h-tests:
+ # Code from module sys_select-h:
+ # Code from module sys_select-h-tests:
+ # Code from module sys_socket-h:
+ # Code from module sys_socket-h-tests:
+ # Code from module sys_stat-h:
+ # Code from module sys_stat-h-tests:
+ # Code from module sys_time-h:
+ # Code from module sys_time-h-tests:
+ # Code from module sys_types-h:
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ # Code from module sys_types-h-tests:
+ # Code from module sys_uio-h:
+ # Code from module sys_uio-h-tests:
# Code from module test-framework-sh:
# Code from module test-framework-sh-tests:
+ # Code from module test-xfail:
# Code from module thread:
# Code from module thread-optim:
# Code from module thread-tests:
# Code from module threadlib:
gl_THREADLIB_EARLY
# Code from module time:
+ # Code from module time-h:
+ # Code from module time-h-tests:
# Code from module time-tests:
+ # Code from module uchar-h:
+ # Code from module uchar-h-tests:
# Code from module unicase/base:
+ # Code from module unicase/base-tests:
# Code from module unicase/cased:
# Code from module unicase/cased-tests:
# Code from module unicase/empty-prefix-context:
@@ -458,6 +556,7 @@ AC_DEFUN([gl_EARLY],
# Code from module unicase/ulc-casecoll-tests:
# Code from module unicase/ulc-casexfrm:
# Code from module uniconv/base:
+ # Code from module uniconv/base-tests:
# Code from module uniconv/u16-conv-from-enc:
# Code from module uniconv/u16-conv-from-enc-tests:
# Code from module uniconv/u16-conv-to-enc:
@@ -489,6 +588,7 @@ AC_DEFUN([gl_EARLY],
# Code from module uniconv/u8-strconv-to-enc-tests:
# Code from module uniconv/u8-strconv-to-locale:
# Code from module unictype/base:
+ # Code from module unictype/base-tests:
# Code from module unictype/bidiclass-all:
# Code from module unictype/bidiclass-byname:
# Code from module unictype/bidiclass-byname-tests:
@@ -640,6 +740,13 @@ AC_DEFUN([gl_EARLY],
# Code from module unictype/decimal-digit-tests:
# Code from module unictype/digit:
# Code from module unictype/digit-tests:
+ # Code from module unictype/incb-all:
+ # Code from module unictype/incb-byname:
+ # Code from module unictype/incb-byname-tests:
+ # Code from module unictype/incb-name:
+ # Code from module unictype/incb-name-tests:
+ # Code from module unictype/incb-of:
+ # Code from module unictype/incb-of-tests:
# Code from module unictype/joininggroup-all:
# Code from module unictype/joininggroup-byname:
# Code from module unictype/joininggroup-byname-tests:
@@ -757,6 +864,10 @@ AC_DEFUN([gl_EARLY],
# Code from module unictype/property-hex-digit-tests:
# Code from module unictype/property-hyphen:
# Code from module unictype/property-hyphen-tests:
+ # Code from module unictype/property-id-compat-math-continue:
+ # Code from module unictype/property-id-compat-math-continue-tests:
+ # Code from module unictype/property-id-compat-math-start:
+ # Code from module unictype/property-id-compat-math-start-tests:
# Code from module unictype/property-id-continue:
# Code from module unictype/property-id-continue-tests:
# Code from module unictype/property-id-start:
@@ -767,6 +878,8 @@ AC_DEFUN([gl_EARLY],
# Code from module unictype/property-ids-binary-operator-tests:
# Code from module unictype/property-ids-trinary-operator:
# Code from module unictype/property-ids-trinary-operator-tests:
+ # Code from module unictype/property-ids-unary-operator:
+ # Code from module unictype/property-ids-unary-operator-tests:
# Code from module unictype/property-ignorable-control:
# Code from module unictype/property-ignorable-control-tests:
# Code from module unictype/property-iso-control:
@@ -783,6 +896,8 @@ AC_DEFUN([gl_EARLY],
# Code from module unictype/property-lowercase-tests:
# Code from module unictype/property-math:
# Code from module unictype/property-math-tests:
+ # Code from module unictype/property-modifier-combining-mark:
+ # Code from module unictype/property-modifier-combining-mark-tests:
# Code from module unictype/property-non-break:
# Code from module unictype/property-non-break-tests:
# Code from module unictype/property-not-a-character:
@@ -813,6 +928,8 @@ AC_DEFUN([gl_EARLY],
# Code from module unictype/property-pattern-syntax-tests:
# Code from module unictype/property-pattern-white-space:
# Code from module unictype/property-pattern-white-space-tests:
+ # Code from module unictype/property-prepended-concatenation-mark:
+ # Code from module unictype/property-prepended-concatenation-mark-tests:
# Code from module unictype/property-private-use:
# Code from module unictype/property-private-use-tests:
# Code from module unictype/property-punctuation:
@@ -863,6 +980,7 @@ AC_DEFUN([gl_EARLY],
# Code from module unictype/syntax-java-whitespace:
# Code from module unictype/syntax-java-whitespace-tests:
# Code from module unigbrk/base:
+ # Code from module unigbrk/base-tests:
# Code from module unigbrk/u16-grapheme-breaks:
# Code from module unigbrk/u16-grapheme-breaks-tests:
# Code from module unigbrk/u16-grapheme-next:
@@ -890,6 +1008,7 @@ AC_DEFUN([gl_EARLY],
# Code from module unigbrk/ulc-grapheme-breaks:
# Code from module unigbrk/ulc-grapheme-breaks-tests:
# Code from module unilbrk/base:
+ # Code from module unilbrk/base-tests:
# Code from module unilbrk/tables:
# Code from module unilbrk/u16-possible-linebreaks:
# Code from module unilbrk/u16-possible-linebreaks-tests:
@@ -908,10 +1027,16 @@ AC_DEFUN([gl_EARLY],
# Code from module unilbrk/ulc-possible-linebreaks-tests:
# Code from module unilbrk/ulc-width-linebreaks:
# Code from module unilbrk/ulc-width-linebreaks-tests:
+ # Code from module unimetadata/base:
+ # Code from module unimetadata/base-tests:
+ # Code from module unimetadata/u-version:
+ # Code from module unimetadata/u-version-tests:
# Code from module uniname/base:
+ # Code from module uniname/base-tests:
# Code from module uniname/uniname:
# Code from module uniname/uniname-tests:
# Code from module uninorm/base:
+ # Code from module uninorm/base-tests:
# Code from module uninorm/canonical-decomposition:
# Code from module uninorm/canonical-decomposition-tests:
# Code from module uninorm/compat-decomposition:
@@ -952,9 +1077,10 @@ AC_DEFUN([gl_EARLY],
# Code from module uninorm/u8-normcoll:
# Code from module uninorm/u8-normcoll-tests:
# Code from module uninorm/u8-normxfrm:
- # Code from module unistd:
- # Code from module unistd-tests:
+ # Code from module unistd-h:
+ # Code from module unistd-h-tests:
# Code from module unistdio/base:
+ # Code from module unistdio/base-tests:
# Code from module unistdio/u-printf-args:
# Code from module unistdio/u16-asnprintf:
# Code from module unistdio/u16-asnprintf-tests:
@@ -1039,6 +1165,7 @@ AC_DEFUN([gl_EARLY],
# Code from module unistdio/ulc-vsprintf:
# Code from module unistdio/ulc-vsprintf-tests:
# Code from module unistr/base:
+ # Code from module unistr/base-tests:
# Code from module unistr/u16-check:
# Code from module unistr/u16-check-tests:
# Code from module unistr/u16-chr:
@@ -1066,6 +1193,8 @@ AC_DEFUN([gl_EARLY],
# Code from module unistr/u16-move-tests:
# Code from module unistr/u16-next:
# Code from module unistr/u16-next-tests:
+ # Code from module unistr/u16-pcpy:
+ # Code from module unistr/u16-pcpy-tests:
# Code from module unistr/u16-prev:
# Code from module unistr/u16-prev-tests:
# Code from module unistr/u16-set:
@@ -1142,6 +1271,8 @@ AC_DEFUN([gl_EARLY],
# Code from module unistr/u32-move-tests:
# Code from module unistr/u32-next:
# Code from module unistr/u32-next-tests:
+ # Code from module unistr/u32-pcpy:
+ # Code from module unistr/u32-pcpy-tests:
# Code from module unistr/u32-prev:
# Code from module unistr/u32-prev-tests:
# Code from module unistr/u32-set:
@@ -1218,6 +1349,8 @@ AC_DEFUN([gl_EARLY],
# Code from module unistr/u8-move-tests:
# Code from module unistr/u8-next:
# Code from module unistr/u8-next-tests:
+ # Code from module unistr/u8-pcpy:
+ # Code from module unistr/u8-pcpy-tests:
# Code from module unistr/u8-prev:
# Code from module unistr/u8-prev-tests:
# Code from module unistr/u8-set:
@@ -1267,8 +1400,9 @@ AC_DEFUN([gl_EARLY],
# Code from module unistr/u8-to-u32-tests:
# Code from module unistr/u8-uctomb:
# Code from module unistr/u8-uctomb-tests:
- # Code from module unitypes:
+ # Code from module unitypes-h:
# Code from module uniwbrk/base:
+ # Code from module uniwbrk/base-tests:
# Code from module uniwbrk/table:
# Code from module uniwbrk/u16-wordbreaks:
# Code from module uniwbrk/u16-wordbreaks-tests:
@@ -1280,6 +1414,7 @@ AC_DEFUN([gl_EARLY],
# Code from module uniwbrk/ulc-wordbreaks-tests:
# Code from module uniwbrk/wordbreak-property:
# Code from module uniwidth/base:
+ # Code from module uniwidth/base-tests:
# Code from module uniwidth/u16-strwidth:
# Code from module uniwidth/u16-strwidth-tests:
# Code from module uniwidth/u16-width:
@@ -1301,8 +1436,8 @@ AC_DEFUN([gl_EARLY],
# Code from module vararrays:
# Code from module verify:
# Code from module verify-tests:
- # Code from module wchar:
- # Code from module wchar-tests:
+ # Code from module wchar-h:
+ # Code from module wchar-h-tests:
# Code from module wcrtomb:
# Code from module wcrtomb-tests:
# Code from module wctob:
@@ -1311,16 +1446,26 @@ AC_DEFUN([gl_EARLY],
# Code from module wctype-h-tests:
# Code from module wcwidth:
# Code from module wcwidth-tests:
+ # Code from module windows-cond:
# Code from module windows-mutex:
+ # Code from module windows-mutex-tests:
# Code from module windows-once:
# Code from module windows-recmutex:
+ # Code from module windows-recmutex-tests:
# Code from module windows-rwlock:
# Code from module windows-thread:
+ # Code from module windows-timedmutex:
+ # Code from module windows-timedmutex-tests:
+ # Code from module windows-timedrecmutex:
+ # Code from module windows-timedrecmutex-tests:
+ # Code from module windows-timedrwlock:
# Code from module windows-tls:
# Code from module xalloc:
# Code from module xalloc-die:
# Code from module xalloc-die-tests:
# Code from module xalloc-oversized:
+ # Code from module xconcat-filename:
+ # Code from module xgetcwd-lgpl:
# Code from module xsize:
# Code from module yield:
])
@@ -1350,17 +1495,122 @@ AC_DEFUN([gl_INIT],
gl_ASSERT_H
gl_CONDITIONAL_HEADER([assert.h])
AC_PROG_MKDIR_P
+ gl_C_BOOL
gl___BUILTIN_EXPECT
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32isalnum])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32isalpha])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32isblank])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32iscntrl])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32isdigit])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32isgraph])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32islower])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32isprint])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32ispunct])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32isspace])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32isupper])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32isxdigit])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32tolower])
+ AC_REQUIRE([gl_UCHAR_H])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how mbrtoc32 is implemented.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32width])
gl_HEADER_ERRNO_H
gl_CONDITIONAL_HEADER([errno.h])
AC_PROG_MKDIR_P
AC_REQUIRE([gl_EXTERN_INLINE])
+ gl_FCNTL_H
+ gl_FCNTL_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
AC_C_FLEXIBLE_ARRAY_MEMBER
gl_FLOAT_H
gl_CONDITIONAL_HEADER([float.h])
AC_PROG_MKDIR_P
- gl_CONDITIONAL([GL_COND_OBJ_FLOAT], [test $REPLACE_FLOAT_LDBL = 1])
+ gl_CONDITIONAL([GL_COND_OBJ_FLOAT],
+ [test $REPLACE_FLOAT_LDBL = 1 || test $REPLACE_FLOAT_SNAN = 1])
gl_CONDITIONAL([GL_COND_OBJ_ITOLD], [test $REPLACE_ITOLD = 1])
+ dnl Prerequisites of lib/float.c.
+ AC_REQUIRE([gl_BIGENDIAN])
gl_FUNC_FREE
gl_CONDITIONAL([GL_COND_OBJ_FREE], [test $REPLACE_FREE = 1])
AM_COND_IF([GL_COND_OBJ_FREE], [
@@ -1379,8 +1629,19 @@ AC_DEFUN([gl_INIT],
gl_MATH_MODULE_INDICATOR([frexpl])
gl_FUNC_FSETERR
gl_CONDITIONAL([GL_COND_OBJ_FSETERR], [test $ac_cv_func___fseterr = no])
+ gl_FUNC_GETLOCALENAME_L_UNSAFE
+ gl_PREREQ_GETLOCALENAME_L_UNSAFE
+ gl_LOCALE_MODULE_INDICATOR([getlocalename_l-unsafe])
+ gl_FUNC_GETLOCALENAME_L_UNSAFE
+ gl_PREREQ_GETLOCALENAME_L_UNSAFE
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_CONDITIONAL([GL_COND_OBJ_GETLOCALENAME_L_UNSAFE_LIMITED],
+ [case "$host_os" in openbsd* | aix* | *-android*) false;; *) true;; esac])
AC_REQUIRE([gl_FUNC_SETLOCALE_NULL])
- LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
+ HARD_LOCALE_LIB="$SETLOCALE_NULL_LIB"
+ AC_SUBST([HARD_LOCALE_LIB])
+ dnl For backward compatibility.
+ LIB_HARD_LOCALE="$HARD_LOCALE_LIB"
AC_SUBST([LIB_HARD_LOCALE])
AC_DEFUN([gl_HAVE_MODULE_HAVELIB])
AM_ICONV
@@ -1422,13 +1683,14 @@ AC_DEFUN([gl_INIT],
gl_CONDITIONAL([GL_COND_OBJ_ISWDIGIT],
[! { test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; } && test $REPLACE_ISWDIGIT = 1])
gl_WCTYPE_MODULE_INDICATOR([iswdigit])
+ gl_FUNC_ISWPUNCT
+ gl_CONDITIONAL([GL_COND_OBJ_ISWPUNCT],
+ [! { test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; } && test $REPLACE_ISWPUNCT = 1])
+ gl_WCTYPE_MODULE_INDICATOR([iswpunct])
gl_FUNC_ISWXDIGIT
gl_CONDITIONAL([GL_COND_OBJ_ISWXDIGIT],
[! { test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; } && test $REPLACE_ISWXDIGIT = 1])
gl_WCTYPE_MODULE_INDICATOR([iswxdigit])
- gl_LANGINFO_H
- gl_LANGINFO_H_REQUIRE_DEFAULTS
- AC_PROG_MKDIR_P
gl_LIMITS_H
gl_CONDITIONAL_HEADER([limits.h])
AC_PROG_MKDIR_P
@@ -1439,8 +1701,23 @@ AC_DEFUN([gl_INIT],
gl_LOCALE_H
gl_LOCALE_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
- gl_LOCALENAME
- gl_LOCALE_MODULE_INDICATOR([localename])
+ gl_FUNC_LOCALECONV
+ gl_CONDITIONAL([GL_COND_OBJ_LOCALECONV], [test $REPLACE_LOCALECONV = 1])
+ AM_COND_IF([GL_COND_OBJ_LOCALECONV], [
+ gl_PREREQ_LOCALECONV
+ ])
+ gl_LOCALE_MODULE_INDICATOR([localeconv])
+ gl_MODULE_INDICATOR([localeconv])
+ gl_LOCALENAME_ENVIRON
+ gl_LOCALE_MODULE_INDICATOR([localename-environ])
+ gl_LOCALENAME_UNSAFE
+ gl_LOCALE_MODULE_INDICATOR([localename-unsafe])
+ gl_MUSL_LIBC
+ gl_LOCALENAME_UNSAFE_LIMITED
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_CONDITIONAL([GL_COND_OBJ_LOCALENAME_UNSAFE_LIMITED],
+ [case "$host_os" in openbsd* | aix* | *-android*) false;; *) true;; esac])
+ gl_MUSL_LIBC
gl_LOCK
gl_MODULE_INDICATOR([lock])
AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
@@ -1454,6 +1731,18 @@ AC_DEFUN([gl_INIT],
AC_PROG_MKDIR_P
gl_MBCHAR
gl_MBITER
+ gl_FUNC_MBRTOC32
+ gl_CONDITIONAL([GL_COND_OBJ_MBRTOC32],
+ [test $HAVE_MBRTOC32 = 0 || test $REPLACE_MBRTOC32 = 1])
+ AM_COND_IF([GL_COND_OBJ_MBRTOC32], [
+ if test $REPLACE_MBSTATE_T = 1; then
+ AC_LIBOBJ([lc-charset-dispatch])
+ AC_LIBOBJ([mbtowc-lock])
+ gl_PREREQ_MBTOWC_LOCK
+ fi
+ gl_PREREQ_MBRTOC32
+ ])
+ gl_UCHAR_MODULE_INDICATOR([mbrtoc32])
gl_FUNC_MBRTOWC
gl_CONDITIONAL([GL_COND_OBJ_MBRTOWC],
[test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1])
@@ -1474,6 +1763,10 @@ AC_DEFUN([gl_INIT],
])
gl_WCHAR_MODULE_INDICATOR([mbsinit])
gl_STRING_MODULE_INDICATOR([mbsnlen])
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ gl_MUSL_LIBC
+ gl_WCHAR_MODULE_INDICATOR([mbszero])
gl_FUNC_MEMCHR
gl_CONDITIONAL([GL_COND_OBJ_MEMCHR], [test $REPLACE_MEMCHR = 1])
AM_COND_IF([GL_COND_OBJ_MEMCHR], [
@@ -1481,14 +1774,29 @@ AC_DEFUN([gl_INIT],
])
gl_STRING_MODULE_INDICATOR([memchr])
gl_MINMAX
+ # Conditionally invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS.
gl_MULTIARCH
+ gl_ONCE
gl_FUNC_PRINTF_FREXP
gl_FUNC_PRINTF_FREXPL
m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
+ gl_PTHREAD_H
+ gl_PTHREAD_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
+ gl_PTHREAD_ONCE
+ gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_ONCE],
+ [test $HAVE_PTHREAD_ONCE = 0 || test $REPLACE_PTHREAD_ONCE = 1])
+ gl_PTHREAD_MODULE_INDICATOR([pthread-once])
gl_RELOCATABLE_LIBRARY
if test $RELOCATABLE = yes; then
AC_LIBOBJ([relocatable])
fi
+ gl_SCHED_H
+ gl_SCHED_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_CONDITIONAL([GL_COND_OBJ_SETLOCALE_FIXES],
+ [case "$host_os" in mingw* | windows* | *-android*) true;; *) false;; esac])
gl_FUNC_SETLOCALE_NULL
gl_CONDITIONAL([GL_COND_OBJ_SETLOCALE_LOCK],
[test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0])
@@ -1498,16 +1806,10 @@ AC_DEFUN([gl_INIT],
gl_LOCALE_MODULE_INDICATOR([setlocale_null])
gl_SIGNBIT
gl_CONDITIONAL([GL_COND_OBJ_SIGNBIT3], [test $REPLACE_SIGNBIT = 1])
- gl_MATH_MODULE_INDICATOR([signbit])
+ gl_MATH_MODULE_INDICATOR([signbit-no-cxx])
gl_SIZE_MAX
gt_TYPE_SSIZE_T
- gl_C_BOOL
- AC_CHECK_HEADERS_ONCE([stdckdint.h])
- if test $ac_cv_header_stdckdint_h = yes; then
- GL_GENERATE_STDCKDINT_H=false
- else
- GL_GENERATE_STDCKDINT_H=true
- fi
+ gl_STDCKDINT_H
gl_CONDITIONAL_HEADER([stdckdint.h])
AC_PROG_MKDIR_P
gl_STDDEF_H
@@ -1529,12 +1831,21 @@ 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_FUNC_STRNCAT
gl_CONDITIONAL([GL_COND_OBJ_STRNCAT], [test $REPLACE_STRNCAT = 1])
AM_COND_IF([GL_COND_OBJ_STRNCAT], [
gl_PREREQ_STRNCAT
])
gl_STRING_MODULE_INDICATOR([strncat])
+ gl_FUNC_STRNCPY
+ gl_CONDITIONAL([GL_COND_OBJ_STRNCPY], [test $REPLACE_STRNCPY = 1])
+ AM_COND_IF([GL_COND_OBJ_STRNCPY], [
+ gl_PREREQ_STRNCPY
+ ])
+ gl_STRING_MODULE_INDICATOR([strncpy])
gl_FUNC_STRSTR
if test $REPLACE_STRSTR = 1; then
AC_LIBOBJ([strstr])
@@ -1547,76 +1858,132 @@ AC_DEFUN([gl_INIT],
gl_SYS_TYPES_H
gl_SYS_TYPES_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
+ gl_MUSL_LIBC
+ gl_CONDITIONAL([LIBC_IS_GNU],
+ [case "$host_os" in *-gnu* | gnu*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([LIBC_IS_MUSL],
+ [case "$host_os" in *-musl* | midipix*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_MACOS],
+ [case "$host_os" in darwin*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_MACOS11],
+ [case "$host_os" in darwin20.*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_MACOS12],
+ [case "$host_os" in darwin21.*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_MACOS13],
+ [case "$host_os" in darwin22.*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_MACOS14],
+ [case "$host_os" in darwin23.*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_FREEBSD],
+ [case "$host_os" in freebsd* | dragonfly*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_NETBSD],
+ [case "$host_os" in netbsd*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_OPENBSD],
+ [case "$host_os" in openbsd*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_AIX],
+ [case "$host_os" in aix*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_SOLARIS11],
+ [case "$host_os" in solaris2.11*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_CYGWIN],
+ [case "$host_os" in cygwin*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_NATIVE_WINDOWS],
+ [case "$host_os" in mingw* | windows*) true ;; *) false ;; esac])
+ is_mingw=false; is_msvc=false
+ case "$host_os" in
+ windows*-msvc*) is_msvc=true ;;
+ mingw* | windows*)
+ AC_EGREP_CPP([Special], [
+ #ifdef _MSC_VER
+ Special
+ #endif
+ ], [is_msvc=true], [is_mingw=true])
+ ;;
+ esac
+ gl_CONDITIONAL([PLATFORM_IS_MINGW], [$is_mingw])
+ gl_CONDITIONAL([PLATFORM_IS_MSVC], [$is_msvc])
+ gl_CONDITIONAL([OS_IS_HAIKU],
+ [case "$host_os" in haiku*) true ;; *) false ;; esac])
+ gl_CONDITIONAL([OS_IS_ANDROID],
+ [case "$host_os" in linux-androideabi*) true ;; *) false ;; esac])
AC_CHECK_HEADERS([sys/single_threaded.h])
AC_REQUIRE([gl_THREADLIB])
- gl_LIBUNISTRING_LIBHEADER([0.9.11], [unicase.h])
+ gl_TIME_H
+ gl_TIME_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
+ gl_UCHAR_H
+ gl_UCHAR_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
+ gl_LIBUNISTRING_LIBHEADER([1.2], [unicase.h])
+ gl_UNICASE_H
+ gl_UNICASE_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unicase/empty-prefix-context])
- gl_LIBUNISTRING_MODULE([0.9.11], [unicase/empty-suffix-context])
+ gl_UNICASE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([0.9.11], [unicase/empty-prefix-context])
+ gl_UNICASE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([0.9.11], [unicase/empty-suffix-context])
AC_REQUIRE([AC_C_INLINE])
gl_LIBUNISTRING_MODULE([0.9.3], [unicase/locale-language])
AC_PROG_MKDIR_P
- gl_LIBUNISTRING_MODULE([0.9.11], [unicase/tolower])
- gl_LIBUNISTRING_MODULE([0.9.11], [unicase/totitle])
- gl_LIBUNISTRING_MODULE([0.9.11], [unicase/toupper])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-casecmp])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-casecoll])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-casefold])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-casexfrm])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-ct-casefold])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-ct-tolower])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-ct-totitle])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-ct-toupper])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-is-cased])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-is-casefolded])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-is-lowercase])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-is-titlecase])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-is-uppercase])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-prefix-context])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-suffix-context])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-tolower])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-totitle])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u16-toupper])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-casecmp])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-casecoll])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-casefold])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-casexfrm])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-ct-casefold])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-ct-tolower])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-ct-totitle])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-ct-toupper])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-is-cased])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-is-casefolded])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-is-lowercase])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-is-titlecase])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-is-uppercase])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-prefix-context])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-suffix-context])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-tolower])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-totitle])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u32-toupper])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-casecmp])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-casecoll])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-casefold])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-casexfrm])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-ct-casefold])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-ct-tolower])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-ct-totitle])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-ct-toupper])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-is-cased])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-is-casefolded])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-is-lowercase])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-is-titlecase])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-is-uppercase])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-prefix-context])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-suffix-context])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-tolower])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-totitle])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/u8-toupper])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/ulc-casecmp])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/ulc-casecoll])
- gl_LIBUNISTRING_MODULE([1.1], [unicase/ulc-casexfrm])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/tolower])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/totitle])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/toupper])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-casecmp])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-casecoll])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-casefold])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-casexfrm])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-ct-casefold])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-ct-tolower])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-ct-totitle])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-ct-toupper])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-is-cased])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-is-casefolded])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-is-lowercase])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-is-titlecase])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-is-uppercase])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-prefix-context])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-suffix-context])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-tolower])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-totitle])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u16-toupper])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-casecmp])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-casecoll])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-casefold])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-casexfrm])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-ct-casefold])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-ct-tolower])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-ct-totitle])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-ct-toupper])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-is-cased])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-is-casefolded])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-is-lowercase])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-is-titlecase])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-is-uppercase])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-prefix-context])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-suffix-context])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-tolower])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-totitle])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u32-toupper])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-casecmp])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-casecoll])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-casefold])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-casexfrm])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-ct-casefold])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-ct-tolower])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-ct-totitle])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-ct-toupper])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-is-cased])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-is-casefolded])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-is-lowercase])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-is-titlecase])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-is-uppercase])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-prefix-context])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-suffix-context])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-tolower])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-totitle])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/u8-toupper])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/ulc-casecmp])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/ulc-casecoll])
+ gl_LIBUNISTRING_MODULE([1.4], [unicase/ulc-casexfrm])
gl_LIBUNISTRING_LIBHEADER([0.9.11], [uniconv.h])
AC_PROG_MKDIR_P
AC_REQUIRE([gl_BIGENDIAN])
@@ -1640,441 +2007,605 @@ AC_DEFUN([gl_INIT],
gl_LIBUNISTRING_MODULE([0.9], [uniconv/u8-strconv-from-locale])
gl_LIBUNISTRING_MODULE([0.9], [uniconv/u8-strconv-to-enc])
gl_LIBUNISTRING_MODULE([0.9], [uniconv/u8-strconv-to-locale])
- gl_LIBUNISTRING_LIBHEADER([0.9.11], [unictype.h])
+ gl_LIBUNISTRING_LIBHEADER([1.3], [unictype.h])
+ gl_UNICTYPE_H
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/bidiclass-byname])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/bidiclass-longname])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/bidiclass-name])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/bidiclass-of])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/bidiclass-test])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/block-list])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/block-test])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-C])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Cc])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-Cf])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-Cn])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Co])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Cs])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-L])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-LC])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-Ll])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-Lm])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-Lo])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Lt])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/category-Lu])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-M])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-Mc])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Me])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-Mn])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-N])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-Nd])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Nl])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-No])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-P])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Pc])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/category-Pd])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/category-Pe])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Pf])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Pi])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-Po])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/category-Ps])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-S])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/category-Sc])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/category-Sk])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Sm])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-So])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Z])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Zl])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Zp])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-Zs])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-and])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-and-not])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-byname])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-longname])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-name])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-none])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/bidiclass-byname])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/bidiclass-longname])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/bidiclass-name])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/bidiclass-of])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/bidiclass-test])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/block-list])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/block-test])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-C])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Cc])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Cf])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Cn])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Co])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Cs])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-L])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-LC])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Ll])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Lm])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Lo])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Lt])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Lu])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-M])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Mc])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Me])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Mn])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-N])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Nd])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Nl])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-No])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-P])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Pc])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Pd])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Pe])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Pf])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Pi])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Po])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Ps])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-S])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Sc])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Sk])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Sm])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-So])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Z])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Zl])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Zp])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/category-Zs])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/category-and])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/category-and-not])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/category-byname])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/category-longname])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/category-name])
+ dnl Since _UC_CATEGORY_NONE is not exported from an installed libunistring,
+ dnl don't use gl_LIBUNISTRING_MODULE here.
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/category-of])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/category-or])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/category-test])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/combining-class])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/combining-class-byname])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/combining-class-longname])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/combining-class-name])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-alnum])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-alpha])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-blank])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-of])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/category-or])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-cntrl])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/category-test])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/combining-class])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/combining-class-byname])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/combining-class-longname])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/combining-class-name])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-digit])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-alnum])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-graph])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-alpha])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-lower])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-blank])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-print])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-cntrl])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-punct])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-digit])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-space])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-graph])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-upper])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/ctype-lower])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/ctype-xdigit])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/decimal-digit])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/digit])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/incb-byname])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/incb-name])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/incb-of])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/joininggroup-byname])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/joininggroup-name])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/joininggroup-of])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/joiningtype-byname])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/joiningtype-longname])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/joiningtype-name])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/joiningtype-of])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/mirror])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/numeric])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-print])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-alphabetic])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-punct])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-ascii-hex-digit])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-space])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-arabic-digit])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/ctype-upper])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-arabic-right-to-left])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-xdigit])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/decimal-digit])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/digit])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/joininggroup-byname])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/joininggroup-name])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/joininggroup-of])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/joiningtype-byname])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/joiningtype-longname])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/joiningtype-name])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/joiningtype-of])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/mirror])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/numeric])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-block-separator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-alphabetic])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-boundary-neutral])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-ascii-hex-digit])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-common-separator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-arabic-digit])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-control])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-arabic-right-to-left])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-embedding-or-override])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-block-separator])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-eur-num-separator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-boundary-neutral])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-eur-num-terminator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-common-separator])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-european-digit])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-control])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-hebrew-right-to-left])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-embedding-or-override])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-left-to-right])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-eur-num-separator])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-non-spacing-mark])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-eur-num-terminator])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-other-neutral])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-european-digit])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-pdf])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-hebrew-right-to-left])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-segment-separator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-left-to-right])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-bidi-whitespace])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/property-byname])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-non-spacing-mark])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-case-ignorable])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-other-neutral])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-cased])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-pdf])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-changes-when-casefolded])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-segment-separator])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-changes-when-casemapped])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-bidi-whitespace])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-byname])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-changes-when-lowercased])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-case-ignorable])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-changes-when-titlecased])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-cased])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-changes-when-uppercased])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-changes-when-casefolded])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-combining])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-changes-when-casemapped])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-composite])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-changes-when-lowercased])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-currency-symbol])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-changes-when-titlecased])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-dash])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-changes-when-uppercased])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-decimal-digit])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-combining])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-default-ignorable-code-point])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-composite])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-deprecated])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-currency-symbol])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-diacritic])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-dash])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-emoji])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-decimal-digit])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-emoji-component])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-default-ignorable-code-point])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-emoji-modifier])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-deprecated])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-emoji-modifier-base])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-diacritic])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-emoji-presentation])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-emoji])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-extended-pictographic])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-emoji-component])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-extender])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-emoji-modifier])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-format-control])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-emoji-modifier-base])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-grapheme-base])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-emoji-presentation])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-grapheme-extend])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-extended-pictographic])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-grapheme-link])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-extender])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-hex-digit])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-format-control])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-hyphen])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-grapheme-base])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-id-compat-math-continue])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-grapheme-extend])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-id-compat-math-start])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-grapheme-link])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-id-continue])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-hex-digit])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-id-start])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-hyphen])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-ideographic])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-id-continue])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-ids-binary-operator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-id-start])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-ids-trinary-operator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-ideographic])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-ids-unary-operator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-ids-binary-operator])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-ignorable-control])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-ids-trinary-operator])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-iso-control])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-ignorable-control])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-join-control])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-iso-control])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-left-of-pair])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-join-control])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-line-separator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-left-of-pair])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-logical-order-exception])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-line-separator])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-lowercase])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-logical-order-exception])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-math])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-lowercase])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-modifier-combining-mark])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-math])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-non-break])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-non-break])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-not-a-character])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-not-a-character])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-numeric])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-numeric])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-other-alphabetic])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-other-alphabetic])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-other-default-ignorable-code-point])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-other-default-ignorable-code-point])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-other-grapheme-extend])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-other-grapheme-extend])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-other-id-continue])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-other-id-continue])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-other-id-start])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-other-id-start])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-other-lowercase])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-other-lowercase])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-other-math])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-other-math])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-other-uppercase])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-other-uppercase])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-paired-punctuation])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-paired-punctuation])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-paragraph-separator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-paragraph-separator])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-pattern-syntax])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-pattern-syntax])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-pattern-white-space])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-pattern-white-space])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-prepended-concatenation-mark])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-private-use])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-private-use])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-punctuation])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-punctuation])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-quotation-mark])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-quotation-mark])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-radical])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-radical])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-regional-indicator])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-regional-indicator])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-sentence-terminal])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-sentence-terminal])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-soft-dotted])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-soft-dotted])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-space])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-space])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-terminal-punctuation])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-test])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-terminal-punctuation])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/property-test])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-titlecase])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-titlecase])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-unassigned-code-value])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-unassigned-code-value])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-unified-ideograph])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-unified-ideograph])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-uppercase])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-uppercase])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.11], [unictype/property-variation-selector])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-variation-selector])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/property-white-space])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-white-space])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-xid-continue])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-xid-continue])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-xid-start])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-xid-start])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/property-zero-width])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/scripts])
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unictype/property-zero-width])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/scripts])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/syntax-c-ident])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/syntax-c-whitespace])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/syntax-c-ident])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/syntax-c-whitespace])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/syntax-java-ident])
- gl_LIBUNISTRING_MODULE([0.9.8], [unictype/syntax-java-whitespace])
- gl_LIBUNISTRING_LIBHEADER([0.9.11], [unigbrk.h])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/syntax-java-ident])
+ gl_LIBUNISTRING_MODULE([1.4], [unictype/syntax-java-whitespace])
+ gl_LIBUNISTRING_LIBHEADER([1.2], [unigbrk.h])
AC_PROG_MKDIR_P
gl_MODULE_INDICATOR([unigbrk/u16-grapheme-breaks])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/u16-grapheme-breaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/u16-grapheme-breaks])
gl_MODULE_INDICATOR([unigbrk/u16-grapheme-next])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/u16-grapheme-next])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/u16-grapheme-next])
gl_MODULE_INDICATOR([unigbrk/u16-grapheme-prev])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/u16-grapheme-prev])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/u16-grapheme-prev])
gl_MODULE_INDICATOR([unigbrk/u32-grapheme-breaks])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/u32-grapheme-breaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/u32-grapheme-breaks])
gl_MODULE_INDICATOR([unigbrk/u32-grapheme-next])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/u32-grapheme-next])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/u32-grapheme-next])
gl_MODULE_INDICATOR([unigbrk/u32-grapheme-prev])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/u32-grapheme-prev])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/u32-grapheme-prev])
gl_MODULE_INDICATOR([unigbrk/u8-grapheme-breaks])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/u8-grapheme-breaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/u8-grapheme-breaks])
gl_MODULE_INDICATOR([unigbrk/u8-grapheme-next])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/u8-grapheme-next])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/u8-grapheme-next])
gl_MODULE_INDICATOR([unigbrk/u8-grapheme-prev])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/u8-grapheme-prev])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/uc-gbrk-prop])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/u8-grapheme-prev])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/uc-gbrk-prop])
gl_MODULE_INDICATOR([unigbrk/uc-grapheme-breaks])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/uc-grapheme-breaks])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/uc-is-grapheme-break])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/uc-grapheme-breaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/uc-is-grapheme-break])
gl_MODULE_INDICATOR([unigbrk/ulc-grapheme-breaks])
- gl_LIBUNISTRING_MODULE([1.1], [unigbrk/ulc-grapheme-breaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unigbrk/ulc-grapheme-breaks])
gl_LIBUNISTRING_LIBHEADER([0.9.11], [unilbrk.h])
AC_PROG_MKDIR_P
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unilbrk/u16-possible-linebreaks])
- gl_LIBUNISTRING_MODULE([1.1], [unilbrk/u16-width-linebreaks])
- gl_LIBUNISTRING_MODULE([1.1], [unilbrk/u32-possible-linebreaks])
- gl_LIBUNISTRING_MODULE([1.1], [unilbrk/u32-width-linebreaks])
- gl_LIBUNISTRING_MODULE([1.1], [unilbrk/u8-possible-linebreaks])
- gl_LIBUNISTRING_MODULE([1.1], [unilbrk/u8-width-linebreaks])
- gl_LIBUNISTRING_MODULE([1.1], [unilbrk/ulc-possible-linebreaks])
- gl_LIBUNISTRING_MODULE([1.1], [unilbrk/ulc-width-linebreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unilbrk/u16-possible-linebreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unilbrk/u16-width-linebreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unilbrk/u32-possible-linebreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unilbrk/u32-width-linebreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unilbrk/u8-possible-linebreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unilbrk/u8-width-linebreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unilbrk/ulc-possible-linebreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [unilbrk/ulc-width-linebreaks])
+ gl_LIBUNISTRING_LIBHEADER([1.2], [unimetadata.h])
+ gl_UNIMETADATA_H
+ gl_UNIMETADATA_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
+ gl_UNIMETADATA_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [unimetadata/u-version])
gl_LIBUNISTRING_LIBHEADER([0.9.5], [uniname.h])
AC_PROG_MKDIR_P
- gl_LIBUNISTRING_MODULE([1.1], [uniname/uniname])
- gl_LIBUNISTRING_LIBHEADER([0.9.11], [uninorm.h])
+ gl_LIBUNISTRING_MODULE([1.4], [uniname/uniname])
+ gl_LIBUNISTRING_LIBHEADER([1.2], [uninorm.h])
+ gl_UNINORM_H
+ gl_UNINORM_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/canonical-decomposition])
- gl_LIBUNISTRING_MODULE([0.9.11], [uninorm/composition])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/canonical-decomposition])
+ gl_LIBUNISTRING_MODULE([1.3], [uninorm/composition])
gl_LIBUNISTRING_MODULE([0.9.11], [uninorm/decomposing-form])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/decomposition])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/decomposition])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/filter])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/nfc])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/nfd])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/nfkc])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/nfkd])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/filter])
+ gl_UNINORM_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [uninorm/nfc])
+ gl_UNINORM_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [uninorm/nfd])
+ gl_UNINORM_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [uninorm/nfkc])
+ gl_UNINORM_H_REQUIRE_DEFAULTS
+ gl_LIBUNISTRING_MODULE_WITH_VARIABLE([1.4], [uninorm/nfkd])
gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u16-normalize])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u16-normalize])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u16-normcmp])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u16-normcoll])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u16-normxfrm])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u16-normalize])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u16-normcmp])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u16-normcoll])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u16-normxfrm])
gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u32-normalize])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u32-normalize])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u32-normcmp])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u32-normcoll])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u32-normxfrm])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u32-normalize])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u32-normcmp])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u32-normcoll])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u32-normxfrm])
gl_MODULE_INDICATOR_FOR_TESTS([uninorm/u8-normalize])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u8-normalize])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u8-normcmp])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u8-normcoll])
- gl_LIBUNISTRING_MODULE([1.1], [uninorm/u8-normxfrm])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u8-normalize])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u8-normcmp])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u8-normcoll])
+ gl_LIBUNISTRING_MODULE([1.4], [uninorm/u8-normxfrm])
gl_UNISTD_H
gl_UNISTD_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
gl_LIBUNISTRING_LIBHEADER([0.9.11], [unistdio.h])
AC_PROG_MKDIR_P
gl_PREREQ_PRINTF_ARGS
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-asnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-asprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-asnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-asprintf])
gl_PREREQ_PRINTF_PARSE
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-snprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-sprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-u16-asnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-u16-asprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-u16-snprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-u16-sprintf])
- gl_PREREQ_VASNPRINTF_WITH_EXTRAS
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-u16-vasnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-u16-vasprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-u16-vsnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-u16-vsprintf])
- gl_PREREQ_VASNPRINTF_WITH_EXTRAS
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-vasnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-vasprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-vsnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u16-vsprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-asnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-asprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-snprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-sprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-u16-asnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-u16-asprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-u16-snprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-u16-sprintf])
+ gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-u16-vasnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-u16-vasprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-u16-vsnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-u16-vsprintf])
+ gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-vasnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-vasprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-vsnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u16-vsprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-asnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-asprintf])
gl_PREREQ_PRINTF_PARSE
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-snprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-sprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-u32-asnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-u32-asprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-u32-snprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-u32-sprintf])
- gl_PREREQ_VASNPRINTF_WITH_EXTRAS
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-u32-vasnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-u32-vasprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-u32-vsnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-u32-vsprintf])
- gl_PREREQ_VASNPRINTF_WITH_EXTRAS
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-vasnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-vasprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-vsnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u32-vsprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-asnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-asprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-snprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-sprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-u32-asnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-u32-asprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-u32-snprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-u32-sprintf])
+ gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-u32-vasnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-u32-vasprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-u32-vsnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-u32-vsprintf])
+ gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-vasnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-vasprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-vsnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u32-vsprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-asnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-asprintf])
gl_PREREQ_PRINTF_PARSE
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-snprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-sprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-u8-asnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-u8-asprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-u8-snprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-u8-sprintf])
- gl_PREREQ_VASNPRINTF_WITH_EXTRAS
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-u8-vasnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-u8-vasprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-u8-vsnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-u8-vsprintf])
- gl_PREREQ_VASNPRINTF_WITH_EXTRAS
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-vasnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-vasprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-vsnprintf])
- gl_LIBUNISTRING_MODULE([0.9], [unistdio/u8-vsprintf])
- gl_LIBUNISTRING_MODULE([0.9.11], [unistdio/ulc-asnprintf])
- gl_LIBUNISTRING_MODULE([0.9.11], [unistdio/ulc-asprintf])
- gl_LIBUNISTRING_MODULE([0.9.11], [unistdio/ulc-fprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-snprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-sprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-u8-asnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-u8-asprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-u8-snprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-u8-sprintf])
+ gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-u8-vasnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-u8-vasprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-u8-vsnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-u8-vsprintf])
+ gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-vasnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-vasprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-vsnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.2]), [unistdio/u8-vsprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.4]), [unistdio/ulc-asnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.4]), [unistdio/ulc-asprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.4]), [unistdio/ulc-fprintf])
gl_PREREQ_PRINTF_PARSE
- gl_LIBUNISTRING_MODULE([0.9.11], [unistdio/ulc-snprintf])
- gl_LIBUNISTRING_MODULE([0.9.11], [unistdio/ulc-sprintf])
- gl_PREREQ_VASNPRINTF_WITH_EXTRAS
- gl_LIBUNISTRING_MODULE([0.9.11], [unistdio/ulc-vasnprintf])
- gl_LIBUNISTRING_MODULE([0.9.11], [unistdio/ulc-vasprintf])
- gl_LIBUNISTRING_MODULE([0.9.11], [unistdio/ulc-vfprintf])
- gl_LIBUNISTRING_MODULE([0.9.11], [unistdio/ulc-vsnprintf])
- gl_LIBUNISTRING_MODULE([0.9.11], [unistdio/ulc-vsprintf])
- gl_LIBUNISTRING_LIBHEADER([0.9.11], [unistr.h])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.4]), [unistdio/ulc-snprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.4]), [unistdio/ulc-sprintf])
+ gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.4]), [unistdio/ulc-vasnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.4]), [unistdio/ulc-vasprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.4]), [unistdio/ulc-vfprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.4]), [unistdio/ulc-vsnprintf])
+ gl_LIBUNISTRING_MODULE(m4_ifdef([gl_PRINTF_SUPPORT_N_DIRECTIVE],[999.9],[1.4]), [unistdio/ulc-vsprintf])
+ gl_LIBUNISTRING_LIBHEADER([1.2], [unistr.h])
AC_PROG_MKDIR_P
gl_LIBUNISTRING_MODULE([0.9], [unistr/u16-check])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u16-chr])
@@ -2093,6 +2624,7 @@ AC_DEFUN([gl_INIT],
gl_LIBUNISTRING_MODULE([0.9], [unistr/u16-mbtoucr])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u16-move])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u16-next])
+ gl_LIBUNISTRING_MODULE([1.2], [unistr/u16-pcpy])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u16-prev])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u16-set])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u16-startswith])
@@ -2138,6 +2670,7 @@ AC_DEFUN([gl_INIT],
gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-mbtoucr])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-move])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-next])
+ gl_LIBUNISTRING_MODULE([1.2], [unistr/u32-pcpy])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-prev])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-set])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-startswith])
@@ -2174,19 +2707,20 @@ AC_DEFUN([gl_INIT],
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-cpy-alloc])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-endswith])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-mblen])
- gl_LIBUNISTRING_MODULE([0.9.4], [unistr/u8-mbsnlen])
+ gl_LIBUNISTRING_MODULE([1.2], [unistr/u8-mbsnlen])
gl_MODULE_INDICATOR([unistr/u8-mbtouc])
- gl_LIBUNISTRING_MODULE([0.9.4], [unistr/u8-mbtouc])
+ gl_LIBUNISTRING_MODULE([1.2], [unistr/u8-mbtouc])
gl_MODULE_INDICATOR([unistr/u8-mbtouc-unsafe])
gl_LIBUNISTRING_MODULE([0.9.4], [unistr/u8-mbtouc-unsafe])
gl_MODULE_INDICATOR([unistr/u8-mbtoucr])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-mbtoucr])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-move])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-next])
+ gl_LIBUNISTRING_MODULE([1.2], [unistr/u8-pcpy])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-prev])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-set])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-startswith])
- AC_CHECK_FUNCS_ONCE([stpcpy])
+ gl_CHECK_FUNCS_ANDROID([stpcpy], [[#include <string.h>]])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-stpcpy])
gl_LIBUNISTRING_MODULE([0.9.3], [unistr/u8-stpncpy])
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-strcat])
@@ -2215,37 +2749,23 @@ AC_DEFUN([gl_INIT],
gl_LIBUNISTRING_MODULE([0.9], [unistr/u8-uctomb])
gl_LIBUNISTRING_LIBHEADER([0.9.11], [unitypes.h])
AC_PROG_MKDIR_P
- AH_VERBATIM([unitypes_restrict], [
- /* This definition is a duplicate of the one in unitypes.h.
- It is here so that we can cope with an older version of unitypes.h
- that does not contain this definition and that is pre-installed among
- the public header files. */
- # if defined __restrict \
- || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
- || __clang_major__ >= 3
- # define _UC_RESTRICT __restrict
- # elif 199901L <= __STDC_VERSION__ || defined restrict
- # define _UC_RESTRICT restrict
- # else
- # define _UC_RESTRICT
- # endif
- ])
+ gl_UNITYPES_H
gl_LIBUNISTRING_LIBHEADER([0.9.11], [uniwbrk.h])
AC_PROG_MKDIR_P
- gl_LIBUNISTRING_MODULE([1.1], [uniwbrk/u16-wordbreaks])
- gl_LIBUNISTRING_MODULE([1.1], [uniwbrk/u32-wordbreaks])
- gl_LIBUNISTRING_MODULE([1.1], [uniwbrk/u8-wordbreaks])
- gl_LIBUNISTRING_MODULE([1.1], [uniwbrk/ulc-wordbreaks])
- gl_LIBUNISTRING_MODULE([1.1], [uniwbrk/wordbreak-property])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwbrk/u16-wordbreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwbrk/u32-wordbreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwbrk/u8-wordbreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwbrk/ulc-wordbreaks])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwbrk/wordbreak-property])
gl_LIBUNISTRING_LIBHEADER([0.9.11], [uniwidth.h])
AC_PROG_MKDIR_P
- gl_LIBUNISTRING_MODULE([1.1], [uniwidth/u16-strwidth])
- gl_LIBUNISTRING_MODULE([1.1], [uniwidth/u16-width])
- gl_LIBUNISTRING_MODULE([1.1], [uniwidth/u32-strwidth])
- gl_LIBUNISTRING_MODULE([1.1], [uniwidth/u32-width])
- gl_LIBUNISTRING_MODULE([1.1], [uniwidth/u8-strwidth])
- gl_LIBUNISTRING_MODULE([1.1], [uniwidth/u8-width])
- gl_LIBUNISTRING_MODULE([1.1], [uniwidth/width])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwidth/u16-strwidth])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwidth/u16-width])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwidth/u32-strwidth])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwidth/u32-width])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwidth/u8-strwidth])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwidth/u8-width])
+ gl_LIBUNISTRING_MODULE([1.4], [uniwidth/width])
gl_WCHAR_H
gl_WCHAR_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
@@ -2261,16 +2781,16 @@ AC_DEFUN([gl_INIT],
gl_WCHAR_MODULE_INDICATOR([wcwidth])
AC_REQUIRE([AC_CANONICAL_HOST])
gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_MUTEX],
- [case "$host_os" in mingw*) true;; *) false;; esac])
+ [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
AC_REQUIRE([AC_CANONICAL_HOST])
gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_ONCE],
- [case "$host_os" in mingw*) true;; *) false;; esac])
+ [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
AC_REQUIRE([AC_CANONICAL_HOST])
gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_RECMUTEX],
- [case "$host_os" in mingw*) true;; *) false;; esac])
+ [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
AC_REQUIRE([AC_CANONICAL_HOST])
gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_RWLOCK],
- [case "$host_os" in mingw*) true;; *) false;; esac])
+ [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
gl_XSIZE
# End of code from modules
m4_ifval(gl_LIBSOURCES_LIST, [
@@ -2295,27 +2815,35 @@ AC_DEFUN([gl_INIT],
gl_libobjs=
gl_ltlibobjs=
gl_libobjdeps=
+ gl_libunistring_libobjs=
+ gl_libunistring_ltlibobjs=
+ gl_libunistring_libobjdeps=
if test -n "$gl_LIBOBJS"; then
# Remove the extension.
changequote(,)dnl
sed_drop_objext='s/\.o$//;s/\.obj$//'
sed_dirname1='s,//*,/,g'
sed_dirname2='s,\(.\)/$,\1,'
- sed_dirname3='s,^[^/]*$,.,'
- sed_dirname4='s,\(.\)/[^/]*$,\1,'
+ sed_dirname3='s,[^/]*$,,'
sed_basename1='s,.*/,,'
changequote([, ])dnl
for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
gl_libobjs="$gl_libobjs $i.$ac_objext"
gl_ltlibobjs="$gl_ltlibobjs $i.lo"
- i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
+ i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3"`
i_base=`echo "$i" | sed -e "$sed_basename1"`
- gl_libobjdeps="$gl_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Plo"
+ gl_libunistring_libobjs="$gl_libunistring_libobjs $i_dir""libunistring_a-$i_base.$ac_objext"
+ gl_libunistring_ltlibobjs="$gl_libunistring_ltlibobjs $i_dir""libunistring_la-$i_base.lo"
+ gl_libobjdeps="$gl_libobjdeps $i_dir\$(DEPDIR)/$i_base.Plo"
+ gl_libunistring_libobjdeps="$gl_libunistring_libobjdeps $i_dir\$(DEPDIR)/libunistring_la-$i_base.Plo"
done
fi
AC_SUBST([gl_LIBOBJS], [$gl_libobjs])
AC_SUBST([gl_LTLIBOBJS], [$gl_ltlibobjs])
AC_SUBST([gl_LIBOBJDEPS], [$gl_libobjdeps])
+ AC_SUBST([gl_libunistring_LIBOBJS], [$gl_libunistring_libobjs])
+ AC_SUBST([gl_libunistring_LTLIBOBJS], [$gl_libunistring_ltlibobjs])
+ AC_SUBST([gl_libunistring_LIBOBJDEPS], [$gl_libunistring_libobjdeps])
])
gltests_libdeps=
gltests_ltlibdeps=
@@ -2340,12 +2868,19 @@ changequote([, ])dnl
AC_REQUIRE([gl_SYS_SOCKET_H])
gl_CONDITIONAL([GL_COND_OBJ_ACCEPT], [test "$ac_cv_header_winsock2_h" = yes])
gl_SYS_SOCKET_MODULE_INDICATOR([accept])
+ gl_MODULE_INDICATOR([accept])
+ gl_ALIGNASOF
gl_ARPA_INET_H
gl_ARPA_INET_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
AC_REQUIRE([gl_SYS_SOCKET_H])
gl_CONDITIONAL([GL_COND_OBJ_BIND], [test "$ac_cv_header_winsock2_h" = yes])
gl_SYS_SOCKET_MODULE_INDICATOR([bind])
+ gl_MODULE_INDICATOR([bind])
+ gl_UCHAR_MODULE_INDICATOR([btoc32])
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
gl_FUNC_BTOWC
gl_CONDITIONAL([GL_COND_OBJ_BTOWC],
[test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1])
@@ -2353,10 +2888,93 @@ changequote([, ])dnl
gl_PREREQ_BTOWC
])
gl_WCHAR_MODULE_INDICATOR([btowc])
+ gt_LOCALE_EN_UTF8
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
gt_LOCALE_FR
gt_LOCALE_TR_UTF8
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gl_MUSL_LIBC
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gl_MUSL_LIBC
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gl_MUSL_LIBC
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gl_MUSL_LIBC
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gl_MUSL_LIBC
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gl_FUNC_C32RTOMB
+ gl_CONDITIONAL([GL_COND_OBJ_C32RTOMB],
+ [test $HAVE_C32RTOMB = 0 || test $REPLACE_C32RTOMB = 1])
+ gl_UCHAR_MODULE_INDICATOR([c32rtomb])
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ gl_UCHAR_MODULE_INDICATOR([c32tob])
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
gl_FUNC_CALLOC_GNU
if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 1; then
AC_LIBOBJ([calloc])
@@ -2371,9 +2989,11 @@ changequote([, ])dnl
gl_FUNC_CLOSE
gl_CONDITIONAL([GL_COND_OBJ_CLOSE], [test $REPLACE_CLOSE = 1])
gl_UNISTD_MODULE_INDICATOR([close])
+ gl_MODULE_INDICATOR([close])
AC_REQUIRE([gl_SYS_SOCKET_H])
gl_CONDITIONAL([GL_COND_OBJ_CONNECT], [test "$ac_cv_header_winsock2_h" = yes])
gl_SYS_SOCKET_MODULE_INDICATOR([connect])
+ gl_MODULE_INDICATOR([connect])
gl_CTYPE_H
gl_CTYPE_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
@@ -2386,21 +3006,21 @@ changequote([, ])dnl
gl_UNISTD_MODULE_INDICATOR([dup2])
gl_ENVIRON
gl_UNISTD_MODULE_INDICATOR([environ])
+ AC_REQUIRE([gl_ERROR_H])
gl_ERROR
- gl_CONDITIONAL([GL_COND_OBJ_ERROR], [test "$ac_cv_lib_error_at_line" = no])
+ gl_CONDITIONAL([GL_COND_OBJ_ERROR], [test $COMPILE_ERROR_C = 1])
AM_COND_IF([GL_COND_OBJ_ERROR], [
gl_PREREQ_ERROR
])
m4_ifdef([AM_XGETTEXT_OPTION],
[AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+ gl_ERROR_H
+ AC_PROG_MKDIR_P
gl_FUNC_FCNTL
gl_CONDITIONAL([GL_COND_OBJ_FCNTL],
[test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1])
gl_FCNTL_MODULE_INDICATOR([fcntl])
- gl_FCNTL_H
- gl_FCNTL_H_REQUIRE_DEFAULTS
- AC_PROG_MKDIR_P
gl_FUNC_FDOPEN
gl_CONDITIONAL([GL_COND_OBJ_FDOPEN], [test $REPLACE_FDOPEN = 1])
AM_COND_IF([GL_COND_OBJ_FDOPEN], [
@@ -2411,13 +3031,14 @@ changequote([, ])dnl
gl_CONDITIONAL([GL_COND_OBJ_FSTAT], [test $REPLACE_FSTAT = 1])
AM_COND_IF([GL_COND_OBJ_FSTAT], [
case "$host_os" in
- mingw*)
+ mingw* | windows*)
AC_LIBOBJ([stat-w32])
;;
esac
gl_PREREQ_FSTAT
])
gl_SYS_STAT_MODULE_INDICATOR([fstat])
+ gl_MODULE_INDICATOR([fstat])
gl_FUNC_FTRUNCATE
gl_CONDITIONAL([GL_COND_OBJ_FTRUNCATE],
[test $HAVE_FTRUNCATE = 0 || test $REPLACE_FTRUNCATE = 1])
@@ -2435,12 +3056,15 @@ changequote([, ])dnl
gl_PREREQ_GETDTABLESIZE
])
gl_UNISTD_MODULE_INDICATOR([getdtablesize])
- gl_FUNC_GETPAGESIZE
- gl_CONDITIONAL([GL_COND_OBJ_GETPAGESIZE], [test $REPLACE_GETPAGESIZE = 1])
- gl_UNISTD_MODULE_INDICATOR([getpagesize])
+ AC_REQUIRE([AC_CANONICAL_HOST])
gl_FUNC_GETPROGNAME
- AC_SUBST([LIBINTL])
- AC_SUBST([LTLIBINTL])
+ gl_CONDITIONAL([GL_COND_OBJ_GETPROGNAME],
+ [test $HAVE_GETPROGNAME = 0 || test $REPLACE_GETPROGNAME = 1])
+ AM_COND_IF([GL_COND_OBJ_GETPROGNAME], [
+ gl_PREREQ_GETPROGNAME
+ ])
+ gl_STDLIB_MODULE_INDICATOR([getprogname])
+ gl_GETTEXT_H
gl_FUNC_GETTIMEOFDAY
gl_CONDITIONAL([GL_COND_OBJ_GETTIMEOFDAY],
[test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1])
@@ -2448,9 +3072,10 @@ changequote([, ])dnl
gl_PREREQ_GETTIMEOFDAY
])
gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+ GNULIB_I18N
gl_MUSL_LIBC
dnl Distinguish OpenBSD >= 6.2 from OpenBSD < 6.2.
- AC_CHECK_FUNCS_ONCE([duplocale])
+ gl_CHECK_FUNCS_ANDROID([duplocale], [[#include <locale.h>]])
gl_FUNC_INET_PTON
gl_CONDITIONAL([GL_COND_OBJ_INET_PTON],
[test $HAVE_INET_PTON = 0 || test $REPLACE_INET_PTON = 1])
@@ -2464,28 +3089,33 @@ changequote([, ])dnl
gl_CONDITIONAL([GL_COND_OBJ_IOCTL],
[test $HAVE_IOCTL = 0 || test $REPLACE_IOCTL = 1])
gl_SYS_IOCTL_MODULE_INDICATOR([ioctl])
+ gl_MODULE_INDICATOR([ioctl])
gl_FUNC_ISBLANK
gl_CONDITIONAL([GL_COND_OBJ_ISBLANK], [test $HAVE_ISBLANK = 0])
gl_MODULE_INDICATOR([isblank])
gl_CTYPE_MODULE_INDICATOR([isblank])
- gl_DOUBLE_EXPONENT_LOCATION
- gl_FLOAT_EXPONENT_LOCATION
- gl_LONG_DOUBLE_EXPONENT_LOCATION
AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+ gt_LOCALE_EN_UTF8
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
gt_LOCALE_JA
gt_LOCALE_ZH_CN
+ gt_LOCALE_EN_UTF8
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
gt_LOCALE_JA
gt_LOCALE_ZH_CN
AC_REQUIRE([gl_LARGEFILE])
+ gl___INLINE
AC_REQUIRE([gl_SYS_SOCKET_H])
gl_CONDITIONAL([GL_COND_OBJ_LISTEN], [test "$ac_cv_header_winsock2_h" = yes])
gl_SYS_SOCKET_MODULE_INDICATOR([listen])
- AC_CHECK_FUNCS_ONCE([newlocale])
- AC_CHECK_FUNCS_ONCE([newlocale])
+ gl_MODULE_INDICATOR([listen])
+ gl_WINDOWS_RC
+ gl_CHECK_FUNCS_ANDROID([newlocale], [[#include <locale.h>]])
+ gl_CHECK_FUNCS_ANDROID([newlocale], [[#include <locale.h>]])
+ gl_MUSL_LIBC
+ gl_WINDOWS_RC
AC_CHECK_HEADERS_ONCE([semaphore.h])
AC_CHECK_DECLS_ONCE([alarm])
AC_REQUIRE([gl_SEMAPHORE])
@@ -2495,15 +3125,26 @@ changequote([, ])dnl
gl_PREREQ_LSTAT
])
gl_SYS_STAT_MODULE_INDICATOR([lstat])
+ gl_MODULE_INDICATOR([lstat])
gl_FUNC_MALLOC_GNU
if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 1; then
AC_LIBOBJ([malloc])
fi
gl_STDLIB_MODULE_INDICATOR([malloc-gnu])
+ gt_LOCALE_EN_UTF8
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
gt_LOCALE_JA
gt_LOCALE_ZH_CN
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gl_WINDOWS_RC
+ gt_LOCALE_EN_UTF8
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_EN_UTF8
gt_LOCALE_FR_UTF8
gl_FUNC_MBTOWC
gl_CONDITIONAL([GL_COND_OBJ_MBTOWC],
@@ -2516,6 +3157,10 @@ changequote([, ])dnl
gl_FUNC_MMAP_ANON
AC_CHECK_HEADERS_ONCE([sys/mman.h])
AC_CHECK_FUNCS_ONCE([mprotect])
+ gl_FUNC_MKFIFO
+ gl_CONDITIONAL([GL_COND_OBJ_MKFIFO],
+ [test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1])
+ gl_UNISTD_MODULE_INDICATOR([mkfifo])
AC_REQUIRE([gl_MSVC_INVAL])
gl_CONDITIONAL([GL_COND_OBJ_MSVC_INVAL],
[test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1])
@@ -2537,6 +3182,7 @@ changequote([, ])dnl
gl_PREREQ_OPEN
])
gl_FCNTL_MODULE_INDICATOR([open])
+ AC_CHECK_DECLS_ONCE([alarm])
gl_PATHMAX
gl_FUNC_PERROR
gl_CONDITIONAL([GL_COND_OBJ_PERROR], [test $REPLACE_PERROR = 1])
@@ -2549,13 +3195,34 @@ changequote([, ])dnl
[test $HAVE_PSELECT = 0 || test $REPLACE_PSELECT = 1])
gl_SYS_SELECT_MODULE_INDICATOR([pselect])
AC_CHECK_HEADERS_ONCE([sys/wait.h])
- gl_PTHREAD_H
- gl_PTHREAD_H_REQUIRE_DEFAULTS
- AC_PROG_MKDIR_P
+ gl_PTHREAD_COND
+ gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_COND],
+ [test $HAVE_PTHREAD_COND_INIT = 0 || test $REPLACE_PTHREAD_COND_INIT = 1])
+ gl_PTHREAD_MODULE_INDICATOR([pthread-cond])
+ AC_CHECK_DECLS_ONCE([alarm])
+ gl_PTHREAD_MUTEX
+ gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_MUTEX],
+ [test $HAVE_PTHREAD_MUTEX_INIT = 0 || test $REPLACE_PTHREAD_MUTEX_INIT = 1 || test $HAVE_PTHREAD_MUTEXATTR_GETROBUST = 0 || test $REPLACE_PTHREAD_MUTEXATTR_GETROBUST = 1])
+ gl_PTHREAD_MODULE_INDICATOR([pthread-mutex])
+ AC_CHECK_HEADERS_ONCE([semaphore.h])
+ AC_CHECK_DECLS_ONCE([alarm])
+ AC_REQUIRE([gl_SEMAPHORE])
+ AC_CHECK_DECLS_ONCE([alarm])
+ gl_PTHREAD_RWLOCK
+ gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_RWLOCK],
+ [test $REPLACE_PTHREAD_RWLOCK_INIT = 1 || test $HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK = 0 || test $REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK = 1])
+ gl_PTHREAD_MODULE_INDICATOR([pthread-rwlock])
+ AC_CHECK_HEADERS_ONCE([semaphore.h])
+ AC_CHECK_DECLS_ONCE([alarm])
+ AC_REQUIRE([gl_SEMAPHORE])
gl_PTHREAD_THREAD
gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_THREAD],
[test $HAVE_PTHREAD_CREATE = 0 || test $REPLACE_PTHREAD_CREATE = 1])
gl_PTHREAD_MODULE_INDICATOR([pthread-thread])
+ gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK
+ gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_MUTEX_TIMEDLOCK],
+ [test $HAVE_PTHREAD_T = 1 && test $HAVE_PTHREAD_MUTEX_TIMEDLOCK = 0])
+ gl_PTHREAD_MODULE_INDICATOR([pthread_mutex_timedlock])
gl_FUNC_PTHREAD_SIGMASK
gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_SIGMASK],
[test $HAVE_PTHREAD_SIGMASK = 0 || test $REPLACE_PTHREAD_SIGMASK = 1])
@@ -2576,15 +3243,24 @@ changequote([, ])dnl
gl_PREREQ_RAISE
])
gl_SIGNAL_MODULE_INDICATOR([raise])
- gl_FUNC_REALLOC_GNU
- if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 1; then
- AC_LIBOBJ([realloc])
- fi
- gl_STDLIB_MODULE_INDICATOR([realloc-gnu])
+ gl_FUNC_RANDOM
+ gl_CONDITIONAL([GL_COND_OBJ_RANDOM],
+ [test $HAVE_RANDOM = 0 || test $REPLACE_RANDOM = 1 || test $REPLACE_INITSTATE = 1 || test $REPLACE_SETSTATE = 1])
+ AM_COND_IF([GL_COND_OBJ_RANDOM], [
+ gl_PREREQ_RANDOM
+ ])
+ gl_STDLIB_MODULE_INDICATOR([random])
+ gl_FUNC_RANDOM_R
+ gl_CONDITIONAL([GL_COND_OBJ_RANDOM_R],
+ [test $HAVE_RANDOM_R = 0 || test $REPLACE_RANDOM_R = 1])
+ AM_COND_IF([GL_COND_OBJ_RANDOM_R], [
+ gl_PREREQ_RANDOM_R
+ ])
+ gl_STDLIB_MODULE_INDICATOR([random_r])
gl_FUNC_REALLOC_POSIX
- if test $REPLACE_REALLOC_FOR_REALLOC_POSIX = 1; then
- AC_LIBOBJ([realloc])
- fi
+ gl_FUNC_REALLOC_0_NONNULL
+ gl_CONDITIONAL([GL_COND_OBJ_REALLOC_POSIX],
+ [test $REPLACE_REALLOC_FOR_REALLOC_POSIX != 0])
gl_STDLIB_MODULE_INDICATOR([realloc-posix])
gl_FUNC_REALLOCARRAY
gl_CONDITIONAL([GL_COND_OBJ_REALLOCARRAY],
@@ -2594,9 +3270,6 @@ changequote([, ])dnl
])
gl_MODULE_INDICATOR([reallocarray])
gl_STDLIB_MODULE_INDICATOR([reallocarray])
- gl_SCHED_H
- gl_SCHED_H_REQUIRE_DEFAULTS
- AC_PROG_MKDIR_P
gl_FUNC_SCHED_YIELD
gl_CONDITIONAL([GL_COND_OBJ_SCHED_YIELD],
[test $HAVE_SCHED_YIELD = 0 || test $REPLACE_SCHED_YIELD = 1])
@@ -2604,6 +3277,7 @@ changequote([, ])dnl
gl_FUNC_SELECT
gl_CONDITIONAL([GL_COND_OBJ_SELECT], [test $REPLACE_SELECT = 1])
gl_SYS_SELECT_MODULE_INDICATOR([select])
+ gl_MODULE_INDICATOR([select])
AC_CHECK_HEADERS_ONCE([sys/wait.h])
gl_FUNC_SETENV
gl_CONDITIONAL([GL_COND_OBJ_SETENV],
@@ -2619,16 +3293,15 @@ changequote([, ])dnl
gt_LOCALE_FR_UTF8
gt_LOCALE_JA
gt_LOCALE_ZH_CN
+ gl_WINDOWS_RC
AC_REQUIRE([gl_SYS_SOCKET_H])
gl_CONDITIONAL([GL_COND_OBJ_SETSOCKOPT],
[test "$ac_cv_header_winsock2_h" = yes])
gl_SYS_SOCKET_MODULE_INDICATOR([setsockopt])
+ gl_MODULE_INDICATOR([setsockopt])
gl_SIGNAL_H
gl_SIGNAL_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
- AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
- AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
- AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
gl_SIGNALBLOCKING
gl_CONDITIONAL([GL_COND_OBJ_SIGPROCMASK], [test $HAVE_POSIX_SIGNALBLOCKING = 0])
AM_COND_IF([GL_COND_OBJ_SIGPROCMASK], [
@@ -2640,6 +3313,8 @@ changequote([, ])dnl
[test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1])
gl_UNISTD_MODULE_INDICATOR([sleep])
AC_CHECK_DECLS_ONCE([alarm])
+ gl_SNAN
+ gl_NAN_MIPS
AC_REQUIRE([gl_SYS_SOCKET_H])
gl_CONDITIONAL([GL_COND_OBJ_SOCKET], [test "$ac_cv_header_winsock2_h" = yes])
# When this module is used, sockets may actually occur as file descriptors,
@@ -2652,6 +3327,7 @@ changequote([, ])dnl
SYS_IOCTL_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=1
fi
gl_SYS_SOCKET_MODULE_INDICATOR([socket])
+ gl_MODULE_INDICATOR([socket])
AC_REQUIRE([gl_SOCKETLIB])
AC_REQUIRE([gl_SOCKETS])
gl_TYPE_SOCKLEN_T
@@ -2659,19 +3335,16 @@ changequote([, ])dnl
gl_CONDITIONAL([GL_COND_OBJ_STAT], [test $REPLACE_STAT = 1])
AM_COND_IF([GL_COND_OBJ_STAT], [
case "$host_os" in
- mingw*)
+ mingw* | windows*)
AC_LIBOBJ([stat-w32])
;;
esac
gl_PREREQ_STAT
])
gl_SYS_STAT_MODULE_INDICATOR([stat])
+ gl_MODULE_INDICATOR([stat])
gl_STAT_TIME
gl_STAT_BIRTHTIME
- gl_STDALIGN_H
- gl_CONDITIONAL_HEADER([stdalign.h])
- AC_PROG_MKDIR_P
- AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
gl_STDIO_H
gl_STDIO_H_REQUIRE_DEFAULTS
@@ -2701,6 +3374,30 @@ changequote([, ])dnl
gl_STDIO_MODULE_INDICATOR([fputs])
gl_STDIO_MODULE_INDICATOR([puts])
gl_STDIO_MODULE_INDICATOR([fwrite])
+ gl_DOUBLE_EXPONENT_LOCATION
+ 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_FUNC_STPCPY
+ gl_CONDITIONAL([GL_COND_OBJ_STPCPY],
+ [test $HAVE_STPCPY = 0 || test $REPLACE_STPCPY = 1])
+ AM_COND_IF([GL_COND_OBJ_STPCPY], [
+ gl_PREREQ_STPCPY
+ ])
+ gl_STRING_MODULE_INDICATOR([stpcpy])
+ gl_STRING_MODULE_INDICATOR([str_endswith])
+ gl_STRING_MODULE_INDICATOR([str_startswith])
gl_FUNC_STRERROR
gl_CONDITIONAL([GL_COND_OBJ_STRERROR], [test $REPLACE_STRERROR = 1])
gl_MODULE_INDICATOR([strerror])
@@ -2718,11 +3415,14 @@ changequote([, ])dnl
gl_PREREQ_STRERROR_R
])
gl_STRING_MODULE_INDICATOR([strerror_r])
- dnl For the modules argp, error.
+ dnl For the modules argp, error, xstrerror.
gl_MODULE_INDICATOR([strerror_r-posix])
gl_FUNC_MMAP_ANON
AC_CHECK_HEADERS_ONCE([sys/mman.h])
AC_CHECK_FUNCS_ONCE([mprotect])
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
AC_CHECK_DECLS_ONCE([alarm])
gl_FUNC_MMAP_ANON
AC_CHECK_HEADERS_ONCE([sys/mman.h])
@@ -2741,6 +3441,8 @@ changequote([, ])dnl
gl_SYS_SOCKET_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
AC_CHECK_FUNCS_ONCE([shutdown])
+ gl_SOCKET_FAMILIES
+ gl_SOCKET_FAMILY_UNIX
gl_SYS_STAT_H
gl_SYS_STAT_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
@@ -2751,9 +3453,12 @@ changequote([, ])dnl
gl_SYS_UIO_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
gl_THREAD
- gl_TIME_H
- gl_TIME_H_REQUIRE_DEFAULTS
- AC_PROG_MKDIR_P
+ gl_FUNC_TIME
+ gl_CONDITIONAL([GL_COND_OBJ_TIME], [test $REPLACE_TIME = 1])
+ AM_COND_IF([GL_COND_OBJ_TIME], [
+ gl_PREREQ_TIME
+ ])
+ gl_TIME_MODULE_INDICATOR([time])
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
gt_LOCALE_JA
@@ -2862,6 +3567,7 @@ changequote([, ])dnl
gl_PREREQ_WCRTOMB
])
gl_WCHAR_MODULE_INDICATOR([wcrtomb])
+ gt_LOCALE_EN_UTF8
gt_LOCALE_FR
gt_LOCALE_FR_UTF8
gt_LOCALE_JA
@@ -2880,14 +3586,27 @@ changequote([, ])dnl
])
gl_STDLIB_MODULE_INDICATOR([wctomb])
AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_COND],
+ [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
+ AC_REQUIRE([AC_CANONICAL_HOST])
gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_THREAD],
- [case "$host_os" in mingw*) true;; *) false;; esac])
+ [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_TIMEDMUTEX],
+ [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_TIMEDRECMUTEX],
+ [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_TIMEDRWLOCK],
+ [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
AC_REQUIRE([AC_CANONICAL_HOST])
gl_CONDITIONAL([GL_COND_OBJ_WINDOWS_TLS],
- [case "$host_os" in mingw*) true;; *) false;; esac])
+ [case "$host_os" in mingw* | windows*) true;; *) false;; esac])
gl_XALLOC
gl_MODULE_INDICATOR([xalloc])
gl_MODULE_INDICATOR([xalloc-die])
+ gl_XGETCWD
AC_REQUIRE([gl_YIELD])
m4_popdef([gl_MODULE_INDICATOR_CONDITION])
m4_ifval(gltests_LIBSOURCES_LIST, [
@@ -2912,27 +3631,35 @@ changequote([, ])dnl
gltests_libobjs=
gltests_ltlibobjs=
gltests_libobjdeps=
+ gltests_libunistring_libobjs=
+ gltests_libunistring_ltlibobjs=
+ gltests_libunistring_libobjdeps=
if test -n "$gltests_LIBOBJS"; then
# Remove the extension.
changequote(,)dnl
sed_drop_objext='s/\.o$//;s/\.obj$//'
sed_dirname1='s,//*,/,g'
sed_dirname2='s,\(.\)/$,\1,'
- sed_dirname3='s,^[^/]*$,.,'
- sed_dirname4='s,\(.\)/[^/]*$,\1,'
+ sed_dirname3='s,[^/]*$,,'
sed_basename1='s,.*/,,'
changequote([, ])dnl
for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
gltests_libobjs="$gltests_libobjs $i.$ac_objext"
gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
- i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3" -e "$sed_dirname4"`
+ i_dir=`echo "$i" | sed -e "$sed_dirname1" -e "$sed_dirname2" -e "$sed_dirname3"`
i_base=`echo "$i" | sed -e "$sed_basename1"`
- gltests_libobjdeps="$gltests_libobjdeps $i_dir/\$(DEPDIR)/$i_base.Plo"
+ gltests_libunistring_libobjs="$gltests_libunistring_libobjs $i_dir""libunistring_a-$i_base.$ac_objext"
+ gltests_libunistring_ltlibobjs="$gltests_libunistring_ltlibobjs $i_dir""libunistring_la-$i_base.lo"
+ gltests_libobjdeps="$gltests_libobjdeps $i_dir\$(DEPDIR)/$i_base.Plo"
+ gltests_libunistring_libobjdeps="$gltests_libunistring_libobjdeps $i_dir\$(DEPDIR)/libunistring_la-$i_base.Plo"
done
fi
AC_SUBST([gltests_LIBOBJS], [$gltests_libobjs])
AC_SUBST([gltests_LTLIBOBJS], [$gltests_ltlibobjs])
AC_SUBST([gltests_LIBOBJDEPS], [$gltests_libobjdeps])
+ AC_SUBST([gltests_libunistring_LIBOBJS], [$gltests_libunistring_libobjs])
+ AC_SUBST([gltests_libunistring_LTLIBOBJS], [$gltests_libunistring_ltlibobjs])
+ AC_SUBST([gltests_libunistring_LIBOBJDEPS], [$gltests_libunistring_libobjdeps])
])
AC_REQUIRE([gl_CC_GNULIB_WARNINGS])
LIBTESTS_LIBDEPS="$gltests_libdeps"
@@ -2997,6 +3724,7 @@ AC_DEFUN([gltests_LIBSOURCES], [
# gnulib-tool and may be removed by future gnulib-tool invocations.
AC_DEFUN([gl_FILE_LIST], [
build-aux/config.rpath
+ build-aux/gitlog-to-changelog
doc/relocatable.texi
lib/_Noreturn.h
lib/alloca.in.h
@@ -3012,8 +3740,24 @@ AC_DEFUN([gl_FILE_LIST], [
lib/c-strcase.h
lib/c-strcasecmp.c
lib/c-strcaseeq.h
- lib/c-strncasecmp.c
+ lib/c32is-impl.h
+ lib/c32isalnum.c
+ lib/c32isalpha.c
+ lib/c32isblank.c
+ lib/c32iscntrl.c
+ lib/c32isdigit.c
+ lib/c32isgraph.c
+ lib/c32islower.c
+ lib/c32isprint.c
+ lib/c32ispunct.c
+ lib/c32isspace.c
+ lib/c32isupper.c
+ lib/c32isxdigit.c
+ lib/c32to-impl.h
+ lib/c32tolower.c
+ lib/c32width.c
lib/errno.in.h
+ lib/fcntl.in.h
lib/flexmember.h
lib/float+.h
lib/float.c
@@ -3024,8 +3768,12 @@ AC_DEFUN([gl_FILE_LIST], [
lib/frexpl.c
lib/fseterr.c
lib/fseterr.h
+ lib/getlocalename_l-unsafe.c
+ lib/getlocalename_l-unsafe.h
lib/glthread/lock.c
lib/glthread/lock.h
+ lib/glthread/once.c
+ lib/glthread/once.h
lib/glthread/threadlib.c
lib/hard-locale.c
lib/hard-locale.h
@@ -3034,8 +3782,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/iconv_close.c
lib/iconv_open-aix.gperf
lib/iconv_open-hpux.gperf
- lib/iconv_open-irix.gperf
- lib/iconv_open-osf.gperf
lib/iconv_open-solaris.gperf
lib/iconv_open-zos.gperf
lib/iconv_open.c
@@ -3052,17 +3798,20 @@ AC_DEFUN([gl_FILE_LIST], [
lib/isnanl.c
lib/iswblank.c
lib/iswdigit.c
+ lib/iswpunct.c
lib/iswxdigit.c
lib/itold.c
- lib/langinfo.in.h
lib/lc-charset-dispatch.c
lib/lc-charset-dispatch.h
lib/limits.in.h
lib/localcharset.c
lib/localcharset.h
lib/locale.in.h
+ lib/localeconv.c
+ lib/localename-environ.c
lib/localename-table.c
lib/localename-table.h
+ lib/localename-unsafe.c
lib/localename.c
lib/localename.h
lib/malloc.c
@@ -3072,13 +3821,15 @@ AC_DEFUN([gl_FILE_LIST], [
lib/math.in.h
lib/mbchar.c
lib/mbchar.h
- lib/mbiter.c
- lib/mbiter.h
+ lib/mbiterf.c
+ lib/mbiterf.h
+ lib/mbrtoc32.c
lib/mbrtowc-impl-utf8.h
lib/mbrtowc-impl.h
lib/mbrtowc.c
lib/mbsinit.c
lib/mbsnlen.c
+ lib/mbszero.c
lib/mbtowc-lock.c
lib/mbtowc-lock.h
lib/memchr.c
@@ -3094,10 +3845,16 @@ AC_DEFUN([gl_FILE_LIST], [
lib/printf-frexpl.h
lib/printf-parse.c
lib/printf-parse.h
+ lib/pthread-once.c
+ lib/pthread.in.h
lib/relocatable.c
lib/relocatable.h
lib/relocatable.valgrind
+ lib/sched.in.h
+ lib/setlocale-fixes.c
+ lib/setlocale-fixes.h
lib/setlocale-lock.c
+ lib/setlocale_null-unlocked.c
lib/setlocale_null.c
lib/setlocale_null.h
lib/signbitd.c
@@ -3108,19 +3865,24 @@ AC_DEFUN([gl_FILE_LIST], [
lib/stddef.in.h
lib/stdint.in.h
lib/stdio-impl.h
+ lib/stdlib.c
lib/stdlib.in.h
- lib/str-kmp.h
lib/str-two-way.h
- lib/streq.h
+ lib/streq-opt.h
lib/striconveh.c
lib/striconveh.h
lib/striconveha.c
lib/striconveha.h
+ lib/string.c
lib/string.in.h
lib/strncat.c
+ lib/strncpy.c
lib/strstr.c
+ lib/struniq.h
lib/sys_types.in.h
lib/thread-optim.h
+ lib/time.in.h
+ lib/uchar.in.h
lib/unicase.in.h
lib/unicase/cased.c
lib/unicase/cased.h
@@ -3379,6 +4141,12 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unictype/digit.c
lib/unictype/digit.h
lib/unictype/identsyntaxmap.h
+ lib/unictype/incb_byname.c
+ lib/unictype/incb_byname.gperf
+ lib/unictype/incb_name.c
+ lib/unictype/incb_name.h
+ lib/unictype/incb_of.c
+ lib/unictype/incb_of.h
lib/unictype/joininggroup_byname.c
lib/unictype/joininggroup_byname.gperf
lib/unictype/joininggroup_name.c
@@ -3491,6 +4259,10 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unictype/pr_hex_digit.h
lib/unictype/pr_hyphen.c
lib/unictype/pr_hyphen.h
+ lib/unictype/pr_id_compat_math_continue.c
+ lib/unictype/pr_id_compat_math_continue.h
+ lib/unictype/pr_id_compat_math_start.c
+ lib/unictype/pr_id_compat_math_start.h
lib/unictype/pr_id_continue.c
lib/unictype/pr_id_continue.h
lib/unictype/pr_id_start.c
@@ -3501,6 +4273,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unictype/pr_ids_binary_operator.h
lib/unictype/pr_ids_trinary_operator.c
lib/unictype/pr_ids_trinary_operator.h
+ lib/unictype/pr_ids_unary_operator.c
lib/unictype/pr_ignorable_control.c
lib/unictype/pr_ignorable_control.h
lib/unictype/pr_iso_control.c
@@ -3517,6 +4290,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unictype/pr_lowercase.h
lib/unictype/pr_math.c
lib/unictype/pr_math.h
+ lib/unictype/pr_modifier_combining_mark.c
+ lib/unictype/pr_modifier_combining_mark.h
lib/unictype/pr_non_break.c
lib/unictype/pr_non_break.h
lib/unictype/pr_not_a_character.c
@@ -3547,6 +4322,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unictype/pr_pattern_syntax.h
lib/unictype/pr_pattern_white_space.c
lib/unictype/pr_pattern_white_space.h
+ lib/unictype/pr_prepended_concatenation_mark.c
+ lib/unictype/pr_prepended_concatenation_mark.h
lib/unictype/pr_private_use.c
lib/unictype/pr_private_use.h
lib/unictype/pr_punctuation.c
@@ -3595,6 +4372,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unigbrk.in.h
lib/unigbrk/gbrkprop.h
lib/unigbrk/u-grapheme-breaks.h
+ lib/unigbrk/u-grapheme-next.h
+ lib/unigbrk/u-grapheme-prev.h
lib/unigbrk/u16-grapheme-breaks.c
lib/unigbrk/u16-grapheme-next.c
lib/unigbrk/u16-grapheme-prev.c
@@ -3624,6 +4403,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unilbrk/ulc-common.h
lib/unilbrk/ulc-possible-linebreaks.c
lib/unilbrk/ulc-width-linebreaks.c
+ lib/unimetadata.in.h
+ lib/unimetadata/u-version.c
lib/uniname.in.h
lib/uniname/gen-uninames.lisp
lib/uniname/uniname.c
@@ -3631,6 +4412,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/uninorm.in.h
lib/uninorm/canonical-decomposition.c
lib/uninorm/compat-decomposition.c
+ lib/uninorm/composition-table-bounds.h
lib/uninorm/composition-table.gperf
lib/uninorm/composition.c
lib/uninorm/decompose-internal.c
@@ -3744,6 +4526,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unistr/u-cpy.h
lib/unistr/u-endswith.h
lib/unistr/u-move.h
+ lib/unistr/u-pcpy.h
lib/unistr/u-set.h
lib/unistr/u-startswith.h
lib/unistr/u-stpcpy.h
@@ -3759,7 +4542,6 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unistr/u-strnlen.h
lib/unistr/u-strpbrk.h
lib/unistr/u-strspn.h
- lib/unistr/u-strstr.h
lib/unistr/u-strtok.h
lib/unistr/u16-check.c
lib/unistr/u16-chr.c
@@ -3777,6 +4559,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unistr/u16-mbtoucr.c
lib/unistr/u16-move.c
lib/unistr/u16-next.c
+ lib/unistr/u16-pcpy.c
lib/unistr/u16-prev.c
lib/unistr/u16-set.c
lib/unistr/u16-startswith.c
@@ -3819,6 +4602,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unistr/u32-mbtoucr.c
lib/unistr/u32-move.c
lib/unistr/u32-next.c
+ lib/unistr/u32-pcpy.c
lib/unistr/u32-prev.c
lib/unistr/u32-set.c
lib/unistr/u32-startswith.c
@@ -3862,6 +4646,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/unistr/u8-mbtoucr.c
lib/unistr/u8-move.c
lib/unistr/u8-next.c
+ lib/unistr/u8-pcpy.c
lib/unistr/u8-prev.c
lib/unistr/u8-set.c
lib/unistr/u8-startswith.c
@@ -3916,6 +4701,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/verify.h
lib/warn-on-use.h
lib/wchar.in.h
+ lib/wcs-two-way.h
+ lib/wcsstr-impl.h
lib/wctype-h.c
lib/wctype.in.h
lib/wcwidth.c
@@ -3932,26 +4719,30 @@ AC_DEFUN([gl_FILE_LIST], [
lib/xsize.c
lib/xsize.h
m4/00gnulib.m4
+ m4/__inline.m4
m4/absolute-header.m4
m4/alloca.m4
m4/arpa_inet_h.m4
m4/assert_h.m4
m4/btowc.m4
+ m4/build-to-host.m4
m4/builtin-expect.m4
m4/c-bool.m4
+ m4/c32rtomb.m4
m4/calloc.m4
m4/close.m4
m4/codeset.m4
m4/ctype_h.m4
m4/double-slash-root.m4
m4/dup2.m4
- m4/eealloc.m4
m4/environ.m4
m4/errno_h.m4
m4/error.m4
+ m4/error_h.m4
m4/exponentd.m4
m4/exponentf.m4
m4/exponentl.m4
+ m4/extensions-aix.m4
m4/extensions.m4
m4/extern-inline.m4
m4/fcntl-o.m4
@@ -3969,16 +4760,19 @@ AC_DEFUN([gl_FILE_LIST], [
m4/ftruncate.m4
m4/getcwd.m4
m4/getdtablesize.m4
- m4/getpagesize.m4
+ m4/getlocalename_l.m4
m4/getprogname.m4
+ m4/gettext_h.m4
m4/gettimeofday.m4
m4/gnulib-common.m4
+ m4/gnulib-i18n.m4
m4/host-cpu-c-abi.m4
m4/iconv.m4
m4/iconv_h.m4
m4/iconv_open.m4
m4/include_next.m4
m4/inet_pton.m4
+ m4/init-package-version.m4
m4/inline.m4
m4/intl-thread-locale.m4
m4/intlmacosx.m4
@@ -3992,23 +4786,26 @@ AC_DEFUN([gl_FILE_LIST], [
m4/isnanl.m4
m4/iswblank.m4
m4/iswdigit.m4
+ m4/iswpunct.m4
m4/iswxdigit.m4
- m4/langinfo_h.m4
m4/largefile.m4
m4/lcmessage.m4
m4/ldexpl.m4
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
+ m4/libdl.m4
m4/libunistring-base.m4
m4/limits-h.m4
m4/localcharset.m4
m4/locale-ar.m4
+ m4/locale-en.m4
m4/locale-fr.m4
m4/locale-ja.m4
m4/locale-tr.m4
m4/locale-zh.m4
m4/locale_h.m4
+ m4/localeconv.m4
m4/localename.m4
m4/lock.m4
m4/lstat.m4
@@ -4017,22 +4814,27 @@ AC_DEFUN([gl_FILE_LIST], [
m4/math_h.m4
m4/mbchar.m4
m4/mbiter.m4
+ m4/mbrtoc32.m4
m4/mbrtowc.m4
m4/mbsinit.m4
m4/mbstate_t.m4
m4/mbtowc.m4
m4/memchr.m4
m4/minmax.m4
+ m4/mkfifo.m4
m4/mmap-anon.m4
m4/mode_t.m4
m4/msvc-inval.m4
m4/msvc-nothrow.m4
m4/multiarch.m4
m4/musl.m4
+ m4/nan-mips.m4
m4/nanosleep.m4
m4/netinet_in_h.m4
m4/nocrash.m4
+ m4/off64_t.m4
m4/off_t.m4
+ m4/once.m4
m4/open-cloexec.m4
m4/open-slash.m4
m4/open.m4
@@ -4044,12 +4846,20 @@ AC_DEFUN([gl_FILE_LIST], [
m4/printf-frexpl.m4
m4/printf.m4
m4/pselect.m4
+ m4/pthread-cond.m4
+ m4/pthread-mutex.m4
+ m4/pthread-once.m4
+ m4/pthread-rwlock.m4
+ m4/pthread-spin.m4
m4/pthread-thread.m4
m4/pthread_h.m4
+ m4/pthread_mutex_timedlock.m4
m4/pthread_rwlock_rdlock.m4
m4/pthread_sigmask.m4
m4/putenv.m4
m4/raise.m4
+ m4/random.m4
+ m4/random_r.m4
m4/realloc.m4
m4/reallocarray.m4
m4/relocatable-lib.m4
@@ -4065,6 +4875,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/signbit.m4
m4/size_max.m4
m4/sleep.m4
+ m4/snan.m4
m4/socketlib.m4
m4/sockets.m4
m4/socklen.m4
@@ -4074,17 +4885,22 @@ AC_DEFUN([gl_FILE_LIST], [
m4/stat.m4
m4/std-gnu11.m4
m4/stdalign.m4
+ m4/stdckdint_h.m4
m4/stddef_h.m4
m4/stdint.m4
m4/stdint_h.m4
m4/stdio_h.m4
m4/stdlib_h.m4
+ m4/stpcpy.m4
m4/strerror.m4
m4/strerror_r.m4
m4/string_h.m4
+ m4/stringeq.m4
m4/strncat.m4
+ m4/strncpy.m4
m4/strstr.m4
m4/symlink.m4
+ m4/sys_cdefs_h.m4
m4/sys_ioctl_h.m4
m4/sys_select_h.m4
m4/sys_socket_h.m4
@@ -4094,66 +4910,118 @@ AC_DEFUN([gl_FILE_LIST], [
m4/sys_uio_h.m4
m4/thread.m4
m4/threadlib.m4
+ m4/time.m4
m4/time_h.m4
+ m4/uchar_h.m4
+ m4/unicase_h.m4
+ m4/unictype_h.m4
+ m4/unimetadata_h.m4
+ m4/uninorm_h.m4
m4/unistd_h.m4
+ m4/unitypes_h.m4
m4/usleep.m4
m4/vararrays.m4
m4/vasnprintf.m4
m4/visibility.m4
m4/warn-on-use.m4
m4/wchar_h.m4
- m4/wchar_t.m4
m4/wcrtomb.m4
m4/wctob.m4
m4/wctomb.m4
m4/wctype_h.m4
m4/wcwidth.m4
+ m4/windows-rc.m4
m4/wint_t.m4
m4/xalloc.m4
+ m4/xgetcwd.m4
m4/xsize.m4
- m4/year2038.m4
m4/yield.m4
m4/zzgnulib.m4
tests/atomic-int-gnulib.h
+ tests/atomic-int-posix.h
tests/iconvsupport.c
tests/infinity.h
tests/init.sh
tests/locale.c
tests/macros.h
tests/minus-zero.h
- tests/nan.h
tests/nap.h
tests/randomd.c
tests/randoml.c
tests/signature.h
tests/test-accept.c
+ tests/test-alignasof.c
tests/test-alloca-opt.c
- tests/test-arpa_inet.c
+ tests/test-arpa_inet-h.c
tests/test-array-mergesort.c
tests/test-assert.c
tests/test-binary-io.c
tests/test-binary-io.sh
tests/test-bind.c
+ tests/test-bool.c
+ tests/test-btoc32-1.sh
+ tests/test-btoc32-2.sh
+ tests/test-btoc32-3.sh
+ tests/test-btoc32.c
+ tests/test-btowc-1.sh
+ tests/test-btowc-2.sh
+ tests/test-btowc-3.sh
tests/test-btowc.c
- tests/test-btowc1.sh
- tests/test-btowc2.sh
tests/test-c-ctype.c
- tests/test-c-strcase.sh
tests/test-c-strcasecmp.c
- tests/test-c-strncasecmp.c
+ tests/test-c-strcasecmp.sh
+ tests/test-c32isalnum.c
+ tests/test-c32isalnum.sh
+ tests/test-c32isalpha.c
+ tests/test-c32isalpha.sh
+ tests/test-c32isblank.c
+ tests/test-c32isblank.sh
+ tests/test-c32iscntrl.c
+ tests/test-c32iscntrl.sh
+ tests/test-c32isdigit.c
+ tests/test-c32isdigit.sh
+ tests/test-c32isgraph.c
+ tests/test-c32isgraph.sh
+ tests/test-c32islower.c
+ tests/test-c32islower.sh
+ tests/test-c32isprint.c
+ tests/test-c32isprint.sh
+ tests/test-c32ispunct.c
+ tests/test-c32ispunct.sh
+ tests/test-c32isspace.c
+ tests/test-c32isspace.sh
+ tests/test-c32isupper.c
+ tests/test-c32isupper.sh
+ tests/test-c32isxdigit.c
+ tests/test-c32isxdigit.sh
+ tests/test-c32rtomb-w32-2.sh
+ tests/test-c32rtomb-w32-3.sh
+ tests/test-c32rtomb-w32-4.sh
+ tests/test-c32rtomb-w32-5.sh
+ tests/test-c32rtomb-w32-6.sh
+ tests/test-c32rtomb-w32-7.sh
+ tests/test-c32rtomb-w32-8.sh
+ tests/test-c32rtomb-w32.c
+ tests/test-c32rtomb.c
+ tests/test-c32rtomb.sh
+ tests/test-c32tolower.c
+ tests/test-c32tolower.sh
+ tests/test-c32width.c
tests/test-calloc-gnu.c
+ tests/test-calloc-posix.c
tests/test-cloexec.c
tests/test-close.c
tests/test-connect.c
- tests/test-ctype.c
+ tests/test-ctype-h.c
tests/test-dup2.c
tests/test-environ.c
- tests/test-errno.c
+ tests/test-errno-h.c
+ tests/test-error.c
+ tests/test-error.sh
tests/test-fcntl-h.c
tests/test-fcntl.c
tests/test-fdopen.c
tests/test-fgetc.c
- tests/test-float.c
tests/test-fputc.c
tests/test-fread.c
tests/test-free.c
@@ -4168,6 +5036,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-getcwd-lgpl.c
tests/test-getdtablesize.c
tests/test-getprogname.c
+ tests/test-gettext-h.c
tests/test-gettimeofday.c
tests/test-hard-locale.c
tests/test-iconv-h.c
@@ -4176,7 +5045,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-inet_pton.c
tests/test-init.sh
tests/test-intprops.c
- tests/test-inttypes.c
+ tests/test-inttypes-h.c
tests/test-ioctl.c
tests/test-isblank.c
tests/test-isnand-nolibm.c
@@ -4188,39 +5057,68 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-iswblank.c
tests/test-iswdigit.c
tests/test-iswdigit.sh
+ tests/test-iswpunct.c
+ tests/test-iswpunct.sh
tests/test-iswxdigit.c
tests/test-iswxdigit.sh
- tests/test-langinfo.c
+ tests/test-largefile.c
tests/test-limits-h.c
tests/test-listen.c
+ tests/test-localcharset-w32utf8.c
+ tests/test-localcharset-w32utf8.sh
tests/test-localcharset.c
- tests/test-locale.c
+ tests/test-locale-h.c
+ tests/test-localeconv-mt.c
+ tests/test-localeconv.c
+ tests/test-localename-w32utf8.c
+ tests/test-localename-w32utf8.sh
tests/test-localename.c
tests/test-lock.c
tests/test-lstat.c
tests/test-lstat.h
tests/test-malloc-gnu.c
+ tests/test-malloc-posix.c
tests/test-malloca.c
- tests/test-math.c
- tests/test-mbrtowc-w32-1.sh
+ tests/test-math-h.c
+ tests/test-mbrtoc32-1.sh
+ tests/test-mbrtoc32-2.sh
+ tests/test-mbrtoc32-3.sh
+ tests/test-mbrtoc32-4.sh
+ tests/test-mbrtoc32-5.sh
+ tests/test-mbrtoc32-w32-2.sh
+ tests/test-mbrtoc32-w32-3.sh
+ tests/test-mbrtoc32-w32-4.sh
+ tests/test-mbrtoc32-w32-5.sh
+ tests/test-mbrtoc32-w32-6.sh
+ tests/test-mbrtoc32-w32-7.sh
+ tests/test-mbrtoc32-w32-8.sh
+ tests/test-mbrtoc32-w32.c
+ tests/test-mbrtoc32.c
+ tests/test-mbrtowc-1.sh
+ tests/test-mbrtowc-2.sh
+ tests/test-mbrtowc-3.sh
+ tests/test-mbrtowc-4.sh
+ tests/test-mbrtowc-5.sh
tests/test-mbrtowc-w32-2.sh
tests/test-mbrtowc-w32-3.sh
tests/test-mbrtowc-w32-4.sh
tests/test-mbrtowc-w32-5.sh
tests/test-mbrtowc-w32-6.sh
tests/test-mbrtowc-w32-7.sh
+ tests/test-mbrtowc-w32-8.sh
tests/test-mbrtowc-w32.c
+ tests/test-mbrtowc-w32utf8.c
+ tests/test-mbrtowc-w32utf8.sh
tests/test-mbrtowc.c
- tests/test-mbrtowc1.sh
- tests/test-mbrtowc2.sh
- tests/test-mbrtowc3.sh
- tests/test-mbrtowc4.sh
- tests/test-mbrtowc5.sh
tests/test-mbsinit.c
tests/test-mbsinit.sh
+ tests/test-mbsnlen.c
+ tests/test-mbsnlen.sh
tests/test-memchr.c
+ tests/test-mkfifo.c
+ tests/test-mkfifo.h
tests/test-nanosleep.c
- tests/test-netinet_in.c
+ tests/test-netinet_in-h.c
tests/test-once.c
tests/test-open.c
tests/test-open.h
@@ -4232,15 +5130,25 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-printf-frexp.c
tests/test-printf-frexpl.c
tests/test-pselect.c
+ tests/test-pthread-cond.c
+ tests/test-pthread-mutex-type.c
+ tests/test-pthread-mutex.c
+ tests/test-pthread-once1.c
+ tests/test-pthread-once2.c
+ tests/test-pthread-rwlock.c
tests/test-pthread-thread.c
tests/test-pthread.c
tests/test-pthread_sigmask1.c
tests/test-pthread_sigmask2.c
+ tests/test-putenv.c
tests/test-raise.c
- tests/test-realloc-gnu.c
+ tests/test-random-mt.c
+ tests/test-random.c
+ tests/test-random_r.c
+ tests/test-realloc-posix.c
tests/test-reallocarray.c
tests/test-rwlock1.c
- tests/test-sched.c
+ tests/test-sched-h.c
tests/test-select-fd.c
tests/test-select-in.sh
tests/test-select-out.sh
@@ -4248,12 +5156,16 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-select.c
tests/test-select.h
tests/test-setenv.c
+ tests/test-setlocale-w32.c
+ tests/test-setlocale-w32utf8.c
+ tests/test-setlocale-w32utf8.sh
tests/test-setlocale1.c
tests/test-setlocale1.sh
tests/test-setlocale2.c
tests/test-setlocale2.sh
tests/test-setlocale_null-mt-all.c
tests/test-setlocale_null-mt-one.c
+ tests/test-setlocale_null-unlocked.c
tests/test-setlocale_null.c
tests/test-setsockopt.c
tests/test-signal-h.c
@@ -4264,52 +5176,59 @@ AC_DEFUN([gl_FILE_LIST], [
tests/test-stat-time.c
tests/test-stat.c
tests/test-stat.h
- tests/test-stdalign.c
- tests/test-stdbool.c
- tests/test-stdckdint.c
- tests/test-stddef.c
- tests/test-stdint.c
- tests/test-stdio.c
- tests/test-stdlib.c
+ tests/test-stdckdint-h.c
+ tests/test-stddef-h.c
+ tests/test-stdint-h.c
+ tests/test-stdio-h.c
+ tests/test-stdlib-h.c
+ tests/test-str_endswith.c
+ tests/test-str_startswith.c
tests/test-strerror.c
tests/test-strerror_r.c
tests/test-striconveh.c
tests/test-striconveha.c
- tests/test-string.c
+ tests/test-string-h.c
tests/test-strncat.c
+ tests/test-strncpy.c
tests/test-strstr.c
tests/test-symlink.c
tests/test-symlink.h
- tests/test-sys_ioctl.c
- tests/test-sys_select.c
- tests/test-sys_socket.c
- tests/test-sys_stat.c
- tests/test-sys_time.c
- tests/test-sys_types.c
- tests/test-sys_uio.c
- tests/test-sys_wait.h
+ tests/test-sys_ioctl-h.c
+ tests/test-sys_select-h.c
+ tests/test-sys_socket-h.c
+ tests/test-sys_stat-h.c
+ tests/test-sys_time-h.c
+ tests/test-sys_types-h.c
+ tests/test-sys_uio-h.c
+ tests/test-sys_wait-h.h
tests/test-thread_create.c
tests/test-thread_self.c
+ tests/test-time-h.c
tests/test-time.c
- tests/test-unistd.c
+ tests/test-uchar-h.c
+ tests/test-unistd-h.c
tests/test-unsetenv.c
tests/test-usleep.c
tests/test-verify-try.c
tests/test-verify.c
tests/test-verify.sh
- tests/test-wchar.c
- tests/test-wcrtomb-w32-1.sh
+ tests/test-wchar-h.c
tests/test-wcrtomb-w32-2.sh
tests/test-wcrtomb-w32-3.sh
tests/test-wcrtomb-w32-4.sh
tests/test-wcrtomb-w32-5.sh
tests/test-wcrtomb-w32-6.sh
tests/test-wcrtomb-w32-7.sh
+ tests/test-wcrtomb-w32-8.sh
tests/test-wcrtomb-w32.c
tests/test-wcrtomb.c
tests/test-wcrtomb.sh
tests/test-wctype-h.c
tests/test-wcwidth.c
+ tests/test-windows-mutex-type.c
+ tests/test-windows-recmutex-type.c
+ tests/test-windows-timedmutex-type.c
+ tests/test-windows-timedrecmutex-type.c
tests/test-xalloc-die.c
tests/test-xalloc-die.sh
tests/unicase/test-casecmp.h
@@ -4368,6 +5287,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unicase/test-ulc-casecoll.c
tests/unicase/test-ulc-casecoll1.sh
tests/unicase/test-ulc-casecoll2.sh
+ tests/unicase/test-unicase-h.c
tests/uniconv/test-u16-conv-from-enc.c
tests/uniconv/test-u16-conv-to-enc.c
tests/uniconv/test-u16-strconv-from-enc.c
@@ -4380,6 +5300,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/uniconv/test-u8-conv-to-enc.c
tests/uniconv/test-u8-strconv-from-enc.c
tests/uniconv/test-u8-strconv-to-enc.c
+ tests/uniconv/test-uniconv-h.c
tests/unictype/test-bidi_byname.c
tests/unictype/test-bidi_longname.c
tests/unictype/test-bidi_name.c
@@ -4455,6 +5376,10 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unictype/test-decdigit.h
tests/unictype/test-digit.c
tests/unictype/test-digit.h
+ tests/unictype/test-incb_byname.c
+ tests/unictype/test-incb_name.c
+ tests/unictype/test-incb_of.c
+ tests/unictype/test-incb_of.h
tests/unictype/test-joininggroup_byname.c
tests/unictype/test-joininggroup_name.c
tests/unictype/test-joininggroup_of.c
@@ -4515,11 +5440,14 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unictype/test-pr_grapheme_link.c
tests/unictype/test-pr_hex_digit.c
tests/unictype/test-pr_hyphen.c
+ tests/unictype/test-pr_id_compat_math_continue.c
+ tests/unictype/test-pr_id_compat_math_start.c
tests/unictype/test-pr_id_continue.c
tests/unictype/test-pr_id_start.c
tests/unictype/test-pr_ideographic.c
tests/unictype/test-pr_ids_binary_operator.c
tests/unictype/test-pr_ids_trinary_operator.c
+ tests/unictype/test-pr_ids_unary_operator.c
tests/unictype/test-pr_ignorable_control.c
tests/unictype/test-pr_iso_control.c
tests/unictype/test-pr_join_control.c
@@ -4528,6 +5456,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unictype/test-pr_logical_order_exception.c
tests/unictype/test-pr_lowercase.c
tests/unictype/test-pr_math.c
+ tests/unictype/test-pr_modifier_combining_mark.c
tests/unictype/test-pr_non_break.c
tests/unictype/test-pr_not_a_character.c
tests/unictype/test-pr_numeric.c
@@ -4543,6 +5472,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unictype/test-pr_paragraph_separator.c
tests/unictype/test-pr_pattern_syntax.c
tests/unictype/test-pr_pattern_white_space.c
+ tests/unictype/test-pr_prepended_concatenation_mark.c
tests/unictype/test-pr_private_use.c
tests/unictype/test-pr_punctuation.c
tests/unictype/test-pr_quotation_mark.c
@@ -4569,6 +5499,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unictype/test-sy_c_whitespace.c
tests/unictype/test-sy_java_ident.c
tests/unictype/test-sy_java_whitespace.c
+ tests/unictype/test-unictype-h.c
tests/unigbrk/GraphemeBreakTest.txt
tests/unigbrk/test-u16-grapheme-breaks.c
tests/unigbrk/test-u16-grapheme-next.c
@@ -4587,17 +5518,25 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unigbrk/test-uc-is-grapheme-break.sh
tests/unigbrk/test-ulc-grapheme-breaks.c
tests/unigbrk/test-ulc-grapheme-breaks.sh
+ tests/unigbrk/test-unigbrk-h.c
+ tests/unilbrk/LineBreakTest.txt
tests/unilbrk/test-u16-possible-linebreaks.c
tests/unilbrk/test-u16-width-linebreaks.c
tests/unilbrk/test-u32-possible-linebreaks.c
tests/unilbrk/test-u32-width-linebreaks.c
tests/unilbrk/test-u8-possible-linebreaks.c
tests/unilbrk/test-u8-width-linebreaks.c
+ tests/unilbrk/test-uc-possible-linebreaks.c
+ tests/unilbrk/test-uc-possible-linebreaks.sh
tests/unilbrk/test-ulc-possible-linebreaks.c
tests/unilbrk/test-ulc-width-linebreaks.c
+ tests/unilbrk/test-unilbrk-h.c
+ tests/unimetadata/test-u-version.c
+ tests/unimetadata/test-unimetadata-h.c
tests/uniname/HangulSyllableNames.txt
tests/uniname/NameAliases.txt
tests/uniname/UnicodeData.txt
+ tests/uniname/test-uniname-h.c
tests/uniname/test-uninames.c
tests/uniname/test-uninames.sh
tests/uninorm/NormalizationTest.txt
@@ -4642,6 +5581,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/uninorm/test-u8-normcmp.h
tests/uninorm/test-u8-normcoll.c
tests/uninorm/test-uninorm-filter-nfc.c
+ tests/uninorm/test-uninorm-h.c
tests/unistdio/test-u16-asnprintf1.c
tests/unistdio/test-u16-asnprintf1.h
tests/unistdio/test-u16-printf1.h
@@ -4686,12 +5626,14 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unistdio/test-ulc-vasprintf1.c
tests/unistdio/test-ulc-vsnprintf1.c
tests/unistdio/test-ulc-vsprintf1.c
+ tests/unistdio/test-unistdio-h.c
tests/unistr/test-chr.h
tests/unistr/test-cmp.h
tests/unistr/test-cmp2.h
tests/unistr/test-cpy-alloc.h
tests/unistr/test-cpy.h
tests/unistr/test-move.h
+ tests/unistr/test-pcpy.h
tests/unistr/test-set.h
tests/unistr/test-stpcpy.h
tests/unistr/test-stpncpy.h
@@ -4720,6 +5662,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unistr/test-u16-mbtoucr.c
tests/unistr/test-u16-move.c
tests/unistr/test-u16-next.c
+ tests/unistr/test-u16-pcpy.c
tests/unistr/test-u16-prev.c
tests/unistr/test-u16-set.c
tests/unistr/test-u16-stpcpy.c
@@ -4757,6 +5700,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unistr/test-u32-mbtoucr.c
tests/unistr/test-u32-move.c
tests/unistr/test-u32-next.c
+ tests/unistr/test-u32-pcpy.c
tests/unistr/test-u32-prev.c
tests/unistr/test-u32-set.c
tests/unistr/test-u32-stpcpy.c
@@ -4794,6 +5738,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unistr/test-u8-mbtoucr.c
tests/unistr/test-u8-move.c
tests/unistr/test-u8-next.c
+ tests/unistr/test-u8-pcpy.c
tests/unistr/test-u8-prev.c
tests/unistr/test-u8-set.c
tests/unistr/test-u8-stpcpy.c
@@ -4817,6 +5762,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/unistr/test-u8-to-u16.c
tests/unistr/test-u8-to-u32.c
tests/unistr/test-u8-uctomb.c
+ tests/unistr/test-unistr-h.c
tests/uniwbrk/WordBreakTest.txt
tests/uniwbrk/test-u16-wordbreaks.c
tests/uniwbrk/test-u32-wordbreaks.c
@@ -4825,6 +5771,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests/uniwbrk/test-uc-wordbreaks.sh
tests/uniwbrk/test-ulc-wordbreaks.c
tests/uniwbrk/test-ulc-wordbreaks.sh
+ tests/uniwbrk/test-uniwbrk-h.c
tests/uniwidth/test-u16-strwidth.c
tests/uniwidth/test-u16-width.c
tests/uniwidth/test-u32-strwidth.c
@@ -4834,32 +5781,42 @@ AC_DEFUN([gl_FILE_LIST], [
tests/uniwidth/test-uc_width.c
tests/uniwidth/test-uc_width2.c
tests/uniwidth/test-uc_width2.sh
+ tests/uniwidth/test-uniwidth-h.c
+ tests/virtualbox.h
+ tests/windows-utf8.manifest
+ tests/windows-utf8.rc
tests/zerosize-ptr.h
tests=lib/_Noreturn.h
tests=lib/accept.c
tests=lib/alloca.c
tests=lib/arg-nonnull.h
+ tests=lib/arpa_inet.c
tests=lib/arpa_inet.in.h
tests=lib/basename-lgpl.c
tests=lib/basename-lgpl.h
tests=lib/binary-io.c
tests=lib/binary-io.h
tests=lib/bind.c
+ tests=lib/btoc32.c
tests=lib/btowc.c
tests=lib/c++defs.h
+ tests=lib/c32rtomb.c
+ tests=lib/c32tob.c
tests=lib/calloc.c
+ tests=lib/cdefs.h
tests=lib/cloexec.c
tests=lib/cloexec.h
tests=lib/close.c
+ tests=lib/concat-filename.c
+ tests=lib/concat-filename.h
tests=lib/connect.c
tests=lib/ctype.in.h
tests=lib/dup2.c
tests=lib/error.c
- tests=lib/error.h
+ tests=lib/error.in.h
tests=lib/exitfail.c
tests=lib/exitfail.h
tests=lib/fcntl.c
- tests=lib/fcntl.in.h
tests=lib/fd-hook.c
tests=lib/fd-hook.h
tests=lib/fdopen.c
@@ -4868,7 +5825,6 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/ftruncate.c
tests=lib/getcwd-lgpl.c
tests=lib/getdtablesize.c
- tests=lib/getpagesize.c
tests=lib/getprogname.c
tests=lib/getprogname.h
tests=lib/gettext.h
@@ -4884,15 +5840,18 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/intprops.h
tests=lib/ioctl.c
tests=lib/isblank.c
+ tests=lib/libc-config.h
tests=lib/listen.c
tests=lib/lstat.c
tests=lib/malloc.c
tests=lib/mbtowc-impl.h
tests=lib/mbtowc.c
+ tests=lib/mkfifo.c
tests=lib/msvc-inval.c
tests=lib/msvc-inval.h
tests=lib/msvc-nothrow.c
tests=lib/msvc-nothrow.h
+ tests=lib/nan.h
tests=lib/nanosleep.c
tests=lib/netinet_in.in.h
tests=lib/open.c
@@ -4900,23 +5859,31 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/perror.c
tests=lib/pipe.c
tests=lib/pselect.c
+ tests=lib/pthread-cond.c
+ tests=lib/pthread-mutex.c
+ tests=lib/pthread-rwlock.c
tests=lib/pthread-thread.c
- tests=lib/pthread.in.h
+ tests=lib/pthread_mutex_timedlock.c
tests=lib/pthread_sigmask.c
tests=lib/putenv.c
tests=lib/raise.c
+ tests=lib/random.c
+ tests=lib/random_r.c
tests=lib/realloc.c
tests=lib/reallocarray.c
+ tests=lib/same-inode.c
tests=lib/same-inode.h
- tests=lib/sched.in.h
tests=lib/sched_yield.c
tests=lib/select.c
tests=lib/setenv.c
tests=lib/setlocale.c
tests=lib/setsockopt.c
tests=lib/signal.in.h
+ tests=lib/signed-nan.h
+ tests=lib/signed-snan.h
tests=lib/sigprocmask.c
tests=lib/sleep.c
+ tests=lib/snan.h
tests=lib/socket.c
tests=lib/sockets.c
tests=lib/sockets.h
@@ -4925,10 +5892,13 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/stat-w32.c
tests=lib/stat-w32.h
tests=lib/stat.c
- tests=lib/stdalign.in.h
+ tests=lib/stdio-consolesafe.c
tests=lib/stdio-read.c
tests=lib/stdio-write.c
tests=lib/stdio.in.h
+ tests=lib/stpcpy.c
+ tests=lib/str_endswith.c
+ tests=lib/str_startswith.c
tests=lib/strerror-override.c
tests=lib/strerror-override.h
tests=lib/strerror.c
@@ -4941,7 +5911,7 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/sys_stat.in.h
tests=lib/sys_time.in.h
tests=lib/sys_uio.in.h
- tests=lib/time.in.h
+ tests=lib/time.c
tests=lib/unsetenv.c
tests=lib/usleep.c
tests=lib/verify.h
@@ -4951,11 +5921,23 @@ AC_DEFUN([gl_FILE_LIST], [
tests=lib/wctob.c
tests=lib/wctomb-impl.h
tests=lib/wctomb.c
+ tests=lib/windows-cond.c
+ tests=lib/windows-cond.h
+ tests=lib/windows-initguard.h
tests=lib/windows-thread.c
tests=lib/windows-thread.h
+ tests=lib/windows-timedmutex.c
+ tests=lib/windows-timedmutex.h
+ tests=lib/windows-timedrecmutex.c
+ tests=lib/windows-timedrecmutex.h
+ tests=lib/windows-timedrwlock.c
+ tests=lib/windows-timedrwlock.h
tests=lib/windows-tls.c
tests=lib/windows-tls.h
tests=lib/xalloc-die.c
tests=lib/xalloc.h
+ tests=lib/xconcat-filename.c
+ tests=lib/xgetcwd.c
+ tests=lib/xgetcwd.h
tests=lib/xmalloc.c
])
diff --git a/gnulib-m4/gnulib-i18n.m4 b/gnulib-m4/gnulib-i18n.m4
new file mode 100644
index 00000000..9a389187
--- /dev/null
+++ b/gnulib-m4/gnulib-i18n.m4
@@ -0,0 +1,61 @@
+# gnulib-i18n.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl From Bruno Haible.
+
+dnl Support for internationalization of Gnulib code.
+
+dnl GNULIB_I18N
+dnl Sets GNULIB_LOCALEDIR to indicate where to find the gnulib.mo files.
+dnl Also it defines GNULIB_LOCALEDIR as macro in config.h, that expands to
+dnl the corresponding C string.
+AC_DEFUN([GNULIB_I18N],
+[
+ dnl It is best to not test "$USE_NLS" here, because: It would be empty
+ dnl in case the package is internationalized but this macro is used before
+ dnl AM_GNU_GETTEXT. We would need to warn about this situation. But since
+ dnl this module is used as a dependency of many packages, such a warning is
+ dnl not welcome.
+
+ dnl Determine gnulib's localedir.
+ dnl Generally, accept an option --with-gnulib-prefix=PREFIX to indicate
+ dnl where to find gnulib's runtime data.
+ dnl Usually ${prefix}/share/locale, but can be influenced by the configure
+ dnl options --datarootdir and --localedir.
+ GNULIB_LOCALEDIR="${localedir}"
+ AC_ARG_WITH([gnulib-prefix],
+ [[ --with-gnulib-prefix=DIR search for gnulib's runtime data in DIR/share]],
+ [if test "X$withval" != "X" && test "X$withval" != "Xno"; then
+ GNULIB_LOCALEDIR="$withval/share/locale"
+ fi
+ ])
+ AC_SUBST([GNULIB_LOCALEDIR])
+
+ dnl Define GNULIB_LOCALEDIR_c and GNULIB_LOCALEDIR_c_make.
+ dnl Find the final value of GNULIB_LOCALEDIR.
+ gl_saved_prefix="${prefix}"
+ gl_saved_datarootdir="${datarootdir}"
+ gl_saved_localedir="${localedir}"
+ gl_saved_gnuliblocaledir="${GNULIB_LOCALEDIR}"
+ dnl Unfortunately, prefix gets only finally determined at the end of
+ dnl configure.
+ if test "X$prefix" = "XNONE"; then
+ prefix="$ac_default_prefix"
+ fi
+ eval datarootdir="$datarootdir"
+ eval localedir="$localedir"
+ eval GNULIB_LOCALEDIR="$GNULIB_LOCALEDIR"
+ gl_BUILD_TO_HOST([GNULIB_LOCALEDIR])
+ GNULIB_LOCALEDIR="${gl_saved_gnuliblocaledir}"
+ localedir="${gl_saved_localedir}"
+ datarootdir="${gl_saved_datarootdir}"
+ prefix="${gl_saved_prefix}"
+
+ AC_DEFINE_UNQUOTED([GNULIB_LOCALEDIR], [${GNULIB_LOCALEDIR_c}],
+ [Define to the directory where to find the localizations of the translation domain 'gnulib', as a C string.])
+])
diff --git a/gnulib-m4/host-cpu-c-abi.m4 b/gnulib-m4/host-cpu-c-abi.m4
index b9223241..23661f4f 100644
--- a/gnulib-m4/host-cpu-c-abi.m4
+++ b/gnulib-m4/host-cpu-c-abi.m4
@@ -1,8 +1,10 @@
-# host-cpu-c-abi.m4 serial 15
-dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# host-cpu-c-abi.m4
+# serial 20
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible and Sam Steingold.
@@ -35,7 +37,7 @@ dnl * The same canonical name is used for different endiannesses. You can
dnl determine the endianness through preprocessor symbols:
dnl - 'arm': test __ARMEL__.
dnl - 'mips', 'mipsn32', 'mips64': test _MIPSEB vs. _MIPSEL.
-dnl - 'powerpc64': test _BIG_ENDIAN vs. _LITTLE_ENDIAN.
+dnl - 'powerpc64': test __BIG_ENDIAN__ vs. __LITTLE_ENDIAN__.
dnl * The same name 'i386' is used for CPUs of type i386, i486, i586
dnl (Pentium), AMD K7, Pentium II, Pentium IV, etc., because
dnl - Instructions that do not exist on all of these CPUs (cmpxchg,
@@ -140,7 +142,7 @@ changequote([,])dnl
else
gl_cv_host_cpu_c_abi=arm
fi
- rm -f conftest*
+ rm -fr conftest*
])
;;
@@ -382,6 +384,9 @@ EOF
#ifndef __ia64__
#undef __ia64__
#endif
+#ifndef __loongarch32__
+#undef __loongarch32__
+#endif
#ifndef __loongarch64__
#undef __loongarch64__
#endif
@@ -461,217 +466,66 @@ EOF
dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit
-dnl one, or to 'unknown' if unknown.
+dnl one.
dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit],
- [if test -n "$gl_cv_host_cpu_c_abi"; then
- case "$gl_cv_host_cpu_c_abi" in
- i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
- gl_cv_host_cpu_c_abi_32bit=yes ;;
- x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
- gl_cv_host_cpu_c_abi_32bit=no ;;
- *)
- gl_cv_host_cpu_c_abi_32bit=unknown ;;
- esac
- else
- case "$host_cpu" in
-
- # CPUs that only support a 32-bit ABI.
- arc \
- | bfin \
- | cris* \
- | csky \
- | epiphany \
- | ft32 \
- | h8300 \
- | m68k \
- | microblaze | microblazeel \
- | nds32 | nds32le | nds32be \
- | nios2 | nios2eb | nios2el \
- | or1k* \
- | or32 \
- | sh | sh[1234] | sh[1234]e[lb] \
- | tic6x \
- | xtensa* )
- gl_cv_host_cpu_c_abi_32bit=yes
- ;;
+ [case "$host_cpu" in
- # CPUs that only support a 64-bit ABI.
-changequote(,)dnl
- alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
- | mmix )
-changequote([,])dnl
- gl_cv_host_cpu_c_abi_32bit=no
- ;;
+ # CPUs that only support a 32-bit ABI.
+ arc \
+ | bfin \
+ | cris* \
+ | csky \
+ | epiphany \
+ | ft32 \
+ | h8300 \
+ | m68k \
+ | microblaze | microblazeel \
+ | nds32 | nds32le | nds32be \
+ | nios2 | nios2eb | nios2el \
+ | or1k* \
+ | or32 \
+ | sh | sh[1234] | sh[1234]e[lb] \
+ | tic6x \
+ | xtensa* )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+ # CPUs that only support a 64-bit ABI.
changequote(,)dnl
- i[34567]86 )
+ alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+ | mmix )
changequote([,])dnl
- gl_cv_host_cpu_c_abi_32bit=yes
- ;;
-
- x86_64 )
- # On x86_64 systems, the C compiler may be generating code in one of
- # these ABIs:
- # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
- # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
- # with native Windows (mingw, MSVC).
- # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32.
- # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if (defined __x86_64__ || defined __amd64__ \
- || defined _M_X64 || defined _M_AMD64) \
- && !(defined __ILP32__ || defined _ILP32)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- arm* | aarch64 )
- # Assume arm with EABI.
- # On arm64 systems, the C compiler may be generating code in one of
- # these ABIs:
- # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
- # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32.
- # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
- # On hppa, the C compiler may be generating 32-bit code or 64-bit
- # code. In the latter case, it defines _LP64 and __LP64__.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef __LP64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- ia64* )
- # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
- # 32-bit code. In the latter case, it defines _ILP32.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef _ILP32
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=yes],
- [gl_cv_host_cpu_c_abi_32bit=no])
- ;;
-
- mips* )
- # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
- # at 32.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- powerpc* )
- # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
- # No need to distinguish them here; the caller may distinguish
- # them based on the OS.
- # On powerpc64 systems, the C compiler may still be generating
- # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
- # be generating 64-bit code.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __powerpc64__ || defined __LP64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- rs6000 )
- gl_cv_host_cpu_c_abi_32bit=yes
- ;;
-
- riscv32 | riscv64 )
- # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
- # Size of 'long' and 'void *':
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __LP64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- s390* )
- # On s390x, the C compiler may be generating 64-bit (= s390x) code
- # or 31-bit (= s390) code.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __LP64__ || defined __s390x__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
- sparc | sparc64 )
- # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
- # C compiler still generates 32-bit code.
+ *)
+ if test -n "$gl_cv_host_cpu_c_abi"; then
+ dnl gl_HOST_CPU_C_ABI has already been run. Use its result.
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | loongarch32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+ gl_cv_host_cpu_c_abi_32bit=yes ;;
+ x86_64 | alpha | arm64 | aarch64c | hppa64 | ia64 | loongarch64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
+ gl_cv_host_cpu_c_abi_32bit=no ;;
+ *)
+ gl_cv_host_cpu_c_abi_32bit=unknown ;;
+ esac
+ else
+ gl_cv_host_cpu_c_abi_32bit=unknown
+ fi
+ if test $gl_cv_host_cpu_c_abi_32bit = unknown; then
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE(
- [[#if defined __sparcv9 || defined __arch64__
- int ok;
- #else
- error fail
- #endif
+ [[int test_pointer_size[sizeof (void *) - 5];
]])],
[gl_cv_host_cpu_c_abi_32bit=no],
[gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- *)
- gl_cv_host_cpu_c_abi_32bit=unknown
- ;;
- esac
- fi
+ fi
+ ;;
+ esac
])
HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
diff --git a/gnulib-m4/iconv.m4 b/gnulib-m4/iconv.m4
index 2065c977..7f14fc3e 100644
--- a/gnulib-m4/iconv.m4
+++ b/gnulib-m4/iconv.m4
@@ -1,9 +1,11 @@
-# iconv.m4 serial 26
-dnl Copyright (C) 2000-2002, 2007-2014, 2016-2022 Free Software Foundation,
+# iconv.m4
+# serial 32
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-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,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
@@ -26,8 +28,8 @@ AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
AC_DEFUN([AM_ICONV_LINK],
[
- dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
- dnl those with the standalone portable GNU libiconv installed).
+ dnl Some systems have iconv in libc, some have it in libiconv (those
+ dnl with the standalone portable GNU libiconv installed).
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
@@ -38,7 +40,7 @@ AC_DEFUN([AM_ICONV_LINK],
dnl because if the user has installed libiconv and not disabled its use
dnl via --without-libiconv-prefix, he wants to use it. The first
dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
- am_save_CPPFLAGS="$CPPFLAGS"
+ gl_saved_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
@@ -55,7 +57,7 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close(cd);]])],
[am_cv_func_iconv=yes])
if test "$am_cv_func_iconv" != yes; then
- am_save_LIBS="$LIBS"
+ gl_saved_LIBS="$LIBS"
LIBS="$LIBS $LIBICONV"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -68,14 +70,14 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close(cd);]])],
[am_cv_lib_iconv=yes]
[am_cv_func_iconv=yes])
- LIBS="$am_save_LIBS"
+ LIBS="$gl_saved_LIBS"
fi
])
if test "$am_cv_func_iconv" = yes; then
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
- dnl Solaris 10.
- am_save_LIBS="$LIBS"
+ dnl Solaris 10, macOS 14.4.
+ gl_saved_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
@@ -113,6 +115,35 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close (cd_utf8_to_88591);
}
}
+ /* Test against macOS 14.4 bug: Failures are not distinguishable from
+ successful returns.
+ POSIX:2018 says: "The iconv() function shall ... return the number of
+ non-identical conversions performed."
+ But here, the conversion always does transliteration (the suffixes
+ "//TRANSLIT" and "//IGNORE" have no effect, nor does iconvctl()) and
+ does not report when it does a non-identical conversion. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\305\202"; /* LATIN SMALL LETTER L WITH STROKE */
+ char buf[10];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ /* Here:
+ With glibc, GNU libiconv (including macOS up to 13): res == (size_t)-1, errno == EILSEQ.
+ With musl libc, NetBSD 10, Solaris 11: res == 1.
+ With macOS 14.4: res == 0, output is "l". */
+ if (res == 0)
+ result |= 2;
+ iconv_close (cd_utf8_to_88591);
+ }
+ }
/* Test against Solaris 10 bug: Failures are not distinguishable from
successful returns. */
{
@@ -129,7 +160,7 @@ AC_DEFUN([AM_ICONV_LINK],
&inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
- result |= 2;
+ result |= 4;
iconv_close (cd_ascii_to_88591);
}
}
@@ -148,7 +179,7 @@ AC_DEFUN([AM_ICONV_LINK],
&inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
- result |= 4;
+ result |= 8;
iconv_close (cd_88591_to_utf8);
}
}
@@ -168,7 +199,7 @@ AC_DEFUN([AM_ICONV_LINK],
&inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
- result |= 8;
+ result |= 16;
iconv_close (cd_88591_to_utf8);
}
}
@@ -178,7 +209,7 @@ AC_DEFUN([AM_ICONV_LINK],
{
/* Try standardized names. */
iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP");
- /* Try IRIX, OSF/1 names. */
+ /* Try possible *BSD names. */
iconv_t cd2 = iconv_open ("UTF-8", "eucJP");
/* Try AIX names. */
iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP");
@@ -186,7 +217,7 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_t cd4 = iconv_open ("utf8", "eucJP");
if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
&& cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
- result |= 16;
+ result |= 32;
if (cd1 != (iconv_t)(-1))
iconv_close (cd1);
if (cd2 != (iconv_t)(-1))
@@ -205,7 +236,7 @@ AC_DEFUN([AM_ICONV_LINK],
esac])
test "$am_cv_func_iconv_works" = no || break
done
- LIBS="$am_save_LIBS"
+ LIBS="$gl_saved_LIBS"
])
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
@@ -224,7 +255,7 @@ AC_DEFUN([AM_ICONV_LINK],
else
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
dnl either.
- CPPFLAGS="$am_save_CPPFLAGS"
+ CPPFLAGS="$gl_saved_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi
diff --git a/gnulib-m4/iconv_h.m4 b/gnulib-m4/iconv_h.m4
index 58465662..506ad2bc 100644
--- a/gnulib-m4/iconv_h.m4
+++ b/gnulib-m4/iconv_h.m4
@@ -1,8 +1,10 @@
-# iconv_h.m4 serial 16
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# iconv_h.m4
+# serial 16
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_ICONV_H],
[
diff --git a/gnulib-m4/iconv_open.m4 b/gnulib-m4/iconv_open.m4
index 1ed26cd8..bebf94d0 100644
--- a/gnulib-m4/iconv_open.m4
+++ b/gnulib-m4/iconv_open.m4
@@ -1,8 +1,10 @@
-# iconv_open.m4 serial 16
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# iconv_open.m4
+# serial 19
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_ICONV_OPEN],
[
@@ -16,7 +18,8 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN],
dnl We know that GNU libiconv and GNU libc do.
AC_EGREP_CPP([gnu_iconv], [
#include <iconv.h>
- #if defined _LIBICONV_VERSION || (defined __GLIBC__ && !defined __UCLIBC__)
+ #if (defined _LIBICONV_VERSION && !(_LIBICONV_VERSION == 0x10b && defined __APPLE__)) \
+ || (defined __GLIBC__ && !defined __UCLIBC__)
gnu_iconv
#endif
], [gl_func_iconv_gnu=yes], [gl_func_iconv_gnu=no])
@@ -24,9 +27,7 @@ AC_DEFUN([gl_FUNC_ICONV_OPEN],
iconv_flavor=
case "$host_os" in
aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
- irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
- osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
openedition*) iconv_flavor=ICONV_FLAVOR_ZOS ;;
esac
diff --git a/gnulib-m4/include_next.m4 b/gnulib-m4/include_next.m4
index a9247f6f..a19f2dfd 100644
--- a/gnulib-m4/include_next.m4
+++ b/gnulib-m4/include_next.m4
@@ -1,8 +1,10 @@
-# include_next.m4 serial 26
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# include_next.m4
+# serial 27
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert and Derek Price.
@@ -74,17 +76,17 @@ EOF
#endif
#define DEFINED_IN_CONFTESTD2
EOF
- gl_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+ gl_saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$gl_saved_CPPFLAGS -Iconftestd1b -Iconftestd2"
dnl We intentionally avoid using AC_LANG_SOURCE here.
AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
[gl_cv_have_include_next=yes],
- [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+ [CPPFLAGS="$gl_saved_CPPFLAGS -Iconftestd1a -Iconftestd2"
AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
[gl_cv_have_include_next=buggy],
[gl_cv_have_include_next=no])
])
- CPPFLAGS="$gl_save_CPPFLAGS"
+ CPPFLAGS="$gl_saved_CPPFLAGS"
rm -rf conftestd1a conftestd1b conftestd2
])
PRAGMA_SYSTEM_HEADER=
diff --git a/gnulib-m4/inet_pton.m4 b/gnulib-m4/inet_pton.m4
index 9507296d..150c3a07 100644
--- a/gnulib-m4/inet_pton.m4
+++ b/gnulib-m4/inet_pton.m4
@@ -1,8 +1,10 @@
-# inet_pton.m4 serial 19
-dnl Copyright (C) 2006, 2008-2022 Free Software Foundation, Inc.
+# inet_pton.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_INET_PTON],
[
@@ -17,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 <ws2tcpip.h>, and it uses stdcall calling convention, not cdecl
dnl (hence we cannot use AC_CHECK_FUNCS, AC_SEARCH_LIBS to find it).
@@ -36,14 +39,14 @@ AC_DEFUN([gl_FUNC_INET_PTON],
HAVE_DECL_INET_PTON=0
fi
else
- gl_save_LIBS=$LIBS
- AC_SEARCH_LIBS([inet_pton], [nsl resolv network], [],
+ gl_saved_LIBS=$LIBS
+ 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
fi
])
- LIBS=$gl_save_LIBS
+ LIBS=$gl_saved_LIBS
if test "$ac_cv_search_inet_pton" != "no" \
&& test "$ac_cv_search_inet_pton" != "none required"; then
diff --git a/gnulib-m4/init-package-version.m4 b/gnulib-m4/init-package-version.m4
new file mode 100644
index 00000000..ca6d3cd9
--- /dev/null
+++ b/gnulib-m4/init-package-version.m4
@@ -0,0 +1,128 @@
+# init-package-version.m4
+# serial 7
+dnl Copyright (C) 1992-2026 Free Software Foundation, Inc.
+dnl This file is free software, distributed under the terms of the GNU
+dnl General Public License. As a special exception to the GNU General
+dnl Public License, this file may be distributed as part of a program
+dnl that contains a configuration script generated by Autoconf, under
+dnl the same distribution terms as the rest of that program.
+
+# Make it possible to pass version numbers extracted from a file in
+# $(srcdir) to autoconf.
+#
+# Autoconf insists on passing the package name and version number to
+# every generated .h file and every Makefile. This was a reasonable
+# design at times when a version number was changed only once a month.
+# Nowadays, people often assign a new version number once a week, or
+# even change it each time a 'git' commit is made. Regenerating all
+# the files that depend on configure.ac (aclocal.m4, configure,
+# config.status, config.h, all Makefiles) may take 15 minutes. These
+# delays can severely hamper development.
+#
+# An alternative is to store the version number in a file in $(srcdir)
+# that is separate from configure.ac. It can be a data file, a shell
+# script, a .m4 file, or other. The essential point is that the maintainer
+# is responsible for creating Makefile dependencies to this version file
+# for every file that needs to be rebuilt when the version changes. This
+# typically includes
+# - distributable documentation files that carry the version number,
+# but does not include
+# - aclocal.m4, configure, config.status, config.h, all Makefiles,
+# - executables.
+#
+# autoconf and automake make it hard to follow this approach:
+#
+# - If AC_INIT is used with arguments, there is a chicken-and-egg problem:
+# The arguments need to be read from a file in $(srcdir). The location
+# of $(srcdir) is only determined by AC_CONFIG_SRCDIR. AC_CONFIG_SRCDIR
+# can only appear after AC_INIT (otherwise aclocal gives an error:
+# "error: m4_defn: undefined macro: _m4_divert_diversion").
+# Furthermore, the arguments passed to AC_INIT must be literals; for
+# example, the assignment to PACKAGE_VERSION looks like this:
+# [PACKAGE_VERSION=']AC_PACKAGE_VERSION[']
+#
+# - If AC_INIT is used without arguments:
+# Automake provides its own variables, PACKAGE and VERSION, and uses them
+# instead of PACKAGE_NAME and PACKAGE_VERSION that come from Autoconf.
+# - If AM_INIT_AUTOMAKE is used with two arguments, automake options
+# like 'silent-rules' cannot be specified.
+# - If AM_INIT_AUTOMAKE is used in its one-argument form or without
+# arguments at all, it triggers an error
+# "error: AC_INIT should be called with package and version arguments".
+# - If AM_INIT_AUTOMAKE is used in its one-argument form or without
+# arguments at all, and _AC_INIT_PACKAGE is used before it, with
+# the package and version number from the file as arguments, we get
+# a warning: "warning: AC_INIT: not a literal: $VERSION_NUMBER".
+# The arguments passed to _AC_INIT_PACKAGE must be literals.
+#
+# With the macro defined in this file, the approach can be coded like this:
+#
+# AC_INIT(PACKAGE, [package], [MORE OPTIONS])
+# AC_CONFIG_SRCDIR(WITNESS)
+# . $srcdir/../version.sh
+# gl_INIT_PACKAGE_VERSION($VERSION_NUMBER)
+# AM_INIT_AUTOMAKE([OPTIONS])
+#
+# and after changing version.sh, the developer can directly configure and build:
+#
+# make distclean
+# ./configure
+# make
+#
+# Some other packages use another approach:
+#
+# AC_INIT(PACKAGE,
+# m4_normalize(m4_esyscmd([. ./version.sh; echo $VERSION_NUMBER])))
+# AC_CONFIG_SRCDIR(WITNESS)
+# AM_INIT_AUTOMAKE([OPTIONS])
+#
+# but here, after changing version.sh, the developer must first regenerate the
+# configure file:
+#
+# make distclean
+# ./autogen.sh --skip-gnulib
+# ./configure
+# make
+#
+
+# gl_INIT_PACKAGE_VERSION(VERSION)
+# --------------------------------
+# followed by an AM_INIT_AUTOMAKE invocation,
+# is like calling AM_INIT_AUTOMAKE(PACKAGE-NAME, VERSION)
+# except that it can use computed non-literal arguments.
+AC_DEFUN([gl_INIT_PACKAGE_VERSION],
+[
+ AC_BEFORE([$0], [AM_INIT_AUTOMAKE])
+ dnl Redefine AM_INIT_AUTOMAKE.
+ m4_define([gl_AM_INIT_AUTOMAKE],
+ m4_bpatsubst(m4_dquote(m4_defn([AM_INIT_AUTOMAKE])),
+ [AC_PACKAGE_VERSION], [gl_INIT_DUMMY])
+ [dnl Set variables documented in Automake.
+ AC_SUBST([VERSION], ["$1"])
+ dnl Set variables documented in Autoconf.
+ AC_SUBST([PACKAGE_VERSION], ["$1"])
+ AC_SUBST([PACKAGE_STRING], ["AC_PACKAGE_NAME $1"])
+ _AC_DEFINE([#undef PACKAGE_VERSION])
+ AC_DEFINE_UNQUOTED([PACKAGE_VERSION], ["$1"],
+ [Define to the version of this package.])
+ _AC_DEFINE([#undef PACKAGE_STRING])
+ AC_DEFINE_UNQUOTED([PACKAGE_STRING], ["AC_PACKAGE_NAME $1"],
+ [Define to the full name and version of this package.])
+ ])
+ m4_define([AM_INIT_AUTOMAKE],
+ m4_defn([gl_RPL_INIT_AUTOMAKE]))
+])
+m4_define([gl_INIT_EMPTY], [])
+dnl Automake 1.16.4 no longer accepts an empty value for gl_INIT_DUMMY.
+dnl But a macro that later expands to empty works.
+m4_define([gl_INIT_DUMMY], [gl_INIT_DUMMY2])
+m4_define([gl_INIT_DUMMY2], [])
+AC_DEFUN([gl_RPL_INIT_AUTOMAKE], [
+ m4_ifval([$2],
+ [m4_fatal([After gl_INIT_PACKAGE_VERSION, the two-argument form of AM_INIT_AUTOMAKE cannot be used.])])
+ gl_AM_INIT_AUTOMAKE([$1 no-define])
+ m4_if(m4_index([ $1 ], [ no-define ]), [-1],
+ [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])
+ ])
+])
diff --git a/gnulib-m4/inline.m4 b/gnulib-m4/inline.m4
index 3f072655..df4402b2 100644
--- a/gnulib-m4/inline.m4
+++ b/gnulib-m4/inline.m4
@@ -1,14 +1,18 @@
-# inline.m4 serial 4
-dnl Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc.
+# inline.m4
+# serial 5
+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.
+dnl This file is offered as-is, without any warranty.
dnl Test for the 'inline' keyword or equivalent.
dnl Define 'inline' to a supported equivalent, or to nothing if not supported,
dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an
dnl equivalent is effectively supported, i.e. if the compiler is likely to
-dnl drop unused 'static inline' functions.
+dnl actually inline 'static inline' functions when there are used. (All
+dnl versions of gcc and clang actually drop the code of 'static inline'
+dnl functions that are unused in the current compilation unit.)
AC_DEFUN([gl_INLINE],
[
AC_REQUIRE([AC_C_INLINE])
diff --git a/gnulib-m4/intl-thread-locale.m4 b/gnulib-m4/intl-thread-locale.m4
index d5d5b26a..7d030abe 100644
--- a/gnulib-m4/intl-thread-locale.m4
+++ b/gnulib-m4/intl-thread-locale.m4
@@ -1,8 +1,10 @@
-# intl-thread-locale.m4 serial 9
-dnl Copyright (C) 2015-2022 Free Software Foundation, Inc.
+# intl-thread-locale.m4
+# serial 16
+dnl Copyright (C) 2015-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.
dnl
dnl This file can be used in projects which are not available under
dnl the GNU General Public License or the GNU Lesser General Public
@@ -36,15 +38,23 @@ AC_DEFUN([gt_INTL_THREAD_LOCALE_NAME],
dnl OpenBSD base system, store complete information about the global locale,
dnl such that third-party software can access it"), but for uselocale()
dnl they did not think about the programs.
- dnl In this situation, even the HAVE_NAMELESS_LOCALES support does not work.
- dnl So, define HAVE_FAKE_LOCALES and disable all locale_t support.
+ dnl In this situation, even the HAVE_NAMELESS_LOCALES support cannot make
+ dnl uselocale() work.
+ dnl Similarly on Android. See
+ dnl <https://android.googlesource.com/platform/bionic/+/refs/heads/main/libc/bionic/locale.cpp>.
+ dnl So, define HAVE_FAKE_LOCALES and disable all per-thread locale support.
+ dnl Expected result:
+ dnl - HAVE_FAKE_LOCALES is defined on OpenBSD ≥ 6.2, Android API level >= 21.
case "$gt_cv_func_uselocale_works" in
*yes)
AC_CHECK_HEADERS_ONCE([xlocale.h])
- AC_CACHE_CHECK([for fake locale system (OpenBSD)],
+ AC_CACHE_CHECK([for fake locale system (OpenBSD, Android)],
[gt_cv_locale_fake],
- [AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
+ [case "$host_os" in
+ *-android*) gt_cv_locale_fake=yes ;;
+ *)
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
#include <locale.h>
#if HAVE_XLOCALE_H
# include <xlocale.h>
@@ -58,14 +68,16 @@ int main ()
loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0);
return !(loc1 == loc2);
}]])],
- [gt_cv_locale_fake=yes],
- [gt_cv_locale_fake=no],
- [dnl Guess the locale system is fake only on OpenBSD.
- case "$host_os" in
- openbsd*) gt_cv_locale_fake="guessing yes" ;;
- *) gt_cv_locale_fake="guessing no" ;;
- esac
- ])
+ [gt_cv_locale_fake=yes],
+ [gt_cv_locale_fake=no],
+ [dnl Guess the locale system is fake only on OpenBSD.
+ case "$host_os" in
+ openbsd*) gt_cv_locale_fake="guessing yes" ;;
+ *) gt_cv_locale_fake="guessing no" ;;
+ esac
+ ])
+ ;;
+ esac
])
;;
*) gt_cv_locale_fake=no ;;
@@ -81,6 +93,7 @@ int main ()
;;
esac
+ dnl Expected result: HAVE_SOLARIS114_LOCALES is defined on Solaris ≥ 11.4.
case "$gt_cv_func_uselocale_works" in
*yes)
AC_CACHE_CHECK([for Solaris 11.4 locale system],
@@ -114,37 +127,56 @@ int main ()
[Define if the locale_t type is as on Solaris 11.4.])
fi
- dnl Solaris 12 will maybe provide getlocalename_l. If it does, it will
- dnl improve the implementation of gl_locale_name_thread(), by removing
- dnl the use of undocumented structures.
- case "$gt_cv_func_uselocale_works" in
- *yes)
- AC_CHECK_FUNCS([getlocalename_l])
- ;;
- esac
-
dnl This code is for platforms where the locale_t type does not provide access
dnl to the name of each locale category. This code has the drawback that it
dnl requires the gnulib overrides of 'newlocale', 'duplocale', 'freelocale',
dnl which is a problem for GNU libunistring. Therefore try hard to avoid
dnl enabling this code!
- gt_nameless_locales=no
+ dnl Expected result:
+ dnl - HAVE_NAMELESS_LOCALES is defined on OpenBSD ≥ 6.2, AIX,
+ dnl Android API level >= 21,
+ dnl - HAVE_AIX72_LOCALES is defined on AIX ≥ 7.2.
+ gt_nameless_locales=$gt_fake_locales
case "$host_os" in
dnl It's needed on AIX 7.2.
aix*)
gt_nameless_locales=yes
- AC_DEFINE([HAVE_NAMELESS_LOCALES], [1],
- [Define if the locale_t type does not contain the name of each locale category.])
+ dnl In AIX ≥ 7.2, a locale contains at least the name of the LC_MESSAGES
+ dnl category (fix of defect 823926).
+ AC_CACHE_CHECK([for AIX locales with LC_MESSAGES name],
+ [gt_cv_locale_aix72],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <locale.h>
+ /* Include <sys/localedef.h>, which defines __locale_t. */
+ #include <stdlib.h>
+ locale_t x;
+ ]],
+ [[return ((__locale_t) x)->locale_name[0];]])],
+ [gt_cv_locale_aix72=yes],
+ [gt_cv_locale_aix72=no])
+ ])
+ if test $gt_cv_locale_aix72 = yes; then
+ AC_DEFINE([HAVE_AIX72_LOCALES], [1],
+ [Define if the __locale_t type contains the name of the LC_MESSAGES category.])
+ fi
;;
esac
+ if test $gt_nameless_locales = yes; then
+ AC_DEFINE([HAVE_NAMELESS_LOCALES], [1],
+ [Define if the locale_t type does not contain the name of each locale category.])
+ fi
dnl We cannot support uselocale() on platforms where the locale_t type is
dnl fake. So, set
dnl gt_good_uselocale = gt_working_uselocale && !gt_fake_locales.
+ dnl Expected result: HAVE_GOOD_USELOCALE is defined on all platforms except
+ dnl FreeBSD < 9.1, NetBSD, OpenBSD, Minix, AIX < 7, AIX 7.2, HP-UX,
+ dnl Solaris < 11.4, Cygwin < 2.6, mingw, MSVC 14, Android.
if test $gt_working_uselocale = yes && test $gt_fake_locales = no; then
gt_good_uselocale=yes
AC_DEFINE([HAVE_GOOD_USELOCALE], [1],
- [Define if the uselocale exists, may be safely called, and returns sufficient information.])
+ [Define if the uselocale function exists, may be safely called, and returns sufficient information.])
else
gt_good_uselocale=no
fi
@@ -152,7 +184,9 @@ int main ()
dnl Set gt_localename_enhances_locale_funcs to indicate whether localename.c
dnl overrides newlocale(), duplocale(), freelocale() to keep track of locale
dnl names.
- if test $gt_good_uselocale = yes && test $gt_nameless_locales = yes; then
+ dnl Expected result: LOCALENAME_ENHANCE_LOCALE_FUNCS is defined on
+ dnl OpenBSD ≥ 6.2, AIX 7.1, AIX ≥ 7.3, Android API level >= 21.
+ if test $gt_working_uselocale = yes && test $gt_nameless_locales = yes; then
gt_localename_enhances_locale_funcs=yes
LOCALENAME_ENHANCE_LOCALE_FUNCS=1
AC_DEFINE([LOCALENAME_ENHANCE_LOCALE_FUNCS], [1],
@@ -164,6 +198,9 @@ int main ()
dnl Tests whether uselocale() exists and is usable.
dnl Sets gt_working_uselocale and defines HAVE_WORKING_USELOCALE.
+dnl Expected result: HAVE_WORKING_USELOCALE is defined on all platforms except
+dnl FreeBSD < 9.1, NetBSD, OpenBSD < 6.2, Minix, AIX < 7, AIX 7.2, HP-UX,
+dnl Solaris < 11.4, Cygwin < 2.6, mingw, MSVC 14, Android API level < 21.
AC_DEFUN([gt_FUNC_USELOCALE],
[
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -171,7 +208,7 @@ AC_DEFUN([gt_FUNC_USELOCALE],
dnl Persuade glibc and Solaris <locale.h> to define 'locale_t'.
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([uselocale])
+ gl_CHECK_FUNCS_ANDROID([uselocale], [[#include <locale.h>]])
dnl On AIX 7.2, the uselocale() function is not documented and leads to
dnl crashes in subsequent setlocale() invocations.
diff --git a/gnulib-m4/intlmacosx.m4 b/gnulib-m4/intlmacosx.m4
index ecc88d6e..d28df608 100644
--- a/gnulib-m4/intlmacosx.m4
+++ b/gnulib-m4/intlmacosx.m4
@@ -1,8 +1,10 @@
-# intlmacosx.m4 serial 8 (gettext-0.20.2)
-dnl Copyright (C) 2004-2014, 2016, 2019-2022 Free Software Foundation, Inc.
+# intlmacosx.m4
+# serial 10 (gettext-0.23)
+dnl Copyright (C) 2004-2014, 2016, 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.
+dnl This file is offered as-is, without any warranty.
dnl
dnl This file can be used in projects which are not available under
dnl the GNU General Public License or the GNU Lesser General Public
@@ -20,7 +22,7 @@ AC_DEFUN([gt_INTL_MACOSX],
dnl Check for API introduced in Mac OS X 10.4.
AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
[gt_cv_func_CFPreferencesCopyAppValue],
- [gt_save_LIBS="$LIBS"
+ [gt_saved_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -28,7 +30,7 @@ AC_DEFUN([gt_INTL_MACOSX],
[[CFPreferencesCopyAppValue(NULL, NULL)]])],
[gt_cv_func_CFPreferencesCopyAppValue=yes],
[gt_cv_func_CFPreferencesCopyAppValue=no])
- LIBS="$gt_save_LIBS"])
+ LIBS="$gt_saved_LIBS"])
if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
[Define to 1 if you have the Mac OS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
@@ -43,7 +45,7 @@ AC_DEFUN([gt_INTL_MACOSX],
dnl CFPreferencesCopyAppValue still returns, namely ll_CC where ll is the
dnl first among the preferred languages and CC is the territory.
AC_CACHE_CHECK([for CFLocaleCopyPreferredLanguages], [gt_cv_func_CFLocaleCopyPreferredLanguages],
- [gt_save_LIBS="$LIBS"
+ [gt_saved_LIBS="$LIBS"
LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -51,7 +53,7 @@ AC_DEFUN([gt_INTL_MACOSX],
[[CFLocaleCopyPreferredLanguages();]])],
[gt_cv_func_CFLocaleCopyPreferredLanguages=yes],
[gt_cv_func_CFLocaleCopyPreferredLanguages=no])
- LIBS="$gt_save_LIBS"])
+ LIBS="$gt_saved_LIBS"])
if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
AC_DEFINE([HAVE_CFLOCALECOPYPREFERREDLANGUAGES], [1],
[Define to 1 if you have the Mac OS X function CFLocaleCopyPreferredLanguages in the CoreFoundation framework.])
@@ -59,7 +61,11 @@ AC_DEFUN([gt_INTL_MACOSX],
INTL_MACOSX_LIBS=
if test $gt_cv_func_CFPreferencesCopyAppValue = yes \
|| test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then
- INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ dnl Starting with macOS version 14, CoreFoundation relies on CoreServices,
+ dnl and we have to link it in explicitly, otherwise an exception
+ dnl NSInvalidArgumentException "unrecognized selector sent to instance"
+ dnl occurs.
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation -Wl,-framework -Wl,CoreServices"
fi
AC_SUBST([INTL_MACOSX_LIBS])
])
diff --git a/gnulib-m4/intmax_t.m4 b/gnulib-m4/intmax_t.m4
index 8a15dabd..ad79536c 100644
--- a/gnulib-m4/intmax_t.m4
+++ b/gnulib-m4/intmax_t.m4
@@ -1,9 +1,11 @@
-# intmax_t.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2022 Free Software Foundation,
+# intmax_t.m4
+# serial 9
+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,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert.
diff --git a/gnulib-m4/inttypes.m4 b/gnulib-m4/inttypes.m4
index df25a21e..ec17c237 100644
--- a/gnulib-m4/inttypes.m4
+++ b/gnulib-m4/inttypes.m4
@@ -1,8 +1,10 @@
-# inttypes.m4 serial 36
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# inttypes.m4
+# serial 37
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Derek Price, Bruno Haible.
dnl Test whether <inttypes.h> is supported or must be substituted.
@@ -170,6 +172,10 @@ AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
HAVE_IMAXDIV_T=1; AC_SUBST([HAVE_IMAXDIV_T])
+ HAVE_IMAXABS=1; AC_SUBST([HAVE_IMAXABS])
+ HAVE_IMAXDIV=1; AC_SUBST([HAVE_IMAXDIV])
+ REPLACE_IMAXABS=0; AC_SUBST([REPLACE_IMAXABS])
+ REPLACE_IMAXDIV=0; AC_SUBST([REPLACE_IMAXDIV])
REPLACE_STRTOIMAX=0; AC_SUBST([REPLACE_STRTOIMAX])
REPLACE_STRTOUMAX=0; AC_SUBST([REPLACE_STRTOUMAX])
INT32_MAX_LT_INTMAX_MAX=1; AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
diff --git a/gnulib-m4/inttypes_h.m4 b/gnulib-m4/inttypes_h.m4
index 6e9eebf1..ed9e7033 100644
--- a/gnulib-m4/inttypes_h.m4
+++ b/gnulib-m4/inttypes_h.m4
@@ -1,8 +1,10 @@
-# inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2022 Free Software Foundation, Inc.
+# inttypes_h.m4
+# serial 10
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert.
diff --git a/gnulib-m4/ioctl.m4 b/gnulib-m4/ioctl.m4
index 7c721345..4a79aecd 100644
--- a/gnulib-m4/ioctl.m4
+++ b/gnulib-m4/ioctl.m4
@@ -1,8 +1,10 @@
-# ioctl.m4 serial 6
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# ioctl.m4
+# serial 6
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_IOCTL],
[
diff --git a/gnulib-m4/isblank.m4 b/gnulib-m4/isblank.m4
index 1d0ed6ce..f3af7cc1 100644
--- a/gnulib-m4/isblank.m4
+++ b/gnulib-m4/isblank.m4
@@ -1,8 +1,10 @@
-# isblank.m4 serial 3
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# isblank.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_ISBLANK],
[
diff --git a/gnulib-m4/isnand.m4 b/gnulib-m4/isnand.m4
index 4eadde7c..962cf9d4 100644
--- a/gnulib-m4/isnand.m4
+++ b/gnulib-m4/isnand.m4
@@ -1,12 +1,14 @@
-# isnand.m4 serial 12
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# isnand.m4
+# serial 15
+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.
+dnl This file is offered as-is, without any warranty.
dnl Check how to get or define isnand().
-AC_DEFUN([gl_FUNC_ISNAND],
+AC_DEFUN_ONCE([gl_FUNC_ISNAND],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
ISNAND_LIBM=
@@ -18,8 +20,7 @@ AC_DEFUN([gl_FUNC_ISNAND],
fi
fi
dnl The variable gl_func_isnand set here is used by isnan.m4.
- if test $gl_cv_func_isnand_no_libm = yes \
- || test $gl_cv_func_isnand_in_libm = yes; then
+ if test $gl_cv_func_isnand_no_libm = yes || test -n "$ISNAND_LIBM"; then
gl_func_isnand=yes
else
gl_func_isnand=no
@@ -53,7 +54,7 @@ AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM],
AC_CACHE_CHECK([whether isnan(double) can be used with libm],
[gl_cv_func_isnand_in_libm],
[
- save_LIBS="$LIBS"
+ saved_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -69,7 +70,7 @@ AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM],
[[return isnand (x);]])],
[gl_cv_func_isnand_in_libm=yes],
[gl_cv_func_isnand_in_libm=no])
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
])
])
diff --git a/gnulib-m4/isnanf.m4 b/gnulib-m4/isnanf.m4
index 44c825a1..ab89e287 100644
--- a/gnulib-m4/isnanf.m4
+++ b/gnulib-m4/isnanf.m4
@@ -1,8 +1,10 @@
-# isnanf.m4 serial 18
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# isnanf.m4
+# serial 22
+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.
+dnl This file is offered as-is, without any warranty.
dnl Check how to get or define isnanf().
@@ -18,12 +20,11 @@ AC_DEFUN([gl_FUNC_ISNANF],
fi
fi
dnl The variable gl_func_isnanf set here is used by isnan.m4.
- if test $gl_cv_func_isnanf_no_libm = yes \
- || test $gl_cv_func_isnanf_in_libm = yes; then
- save_LIBS="$LIBS"
+ if test $gl_cv_func_isnanf_no_libm = yes || test -n "$ISNANF_LIBM"; then
+ saved_LIBS="$LIBS"
LIBS="$LIBS $ISNANF_LIBM"
gl_ISNANF_WORKS
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
case "$gl_cv_func_isnanf_works" in
*yes) gl_func_isnanf=yes ;;
*) gl_func_isnanf=no; ISNANF_LIBM= ;;
@@ -94,7 +95,7 @@ AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM],
AC_CACHE_CHECK([whether isnan(float) can be used with libm],
[gl_cv_func_isnanf_in_libm],
[
- save_LIBS="$LIBS"
+ saved_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -110,13 +111,11 @@ AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM],
[[return isnanf (x);]])],
[gl_cv_func_isnanf_in_libm=yes],
[gl_cv_func_isnanf_in_libm=no])
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
])
])
-dnl Test whether isnanf() rejects Infinity (this fails on Solaris 2.5.1),
-dnl recognizes a NaN (this fails on IRIX 6.5 with cc), and recognizes a NaN
-dnl with in-memory representation 0x7fbfffff (this fails on IRIX 6.5).
+dnl Test whether isnanf() rejects Infinity (this fails on Solaris 2.5.1).
AC_DEFUN([gl_ISNANF_WORKS],
[
AC_REQUIRE([AC_PROG_CC])
@@ -134,20 +133,6 @@ AC_DEFUN([gl_ISNANF_WORKS],
# undef isnanf
# define isnanf(x) isnan ((float)(x))
#endif
-/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
-#ifdef __DECC
-static float
-NaN ()
-{
- static float zero = 0.0f;
- return zero / zero;
-}
-#else
-# define NaN() (0.0f / 0.0f)
-#endif
-#define NWORDS \
- ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
-typedef union { unsigned int word[NWORDS]; float value; } memory_float;
int main()
{
int result = 0;
@@ -155,33 +140,13 @@ int main()
if (isnanf (1.0f / 0.0f))
result |= 1;
- if (!isnanf (NaN ()))
- result |= 2;
-
-#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
- /* The isnanf function should be immune against changes in the sign bit and
- in the mantissa bits. The xor operation twiddles a bit that can only be
- a sign bit or a mantissa bit. */
- if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
- {
- memory_float m;
-
- m.value = NaN ();
- /* Set the bits below the exponent to 01111...111. */
- m.word[0] &= -1U << FLT_EXPBIT0_BIT;
- m.word[0] |= (1U << (FLT_EXPBIT0_BIT - 1)) - 1;
- if (!isnanf (m.value))
- result |= 4;
- }
-#endif
-
return result;
}]])],
[gl_cv_func_isnanf_works=yes],
[gl_cv_func_isnanf_works=no],
[case "$host_os" in
- irix* | solaris*) gl_cv_func_isnanf_works="guessing no" ;;
- mingw*) # Guess yes on mingw, no on MSVC.
+ solaris*) gl_cv_func_isnanf_works="guessing no" ;;
+ mingw* | windows*) # Guess yes on mingw, no on MSVC.
AC_EGREP_CPP([Known], [
#ifdef __MINGW32__
Known
diff --git a/gnulib-m4/isnanl.m4 b/gnulib-m4/isnanl.m4
index fa49a644..495a959a 100644
--- a/gnulib-m4/isnanl.m4
+++ b/gnulib-m4/isnanl.m4
@@ -1,10 +1,12 @@
-# isnanl.m4 serial 22
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# isnanl.m4
+# serial 27
+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.
+dnl This file is offered as-is, without any warranty.
-AC_DEFUN([gl_FUNC_ISNANL],
+AC_DEFUN_ONCE([gl_FUNC_ISNANL],
[
AC_REQUIRE([gl_MATH_H_DEFAULTS])
ISNANL_LIBM=
@@ -16,12 +18,11 @@ AC_DEFUN([gl_FUNC_ISNANL],
fi
fi
dnl The variable gl_func_isnanl set here is used by isnan.m4.
- if test $gl_cv_func_isnanl_no_libm = yes \
- || test $gl_cv_func_isnanl_in_libm = yes; then
- save_LIBS="$LIBS"
+ if test $gl_cv_func_isnanl_no_libm = yes || test -n "$ISNANL_LIBM"; then
+ saved_LIBS="$LIBS"
LIBS="$LIBS $ISNANL_LIBM"
gl_FUNC_ISNANL_WORKS
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
case "$gl_cv_func_isnanl_works" in
*yes) gl_func_isnanl=yes ;;
*) gl_func_isnanl=no; ISNANL_LIBM= ;;
@@ -88,7 +89,7 @@ AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM],
AC_CACHE_CHECK([whether isnan(long double) can be used with libm],
[gl_cv_func_isnanl_in_libm],
[
- save_LIBS="$LIBS"
+ saved_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -104,7 +105,7 @@ AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM],
[[return isnanl (x);]])],
[gl_cv_func_isnanl_in_libm=yes],
[gl_cv_func_isnanl_in_libm=no])
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
])
])
@@ -134,17 +135,7 @@ AC_DEFUN([gl_FUNC_ISNANL_WORKS],
((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
typedef union { unsigned int word[NWORDS]; long double value; }
memory_long_double;
-/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
- runtime type conversion. */
-#ifdef __sgi
-static long double NaNl ()
-{
- double zero = 0.0;
- return zero / zero;
-}
-#else
-# define NaNl() (0.0L / 0.0L)
-#endif
+#define NaNl() (0.0L / 0.0L)
int main ()
{
int result = 0;
@@ -232,7 +223,7 @@ int main ()
[gl_cv_func_isnanl_works=yes],
[gl_cv_func_isnanl_works=no],
[case "$host_os" in
- mingw*) # Guess yes on mingw, no on MSVC.
+ mingw* | windows*) # Guess yes on mingw, no on MSVC.
AC_EGREP_CPP([Known], [
#ifdef __MINGW32__
Known
diff --git a/gnulib-m4/iswblank.m4 b/gnulib-m4/iswblank.m4
index ddecf9b8..2c301a97 100644
--- a/gnulib-m4/iswblank.m4
+++ b/gnulib-m4/iswblank.m4
@@ -1,8 +1,10 @@
-# iswblank.m4 serial 5
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# iswblank.m4
+# serial 7
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_ISWBLANK],
[
@@ -10,14 +12,18 @@ AC_DEFUN([gl_FUNC_ISWBLANK],
AC_REQUIRE([gl_WCTYPE_H])
dnl Persuade glibc <wctype.h> to declare iswblank().
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
- AC_CHECK_FUNCS_ONCE([iswblank])
+ gl_CHECK_FUNCS_ANDROID([iswblank], [[#include <wctype.h>]])
AC_CHECK_DECLS([iswblank], , , [[
#include <wchar.h>
#include <wctype.h>
]])
if test $ac_cv_func_iswblank = no; then
HAVE_ISWBLANK=0
- if test $ac_cv_have_decl_iswblank = yes; then
+ if test $ac_cv_have_decl_iswblank = yes \
+ || case "$gl_cv_onwards_func_iswblank" in \
+ future*) true ;; \
+ *) false ;; \
+ esac; then
REPLACE_ISWBLANK=1
fi
fi
diff --git a/gnulib-m4/iswdigit.m4 b/gnulib-m4/iswdigit.m4
index 643c5b29..7fca8167 100644
--- a/gnulib-m4/iswdigit.m4
+++ b/gnulib-m4/iswdigit.m4
@@ -1,8 +1,10 @@
-# iswdigit.m4 serial 3
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+# iswdigit.m4
+# serial 9
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_ISWDIGIT],
[
@@ -10,8 +12,9 @@ AC_DEFUN([gl_FUNC_ISWDIGIT],
AC_REQUIRE([gl_WCTYPE_H])
AC_REQUIRE([gt_LOCALE_FR])
AC_REQUIRE([gt_LOCALE_JA])
- AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_EN_UTF8])
AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST])
if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
dnl <wctype.h> redefines iswdigit already.
@@ -24,14 +27,14 @@ AC_DEFUN([gl_FUNC_ISWDIGIT],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
- freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
+ # Guess no on FreeBSD, NetBSD, OpenBSD, Solaris, native Windows, Haiku, Android.
+ freebsd* | dragonfly* | netbsd* | openbsd* | solaris* | mingw* | windows* | haiku* | *-android*)
gl_cv_func_iswdigit_works="guessing no" ;;
# Guess yes otherwise.
*) gl_cv_func_iswdigit_works="guessing yes" ;;
esac
changequote([,])dnl
- if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
+ if test $LOCALE_FR != none || test $LOCALE_JA != none || test "$LOCALE_EN_UTF8" != none || test $LOCALE_ZH_CN != none; then
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
@@ -63,7 +66,8 @@ main (int argc, char *argv[])
int is;
int result = 0;
- if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ if (strcmp ("$LOCALE_FR", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
{
/* This fails on mingw, MSVC 14. */
/* U+00B2 SUPERSCRIPT TWO */
@@ -71,30 +75,33 @@ main (int argc, char *argv[])
if (!(is == 0))
result |= 1;
}
- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
{
- /* This fails on NetBSD 8.0. */
+ /* This fails on NetBSD 10.0. */
/* U+FF11 FULLWIDTH DIGIT ONE */
is = for_character ("\243\261", 2);
if (!(is == 0))
result |= 2;
}
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (strcmp ("$LOCALE_EN_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
{
- /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
+ /* This fails on FreeBSD 13.0, NetBSD 10.0, OpenBSD 7.5, MSVC 14, Haiku, Android. */
/* U+0663 ARABIC-INDIC DIGIT THREE */
is = for_character ("\331\243", 2);
if (!(is == 0))
result |= 4;
- /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
+ /* This fails on FreeBSD 13.0, NetBSD 10.0, OpenBSD 7.5, MSVC 14, Haiku, Android. */
/* U+FF11 FULLWIDTH DIGIT ONE */
is = for_character ("\357\274\221", 3);
if (!(is == 0))
result |= 8;
}
- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
{
- /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4. */
+ /* This fails on NetBSD 10.0, Solaris 10, Solaris 11.4. */
/* U+FF11 FULLWIDTH DIGIT ONE */
is = for_character ("\243\261", 2);
if (!(is == 0))
diff --git a/gnulib-m4/iswpunct.m4 b/gnulib-m4/iswpunct.m4
new file mode 100644
index 00000000..be312d6c
--- /dev/null
+++ b/gnulib-m4/iswpunct.m4
@@ -0,0 +1,50 @@
+# iswpunct.m4
+# serial 2
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_FUNC_ISWPUNCT],
+[
+ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+ AC_REQUIRE([gl_WCTYPE_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+ dnl <wctype.h> redefines iswpunct already.
+ REPLACE_ISWPUNCT="$REPLACE_ISWCNTRL"
+ else
+ AC_CACHE_CHECK([whether iswpunct is consistent with ispunct],
+ [gl_cv_func_iswpunct_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <ctype.h>
+#include <wchar.h>
+#include <wctype.h>
+int
+main (int argc, char *argv[])
+{
+ int result = 0;
+ /* This fails on Android 11. */
+ if ((! iswpunct ('\`')) != (! ispunct ('\`')))
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_iswpunct_works=yes],
+ [gl_cv_func_iswpunct_works=no],
+ [case "$host_os" in
+ # Guess no on Android.
+ android*) gl_cv_func_iswpunct_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_iswpunct_works="guessing yes" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_iswpunct_works" in
+ *yes) ;;
+ *) REPLACE_ISWPUNCT=1 ;;
+ esac
+ fi
+])
diff --git a/gnulib-m4/iswxdigit.m4 b/gnulib-m4/iswxdigit.m4
index cc7c1a24..2cb8e873 100644
--- a/gnulib-m4/iswxdigit.m4
+++ b/gnulib-m4/iswxdigit.m4
@@ -1,16 +1,19 @@
-# iswxdigit.m4 serial 3
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+# iswxdigit.m4
+# serial 9
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_ISWXDIGIT],
[
AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
AC_REQUIRE([gl_WCTYPE_H])
AC_REQUIRE([gt_LOCALE_JA])
- AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_EN_UTF8])
AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST])
if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
dnl <wctype.h> redefines iswxdigit already.
@@ -23,14 +26,14 @@ AC_DEFUN([gl_FUNC_ISWXDIGIT],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
- freebsd* | dragonfly* | netbsd* | solaris* | mingw*)
+ # Guess no on FreeBSD, NetBSD, OpenBSD, Solaris, native Windows, Haiku, Android.
+ freebsd* | dragonfly* | netbsd* | openbsd* | solaris* | mingw* | windows* | haiku* | *-android*)
gl_cv_func_iswxdigit_works="guessing no" ;;
# Guess yes otherwise.
*) gl_cv_func_iswxdigit_works="guessing yes" ;;
esac
changequote([,])dnl
- if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
+ if test $LOCALE_JA != none || test "$LOCALE_EN_UTF8" != none || test $LOCALE_ZH_CN != none; then
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
@@ -62,28 +65,31 @@ main (int argc, char *argv[])
int is;
int result = 0;
- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
{
- /* This fails on NetBSD 8.0. */
+ /* This fails on NetBSD 10.0. */
/* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
is = for_character ("\243\301", 2);
if (!(is == 0))
result |= 1;
}
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (strcmp ("$LOCALE_EN_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
{
- /* This fails on FreeBSD 13.0. */
+ /* This fails on FreeBSD 13.0, Haiku, Android. */
/* U+0663 ARABIC-INDIC DIGIT THREE */
is = for_character ("\331\243", 2);
if (!(is == 0))
result |= 2;
- /* This fails on MSVC 14. */
+ /* This fails on NetBSD 10.0, OpenBSD 7.5, MSVC 14, Haiku, Android. */
/* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
is = for_character ("\357\274\241", 3);
if (!(is == 0))
result |= 4;
}
- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
{
/* This fails on Solaris 10, Solaris 11.4. */
/* U+FF11 FULLWIDTH DIGIT ONE */
diff --git a/gnulib-m4/langinfo_h.m4 b/gnulib-m4/langinfo_h.m4
deleted file mode 100644
index 563c8c43..00000000
--- a/gnulib-m4/langinfo_h.m4
+++ /dev/null
@@ -1,137 +0,0 @@
-# langinfo_h.m4 serial 12
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-AC_DEFUN_ONCE([gl_LANGINFO_H],
-[
- AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
-
- dnl Persuade glibc-2.0.6 <langinfo.h> to define CODESET.
- AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
-
- dnl <langinfo.h> is always overridden, because of GNULIB_POSIXCHECK.
- gl_CHECK_NEXT_HEADERS([langinfo.h])
-
- dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS.
- HAVE_LANGINFO_CODESET=0
- HAVE_LANGINFO_T_FMT_AMPM=0
- HAVE_LANGINFO_ALTMON=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 <langinfo.h> defines.
- dnl CODESET is missing on OpenBSD 3.8.
- dnl ERA etc. are missing on OpenBSD 6.7.
- dnl T_FMT_AMPM and YESEXPR, NOEXPR are missing on IRIX 5.3.
- dnl ALTMON_* are missing on glibc 2.26 and many other systems.
- AC_CACHE_CHECK([whether langinfo.h defines CODESET],
- [gl_cv_header_langinfo_codeset],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[#include <langinfo.h>
-int a = CODESET;
-]])],
- [gl_cv_header_langinfo_codeset=yes],
- [gl_cv_header_langinfo_codeset=no])
- ])
- 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 <langinfo.h>
-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(
- [AC_LANG_PROGRAM([[#include <langinfo.h>
-int a = ALTMON_1;
-]])],
- [gl_cv_header_langinfo_altmon=yes],
- [gl_cv_header_langinfo_altmon=no])
- ])
- if test $gl_cv_header_langinfo_altmon = yes; then
- HAVE_LANGINFO_ALTMON=1
- fi
- AC_CACHE_CHECK([whether langinfo.h defines ERA],
- [gl_cv_header_langinfo_era],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM([[#include <langinfo.h>
-int a = ERA;
-]])],
- [gl_cv_header_langinfo_era=yes],
- [gl_cv_header_langinfo_era=no])
- ])
- 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 <langinfo.h>
-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_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.
- gl_WARN_ON_USE_PREPARE([[#include <langinfo.h>
- ]], [nl_langinfo])
-])
-
-# gl_LANGINFO_MODULE_INDICATOR([modulename])
-# sets the shell variable that indicates the presence of the given module
-# to a C preprocessor expression that will evaluate to 1.
-# This macro invocation must not occur in macros that are AC_REQUIREd.
-AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR],
-[
- dnl Ensure to expand the default settings once only.
- gl_LANGINFO_H_REQUIRE_DEFAULTS
- gl_MODULE_INDICATOR_SET_VARIABLE([$1])
- dnl Define it also as a C macro, for the benefit of the unit tests.
- gl_MODULE_INDICATOR_FOR_TESTS([$1])
-])
-
-# Initializes the default values for AC_SUBSTed shell variables.
-# This macro must not be AC_REQUIREd. It must only be invoked, and only
-# outside of macros or in macros that are not AC_REQUIREd.
-AC_DEFUN([gl_LANGINFO_H_REQUIRE_DEFAULTS],
-[
- m4_defun(GL_MODULE_INDICATOR_PREFIX[_LANGINFO_H_MODULE_INDICATOR_DEFAULTS], [
- gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NL_LANGINFO])
- ])
- m4_require(GL_MODULE_INDICATOR_PREFIX[_LANGINFO_H_MODULE_INDICATOR_DEFAULTS])
- AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
-])
-
-AC_DEFUN([gl_LANGINFO_H_DEFAULTS],
-[
- dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO])
- REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO])
-])
diff --git a/gnulib-m4/largefile.m4 b/gnulib-m4/largefile.m4
index ec9677c4..3134f336 100644
--- a/gnulib-m4/largefile.m4
+++ b/gnulib-m4/largefile.m4
@@ -1,19 +1,21 @@
+# largefile.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
+
# Enable large files on systems where this is not the default.
# Enable support for files on Linux file systems with 64-bit inode numbers.
-# Copyright 1992-1996, 1998-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
# The following macro works around a problem in Autoconf's AC_FUNC_FSEEKO:
# It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this
# setting of _LARGEFILE_SOURCE is needed so that <stdio.h> declares fseeko
# and ftello in C++ mode as well.
-# Fixed in Autoconf 2.72, which has AC_SYS_YEAR2038.
+# This problem occurs in Autoconf 2.71 and earlier, which lack AC_SYS_YEAR2038.
AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
-[
- m4_ifndef([AC_SYS_YEAR2038], [
+ m4_ifndef([AC_SYS_YEAR2038], [[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_FUNC_FSEEKO
case "$host_os" in
@@ -22,107 +24,288 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
[Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2).])
;;
esac
- ])
+ ]])
+)
+
+dnl Remove AC_SYS_YEAR2038_RECOMMENDED if unpatched Autoconf 2.72 or earlier.
+dnl Autoconf 2.72 still uses -n32, which is not a C preprocessor option,
+dnl and which was useful only on IRIX which is no longer supported.
+dnl This should be fixed in Autoconf 2.73.
+m4_ifdef([AC_SYS_YEAR2038_RECOMMENDED],
+ [m4_bmatch(m4_ifdef([_AC_SYS_LARGEFILE_OPTIONS],
+ [m4_defn([_AC_SYS_LARGEFILE_OPTIONS])],
+ ["-n32"]),
+ ["-n32"],
+ [m4_undefine([AC_SYS_YEAR2038_RECOMMENDED])])])
+
+m4_ifndef([AC_SYS_YEAR2038_RECOMMENDED], [
+# Fix up AC_SYS_YEAR2038_RECOMMENDED and related macros, even if
+# unpatched Autoconf 2.72 or earlier. This code is taken from Autoconf master.
+
+# _AC_SYS_YEAR2038_TEST_CODE
+# --------------------------
+# C code used to probe for time_t that can represent time points more
+# than 2**31 - 1 seconds after the epoch. With the usual Unix epoch,
+# these correspond to dates after 2038-01-18 22:14:07 +0000 (Gregorian),
+# hence the name.
+AC_DEFUN([_AC_SYS_YEAR2038_TEST_CODE],
+[[
+ #include <time.h>
+ /* Check that time_t can represent 2**32 - 1 correctly. */
+ #define LARGE_TIME_T \\
+ ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
+ int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
+ && LARGE_TIME_T % 65537 == 0)
+ ? 1 : -1];
+]])
+
+# _AC_SYS_YEAR2038_OPTIONS
+# ------------------------
+# List of known ways to enable support for large time_t. If you change
+# this list you probably also need to change the AS_CASE at the end of
+# _AC_SYS_YEAR2038_PROBE.
+m4_define([_AC_SYS_YEAR2038_OPTIONS], m4_normalize(
+ ["none needed"] dnl 64-bit and newer 32-bit Unix
+ ["-D_TIME_BITS=64"] dnl glibc 2.34 with some 32-bit ABIs
+ ["-D__MINGW_USE_VC2005_COMPAT"] dnl 32-bit MinGW
+ ["-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"]
+ dnl 32-bit MinGW (misconfiguration)
+))
+
+# _AC_SYS_YEAR2038_PROBE
+# ----------------------
+# Subroutine of AC_SYS_YEAR2038. Probe for time_t that can represent
+# time points more than 2**31 - 1 seconds after the epoch (dates after
+# 2038-01-18, see above) and set the cache variable ac_cv_sys_year2038_opts
+# to one of the values in the _AC_SYS_YEAR2038_OPTIONS list, or to
+# "support not detected" if none of them worked. Then, set compilation
+# options and #defines as necessary to enable large time_t support.
+#
+# Note that we do not test whether mktime, localtime, etc. handle
+# large values of time_t correctly, as that would require use of
+# AC_TRY_RUN. Note also that some systems only support large time_t
+# together with large off_t.
+#
+# If you change this macro you may also need to change
+# _AC_SYS_YEAR2038_OPTIONS.
+AC_DEFUN([_AC_SYS_YEAR2038_PROBE],
+[AC_CACHE_CHECK([for $CC option to support timestamps after 2038],
+ [ac_cv_sys_year2038_opts],
+ [ac_save_CPPFLAGS="$CPPFLAGS"
+ ac_opt_found=no
+ for ac_opt in _AC_SYS_YEAR2038_OPTIONS; do
+ AS_IF([test x"$ac_opt" != x"none needed"],
+ [CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_YEAR2038_TEST_CODE])],
+ [ac_cv_sys_year2038_opts="$ac_opt"
+ ac_opt_found=yes])
+ test $ac_opt_found = no || break
+ done
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected"])
+
+ac_have_year2038=yes
+AS_CASE([$ac_cv_sys_year2038_opts],
+ ["none needed"], [],
+ ["support not detected"],
+ [ac_have_year2038=no],
+
+ ["-D_TIME_BITS=64"],
+ [AC_DEFINE([_TIME_BITS], [64],
+ [Number of bits in time_t, on hosts where this is settable.])],
+
+ ["-D__MINGW_USE_VC2005_COMPAT"],
+ [AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1],
+ [Define to 1 on platforms where this makes time_t a 64-bit type.])],
+
+ ["-U_USE_32_BIT_TIME_T"*],
+ [AC_MSG_FAILURE(m4_text_wrap(
+ [the 'time_t' type is currently forced to be 32-bit.
+ It will stop working after mid-January 2038.
+ Remove _USE_32BIT_TIME_T from the compiler flags.],
+ [], [], [55]))],
+
+ [AC_MSG_ERROR(
+ [internal error: bad value for \$ac_cv_sys_year2038_opts])])
])
-# Work around a problem in Autoconf through 2.71 on glibc 2.34+
-# with _TIME_BITS. Also, work around a problem in autoconf <= 2.69:
-# AC_SYS_LARGEFILE does not configure for large inodes on Mac OS X 10.5,
-# or configures them incorrectly in some cases.
-m4_version_prereq([2.70], [], [
-
-# _AC_SYS_LARGEFILE_TEST_INCLUDES
-# -------------------------------
-m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES],
-[#include <sys/types.h>
- /* Check that off_t can represent 2**63 - 1 correctly.
- We can't simply define LARGE_OFF_T to be 9223372036854775807,
+# _AC_SYS_YEAR2038_ENABLE
+# -----------------------
+# Depending on which of the YEAR2038 macros was used, add either an
+# --enable-year2038 or a --disable-year2038 to
+# the configure script. This is expanded very late and
+# therefore there cannot be any code in the AC_ARG_ENABLE. The
+# default value for 'enable_year2038' is emitted unconditionally
+# because the generated code always looks at this variable.
+m4_define([_AC_SYS_YEAR2038_ENABLE],
+[m4_divert_text([DEFAULTS],
+ m4_provide_if([AC_SYS_YEAR2038],
+ [enable_year2038=yes],
+ [enable_year2038=no]))]dnl
+[AC_ARG_ENABLE([year2038],
+ m4_provide_if([AC_SYS_YEAR2038],
+ [AS_HELP_STRING([--disable-year2038],
+ [don't support timestamps after 2038])],
+ [AS_HELP_STRING([--enable-year2038],
+ [support timestamps after 2038])]))])
+
+# AC_SYS_YEAR2038
+# ---------------
+# Attempt to detect and activate support for large time_t.
+# On systems where time_t is not always 64 bits, this probe can be
+# skipped by passing the --disable-year2038 option to configure.
+AC_DEFUN([AC_SYS_YEAR2038],
+[AC_REQUIRE([AC_SYS_LARGEFILE])dnl
+AS_IF([test "$enable_year2038,$ac_have_year2038,$cross_compiling" = yes,no,no],
+ [# If we're not cross compiling and 'touch' works with a large
+ # timestamp, then we can presume the system supports wider time_t
+ # *somehow* and we just weren't able to detect it. One common
+ # case that we deliberately *don't* probe for is a system that
+ # supports both 32- and 64-bit ABIs but only the 64-bit ABI offers
+ # wide time_t. (It would be inappropriate for us to override an
+ # intentional use of -m32.) Error out, demanding use of
+ # --disable-year2038 if this is intentional.
+ AS_IF([TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null],
+ [AS_CASE([`TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null`],
+ [*'Feb 7 2106'* | *'Feb 7 17:10'*],
+ [AC_MSG_FAILURE(m4_text_wrap(
+ [this system appears to support timestamps after mid-January 2038,
+ but no mechanism for enabling wide 'time_t' was detected.
+ Did you mean to build a 64-bit binary? (E.g., 'CC="${CC} -m64"'.)
+ To proceed with 32-bit time_t, configure with '--disable-year2038'.],
+ [], [], [55]))])])])])
+
+# AC_SYS_YEAR2038_RECOMMENDED
+# ---------------------------
+# Same as AC_SYS_YEAR2038, but recommend support for large time_t.
+# If we cannot find any way to make time_t capable of representing
+# values larger than 2**31 - 1, error out unless --disable-year2038 is given.
+AC_DEFUN([AC_SYS_YEAR2038_RECOMMENDED],
+[AC_REQUIRE([AC_SYS_YEAR2038])dnl
+AS_IF([test "$enable_year2038,$ac_have_year2038" = yes,no],
+ [AC_MSG_FAILURE(m4_text_wrap(
+ [could not enable timestamps after mid-January 2038.
+ This package recommends support for these later timestamps.
+ However, to proceed with signed 32-bit time_t even though it
+ will fail then, configure with '--disable-year2038'.],
+ [], [], [55]))])])
+
+# _AC_SYS_LARGEFILE_TEST_CODE
+# ---------------------------
+# C code used to probe for large file support.
+m4_define([_AC_SYS_LARGEFILE_TEST_CODE],
+[@%:@include <sys/types.h>
+@%:@ifndef FTYPE
+@%:@ define FTYPE off_t
+@%:@endif
+ /* Check that FTYPE can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_FTYPE to be 9223372036854775807,
since some C++ compilers masquerading as C compilers
incorrectly reject 9223372036854775807. */
-#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
- int off_t_is_large[[(LARGE_OFF_T % 2147483629 == 721
- && LARGE_OFF_T % 2147483647 == 1)
- ? 1 : -1]];[]dnl
+@%:@define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31))
+ int FTYPE_is_large[[(LARGE_FTYPE % 2147483629 == 721
+ && LARGE_FTYPE % 2147483647 == 1)
+ ? 1 : -1]];[]dnl
])
-])# m4_version_prereq 2.70
-
-m4_ifndef([AC_SYS_YEAR2038], [
-
-# _AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, VALUE,
-# CACHE-VAR,
-# DESCRIPTION,
-# PROLOGUE, [FUNCTION-BODY])
-# --------------------------------------------------------
-m4_define([_AC_SYS_LARGEFILE_MACRO_VALUE],
-[AC_CACHE_CHECK([for $1 value needed for large files], [$3],
-[while :; do
- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
- [AC_LANG_PROGRAM([$5], [$6])],
- [$3=no; break])
- m4_ifval([$6], [AC_LINK_IFELSE], [AC_COMPILE_IFELSE])(
- [AC_LANG_PROGRAM([#undef $1
-#define $1 $2
-$5], [$6])],
- [$3=$2; break])
- $3=unknown
- break
-done])
-case $$3 in #(
- no | unknown) ;;
- *) AC_DEFINE_UNQUOTED([$1], [$$3], [$4]);;
-esac
-rm -rf conftest*[]dnl
-])# _AC_SYS_LARGEFILE_MACRO_VALUE
+# Defined by Autoconf 2.71 and circa 2022 Gnulib unwisely depended on it.
+m4_define([_AC_SYS_LARGEFILE_TEST_INCLUDES], [_AC_SYS_LARGEFILE_TEST_CODE])
+
+# _AC_SYS_LARGEFILE_OPTIONS
+# -------------------------
+# List of known ways to enable support for large files. If you change
+# this list you probably also need to change the AS_CASE at the end of
+# _AC_SYS_LARGEFILE_PROBE.
+m4_define([_AC_SYS_LARGEFILE_OPTIONS], m4_normalize(
+ ["none needed"] dnl Most current systems
+ ["-D_FILE_OFFSET_BITS=64"] dnl X/Open LFS spec
+ ["-D_LARGE_FILES=1"] dnl 32-bit AIX 4.2.1+, 32-bit z/OS
+))
+
+# _AC_SYS_LARGEFILE_PROBE
+# -----------------------
+# Subroutine of AC_SYS_LARGEFILE. Probe for large file support and set
+# the cache variable ac_cv_sys_largefile_opts to one of the values in
+# the _AC_SYS_LARGEFILE_OPTIONS list, or to "support not detected" if
+# none of the options in that list worked. Then, set compilation
+# options and #defines as necessary to enable large file support.
+#
+# If large file support is not detected, the behavior depends on which of
+# the top-level AC_SYS_LARGEFILE macros was used (see below).
+#
+# If you change this macro you may also need to change
+# _AC_SYS_LARGEFILE_OPTIONS.
+AC_DEFUN([_AC_SYS_LARGEFILE_PROBE],
+[AC_CACHE_CHECK([for $CC option to support large files],
+ [ac_cv_sys_largefile_opts],
+ [ac_save_CPPFLAGS=$CPPFLAGS
+ ac_opt_found=no
+ for ac_opt in _AC_SYS_LARGEFILE_OPTIONS; do
+ AS_IF([test x"$ac_opt" != x"none needed"],
+ [CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"])
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_CODE])],
+ [AS_IF([test x"$ac_opt" = x"none needed"],
+ [# GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
+ CPPFLAGS="$CPPFLAGS -DFTYPE=ino_t"
+ AC_COMPILE_IFELSE([], [],
+ [CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
+ AC_COMPILE_IFELSE([], [ac_opt='-D_FILE_OFFSET_BITS=64'])])])
+ ac_cv_sys_largefile_opts=$ac_opt
+ ac_opt_found=yes])
+ test $ac_opt_found = no || break
+ done
+ CPPFLAGS=$ac_save_CPPFLAGS
+ dnl Gnulib implements large file support for native Windows, based on the
+ dnl variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE.
+ m4_ifdef([gl_LARGEFILE], [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ if test $ac_opt_found != yes; then
+ AS_CASE([$host_os],
+ [mingw* | windows*],
+ [ac_cv_sys_largefile_opts="supported through gnulib"
+ ac_opt_found=yes]
+ )
+ fi
+ ])
+ test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected"])
+
+ac_have_largefile=yes
+AS_CASE([$ac_cv_sys_largefile_opts],
+ ["none needed"], [],
+ ["supported through gnulib"], [],
+ ["support not detected"],
+ [ac_have_largefile=no],
+
+ ["-D_FILE_OFFSET_BITS=64"],
+ [AC_DEFINE([_FILE_OFFSET_BITS], [64],
+ [Number of bits in a file offset, on hosts where this is settable.])],
+
+ ["-D_LARGE_FILES=1"],
+ [AC_DEFINE([_LARGE_FILES], [1],
+ [Define to 1 on platforms where this makes off_t a 64-bit type.])],
+
+ [AC_MSG_ERROR(
+ [internal error: bad value for \$ac_cv_sys_largefile_opts])])
+AS_IF([test "$enable_year2038" != no],
+ [_AC_SYS_YEAR2038_PROBE])
+AC_CONFIG_COMMANDS_PRE([_AC_SYS_YEAR2038_ENABLE])])
# AC_SYS_LARGEFILE
# ----------------
# By default, many hosts won't let programs access large files;
# one must use special compiler options to get large-file access to work.
# For more details about this brain damage please see:
-# http://www.unix.org/version2/whatsnew/lfs20mar.html
+# https://www.unix.org/version2/whatsnew/lfs20mar.html
# Additionally, on Linux file systems with 64-bit inodes a file that happens
# to have a 64-bit inode number cannot be accessed by 32-bit applications on
# Linux x86/x86_64. This can occur with file systems such as XFS and NFS.
AC_DEFUN([AC_SYS_LARGEFILE],
-[AC_ARG_ENABLE(largefile,
- [ --disable-largefile omit support for large files])
-AS_IF([test "$enable_largefile" != no],
- [AC_CACHE_CHECK([for special C compiler options needed for large files],
- ac_cv_sys_largefile_CC,
- [ac_cv_sys_largefile_CC=no
- if test "$GCC" != yes; then
- ac_save_CC=$CC
- while :; do
- # IRIX 6.2 and later do not support large files by default,
- # so use the C compiler's -n32 option if that helps.
- AC_LANG_CONFTEST([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_INCLUDES])])
- AC_COMPILE_IFELSE([], [break])
- CC="$CC -n32"
- AC_COMPILE_IFELSE([], [ac_cv_sys_largefile_CC=' -n32'; break])
- break
- done
- CC=$ac_save_CC
- rm -f conftest.$ac_ext
- fi])
- if test "$ac_cv_sys_largefile_CC" != no; then
- CC=$CC$ac_cv_sys_largefile_CC
- fi
-
- _AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS, 64,
- ac_cv_sys_file_offset_bits,
- [Number of bits in a file offset, on hosts where this is settable.],
- [_AC_SYS_LARGEFILE_TEST_INCLUDES])
- AS_CASE([$ac_cv_sys_file_offset_bits],
- [unknown],
- [_AC_SYS_LARGEFILE_MACRO_VALUE([_LARGE_FILES], [1],
- [ac_cv_sys_large_files],
- [Define for large files, on AIX-style hosts.],
- [_AC_SYS_LARGEFILE_TEST_INCLUDES])],
- [64],
- [gl_YEAR2038_BODY([])])])
-])# AC_SYS_LARGEFILE
-])# m4_ifndef AC_SYS_YEAR2038
+[AC_ARG_ENABLE([largefile],
+ [AS_HELP_STRING([--disable-largefile],
+ [omit support for large files])])dnl
+AS_IF([test "$enable_largefile,$enable_year2038" != no,no],
+ [_AC_SYS_LARGEFILE_PROBE])])
+])# m4_ifndef AC_SYS_YEAR2038_RECOMMENDED
# Enable large files on systems where this is implemented by Gnulib, not by the
# system headers.
@@ -132,7 +315,7 @@ AC_DEFUN([gl_LARGEFILE],
[
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
- mingw*)
+ mingw* | windows*)
dnl Native Windows.
dnl mingw64 defines off_t to a 64-bit type already, if
dnl _FILE_OFFSET_BITS=64, which is ensured by AC_SYS_LARGEFILE.
@@ -172,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/gnulib-m4/lcmessage.m4 b/gnulib-m4/lcmessage.m4
index 1a3eefe7..1c7e45f7 100644
--- a/gnulib-m4/lcmessage.m4
+++ b/gnulib-m4/lcmessage.m4
@@ -1,9 +1,11 @@
-# lcmessage.m4 serial 8
-dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016, 2019-2022 Free
+# lcmessage.m4
+# serial 8
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2014, 2016, 2019-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,
dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
dnl
dnl This file can be used in projects which are not available under
dnl the GNU General Public License or the GNU Lesser General Public
diff --git a/gnulib-m4/ldexpl.m4 b/gnulib-m4/ldexpl.m4
index 06d30f71..c2b17684 100644
--- a/gnulib-m4/ldexpl.m4
+++ b/gnulib-m4/ldexpl.m4
@@ -1,8 +1,10 @@
-# ldexpl.m4 serial 17
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# ldexpl.m4
+# serial 19
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_LDEXPL],
[
@@ -24,7 +26,7 @@ AC_DEFUN([gl_FUNC_LDEXPL],
AC_CACHE_CHECK([whether ldexpl() can be used with libm],
[gl_cv_func_ldexpl_in_libm],
[
- save_LIBS="$LIBS"
+ saved_LIBS="$LIBS"
LIBS="$LIBS -lm"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -33,7 +35,7 @@ AC_DEFUN([gl_FUNC_LDEXPL],
[[return ldexpl (x, -1) > 0;]])],
[gl_cv_func_ldexpl_in_libm=yes],
[gl_cv_func_ldexpl_in_libm=no])
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
])
if test $gl_cv_func_ldexpl_in_libm = yes; then
LDEXPL_LIBM=-lm
@@ -41,10 +43,10 @@ AC_DEFUN([gl_FUNC_LDEXPL],
fi
if test $gl_cv_func_ldexpl_no_libm = yes \
|| test $gl_cv_func_ldexpl_in_libm = yes; then
- save_LIBS="$LIBS"
+ saved_LIBS="$LIBS"
LIBS="$LIBS $LDEXPL_LIBM"
gl_FUNC_LDEXPL_WORKS
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
case "$gl_cv_func_ldexpl_works" in
*yes) gl_func_ldexpl=yes ;;
*) gl_func_ldexpl=no; REPLACE_LDEXPL=1 ;;
@@ -124,10 +126,10 @@ int main()
[
changequote(,)dnl
case "$host_os" in
- aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_ldexpl_works="guessing yes" ;;
- *) gl_cv_func_ldexpl_works="guessing yes" ;;
+ aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_ldexpl_works="guessing yes" ;;
+ *) gl_cv_func_ldexpl_works="guessing yes" ;;
esac
changequote([,])dnl
])
diff --git a/gnulib-m4/lib-ld.m4 b/gnulib-m4/lib-ld.m4
index 934207a7..f32028c0 100644
--- a/gnulib-m4/lib-ld.m4
+++ b/gnulib-m4/lib-ld.m4
@@ -1,8 +1,10 @@
-# lib-ld.m4 serial 10
-dnl Copyright (C) 1996-2003, 2009-2022 Free Software Foundation, Inc.
+# lib-ld.m4
+# serial 13
+dnl Copyright (C) 1996-2003, 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.
+dnl This file is offered as-is, without any warranty.
dnl Subroutines of libtool.m4,
dnl with replacements s/_*LT_PATH/AC_LIB_PROG/ and s/lt_/acl_/ to avoid
@@ -29,7 +31,7 @@ AC_DEFUN([AC_LIB_PROG_LD],
AC_REQUIRE([AC_CANONICAL_HOST])dnl
AC_ARG_WITH([gnu-ld],
- [AS_HELP_STRING([--with-gnu-ld],
+ [AS_HELP_STRING([[--with-gnu-ld]],
[assume the C compiler uses GNU ld [default=no]])],
[test "$withval" = no || with_gnu_ld=yes],
[with_gnu_ld=no])dnl
@@ -67,7 +69,7 @@ else
if test "$GCC" = yes; then
# Check if gcc -print-prog-name=ld gives a path.
case $host in
- *-*-mingw*)
+ *-*-mingw* | windows*)
# gcc leaves a trailing carriage return which upsets mingw
acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
*)
@@ -97,9 +99,9 @@ else
fi
if test -n "$ac_prog"; then
# Search for $ac_prog in $PATH.
- acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ acl_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS="$acl_save_ifs"
+ IFS="$acl_saved_IFS"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
acl_cv_path_LD="$ac_dir/$ac_prog"
@@ -116,7 +118,7 @@ else
esac
fi
done
- IFS="$acl_save_ifs"
+ IFS="$acl_saved_IFS"
fi
case $host in
*-*-aix*)
diff --git a/gnulib-m4/lib-link.m4 b/gnulib-m4/lib-link.m4
index 3b75bcd0..6be17b14 100644
--- a/gnulib-m4/lib-link.m4
+++ b/gnulib-m4/lib-link.m4
@@ -1,8 +1,10 @@
-# lib-link.m4 serial 33
-dnl Copyright (C) 2001-2022 Free Software Foundation, Inc.
+# lib-link.m4
+# serial 35
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
@@ -69,11 +71,11 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
dnl because if the user has installed lib[]Name and not disabled its use
dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
+ acl_saved_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
+ acl_saved_LIBS="$LIBS"
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
dnl because these -l options might require -L options that are present in
dnl LIBS. -l options benefit only from the -L options listed before it.
@@ -89,7 +91,7 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
[AC_LANG_PROGRAM([[$3]], [[$4]])],
[ac_cv_lib[]Name=yes],
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
- LIBS="$ac_save_LIBS"
+ LIBS="$acl_saved_LIBS"
])
if test "$ac_cv_lib[]Name" = yes; then
HAVE_LIB[]NAME=yes
@@ -100,7 +102,7 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
HAVE_LIB[]NAME=no
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
+ CPPFLAGS="$acl_saved_CPPFLAGS"
LIB[]NAME=
LTLIB[]NAME=
LIB[]NAME[]_PREFIX=
@@ -168,7 +170,7 @@ AC_DEFUN([AC_LIB_FROMPACKAGE],
pushdef([PACKUP],[m4_translit(PACK,[abcdefghijklmnopqrstuvwxyz./+-],
[ABCDEFGHIJKLMNOPQRSTUVWXYZ____])])
define([acl_libsinpackage_]PACKUP,
- m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[, ]],)[lib$1])
+ m4_ifdef([acl_libsinpackage_]PACKUP, [m4_defn([acl_libsinpackage_]PACKUP)[[, ]]],)[lib$1])
popdef([PACKUP])
popdef([PACK])
])
@@ -224,7 +226,7 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
additional_libdir3=
fi
dnl Search the library and its dependencies in $additional_libdir and
- dnl $LDFLAGS. Using breadth-first-seach.
+ dnl $LDFLAGS. Use breadth-first search.
LIB[]NAME=
LTLIB[]NAME=
INC[]NAME=
@@ -537,12 +539,12 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl Read the .la file. It defines the variables
dnl dlname, library_names, old_library, dependency_libs, current,
dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
+ saved_libdir="$libdir"
case "$found_la" in
*/* | *\\*) . "$found_la" ;;
*) . "./$found_la" ;;
esac
- libdir="$save_libdir"
+ libdir="$saved_libdir"
dnl We use only dependency_libs.
for dep in $dependency_libs; do
case "$dep" in
@@ -682,18 +684,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
done
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
+ acl_saved_libdir="$libdir"
libdir="$alldirs"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
+ libdir="$acl_saved_libdir"
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
else
dnl The -rpath options are cumulative.
for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
+ acl_saved_libdir="$libdir"
libdir="$found_dir"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
+ libdir="$acl_saved_libdir"
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
done
fi
@@ -790,18 +792,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
for dir in $rpathdirs; do
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
done
- acl_save_libdir="$libdir"
+ acl_saved_libdir="$libdir"
libdir="$alldirs"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
+ libdir="$acl_saved_libdir"
$1="$flag"
else
dnl The -rpath options are cumulative.
for dir in $rpathdirs; do
- acl_save_libdir="$libdir"
+ acl_saved_libdir="$libdir"
libdir="$dir"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
+ libdir="$acl_saved_libdir"
$1="${$1}${$1:+ }$flag"
done
fi
diff --git a/gnulib-m4/lib-prefix.m4 b/gnulib-m4/lib-prefix.m4
index 999f712f..9e4326e9 100644
--- a/gnulib-m4/lib-prefix.m4
+++ b/gnulib-m4/lib-prefix.m4
@@ -1,8 +1,10 @@
-# lib-prefix.m4 serial 20
-dnl Copyright (C) 2001-2005, 2008-2022 Free Software Foundation, Inc.
+# lib-prefix.m4
+# serial 23
+dnl Copyright (C) 2001-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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
@@ -126,10 +128,10 @@ AC_DEFUN([AC_LIB_PREPARE_PREFIX],
else
acl_final_exec_prefix="$exec_prefix"
fi
- acl_save_prefix="$prefix"
+ acl_saved_prefix="$prefix"
prefix="$acl_final_prefix"
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
+ prefix="$acl_saved_prefix"
])
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
@@ -137,13 +139,13 @@ dnl variables prefix and exec_prefix bound to the values they will have
dnl at the end of the configure script.
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
[
- acl_save_prefix="$prefix"
+ acl_saved_prefix="$prefix"
prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
+ acl_saved_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
$1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
+ exec_prefix="$acl_saved_exec_prefix"
+ prefix="$acl_saved_prefix"
])
dnl AC_LIB_PREPARE_MULTILIB creates
@@ -174,7 +176,7 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
[AC_EGREP_CPP([Extensible Linking Format],
- [#if defined __ELF__ || (defined __linux__ && defined __EDG__)
+ [#if defined __ELF__ || (defined __linux__ && (defined __EDG__ || defined __SUNPRO_C))
Extensible Linking Format
#endif
],
@@ -256,6 +258,15 @@ changequote([,])dnl
esac
fi
;;
+ netbsd*)
+ dnl On NetBSD/sparc64, there is a 'sparc' subdirectory that contains
+ dnl 32-bit libraries.
+ if test $HOST_CPU_C_ABI_32BIT != no; then
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparc ;;
+ esac
+ fi
+ ;;
*)
dnl If $CC generates code for a 32-bit ABI, the libraries are
dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64.
@@ -280,7 +291,7 @@ changequote([,])dnl
fi
fi
if test -n "$searchpath"; then
- acl_save_IFS="${IFS= }"; IFS=":"
+ acl_saved_IFS="${IFS= }"; IFS=":"
for searchdir in $searchpath; do
if test -d "$searchdir"; then
case "$searchdir" in
@@ -297,7 +308,7 @@ changequote([,])dnl
esac
fi
done
- IFS="$acl_save_IFS"
+ IFS="$acl_saved_IFS"
if test $HOST_CPU_C_ABI_32BIT = yes; then
# 32-bit ABI.
acl_libdirstem3=
diff --git a/gnulib-m4/libdl.m4 b/gnulib-m4/libdl.m4
new file mode 100644
index 00000000..79d69063
--- /dev/null
+++ b/gnulib-m4/libdl.m4
@@ -0,0 +1,46 @@
+# libdl.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl From Bruno Haible.
+
+dnl Set LIBDL to '-ldl' if it is needed to use the functions declared
+dnl in <dlfcn.h> (dlopen, dlsym, etc.), or to empty otherwise.
+AC_DEFUN([gl_LIBDL],
+[
+ dnl dlopen, dlsym are
+ dnl - in libc on glibc >= 2.34, musl libc, macOS, FreeBSD, NetBSD, OpenBSD,
+ dnl AIX, Solaris, Cygwin, Haiku,
+ dnl - in a separate libdl on glibc < 2.34, uClibc, Android.
+ AC_CACHE_CHECK([for library needed for dlopen and dlsym],
+ [gl_cv_lib_dl],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <dlfcn.h>
+ ]],
+ [[return ! dlsym (RTLD_DEFAULT, "main");]])],
+ [gl_cv_lib_dl=none],
+ [gl_cv_lib_dl=maybe])
+ if test $gl_cv_lib_dl = maybe; then
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS -ldl"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <dlfcn.h>
+ ]],
+ [[return ! dlsym (RTLD_DEFAULT, "main");]])],
+ [gl_cv_lib_dl='-ldl'],
+ [gl_cv_lib_dl=none])
+ LIBS="$saved_LIBS"
+ fi
+ ])
+ case "$gl_cv_lib_dl" in
+ none) LIBDL='' ;;
+ *) LIBDL="$gl_cv_lib_dl" ;;
+ esac
+ AC_SUBST([LIBDL])
+])
diff --git a/gnulib-m4/libunistring-base.m4 b/gnulib-m4/libunistring-base.m4
index a0892da4..f2f144ac 100644
--- a/gnulib-m4/libunistring-base.m4
+++ b/gnulib-m4/libunistring-base.m4
@@ -1,8 +1,10 @@
-# libunistring-base.m4 serial 7
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+# libunistring-base.m4
+# serial 10
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Paolo Bonzini and Bruno Haible.
@@ -18,6 +20,8 @@ dnl You have to bump the VERSION argument to the next projected version
dnl number each time you make a change that affects the behaviour of the
dnl functions defined in Module (even if the sources of Module itself do not
dnl change).
+dnl
+dnl This macro invocation must not occur in macros that are AC_REQUIREd.
AC_DEFUN([gl_LIBUNISTRING_MODULE],
[
@@ -28,6 +32,37 @@ AC_DEFUN([gl_LIBUNISTRING_MODULE],
[gl_LIBUNISTRING_VERSION_CMP([$1])])
])
+dnl gl_LIBUNISTRING_MODULE_WITH_VARIABLE([VERSION], [Module])
+dnl is like gl_LIBUNISTRING_MODULE([VERSION], [Module]), except that it also
+dnl defines an AC_SUBSTed autoconf variable GNULIB_$MODULE_DLL_VARIABLE.
+dnl What's the expansion of this autoconf variable?
+dnl - When building libunistring, it expands to LIBUNISTRING_DLL_VARIABLE.
+dnl (This is necessary because this token must be present in the .h files
+dnl when the .h files get installed.)
+dnl - When building gnulib or application code it expands to
+dnl - LIBUNISTRING_DLL_VARIABLE by default,
+dnl - if the automake conditional LIBUNISTRING_COMPILE_$MODULE evaluates
+dnl to true: the value of
+dnl ${module_indicator_prefix}_GNULIB_LIBUNISTRING_DLL_VARIABLE_NAME
+dnl (which usually is empty, unless explicitly set in configure.ac).
+dnl (This is necessary because when the conditional evaluates to false,
+dnl the application code expects to use the declared variable from the
+dnl installed libunistring; it's in this case that the
+dnl LIBUNISTRING_DLL_VARIABLE macro from the installed
+dnl <unistring/woe32dll.h> must be used.)
+dnl
+dnl This macro invocation must not occur in macros that are AC_REQUIREd.
+
+AC_DEFUN([gl_LIBUNISTRING_MODULE_WITH_VARIABLE],
+[
+ gl_LIBUNISTRING_MODULE([$1], [$2])
+ m4_ifndef([gl_IN_LIBUNISTRING],
+ [if test -z "${AS_TR_CPP([LIBUNISTRING_COMPILE_$2])_TRUE}"; then
+ GL_MODULE_INDICATOR_PREFIX[]_GNULIB_[]AS_TR_CPP([$2_DLL_VARIABLE])=$GL_MODULE_INDICATOR_PREFIX[]_GNULIB_LIBUNISTRING_DLL_VARIABLE_NAME
+ fi
+ ])
+])
+
dnl gl_LIBUNISTRING_LIBHEADER([VERSION], [HeaderFile])
dnl Declares that HeaderFile should be created, unless we are linking
dnl with libunistring and its version is >= the given VERSION.
@@ -95,12 +130,36 @@ changequote([,])
LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
fi
+
+ dnl Determine whether <unistring/woe32dll.h> from an installed libunistring
+ dnl is available.
+ m4_ifdef([gl_IN_LIBUNISTRING],
+ [dnl In libunistring, all .h files that declare variables need to
+ dnl #include <unistring/woe32dll.h>. This references the file
+ dnl unistring/woe32dll.h in libunistring.
+ HAVE_UNISTRING_WOE32DLL_H=1
+ ],
+ [dnl In gnulib or in applications, we need a #include <unistring/woe32dll.h>
+ dnl if and only if an installed libunistring is available.
+ if test "$HAVE_LIBUNISTRING" = yes; then
+ AC_CHECK_HEADERS([unistring/woe32dll.h],
+ [HAVE_UNISTRING_WOE32DLL_H=1],
+ [HAVE_UNISTRING_WOE32DLL_H=0])
+ else
+ HAVE_UNISTRING_WOE32DLL_H=0
+ fi
+ ])
+ AC_SUBST([HAVE_UNISTRING_WOE32DLL_H])
])
dnl gl_LIBUNISTRING_VERSION_CMP([VERSION])
dnl Expands to a shell statement that evaluates to true if LIBUNISTRING_VERSION
dnl is less than the VERSION argument.
AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP],
+[dnl VERSION = 999.9 means to evaluates to true always, i.e. to ignore
+dnl the installed libunistring regardless of its version.
+m4_if([$1], [999.9],
+[true],
[ { test "$HAVE_LIBUNISTRING" != yes \
|| {
dnl AS_LITERAL_IF exists and works fine since autoconf-2.59 at least.
@@ -138,7 +197,7 @@ AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP],
}
])
}
- }])
+ }])])
dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the
dnl same as ORIG, otherwise to 0.
diff --git a/gnulib-m4/limits-h.m4 b/gnulib-m4/limits-h.m4
index 5d5a5bf5..048c8fab 100644
--- a/gnulib-m4/limits-h.m4
+++ b/gnulib-m4/limits-h.m4
@@ -1,9 +1,12 @@
-dnl Check whether limits.h has needed features.
-
-dnl Copyright 2016-2022 Free Software Foundation, Inc.
+# limits-h.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl Check whether limits.h has needed features.
dnl From Paul Eggert.
@@ -23,14 +26,27 @@ AC_DEFUN_ONCE([gl_LIMITS_H],
int wb = WORD_BIT;
int ullw = ULLONG_WIDTH;
int bw = BOOL_WIDTH;
+ int bm = BOOL_MAX;
+ int mblm = MB_LEN_MAX;
]])],
[gl_cv_header_limits_width=yes],
[gl_cv_header_limits_width=no])])
- if test "$gl_cv_header_limits_width" = yes; then
- GL_GENERATE_LIMITS_H=false
- else
- GL_GENERATE_LIMITS_H=true
- fi
+ GL_GENERATE_LIMITS_H=true
+ AS_IF([test "$gl_cv_header_limits_width" = yes],
+ [AC_CACHE_CHECK([whether limits.h has SSIZE_MAX],
+ [gl_cv_header_limits_ssize_max],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#include <limits.h>
+ #ifndef SSIZE_MAX
+ #error "SSIZE_MAX is not defined"
+ #endif
+ ]])],
+ [gl_cv_header_limits_ssize_max=yes],
+ [gl_cv_header_limits_ssize_max=no])])
+ if test "$gl_cv_header_limits_ssize_max" = yes; then
+ GL_GENERATE_LIMITS_H=false
+ fi])
])
dnl Unconditionally enables the replacement of <limits.h>.
diff --git a/gnulib-m4/localcharset.m4 b/gnulib-m4/localcharset.m4
index f5dbbd4f..8e2c2755 100644
--- a/gnulib-m4/localcharset.m4
+++ b/gnulib-m4/localcharset.m4
@@ -1,8 +1,10 @@
-# localcharset.m4 serial 8
-dnl Copyright (C) 2002, 2004, 2006, 2009-2022 Free Software Foundation, Inc.
+# localcharset.m4
+# serial 8
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_LOCALCHARSET],
[
diff --git a/gnulib-m4/locale-ar.m4 b/gnulib-m4/locale-ar.m4
index 574311da..b0b4d8e9 100644
--- a/gnulib-m4/locale-ar.m4
+++ b/gnulib-m4/locale-ar.m4
@@ -1,13 +1,15 @@
-# locale-ar.m4 serial 9
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-ar.m4
+# serial 12
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Ben Pfaff, based on locale-fr.m4 by Bruno Haible.
dnl Determine the name of an Arabic locale with traditional encoding.
-AC_DEFUN([gt_LOCALE_AR],
+AC_DEFUN_ONCE([gt_LOCALE_AR],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AM_LANGINFO_CODESET])
@@ -64,12 +66,13 @@ int main () {
if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
case "$host_os" in
# Handle native Windows specially, because there setlocale() interprets
- # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "ar" or "ara" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "en" or "eng" as "English" or "English_United States.1252",
# "fr" or "fra" as "French" or "French_France.1252",
# "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
- # "ja" as "Japanese" or "Japanese_Japan.932",
+ # "ja" or "jpn" as "Japanese" or "Japanese_Japan.932",
# and similar.
- mingw*)
+ mingw* | windows*)
# Note that on native Windows, the Arabic locale is
# "Arabic_Saudi Arabia.1256", and CP1256 is very different from
# ISO-8859-6, so we cannot use it here.
@@ -84,7 +87,7 @@ int main () {
# - The usual locale name: ar_SA
# - The locale name with explicit encoding suffix: ar_SA.ISO-8859-6
# - The HP-UX locale name: ar_SA.iso88596
- # - The Solaris 7 locale name: ar
+ # - The Solaris 10 locale name: ar
# Also try ar_EG instead of ar_SA because Egypt is a large country too.
for gt_cv_locale_ar in ar_SA ar_SA.ISO-8859-6 ar_SA.iso88596 ar_EG ar_EG.ISO-8859-6 ar_EG.iso88596 ar none; do
if test $gt_cv_locale_ar = none; then
@@ -100,5 +103,11 @@ int main () {
rm -fr conftest*
])
LOCALE_AR=$gt_cv_locale_ar
+ case $LOCALE_AR in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_AR"; assuming "none"])
+ LOCALE_AR=none;;
+ esac
AC_SUBST([LOCALE_AR])
])
diff --git a/gnulib-m4/locale-en.m4 b/gnulib-m4/locale-en.m4
new file mode 100644
index 00000000..f5e035f3
--- /dev/null
+++ b/gnulib-m4/locale-en.m4
@@ -0,0 +1,138 @@
+# locale-en.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl From Bruno Haible.
+
+dnl Determine the name of an English (or American English) locale with
+dnl UTF-8 encoding.
+AC_DEFUN_ONCE([gt_LOCALE_EN_UTF8],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for an english Unicode locale], [gt_cv_locale_en_utf8], [
+ case "$host_os" in
+ *-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_MESSAGES)
+ dnl for which localizations (.mo files) have been installed.
+ gt_cv_locale_en_utf8=en_US.UTF-8
+ ;;
+ *)
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+# if defined _WIN32 && !defined __CYGWIN__
+ /* On native Windows, setlocale(category, "") looks at the system settings,
+ not at the environment variables. Also, when an encoding suffix such
+ as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
+ category of the locale to "C". */
+ if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
+ || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
+ return 1;
+# else
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+# endif
+ /* Check whether nl_langinfo(CODESET) is "UTF-8" or equivalent. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (!(strcmp (cs, "UTF-8") == 0 || strcmp (cs, "UTF8") == 0
+ || strcmp (cs, "utf-8") == 0 || strcmp (cs, "utf8") == 0))
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check the third month name. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 3 - 1; t.tm_mday = 24;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 5 || strcmp (buf, "March") != 0)
+ return 1;
+#endif
+#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
+ /* Check whether the decimal separator is a dot. */
+ if (localeconv () ->decimal_point[0] != '.') return 1;
+#endif
+ return 0;
+}
+ ]])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" or "ara" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "en" or "eng" as "English" or "English_United States.1252",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" or "jpn" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw* | windows*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL='English_United States.65001' LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_en_utf8='English_United States.65001'
+ else
+ # None found.
+ gt_cv_locale_en_utf8=none
+ fi
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name with explicit encoding suffix first
+ # (this is necessary on Haiku).
+ if (LC_ALL=en_US.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_en_utf8=en_US.UTF-8
+ else
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=en_US LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_en_utf8=en_US
+ else
+ # Test for the Solaris 10 locale name.
+ if (LC_ALL=en.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_en_utf8=en.UTF-8
+ else
+ # None found.
+ gt_cv_locale_en_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+ ;;
+ esac
+ ])
+ LOCALE_EN_UTF8="$gt_cv_locale_en_utf8"
+ case "$LOCALE_EN_UTF8" in #(
+ '' | *[[\"\$\'*@<:@]]*)
+ dnl The empty value occurs when the conftest.c program above could not
+ dnl be compiled. The other values might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_EN_UTF8"; assuming "none"])
+ LOCALE_EN_UTF8=none;;
+ esac
+ AC_SUBST([LOCALE_EN_UTF8])
+])
diff --git a/gnulib-m4/locale-fr.m4 b/gnulib-m4/locale-fr.m4
index 3753891f..097cefa6 100644
--- a/gnulib-m4/locale-fr.m4
+++ b/gnulib-m4/locale-fr.m4
@@ -1,13 +1,15 @@
-# locale-fr.m4 serial 20
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-fr.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
dnl Determine the name of a french locale with traditional encoding.
-AC_DEFUN([gt_LOCALE_FR],
+AC_DEFUN_ONCE([gt_LOCALE_FR],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AM_LANGINFO_CODESET])
@@ -70,8 +72,9 @@ int main () {
if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
- On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
- are nl_langinfo(RADIXCHAR) are both ".". */
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale
+ and on Haiku in the fr_FR.UTF-8 locale,
+ localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
# endif
return 0;
@@ -81,12 +84,13 @@ int main () {
if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
case "$host_os" in
# Handle native Windows specially, because there setlocale() interprets
- # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "ar" or "ara" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "en" or "eng" as "English" or "English_United States.1252",
# "fr" or "fra" as "French" or "French_France.1252",
# "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
- # "ja" as "Japanese" or "Japanese_Japan.932",
+ # "ja" or "jpn" as "Japanese" or "Japanese_Japan.932",
# and similar.
- mingw*)
+ mingw* | windows*)
# Test for the native Windows locale name.
if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=French_France.1252
@@ -108,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
@@ -116,7 +120,7 @@ int main () {
if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=fr_FR.iso88591
else
- # Test for the Solaris 7 locale name.
+ # Test for the Solaris 10 locale name.
if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_fr=fr
else
@@ -133,15 +137,31 @@ int main () {
rm -fr conftest*
])
LOCALE_FR=$gt_cv_locale_fr
+ case $LOCALE_FR in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_FR"; assuming "none"])
+ LOCALE_FR=none;;
+ esac
AC_SUBST([LOCALE_FR])
])
dnl Determine the name of a french locale with UTF-8 encoding.
-AC_DEFUN([gt_LOCALE_FR_UTF8],
+AC_DEFUN_ONCE([gt_LOCALE_FR_UTF8],
[
+ AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AM_LANGINFO_CODESET])
AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
- AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+ case "$host_os" in
+ *-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_MESSAGES)
+ dnl for which localizations (.mo files) have been installed.
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ ;;
+ *)
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([[
#include <locale.h>
#include <time.h>
#if HAVE_LANGINFO_CODESET
@@ -197,57 +217,90 @@ int main () {
#endif
#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
/* Check whether the decimal separator is a comma.
- On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
- are nl_langinfo(RADIXCHAR) are both ".". */
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale
+ and on Haiku in the fr_FR.UTF-8 locale,
+ localeconv()->decimal_point are nl_langinfo(RADIXCHAR) are both ".". */
if (localeconv () ->decimal_point[0] != ',') return 1;
#endif
return 0;
}
- ]])])
- if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
- case "$host_os" in
- # Handle native Windows specially, because there setlocale() interprets
- # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
- # "fr" or "fra" as "French" or "French_France.1252",
- # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
- # "ja" as "Japanese" or "Japanese_Japan.932",
- # and similar.
- mingw*)
- # Test for the hypothetical native Windows locale name.
- if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=French_France.65001
- else
- # None found.
- gt_cv_locale_fr_utf8=none
- fi
- ;;
- *)
- # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
- # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
- # configure script would override the LC_ALL setting. Likewise for
- # LC_CTYPE, which is also set at the beginning of the configure script.
- # Test for the usual locale name.
- if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=fr_FR
- else
- # Test for the locale name with explicit encoding suffix.
- if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=fr_FR.UTF-8
- else
- # Test for the Solaris 7 locale name.
- if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
- gt_cv_locale_fr_utf8=fr.UTF-8
+ ]])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ case "$host_os" in
+ # Handle native Windows specially, because there setlocale() interprets
+ # "ar" or "ara" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "en" or "eng" as "English" or "English_United States.1252",
+ # "fr" or "fra" as "French" or "French_France.1252",
+ # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+ # "ja" or "jpn" as "Japanese" or "Japanese_Japan.932",
+ # and similar.
+ mingw* | windows*)
+ # Test for the hypothetical native Windows locale name.
+ if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=French_France.65001
else
# None found.
gt_cv_locale_fr_utf8=none
fi
- fi
- fi
- ;;
- esac
- fi
- rm -fr conftest*
+ ;;
+ *)
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 10 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ ;;
+ esac
+ fi
+ rm -fr conftest*
+ ;;
+ esac
])
LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+ case $LOCALE_FR_UTF8 in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_FR_UTF8"; assuming "none"])
+ LOCALE_FR_UTF8=none;;
+ esac
AC_SUBST([LOCALE_FR_UTF8])
+
+ dnl Users of $LOCALE_FR_UTF8 need to know which of the locale categories they
+ dnl can rely on.
+ case "$host_os" in
+ *-musl* | midipix*)
+ dnl On musl libc, locale categories other than LC_CTYPE and LC_MESSAGES
+ dnl are effectively unimplemented.
+ LC_COLLATE_IMPLEMENTED=false
+ LC_NUMERIC_IMPLEMENTED=false
+ LC_TIME_IMPLEMENTED=false
+ LC_MONETARY_IMPLEMENTED=false
+ ;;
+ *)
+ LC_COLLATE_IMPLEMENTED=true
+ LC_NUMERIC_IMPLEMENTED=true
+ LC_TIME_IMPLEMENTED=true
+ LC_MONETARY_IMPLEMENTED=true
+ ;;
+ esac
+ AC_SUBST([LC_COLLATE_IMPLEMENTED])
+ AC_SUBST([LC_NUMERIC_IMPLEMENTED])
+ AC_SUBST([LC_TIME_IMPLEMENTED])
+ AC_SUBST([LC_MONETARY_IMPLEMENTED])
])
diff --git a/gnulib-m4/locale-ja.m4 b/gnulib-m4/locale-ja.m4
index 73a5d1ae..ee4309ed 100644
--- a/gnulib-m4/locale-ja.m4
+++ b/gnulib-m4/locale-ja.m4
@@ -1,13 +1,15 @@
-# locale-ja.m4 serial 15
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-ja.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
dnl Determine the name of a japanese locale with EUC-JP encoding.
-AC_DEFUN([gt_LOCALE_JA],
+AC_DEFUN_ONCE([gt_LOCALE_JA],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AM_LANGINFO_CODESET])
@@ -85,12 +87,13 @@ int main ()
if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
case "$host_os" in
# Handle native Windows specially, because there setlocale() interprets
- # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "ar" or "ara" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "en" or "eng" as "English" or "English_United States.1252",
# "fr" or "fra" as "French" or "French_France.1252",
# "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
- # "ja" as "Japanese" or "Japanese_Japan.932",
+ # "ja" or "jpn" as "Japanese" or "Japanese_Japan.932",
# and similar.
- mingw*)
+ mingw* | windows*)
# Note that on native Windows, the Japanese locale is
# Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
# cannot use it here.
@@ -109,15 +112,15 @@ 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
- # Test for the Solaris 7 locale name.
+ # Test for the Solaris 10 locale name.
if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_ja=ja
else
@@ -139,5 +142,11 @@ int main ()
rm -fr conftest*
])
LOCALE_JA=$gt_cv_locale_ja
+ case $LOCALE_JA in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_JA"; assuming "none"])
+ LOCALE_JA=none;;
+ esac
AC_SUBST([LOCALE_JA])
])
diff --git a/gnulib-m4/locale-tr.m4 b/gnulib-m4/locale-tr.m4
index 4b99e67d..34f28a9c 100644
--- a/gnulib-m4/locale-tr.m4
+++ b/gnulib-m4/locale-tr.m4
@@ -1,13 +1,15 @@
-# locale-tr.m4 serial 13
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-tr.m4
+# serial 16
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
dnl Determine the name of a turkish locale with UTF-8 encoding.
-AC_DEFUN([gt_LOCALE_TR_UTF8],
+AC_DEFUN_ONCE([gt_LOCALE_TR_UTF8],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AM_LANGINFO_CODESET])
@@ -78,12 +80,13 @@ int main () {
if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
case "$host_os" in
# Handle native Windows specially, because there setlocale() interprets
- # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "ar" or "ara" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "en" or "eng" as "English" or "English_United States.1252",
# "fr" or "fra" as "French" or "French_France.1252",
# "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
- # "ja" as "Japanese" or "Japanese_Japan.932",
+ # "ja" or "jpn" as "Japanese" or "Japanese_Japan.932",
# and similar.
- mingw*)
+ mingw* | windows*)
# Test for the hypothetical native Windows locale name.
if (LC_ALL=Turkish_Turkey.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_tr_utf8=Turkish_Turkey.65001
@@ -105,7 +108,7 @@ int main () {
if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_tr_utf8=tr_TR.UTF-8
else
- # Test for the Solaris 7 locale name.
+ # Test for the Solaris 10 locale name.
if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_tr_utf8=tr.UTF-8
else
@@ -122,5 +125,11 @@ int main () {
rm -fr conftest*
])
LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+ case $LOCALE_TR_UTF8 in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_TR_UTF8"; assuming "none"])
+ LOCALE_TR_UTF8=none;;
+ esac
AC_SUBST([LOCALE_TR_UTF8])
])
diff --git a/gnulib-m4/locale-zh.m4 b/gnulib-m4/locale-zh.m4
index c997971f..98975bdd 100644
--- a/gnulib-m4/locale-zh.m4
+++ b/gnulib-m4/locale-zh.m4
@@ -1,13 +1,15 @@
-# locale-zh.m4 serial 15
-dnl Copyright (C) 2003, 2005-2022 Free Software Foundation, Inc.
+# locale-zh.m4
+# serial 20
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
dnl Determine the name of a chinese locale with GB18030 encoding.
-AC_DEFUN([gt_LOCALE_ZH_CN],
+AC_DEFUN_ONCE([gt_LOCALE_ZH_CN],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([AM_LANGINFO_CODESET])
@@ -21,6 +23,7 @@ AC_DEFUN([gt_LOCALE_ZH_CN],
#endif
#include <stdlib.h>
#include <string.h>
+#include <wchar.h>
struct tm t;
char buf[16];
int main ()
@@ -79,6 +82,19 @@ int main ()
single wide character. This excludes the GB2312 and GBK encodings. */
if (mblen ("\203\062\332\066", 5) != 4)
return 1;
+ /* Check whether mbrtowc accept this character one byte at a time.
+ This excludes NetBSD 10.0. */
+ if (sizeof (wchar_t) > 2)
+ {
+ wchar_t wc;
+ mbstate_t state;
+ memset (&state, 0, sizeof (state));
+ if (!(mbrtowc (&wc, "\203", 1, &state) == (size_t)(-2)
+ && mbrtowc (&wc, "\062", 1, &state) == (size_t)(-2)
+ && mbrtowc (&wc, "\332", 1, &state) == (size_t)(-2)
+ && mbrtowc (&wc, "\066", 1, &state) == 1))
+ return 1;
+ }
return 0;
#endif
}
@@ -86,12 +102,13 @@ int main ()
if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
case "$host_os" in
# Handle native Windows specially, because there setlocale() interprets
- # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "ar" or "ara" as "Arabic" or "Arabic_Saudi Arabia.1256",
+ # "en" or "eng" as "English" or "English_United States.1252",
# "fr" or "fra" as "French" or "French_France.1252",
# "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
- # "ja" as "Japanese" or "Japanese_Japan.932",
+ # "ja" or "jpn" as "Japanese" or "Japanese_Japan.932",
# and similar.
- mingw*)
+ mingw* | windows*)
# Test for the hypothetical native Windows locale name.
if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
gt_cv_locale_zh_CN=Chinese_China.54936
@@ -133,5 +150,11 @@ int main ()
rm -fr conftest*
])
LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+ case $LOCALE_ZH_CN in #(
+ '' | *[[[:space:]\"\$\'*@<:@]]*)
+ dnl This locale name might cause trouble with sh or make.
+ AC_MSG_WARN([invalid locale "$LOCALE_ZH_CN"; assuming "none"])
+ LOCALE_ZH_CN=none;;
+ esac
AC_SUBST([LOCALE_ZH_CN])
])
diff --git a/gnulib-m4/locale_h.m4 b/gnulib-m4/locale_h.m4
index ca5d0d0f..aeda9f9d 100644
--- a/gnulib-m4/locale_h.m4
+++ b/gnulib-m4/locale_h.m4
@@ -1,8 +1,10 @@
-# locale_h.m4 serial 28
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# locale_h.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_LOCALE_H],
[
@@ -18,6 +20,26 @@ AC_DEFUN_ONCE([gl_LOCALE_H],
AC_REQUIRE([gl_STDDEF_H])
AC_REQUIRE([gl_LOCALE_T])
+ dnl On native Windows, there is a type '_locale_t' that can be used to
+ dnl define locale_t.
+ AC_CACHE_CHECK([whether locale.h defines _locale_t],
+ [gl_cv_header_locale_has_windows_locale_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <locale.h>
+ _locale_t x;]],
+ [[]])],
+ [gl_cv_header_locale_has_windows_locale_t=yes],
+ [gl_cv_header_locale_has_windows_locale_t=no])
+ ])
+ if test $gl_cv_header_locale_has_windows_locale_t = yes; then
+ HAVE_WINDOWS_LOCALE_T=1
+ AC_DEFINE([HAVE_WINDOWS_LOCALE_T], [1],
+ [Define to 1 if <locale.h> defines the _locale_t type.])
+ else
+ HAVE_WINDOWS_LOCALE_T=0
+ fi
+ AC_SUBST([HAVE_WINDOWS_LOCALE_T])
dnl Solaris 11.0 defines the int_p_*, int_n_* members of 'struct lconv'
dnl only if _LCONV_C99 is defined.
@@ -41,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(
@@ -59,7 +81,9 @@ AC_DEFUN_ONCE([gl_LOCALE_H],
dnl On native Windows with MSVC, merely define these member names as macros.
dnl This avoids trouble in C++ mode.
case "$host_os" in
- mingw*)
+ windows*-msvc*)
+ ;;
+ mingw* | windows*)
AC_EGREP_CPP([Special], [
#ifdef _MSC_VER
Special
@@ -83,7 +107,7 @@ AC_DEFUN_ONCE([gl_LOCALE_H],
# include <xlocale.h>
#endif
]],
- [setlocale newlocale duplocale freelocale])
+ [setlocale newlocale duplocale freelocale getlocalename_l])
])
dnl Checks to determine whether the system has the locale_t type,
@@ -127,6 +151,7 @@ AC_DEFUN([gl_LOCALE_T],
fi
fi
AC_SUBST([HAVE_XLOCALE_H])
+ AC_SUBST([HAVE_LOCALE_T])
])
# gl_LOCALE_MODULE_INDICATOR([modulename])
@@ -151,8 +176,12 @@ AC_DEFUN([gl_LOCALE_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALECONV])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETLOCALE])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETLOCALE_NULL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NEWLOCALE])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUPLOCALE])
- gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALENAME])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREELOCALE])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOCALENAME_L])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOCALENAME_L_UNSAFE])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALENAME_UNSAFE])
])
m4_require(GL_MODULE_INDICATOR_PREFIX[_LOCALE_H_MODULE_INDICATOR_DEFAULTS])
AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
@@ -161,14 +190,16 @@ AC_DEFUN([gl_LOCALE_H_REQUIRE_DEFAULTS],
AC_DEFUN([gl_LOCALE_H_DEFAULTS],
[
dnl Assume proper GNU behavior unless another module says otherwise.
- HAVE_NEWLOCALE=1; AC_SUBST([HAVE_NEWLOCALE])
- HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
- HAVE_FREELOCALE=1; AC_SUBST([HAVE_FREELOCALE])
- REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV])
- REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
- REPLACE_NEWLOCALE=0; AC_SUBST([REPLACE_NEWLOCALE])
- REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
- REPLACE_FREELOCALE=0; AC_SUBST([REPLACE_FREELOCALE])
- REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV])
+ HAVE_NEWLOCALE=1; AC_SUBST([HAVE_NEWLOCALE])
+ HAVE_DUPLOCALE=1; AC_SUBST([HAVE_DUPLOCALE])
+ HAVE_FREELOCALE=1; AC_SUBST([HAVE_FREELOCALE])
+ HAVE_GETLOCALENAME_L=1; AC_SUBST([HAVE_GETLOCALENAME_L])
+ REPLACE_LOCALECONV=0; AC_SUBST([REPLACE_LOCALECONV])
+ REPLACE_SETLOCALE=0; AC_SUBST([REPLACE_SETLOCALE])
+ REPLACE_NEWLOCALE=0; AC_SUBST([REPLACE_NEWLOCALE])
+ REPLACE_DUPLOCALE=0; AC_SUBST([REPLACE_DUPLOCALE])
+ REPLACE_FREELOCALE=0; AC_SUBST([REPLACE_FREELOCALE])
+ REPLACE_GETLOCALENAME_L=0; AC_SUBST([REPLACE_GETLOCALENAME_L])
+ REPLACE_STRUCT_LCONV=0; AC_SUBST([REPLACE_STRUCT_LCONV])
LOCALENAME_ENHANCE_LOCALE_FUNCS=0; AC_SUBST([LOCALENAME_ENHANCE_LOCALE_FUNCS])
])
diff --git a/gnulib-m4/localeconv.m4 b/gnulib-m4/localeconv.m4
new file mode 100644
index 00000000..9fa31de8
--- /dev/null
+++ b/gnulib-m4/localeconv.m4
@@ -0,0 +1,61 @@
+# localeconv.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_FUNC_LOCALECONV],
+[
+ AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
+ AC_REQUIRE([gl_LOCALE_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ if test $REPLACE_STRUCT_LCONV = 1; then
+ REPLACE_LOCALECONV=1
+ fi
+ if test $REPLACE_LOCALECONV = 0; then
+ dnl Test whether fields of type 'char' are filled correctly.
+ dnl This test fails on mingw 5.0.3.
+ AC_CACHE_CHECK([whether localeconv works],
+ [gl_cv_func_localeconv_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <locale.h>
+ #include <limits.h>
+ int main ()
+ {
+ struct lconv *l = localeconv ();
+ return l->frac_digits != CHAR_MAX && l->frac_digits < 0;
+ }
+ ]])],
+ [gl_cv_func_localeconv_works=yes],
+ [gl_cv_func_localeconv_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_localeconv_works="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_localeconv_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_localeconv_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_localeconv_works="$gl_cross_guess_normal" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_localeconv_works" in
+ *yes) ;;
+ *) REPLACE_LOCALECONV=1 ;;
+ esac
+ fi
+])
+
+# Prerequisites of lib/localeconv.c.
+AC_DEFUN([gl_PREREQ_LOCALECONV],
+[
+ AC_CHECK_MEMBERS([struct lconv.decimal_point], [], [],
+ [[#include <locale.h>]])
+ AC_CHECK_MEMBERS([struct lconv.int_p_cs_precedes], [], [],
+ [[#include <locale.h>]])
+])
diff --git a/gnulib-m4/localename.m4 b/gnulib-m4/localename.m4
index e0cf8c5c..18387d08 100644
--- a/gnulib-m4/localename.m4
+++ b/gnulib-m4/localename.m4
@@ -1,41 +1,24 @@
-# localename.m4 serial 8
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# localename.m4
+# serial 15
+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.
+dnl This file is offered as-is, without any warranty.
-AC_DEFUN([gl_LOCALENAME],
+AC_DEFUN([gl_LOCALENAME_UNSAFE],
[
- AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
- AC_REQUIRE([gl_LOCALE_T])
AC_REQUIRE([gt_LC_MESSAGES])
- AC_REQUIRE([gt_INTL_THREAD_LOCALE_NAME])
AC_REQUIRE([gt_INTL_MACOSX])
- AC_CHECK_HEADERS_ONCE([langinfo.h])
- if test $HAVE_LOCALE_T = 1; then
- AC_CHECK_FUNCS_ONCE([newlocale duplocale freelocale])
- gl_func_newlocale="$ac_cv_func_newlocale"
- gl_func_duplocale="$ac_cv_func_duplocale"
- gl_func_freelocale="$ac_cv_func_freelocale"
- else
- dnl In 2019, some versions of z/OS lack the locale_t type and have broken
- dnl newlocale, duplocale, freelocale functions.
- gl_func_newlocale=no
- gl_func_duplocale=no
- gl_func_freelocale=no
- fi
- if test $gl_func_newlocale != yes; then
- HAVE_NEWLOCALE=0
- fi
- if test $gl_func_duplocale != yes; then
- HAVE_DUPLOCALE=0
- fi
- if test $gl_func_freelocale != yes; then
- HAVE_FREELOCALE=0
- fi
- if test $gt_localename_enhances_locale_funcs = yes; then
- REPLACE_NEWLOCALE=1
- REPLACE_DUPLOCALE=1
- REPLACE_FREELOCALE=1
- fi
+])
+
+AC_DEFUN([gl_LOCALENAME_UNSAFE_LIMITED],
+[
+ AC_REQUIRE([gt_LC_MESSAGES])
+ AC_REQUIRE([gt_INTL_MACOSX])
+])
+
+AC_DEFUN([gl_LOCALENAME_ENVIRON],
+[
+ AC_REQUIRE([gt_INTL_MACOSX])
])
diff --git a/gnulib-m4/lock.m4 b/gnulib-m4/lock.m4
index c4cbf07b..7058fb30 100644
--- a/gnulib-m4/lock.m4
+++ b/gnulib-m4/lock.m4
@@ -1,8 +1,10 @@
-# lock.m4 serial 14
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+# lock.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
@@ -10,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/gnulib-m4/lstat.m4 b/gnulib-m4/lstat.m4
index d987060b..57df6fd9 100644
--- a/gnulib-m4/lstat.m4
+++ b/gnulib-m4/lstat.m4
@@ -1,10 +1,10 @@
-# serial 33
-
-# Copyright (C) 1997-2001, 2003-2022 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# lstat.m4
+# serial 36
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
@@ -18,7 +18,7 @@ AC_DEFUN([gl_FUNC_LSTAT],
if test $ac_cv_func_lstat = yes; then
AC_REQUIRE([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
- solaris* | *no)
+ darwin* | solaris* | *no)
REPLACE_LSTAT=1
;;
esac
@@ -56,10 +56,13 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
linux-* | linux)
# Guess yes on Linux systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
+ midipix*)
+ # Guess yes on systems that emulate the Linux system calls.
+ gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
*-gnu* | gnu*)
# Guess yes on glibc systems.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
- mingw*)
+ mingw* | windows*)
# Guess no on native Windows.
gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
*)
diff --git a/gnulib-m4/malloc.m4 b/gnulib-m4/malloc.m4
index 6b76c1e6..a95e33db 100644
--- a/gnulib-m4/malloc.m4
+++ b/gnulib-m4/malloc.m4
@@ -1,11 +1,24 @@
-# malloc.m4 serial 28
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# malloc.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
-# This is adapted with modifications from upstream Autoconf here:
-# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n949
+m4_version_prereq([2.73], [], [
+# Modules that use this macro directly or indirectly should depend
+# on extensions-aix, so that _LINUX_SOURCE_COMPAT gets defined
+# before this macro gets invoked. This helps on AIX 7.2 and earlier
+# if !(__VEC__ || __AIXVEC), and doesn't hurt otherwise.
+#
+# This is copied from upstream Autoconf here:
+# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=1f38316f6af7bf63e5e7dd187ff6456e07ad743e#n971
+# _AC_FUNC_MALLOC_IF(IF-WORKS, IF-NOT[, UNKNOWN-ASSUME])
+# ------------------------------------------------------
+# If 'malloc (0)' returns nonnull, run IF-WORKS, otherwise, IF-NOT.
+# If it is not known whether it works, assume the shell word UNKNOWN-ASSUME,
+# which should end in "yes" or in something else (the latter is the default).
AC_DEFUN([_AC_FUNC_MALLOC_IF],
[
AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
@@ -14,55 +27,81 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
[AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdlib.h>
- ]],
- [[void *p = malloc (0);
+ /* Use pmalloc to test; 'volatile' prevents the compiler
+ from optimizing the malloc call away. */
+ void *(*volatile pmalloc) (size_t) = malloc;]],
+ [[void *p = pmalloc (0);
int result = !p;
free (p);
- return result;]])
- ],
+ return result;]])],
[ac_cv_func_malloc_0_nonnull=yes],
[ac_cv_func_malloc_0_nonnull=no],
- [case "$host_os" in
- # Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | gnu* | *-musl* | midnightbsd* \
- | hpux* | solaris* | cygwin* | mingw* | msys* )
- ac_cv_func_malloc_0_nonnull="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;;
- esac
- ])
- ])
+ [AS_CASE([$host_os],
+ [# Guess yes on platforms where we know the result.
+ *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
+ | gnu* | *-musl* | midipix* | midnightbsd* \
+ | hpux* | solaris* | cygwin* | mingw* | windows* | msys*],
+ [ac_cv_func_malloc_0_nonnull="guessing yes"],
+ [# Guess as follows if we don't know.
+ ac_cv_func_malloc_0_nonnull=m4_default([$3], ["guessing no"])])])])
AS_CASE([$ac_cv_func_malloc_0_nonnull], [*yes], [$1], [$2])
])# _AC_FUNC_MALLOC_IF
+])
+
+# gl_FUNC_MALLOC_0_NONNULL
+# ------------------------
+# If 'malloc (0)' returns nonnull define HAVE_MALLOC_0_NONNULL.
+# Also, set ac_cv_func_malloc_0_nonnull to a string that ends in
+# "yes", otherwise set it to something else. If unknown whether
+# malloc (0) works, guess as normal for cross-builds.
+AC_DEFUN([gl_FUNC_MALLOC_0_NONNULL],
+[
+ _AC_FUNC_MALLOC_IF(
+ [AC_DEFINE([HAVE_MALLOC_0_NONNULL], [1],
+ [Define to 1 if malloc (0) returns nonnull.])],
+ [],
+ ["$gl_cross_guess_normal"])
+])
# gl_FUNC_MALLOC_GNU
# ------------------
-# Replace malloc if it is not compatible with GNU libc.
+# Test whether malloc (0) is compatible with GNU libc.
+# Replace malloc if not.
+# Define HAVE_MALLOC_0_NONNULL if malloc (0) returns nonnull (except upon
+# out-of-memory).
+# Define HAVE_MALLOC_PTRDIFF if malloc (N) reliably fails when N exceeds
+# PTRDIFF_MAX.
AC_DEFUN([gl_FUNC_MALLOC_GNU],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
- REPLACE_MALLOC_FOR_MALLOC_GNU="$REPLACE_MALLOC_FOR_MALLOC_POSIX"
- if test $REPLACE_MALLOC_FOR_MALLOC_GNU = 0; then
- _AC_FUNC_MALLOC_IF([], [REPLACE_MALLOC_FOR_MALLOC_GNU=1])
- fi
+ AC_REQUIRE([gl_FUNC_MALLOC_0_NONNULL])
+
+ AS_CASE([$ac_cv_func_malloc_0_nonnull],
+ [*yes],
+ [REPLACE_MALLOC_FOR_MALLOC_GNU=$REPLACE_MALLOC_FOR_MALLOC_POSIX],
+ [REPLACE_MALLOC_FOR_MALLOC_GNU=1])
])
# gl_FUNC_MALLOC_PTRDIFF
# ----------------------
-# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX,
-# and replace malloc otherwise.
+# Test whether malloc (N) reliably fails when N exceeds PTRDIFF_MAX.
+# Define HAVE_MALLOC_PTRDIFF if yes.
+# Replace malloc if not.
AC_DEFUN([gl_FUNC_MALLOC_PTRDIFF],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
- test "$gl_cv_malloc_ptrdiff" = yes || REPLACE_MALLOC_FOR_MALLOC_POSIX=1
+ AS_IF([test "$gl_cv_malloc_ptrdiff" = yes],
+ [AC_DEFINE([HAVE_MALLOC_PTRDIFF], 1,
+ [Define to 1 if malloc-like functions do not allocate objects
+ larger than PTRDIFF_MAX bytes.])],
+ [REPLACE_MALLOC_FOR_MALLOC_POSIX=1])
])
-# Test whether malloc, realloc, calloc refuse to create objects
+# Test whether malloc, calloc refuse to create objects
# larger than what can be expressed in ptrdiff_t.
-# Set gl_cv_func_malloc_gnu to yes or no accordingly.
+# Set gl_cv_func_malloc_gnu.
AC_DEFUN([gl_CHECK_MALLOC_PTRDIFF],
[
AC_CACHE_CHECK([whether malloc is ptrdiff_t safe],
@@ -106,64 +145,84 @@ AC_DEFUN([gl_FUNC_MALLOC_POSIX],
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_PTRDIFF])
AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
- if test "$gl_cv_func_malloc_posix" = yes; then
- AC_DEFINE([HAVE_MALLOC_POSIX], [1],
- [Define if malloc, realloc, and calloc set errno on allocation failure.])
- else
- REPLACE_MALLOC_FOR_MALLOC_POSIX=1
- fi
+ case "$gl_cv_func_malloc_posix" in
+ *yes)
+ AC_DEFINE([HAVE_MALLOC_POSIX], [1],
+ [Define if malloc and calloc set errno on allocation failure.])
+ ;;
+ *)
+ REPLACE_MALLOC_FOR_MALLOC_POSIX=1
+ ;;
+ esac
])
-# Test whether malloc, realloc, calloc set errno to ENOMEM on failure.
-# Set gl_cv_func_malloc_posix to yes or no accordingly.
+# Test whether malloc, calloc set errno to ENOMEM on failure.
+# Set gl_cv_func_malloc_posix to *yes or *no accordingly.
AC_DEFUN([gl_CHECK_MALLOC_POSIX],
[
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_CACHE_CHECK([whether malloc, realloc, calloc set errno on failure],
+ AC_CACHE_CHECK([whether malloc, calloc set errno on failure],
[gl_cv_func_malloc_posix],
[
dnl It is too dangerous to try to allocate a large amount of memory:
dnl some systems go to their knees when you do that. So assume that
dnl all Unix implementations of the function set errno on failure,
dnl except on those platforms where we have seen 'test-malloc-gnu',
- dnl 'test-realloc-gnu', 'test-calloc-gnu' fail.
+ dnl 'test-realloc-posix', 'test-calloc-gnu' fail. For platforms
+ dnl where only 'test-realloc-posix', see realloc.m4.
case "$host_os" in
- mingw*)
- gl_cv_func_malloc_posix=no ;;
- irix* | solaris*)
- dnl On IRIX 6.5, the three functions return NULL with errno unset
- dnl when the argument is larger than PTRDIFF_MAX.
- dnl On Solaris 11.3, the three functions return NULL with errno set
+ mingw* | windows*)
+ dnl Old MSVCRT from 2001 did not set errno=ENOMEM when malloc failed.
+ dnl More recent MSVCRT from 2019 does so.
+ dnl UCRT is the successor of MSVCRT. Assume that UCRT does so as well.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdio.h>
+ #ifndef _UCRT
+ msvcrt yuck
+ #endif
+ ]],
+ [[]])
+ ],
+ [gl_cv_func_malloc_posix="guessing yes"],
+ [gl_cv_func_malloc_posix="guessing no"])
+ ;;
+ 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 <errno.h>
+#include <stddef.h>
#include <stdio.h>
+#include <stdint.h>
#include <stdlib.h>
-#define ptrdiff_t long
-#ifndef PTRDIFF_MAX
-# define PTRDIFF_MAX ((ptrdiff_t) ((1UL << (8 * sizeof (ptrdiff_t) - 1)) - 1))
-#endif
-
-int main ()
-{
- void *p;
-
- fprintf (stderr, "PTRDIFF_MAX = %lu\n", (unsigned long) PTRDIFF_MAX);
- errno = 0;
- p = malloc ((unsigned long) PTRDIFF_MAX + 1);
- fprintf (stderr, "p=%p errno=%d\n", p, errno);
-
- errno = 0;
- p = calloc (PTRDIFF_MAX / 2 + 1, 2);
- fprintf (stderr, "p=%p errno=%d\n", p, errno);
-
- errno = 0;
- p = realloc (NULL, (unsigned long) PTRDIFF_MAX + 1);
- fprintf (stderr, "p=%p errno=%d\n", p, errno);
+#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 ()
+{
+ 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/gnulib-m4/malloca.m4 b/gnulib-m4/malloca.m4
index 77eb96a0..2c0ed8ea 100644
--- a/gnulib-m4/malloca.m4
+++ b/gnulib-m4/malloca.m4
@@ -1,14 +1,16 @@
-# malloca.m4 serial 2
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2022 Free Software Foundation,
+# malloca.m4
+# serial 3
+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,
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_MALLOCA],
[
dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables
dnl @ALLOCA@ and @LTALLOCA@.
dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies.
- AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([gl_FUNC_MALLOC_GNU])
])
diff --git a/gnulib-m4/math_h.m4 b/gnulib-m4/math_h.m4
index a08526a7..4cf59671 100644
--- a/gnulib-m4/math_h.m4
+++ b/gnulib-m4/math_h.m4
@@ -1,8 +1,10 @@
-# math_h.m4 serial 125
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# math_h.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_MATH_H],
[
@@ -42,15 +44,21 @@ AC_DEFUN_ONCE([gl_MATH_H],
cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf
expf expl exp2 exp2f exp2l expm1 expm1f expm1l
fabsf fabsl floorf floorl fma fmaf fmal
- fmod fmodf fmodl frexpf frexpl hypotf hypotl
+ fmod fmodf fmodl frexpf frexpl
+ getpayload getpayloadf getpayloadl
+ hypotf hypotl
ilogb ilogbf ilogbl
ldexpf ldexpl
log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l
- logb logbf logbl
+ logb logbf logbl logp1 log1pf logp1l
modf modff modfl powf
remainder remainderf remainderl
- rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
- tanf tanl tanhf trunc truncf truncl])
+ rint rintf rintl round roundf roundl
+ setpayload setpayloadf setpayloadl
+ setpayloadsig setpayloadsigf setpayloadsigl
+ sinf sinl sinhf sqrtf sqrtl
+ tanf tanl tanhf totalorder totalorderf totalorderl totalordermag
+ totalordermagf totalordermagl trunc truncf truncl])
])
# gl_MATH_MODULE_INDICATOR([modulename])
@@ -113,6 +121,9 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXPF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXP])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXPL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAYLOAD])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAYLOADF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAYLOADL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOTL])
@@ -120,11 +131,15 @@ 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])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LDEXP])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LDEXPF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LDEXPL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOG])
@@ -142,6 +157,9 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGB])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGBF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGBL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGP1])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGP1F])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOGP1L])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MODF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MODFF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MODFL])
@@ -155,7 +173,14 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUND])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUNDF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUNDL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOAD])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIG])
+ 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])
@@ -164,6 +189,12 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANHF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDER])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERMAG])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERMAGF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERMAGL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCL])
@@ -193,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])
@@ -209,6 +245,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_FMODF=1; AC_SUBST([HAVE_FMODF])
HAVE_FMODL=1; AC_SUBST([HAVE_FMODL])
HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF])
+ HAVE_GETPAYLOAD=1; AC_SUBST([HAVE_GETPAYLOAD])
+ HAVE_GETPAYLOADF=1; AC_SUBST([HAVE_GETPAYLOADF])
+ HAVE_GETPAYLOADL=1; AC_SUBST([HAVE_GETPAYLOADL])
HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF])
HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL])
HAVE_ILOGB=1; AC_SUBST([HAVE_ILOGB])
@@ -225,15 +264,32 @@ 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])
+ HAVE_LOGP1F=1; AC_SUBST([HAVE_LOGP1F])
+ HAVE_LOGP1L=1; AC_SUBST([HAVE_LOGP1L])
HAVE_MODFF=1; AC_SUBST([HAVE_MODFF])
HAVE_MODFL=1; AC_SUBST([HAVE_MODFL])
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])
+ HAVE_SETPAYLOADSIG=1; AC_SUBST([HAVE_SETPAYLOADSIG])
+ HAVE_SETPAYLOADSIGF=1; AC_SUBST([HAVE_SETPAYLOADSIGF])
+ HAVE_SETPAYLOADSIGL=1; AC_SUBST([HAVE_SETPAYLOADSIGL])
HAVE_SINF=1; AC_SUBST([HAVE_SINF])
HAVE_SINL=1; AC_SUBST([HAVE_SINL])
HAVE_SINHF=1; AC_SUBST([HAVE_SINHF])
@@ -242,36 +298,26 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_TANF=1; AC_SUBST([HAVE_TANF])
HAVE_TANL=1; AC_SUBST([HAVE_TANL])
HAVE_TANHF=1; AC_SUBST([HAVE_TANHF])
+ HAVE_TOTALORDER=1; AC_SUBST([HAVE_TOTALORDER])
+ HAVE_TOTALORDERF=1; AC_SUBST([HAVE_TOTALORDERF])
+ HAVE_TOTALORDERL=1; AC_SUBST([HAVE_TOTALORDERL])
+ HAVE_TOTALORDERMAG=1; AC_SUBST([HAVE_TOTALORDERMAG])
+ HAVE_TOTALORDERMAGF=1; AC_SUBST([HAVE_TOTALORDERMAGF])
+ HAVE_TOTALORDERMAGL=1; AC_SUBST([HAVE_TOTALORDERMAGL])
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])
@@ -309,6 +355,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF])
REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP])
REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL])
+ REPLACE_GETPAYLOAD=0; AC_SUBST([REPLACE_GETPAYLOAD])
+ REPLACE_GETPAYLOADF=0; AC_SUBST([REPLACE_GETPAYLOADF])
+ REPLACE_GETPAYLOADL=0; AC_SUBST([REPLACE_GETPAYLOADL])
REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL])
REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT])
REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF])
@@ -319,6 +368,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE])
REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF])
REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN])
+ REPLACE_LDEXP=0; AC_SUBST([REPLACE_LDEXP])
REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL])
REPLACE_LOG=0; AC_SUBST([REPLACE_LOG])
REPLACE_LOGF=0; AC_SUBST([REPLACE_LOGF])
@@ -350,10 +400,17 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
REPLACE_SIGNBIT_USING_BUILTINS=0; AC_SUBST([REPLACE_SIGNBIT_USING_BUILTINS])
REPLACE_SINF=0; AC_SUBST([REPLACE_SINF])
REPLACE_SINHF=0; AC_SUBST([REPLACE_SINHF])
+ REPLACE_SINL=0; AC_SUBST([REPLACE_SINL])
REPLACE_SQRTF=0; AC_SUBST([REPLACE_SQRTF])
REPLACE_SQRTL=0; AC_SUBST([REPLACE_SQRTL])
REPLACE_TANF=0; AC_SUBST([REPLACE_TANF])
REPLACE_TANHF=0; AC_SUBST([REPLACE_TANHF])
+ REPLACE_TOTALORDER=0; AC_SUBST([REPLACE_TOTALORDER])
+ REPLACE_TOTALORDERF=0; AC_SUBST([REPLACE_TOTALORDERF])
+ REPLACE_TOTALORDERL=0; AC_SUBST([REPLACE_TOTALORDERL])
+ REPLACE_TOTALORDERMAG=0; AC_SUBST([REPLACE_TOTALORDERMAG])
+ REPLACE_TOTALORDERMAGF=0; AC_SUBST([REPLACE_TOTALORDERMAGF])
+ REPLACE_TOTALORDERMAGL=0; AC_SUBST([REPLACE_TOTALORDERMAGL])
REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC])
REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF])
REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL])
@@ -364,7 +421,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
# Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines
# HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly.
# The currently known platforms where this is the case are:
-# Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9.
+# Linux/HPPA, NetBSD/sparc32, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9.
AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE],
[
AC_CACHE_CHECK([whether long double and double are the same],
diff --git a/gnulib-m4/mbchar.m4 b/gnulib-m4/mbchar.m4
index 22673922..4251a84c 100644
--- a/gnulib-m4/mbchar.m4
+++ b/gnulib-m4/mbchar.m4
@@ -1,8 +1,10 @@
-# mbchar.m4 serial 9
-dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+# mbchar.m4
+# serial 9
+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.
+dnl This file is offered as-is, without any warranty.
dnl autoconf tests required for use of mbchar.m4
dnl From Bruno Haible.
diff --git a/gnulib-m4/mbiter.m4 b/gnulib-m4/mbiter.m4
index 7815edb0..927876bc 100644
--- a/gnulib-m4/mbiter.m4
+++ b/gnulib-m4/mbiter.m4
@@ -1,8 +1,10 @@
-# mbiter.m4 serial 7
-dnl Copyright (C) 2005, 2008-2022 Free Software Foundation, Inc.
+# mbiter.m4
+# serial 7
+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.
+dnl This file is offered as-is, without any warranty.
dnl autoconf tests required for use of mbiter.h
dnl From Bruno Haible.
diff --git a/gnulib-m4/mbrtoc32.m4 b/gnulib-m4/mbrtoc32.m4
new file mode 100644
index 00000000..d1690fb4
--- /dev/null
+++ b/gnulib-m4/mbrtoc32.m4
@@ -0,0 +1,326 @@
+# mbrtoc32.m4
+# serial 21
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_FUNC_MBRTOC32],
+[
+ AC_REQUIRE([gl_UCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ dnl Determine REPLACE_MBSTATE_T, from which GNULIB_defined_mbstate_t is
+ dnl determined. It describes how our overridden mbrtowc is implemented.
+ dnl We then implement mbrtoc32 accordingly.
+ AC_REQUIRE([gl_MBSTATE_T_BROKEN])
+
+ AC_REQUIRE([gl_TYPE_CHAR32_T])
+ AC_REQUIRE([gl_MBRTOC32_SANITYCHECK])
+
+ AC_REQUIRE([gl_CHECK_FUNC_MBRTOC32])
+ if test $gl_cv_func_mbrtoc32 = no; then
+ HAVE_MBRTOC32=0
+ else
+ if test $GNULIBHEADERS_OVERRIDE_CHAR32_T = 1 || test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBRTOC32=1
+ else
+ gl_MBRTOC32_EMPTY_INPUT
+ gl_MBRTOC32_C_LOCALE
+ gl_MBRTOC32_UTF8_LOCALE
+ case "$gl_cv_func_mbrtoc32_empty_input" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOC32_EMPTY_INPUT_BUG], [1],
+ [Define if the mbrtoc32 function does not return (size_t) -2 for empty input.])
+ REPLACE_MBRTOC32=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtoc32_C_locale_sans_EILSEQ" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOC32_IN_C_LOCALE_MAYBE_EILSEQ], [1],
+ [Define if the mbrtoc32 function may signal encoding errors in the C locale.])
+ REPLACE_MBRTOC32=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtoc32_utf8_locale_works" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOC32_MULTIBYTE_LOCALE_BUG], [1],
+ [Define if the mbrtoc32 function does not accept the input bytes one-by-one.])
+ REPLACE_MBRTOC32=1
+ dnl Our replacement mbrtoc32 can handle UTF-8, but not GB18030.
+ LOCALE_ZH_CN=none
+ ;;
+ esac
+ fi
+ if test $HAVE_WORKING_MBRTOC32 = 0; then
+ REPLACE_MBRTOC32=1
+ fi
+ fi
+])
+
+AC_DEFUN([gl_CHECK_FUNC_MBRTOC32],
+[
+ dnl Cf. gl_CHECK_FUNCS_ANDROID
+ AC_CHECK_DECL([mbrtoc32], , ,
+ [[#ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ ]])
+ if test $ac_cv_have_decl_mbrtoc32 = yes; then
+ dnl We can't use AC_CHECK_FUNC here, because mbrtoc32() is defined as a
+ dnl static inline function on Haiku 2020.
+ AC_CACHE_CHECK([for mbrtoc32], [gl_cv_func_mbrtoc32],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ #ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ ]],
+ [[char32_t c;
+ return mbrtoc32 (&c, "", 1, NULL) == 0;
+ ]])
+ ],
+ [gl_cv_func_mbrtoc32=yes],
+ [gl_cv_func_mbrtoc32=no])
+ ])
+ else
+ gl_cv_func_mbrtoc32=no
+ fi
+])
+
+dnl Test whether mbrtoc32 returns the correct value on empty input.
+
+AC_DEFUN([gl_MBRTOC32_EMPTY_INPUT],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtoc32 works on empty input],
+ [gl_cv_func_mbrtoc32_empty_input],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ static char32_t wc;
+ static mbstate_t mbs;
+ int
+ main (void)
+ {
+ return mbrtoc32 (&wc, "", 0, &mbs) != (size_t) -2;
+ }]])],
+ [gl_cv_func_mbrtoc32_empty_input=yes],
+ [gl_cv_func_mbrtoc32_empty_input=no],
+ [case "$host_os" in
+ # Guess no on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_mbrtoc32_empty_input="guessing no" ;;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_mbrtoc32_empty_input="guessing no" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_mbrtoc32_empty_input="guessing no" ;;
+ *) gl_cv_func_mbrtoc32_empty_input="guessing yes" ;;
+ esac
+ ])
+ ])
+])
+
+dnl <https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrtowc.html>
+dnl POSIX:2018 says regarding mbrtowc: "In the POSIX locale an [EILSEQ] error
+dnl cannot occur since all byte values are valid characters." It is reasonable
+dnl to expect mbrtoc32 to behave in the same way.
+
+AC_DEFUN([gl_MBRTOC32_C_LOCALE],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether the C locale is free of encoding errors],
+ [gl_cv_func_mbrtoc32_C_locale_sans_EILSEQ],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <limits.h>
+ #include <locale.h>
+ #ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ ]], [[
+ int i;
+ char *locale = setlocale (LC_ALL, "C");
+ if (! locale)
+ return 2;
+ for (i = CHAR_MIN; i <= CHAR_MAX; i++)
+ {
+ char c = i;
+ char32_t wc;
+ mbstate_t mbs = { 0, };
+ size_t ss = mbrtoc32 (&wc, &c, 1, &mbs);
+ if (1 < ss)
+ return 3;
+ }
+ return 0;
+ ]])],
+ [gl_cv_func_mbrtoc32_C_locale_sans_EILSEQ=yes],
+ [gl_cv_func_mbrtoc32_C_locale_sans_EILSEQ=no],
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_mbrtoc32_C_locale_sans_EILSEQ="guessing yes" ;;
+ *) gl_cv_func_mbrtoc32_C_locale_sans_EILSEQ="$gl_cross_guess_normal" ;;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether mbrtoc32 works when it's fed the bytes one-by-one in an UTF-8
+dnl locale.
+
+AC_DEFUN([gl_MBRTOC32_UTF8_LOCALE],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtoc32 works in an UTF-8 locale],
+ [gl_cv_func_mbrtoc32_utf8_locale_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <locale.h>
+ #ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ ]], [[
+ char *locale = setlocale (LC_ALL, "en_US.UTF-8");
+ if (locale)
+ {
+ /* This test fails on Cygwin 3.5.3. */
+ mbstate_t state = { 0, };
+ char32_t uc = 0xDEADBEEF;
+ /* \360\237\220\203 = U+0001F403 */
+ if (mbrtoc32 (&uc, "\360", 1, &state) != (size_t)-2)
+ return 1;
+ if (mbrtoc32 (&uc, "\237", 1, &state) != (size_t)-2)
+ return 2;
+ if (mbrtoc32 (&uc, "\220", 1, &state) != (size_t)-2)
+ return 3;
+ if (mbrtoc32 (&uc, "\203", 1, &state) != 1)
+ return 4;
+ if (uc != 0x0001F403)
+ return 5;
+ }
+ return 0;
+ ]])],
+ [gl_cv_func_mbrtoc32_utf8_locale_works=yes],
+ [gl_cv_func_mbrtoc32_utf8_locale_works=no],
+ [case "$host_os" in
+ # Guess no on Cygwin.
+ cygwin*) gl_cv_func_mbrtoc32_utf8_locale_works="guessing no" ;;
+ *) gl_cv_func_mbrtoc32_utf8_locale_works="$gl_cross_guess_normal" ;;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether mbrtoc32 works not worse than mbrtowc.
+dnl Result is HAVE_WORKING_MBRTOC32.
+
+AC_DEFUN([gl_MBRTOC32_SANITYCHECK],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_TYPE_CHAR32_T])
+ AC_REQUIRE([gl_CHECK_FUNC_MBRTOC32])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ if test $GNULIBHEADERS_OVERRIDE_CHAR32_T = 1 || test $gl_cv_func_mbrtoc32 = no; then
+ HAVE_WORKING_MBRTOC32=0
+ else
+ AC_CACHE_CHECK([whether mbrtoc32 works as well as mbrtowc],
+ [gl_cv_func_mbrtoc32_sanitycheck],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on FreeBSD, Solaris, native Windows.
+ freebsd* | midnightbsd* | solaris* | mingw* | windows*)
+ gl_cv_func_mbrtoc32_sanitycheck="guessing no"
+ ;;
+ # Guess yes otherwise.
+ *)
+ gl_cv_func_mbrtoc32_sanitycheck="guessing yes"
+ ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none || test $LOCALE_ZH_CN != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#ifdef __HAIKU__
+ #include <stdint.h>
+#endif
+#include <uchar.h>
+int main ()
+{
+ int result = 0;
+ /* This fails on native Windows:
+ mbrtoc32 returns (size_t)-1.
+ mbrtowc returns 1 (correct). */
+ if (strcmp ("$LOCALE_FR", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\374", 1, &state) == 1)
+ {
+ char32_t c32 = (wchar_t) 0xBADFACE;
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtoc32 (&c32, "\374", 1, &state) != 1)
+ result |= 1;
+ }
+ }
+ /* This fails on FreeBSD 13.0 and Solaris 11.4:
+ mbrtoc32 returns (size_t)-2 or (size_t)-1.
+ mbrtowc returns 4 (correct). */
+ if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc = (wchar_t) 0xBADFACE;
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "\224\071\375\067", 4, &state) == 4)
+ {
+ char32_t c32 = (wchar_t) 0xBADFACE;
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtoc32 (&c32, "\224\071\375\067", 4, &state) != 4)
+ result |= 2;
+ }
+ }
+ return result;
+}]])],
+ [gl_cv_func_mbrtoc32_sanitycheck=yes],
+ [gl_cv_func_mbrtoc32_sanitycheck=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_mbrtoc32_sanitycheck" in
+ *yes)
+ HAVE_WORKING_MBRTOC32=1
+ AC_DEFINE([HAVE_WORKING_MBRTOC32], [1],
+ [Define if the mbrtoc32 function basically works.])
+ ;;
+ *) HAVE_WORKING_MBRTOC32=0 ;;
+ esac
+ fi
+ AC_SUBST([HAVE_WORKING_MBRTOC32])
+])
+
+# Prerequisites of lib/mbrtoc32.c and lib/lc-charset-dispatch.c.
+AC_DEFUN([gl_PREREQ_MBRTOC32], [
+ AC_REQUIRE([gl_C32RTOMB_SANITYCHECK])
+ :
+])
diff --git a/gnulib-m4/mbrtowc.m4 b/gnulib-m4/mbrtowc.m4
index ec8716b5..a49872fa 100644
--- a/gnulib-m4/mbrtowc.m4
+++ b/gnulib-m4/mbrtowc.m4
@@ -1,9 +1,11 @@
-# mbrtowc.m4 serial 38 -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2022 Free Software Foundation,
+# mbrtowc.m4
+# 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,
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_MBRTOWC],
[
@@ -31,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
@@ -44,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],
@@ -91,20 +85,25 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
fi
if test $REPLACE_MBSTATE_T = 1; then
case "$host_os" in
- mingw*) LIB_MBRTOWC= ;;
+ mingw* | windows*)
+ MBRTOWC_LIB=
+ ;;
*)
gl_WEAK_SYMBOLS
case "$gl_cv_have_weak" in
- *yes) LIB_MBRTOWC= ;;
- *) LIB_MBRTOWC="$LIBPTHREAD" ;;
+ *yes) MBRTOWC_LIB= ;;
+ *) MBRTOWC_LIB="$LIBPTHREAD" ;;
esac
;;
esac
else
- LIB_MBRTOWC=
+ MBRTOWC_LIB=
fi
- dnl LIB_MBRTOWC is expected to be '-pthread' or '-lpthread' on AIX
+ dnl MBRTOWC_LIB is expected to be '-pthread' or '-lpthread' on AIX
dnl with gcc or xlc, and empty otherwise.
+ AC_SUBST([MBRTOWC_LIB])
+ dnl For backward compatibility.
+ LIB_MBRTOWC="$MBRTOWC_LIB"
AC_SUBST([LIB_MBRTOWC])
])
@@ -114,7 +113,7 @@ dnl Result is REPLACE_MBSTATE_T.
dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to
dnl avoid inconsistencies.
-AC_DEFUN([gl_MBSTATE_T_BROKEN],
+AC_DEFUN_ONCE([gl_MBSTATE_T_BROKEN],
[
AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
AC_REQUIRE([AC_CANONICAL_HOST])
@@ -126,7 +125,7 @@ AC_DEFUN([gl_MBSTATE_T_BROKEN],
dnl to override it, even if - like on MSVC - mbsinit() is only defined as
dnl an inline function, not as a global function.
if case "$host_os" in
- mingw*) true ;;
+ mingw* | windows*) true ;;
*) test $ac_cv_func_mbsinit = yes ;;
esac \
&& test $ac_cv_func_mbrtowc = yes; then
@@ -154,7 +153,7 @@ AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([gt_LOCALE_JA])
- AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_EN_UTF8])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether mbrtowc handles incomplete characters],
[gl_cv_func_mbrtowc_incomplete_state],
@@ -163,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
@@ -194,7 +193,7 @@ int main ()
[gl_cv_func_mbrtowc_incomplete_state=no],
[:])
else
- if test $LOCALE_FR_UTF8 != none; then
+ if test "$LOCALE_EN_UTF8" != none; then
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
@@ -202,7 +201,7 @@ int main ()
#include <wchar.h>
int main ()
{
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
{
const char input[] = "B\303\274\303\237er"; /* "Büßer" */
mbstate_t state;
@@ -282,7 +281,7 @@ dnl Result is gl_cv_func_mbrtowc_null_arg1.
AC_DEFUN([gl_MBRTOWC_NULL_ARG1],
[
AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_EN_UTF8])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether mbrtowc handles a NULL pwc argument],
[gl_cv_func_mbrtowc_null_arg1],
@@ -297,7 +296,7 @@ changequote(,)dnl
*) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
esac
changequote([,])dnl
- if test $LOCALE_FR_UTF8 != none; then
+ if test "$LOCALE_EN_UTF8" != none; then
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
@@ -308,7 +307,7 @@ int main ()
{
int result = 0;
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
{
char input[] = "\303\237er";
mbstate_t state;
@@ -339,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_FR_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_FR_UTF8 != none; then
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <locale.h>
-#include <string.h>
-#include <wchar.h>
-int main ()
-{
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
- {
- 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).
@@ -398,7 +346,7 @@ dnl Result is gl_cv_func_mbrtowc_retval.
AC_DEFUN([gl_MBRTOWC_RETVAL],
[
AC_REQUIRE([AC_PROG_CC])
- AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_EN_UTF8])
AC_REQUIRE([gt_LOCALE_JA])
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([whether mbrtowc has a correct return value],
@@ -408,14 +356,16 @@ AC_DEFUN([gl_MBRTOWC_RETVAL],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on HP-UX, Solaris, native Windows.
- hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
+ # Guess no on HP-UX, Solaris, native Windows.
+ hpux* | solaris* | mingw* | windows*)
+ gl_cv_func_mbrtowc_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *)
+ gl_cv_func_mbrtowc_retval="guessing yes" ;;
esac
changequote([,])dnl
- if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
- || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
+ if test "$LOCALE_EN_UTF8" != none || test $LOCALE_JA != none \
+ || { case "$host_os" in mingw* | windows*) true;; *) false;; esac; }; then
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
@@ -426,7 +376,8 @@ int main ()
int result = 0;
int found_some_locale = 0;
/* This fails on Solaris. */
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (strcmp ("$LOCALE_EN_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
{
char input[] = "B\303\274\303\237er"; /* "Büßer" */
mbstate_t state;
@@ -442,7 +393,8 @@ int main ()
found_some_locale = 1;
}
/* This fails on HP-UX 11.11. */
- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
{
char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
mbstate_t state;
@@ -577,13 +529,13 @@ AC_DEFUN([gl_MBRTOWC_STORES_INCOMPLETE],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess yes on native Windows.
- mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
- *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;;
+ *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;;
esac
changequote([,])dnl
case "$host_os" in
- mingw*)
+ mingw* | windows*)
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
@@ -639,8 +591,8 @@ int main ()
[:])
;;
*)
- AC_REQUIRE([gt_LOCALE_FR_UTF8])
- if test $LOCALE_FR_UTF8 != none; then
+ AC_REQUIRE([gt_LOCALE_EN_UTF8])
+ if test "$LOCALE_EN_UTF8" != none; then
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
@@ -648,7 +600,7 @@ int main ()
#include <wchar.h>
int main ()
{
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
{
wchar_t wc = (wchar_t) 0xBADFACE;
mbstate_t state;
@@ -677,50 +629,46 @@ AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether mbrtowc works on empty input],
[gl_cv_func_mbrtowc_empty_input],
- [
- dnl Initial guess, used when cross-compiling or when no suitable locale
- dnl is present.
-changequote(,)dnl
- case "$host_os" in
- # Guess no on AIX and glibc systems.
- aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
- *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
- esac
-changequote([,])dnl
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
- #include <wchar.h>
- static wchar_t wc;
- static mbstate_t mbs;
- int
- main (void)
- {
- return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
- }]])],
- [gl_cv_func_mbrtowc_empty_input=yes],
- [gl_cv_func_mbrtowc_empty_input=no],
- [:])
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <wchar.h>
+ static wchar_t wc;
+ static mbstate_t mbs;
+ int
+ main (void)
+ {
+ return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
+ }]])],
+ [gl_cv_func_mbrtowc_empty_input=yes],
+ [gl_cv_func_mbrtowc_empty_input=no],
+ [case "$host_os" in
+ # Guess no on AIX and glibc systems.
+ aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
+ esac
+ ])
])
])
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 <https://pubs.opengroup.org/onlinepubs/9699919799/functions/mbrtowc.html>
+dnl says: "In the POSIX locale an [EILSEQ] error cannot occur since all byte
+dnl values are valid characters."
AC_DEFUN([gl_MBRTOWC_C_LOCALE],
[
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether the C locale is free of encoding errors],
[gl_cv_func_mbrtowc_C_locale_sans_EILSEQ],
- [
- dnl Initial guess, used when cross-compiling or when no suitable locale
- dnl is present.
- gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal"
-
- AC_RUN_IFELSE(
+ [AC_RUN_IFELSE(
[AC_LANG_PROGRAM(
[[#include <limits.h>
#include <locale.h>
@@ -741,13 +689,14 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
}
return 0;
]])],
- [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes],
- [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no],
- [case "$host_os" in
- # Guess yes on native Windows.
- mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
- esac
- ])
+ [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes],
+ [gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no],
+ [case "$host_os" in
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;;
+ *) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal" ;;
+ esac
+ ])
])
])
diff --git a/gnulib-m4/mbsinit.m4 b/gnulib-m4/mbsinit.m4
index ebd2d4ff..757f2360 100644
--- a/gnulib-m4/mbsinit.m4
+++ b/gnulib-m4/mbsinit.m4
@@ -1,8 +1,10 @@
-# mbsinit.m4 serial 9
-dnl Copyright (C) 2008, 2010-2022 Free Software Foundation, Inc.
+# mbsinit.m4
+# serial 10
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_MBSINIT],
[
@@ -32,7 +34,7 @@ AC_DEFUN([gl_FUNC_MBSINIT],
dnl states produced by mbrtowc() for an incomplete multibyte character
dnl in multibyte locales.
case "$host_os" in
- mingw*) REPLACE_MBSINIT=1 ;;
+ mingw* | windows*) REPLACE_MBSINIT=1 ;;
esac
fi
fi
diff --git a/gnulib-m4/mbstate_t.m4 b/gnulib-m4/mbstate_t.m4
index a6eba1bc..88307d7a 100644
--- a/gnulib-m4/mbstate_t.m4
+++ b/gnulib-m4/mbstate_t.m4
@@ -1,8 +1,10 @@
-# mbstate_t.m4 serial 14
-dnl Copyright (C) 2000-2002, 2008-2022 Free Software Foundation, Inc.
+# mbstate_t.m4
+# serial 14
+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.
+dnl This file is offered as-is, without any warranty.
# From Paul Eggert.
diff --git a/gnulib-m4/mbtowc.m4 b/gnulib-m4/mbtowc.m4
index 2827e833..9c5887d3 100644
--- a/gnulib-m4/mbtowc.m4
+++ b/gnulib-m4/mbtowc.m4
@@ -1,16 +1,21 @@
-# mbtowc.m4 serial 3
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# mbtowc.m4
+# serial 5
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_MBTOWC],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_CHECK_FUNCS([mbtowc])
+ gl_CHECK_FUNCS_ANDROID([mbtowc], [[#include <stdlib.h>]])
if test $ac_cv_func_mbtowc = no; then
HAVE_MBTOWC=0
+ case "$gl_cv_onwards_func_mbtowc" in
+ future*) REPLACE_MBTOWC=1 ;;
+ esac
else
if false; then
REPLACE_MBTOWC=1
diff --git a/gnulib-m4/memchr.m4 b/gnulib-m4/memchr.m4
index c7489d87..c5c74682 100644
--- a/gnulib-m4/memchr.m4
+++ b/gnulib-m4/memchr.m4
@@ -1,8 +1,10 @@
-# memchr.m4 serial 18
-dnl Copyright (C) 2002-2004, 2009-2022 Free Software Foundation, Inc.
+# memchr.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
[
@@ -19,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.
@@ -31,31 +33,20 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
# include <unistd.h>
# include <sys/types.h>
# include <sys/mman.h>
-# 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
- {
- int pagesize = getpagesize ();
- char *two_pages =
- (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
- flags, fd, 0);
- if (two_pages != (char *)(-1)
- && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
- fence = two_pages + pagesize;
- }
+ {
+ 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)
{
@@ -85,12 +76,12 @@ AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
[gl_cv_func_memchr_works=yes],
[gl_cv_func_memchr_works=no],
[case "$host_os" in
- # Guess no on Android.
- linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_memchr_works="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_memchr_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_memchr_works="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;;
esac
])
])
diff --git a/gnulib-m4/minmax.m4 b/gnulib-m4/minmax.m4
index b9767397..3344e3f7 100644
--- a/gnulib-m4/minmax.m4
+++ b/gnulib-m4/minmax.m4
@@ -1,8 +1,10 @@
-# minmax.m4 serial 4
-dnl Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+# minmax.m4
+# serial 4
+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.
+dnl This file is offered as-is, without any warranty.
AC_PREREQ([2.53])
diff --git a/gnulib-m4/mkfifo.m4 b/gnulib-m4/mkfifo.m4
new file mode 100644
index 00000000..b155c872
--- /dev/null
+++ b/gnulib-m4/mkfifo.m4
@@ -0,0 +1,75 @@
+# mkfifo.m4
+# serial 9
+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.
+dnl This file is offered as-is, without any warranty.
+
+# See if we need to provide mkfifo replacement.
+
+# Written by Eric Blake.
+
+AC_DEFUN([gl_FUNC_MKFIFO],
+[
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl We can't use AC_CHECK_FUNC here, because mkfifo() is defined as a
+ dnl static inline function when compiling for Android 4.4 or older.
+ AC_CACHE_CHECK([for mkfifo], [gl_cv_func_mkfifo],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/stat.h>]],
+ [[return mkfifo("/",0);]])
+ ],
+ [gl_cv_func_mkfifo=yes],
+ [gl_cv_func_mkfifo=no])
+ ])
+ if test $gl_cv_func_mkfifo = no; then
+ HAVE_MKFIFO=0
+ else
+ AC_DEFINE([HAVE_MKFIFO], [1],
+ [Define to 1 if you have a 'mkfifo' function.])
+ dnl Check for Solaris 9 and FreeBSD bug with trailing slash.
+ AC_CHECK_FUNCS_ONCE([lstat])
+ AC_CACHE_CHECK([whether mkfifo rejects trailing slashes],
+ [gl_cv_func_mkfifo_works],
+ [# Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.tmp conftest.lnk
+ fi
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/stat.h>
+ ]],
+ [[int result = 0;
+ if (!mkfifo ("conftest.tmp/", 0600))
+ result |= 1;
+#if HAVE_LSTAT
+ if (!mkfifo ("conftest.lnk/", 0600))
+ result |= 2;
+#endif
+ return result;
+ ]])],
+ [gl_cv_func_mkfifo_works=yes], [gl_cv_func_mkfifo_works=no],
+ [case "$host_os" in
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_mkfifo_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_mkfifo_works="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_mkfifo_works="$gl_cross_guess_normal" ;;
+ esac
+ ])
+ rm -f conftest.tmp conftest.lnk])
+ case "$gl_cv_func_mkfifo_works" in
+ *yes) ;;
+ *)
+ AC_DEFINE([MKFIFO_TRAILING_SLASH_BUG], [1], [Define to 1 if mkfifo
+ does not reject trailing slash])
+ REPLACE_MKFIFO=1
+ ;;
+ esac
+ fi
+])
diff --git a/gnulib-m4/mmap-anon.m4 b/gnulib-m4/mmap-anon.m4
index a4580ff9..b5e323d4 100644
--- a/gnulib-m4/mmap-anon.m4
+++ b/gnulib-m4/mmap-anon.m4
@@ -1,17 +1,17 @@
-# mmap-anon.m4 serial 12
-dnl Copyright (C) 2005, 2007, 2009-2022 Free Software Foundation, Inc.
+# mmap-anon.m4
+# 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.
+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],
[
@@ -21,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 <sys/mman.h> 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 <sys/mman.h>
@@ -46,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 <sys/mman.h>.])
- fi
fi
])
diff --git a/gnulib-m4/mode_t.m4 b/gnulib-m4/mode_t.m4
index e08d27a7..4621813d 100644
--- a/gnulib-m4/mode_t.m4
+++ b/gnulib-m4/mode_t.m4
@@ -1,8 +1,10 @@
-# mode_t.m4 serial 2
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# mode_t.m4
+# serial 2
+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.
+dnl This file is offered as-is, without any warranty.
# For using mode_t, it's sufficient to use AC_TYPE_MODE_T and
# include <sys/types.h>.
diff --git a/gnulib-m4/msvc-inval.m4 b/gnulib-m4/msvc-inval.m4
index b32cf6eb..565c0d3a 100644
--- a/gnulib-m4/msvc-inval.m4
+++ b/gnulib-m4/msvc-inval.m4
@@ -1,8 +1,10 @@
-# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# msvc-inval.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_MSVC_INVAL],
[
diff --git a/gnulib-m4/msvc-nothrow.m4 b/gnulib-m4/msvc-nothrow.m4
index 16ceb1f1..1c2b491e 100644
--- a/gnulib-m4/msvc-nothrow.m4
+++ b/gnulib-m4/msvc-nothrow.m4
@@ -1,8 +1,10 @@
-# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# msvc-nothrow.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_MSVC_NOTHROW],
[
diff --git a/gnulib-m4/multiarch.m4 b/gnulib-m4/multiarch.m4
index 5d942765..4fb642b7 100644
--- a/gnulib-m4/multiarch.m4
+++ b/gnulib-m4/multiarch.m4
@@ -1,8 +1,10 @@
-# multiarch.m4 serial 9
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# multiarch.m4
+# serial 9
+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.
+dnl This file is offered as-is, without any warranty.
# Determine whether the compiler is or may be producing universal binaries.
#
diff --git a/gnulib-m4/musl.m4 b/gnulib-m4/musl.m4
index 111f75d3..15b34466 100644
--- a/gnulib-m4/musl.m4
+++ b/gnulib-m4/musl.m4
@@ -1,8 +1,10 @@
-# musl.m4 serial 3
-dnl Copyright (C) 2019-2022 Free Software Foundation, Inc.
+# musl.m4
+# serial 4
+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.
+dnl This file is offered as-is, without any warranty.
# Test for musl libc, despite the musl libc authors don't like it
# <https://wiki.musl-libc.org/faq.html>
@@ -13,6 +15,8 @@ AC_DEFUN_ONCE([gl_MUSL_LIBC],
[
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
- *-musl*) AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.]) ;;
+ *-musl* | midipix*)
+ AC_DEFINE([MUSL_LIBC], [1], [Define to 1 on musl libc.])
+ ;;
esac
])
diff --git a/gnulib-m4/nan-mips.m4 b/gnulib-m4/nan-mips.m4
new file mode 100644
index 00000000..da807c66
--- /dev/null
+++ b/gnulib-m4/nan-mips.m4
@@ -0,0 +1,91 @@
+# nan-mips.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+# Extra meta-info mentioned by lib/snan.h.
+AC_DEFUN_ONCE([gl_NAN_MIPS],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_cpu" in
+ mips*)
+ AC_CACHE_CHECK([whether the NaN float encoding is IEEE 754-2008 compliant],
+ [gl_cv_nan2008_f],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([[
+ float volatile zero;
+ /* Assume 'float' has 32 bits, i.e. IEEE single-float. */
+ union { float value; unsigned int word; } qnan;
+ ]],
+ [[qnan.value = zero / zero;
+ return !((qnan.word >> 22) & 1);
+ ]])
+ ],
+ [gl_cv_nan2008_f=yes],
+ [gl_cv_nan2008_f=no],
+ [gl_cv_nan2008_f="guessing no"])
+ ])
+ case "$gl_cv_nan2008_f" in
+ *yes) gl_mips_nan2008_f=1 ;;
+ *) gl_mips_nan2008_f=0 ;;
+ esac
+ AC_DEFINE_UNQUOTED([MIPS_NAN2008_FLOAT], [$gl_mips_nan2008_f],
+ [Define to 1 if the encoding of NaN 'float's is as in IEEE 754-2008 § 6.2.1.])
+
+ AC_CACHE_CHECK([whether the NaN double encoding is IEEE 754-2008 compliant],
+ [gl_cv_nan2008_d],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([[
+ double volatile zero;
+ /* Assume 'double' has 64 bits, i.e. IEEE double-float. */
+ union { double value; unsigned long long word; } qnan;
+ ]],
+ [[qnan.value = zero / zero;
+ return !((qnan.word >> 51) & 1);
+ ]])
+ ],
+ [gl_cv_nan2008_d=yes],
+ [gl_cv_nan2008_d=no],
+ [gl_cv_nan2008_d="guessing no"])
+ ])
+ case "$gl_cv_nan2008_d" in
+ *yes) gl_mips_nan2008_d=1 ;;
+ *) gl_mips_nan2008_d=0 ;;
+ esac
+ AC_DEFINE_UNQUOTED([MIPS_NAN2008_DOUBLE], [$gl_mips_nan2008_d],
+ [Define to 1 if the encoding of NaN 'double's is as in IEEE 754-2008 § 6.2.1.])
+
+ AC_CACHE_CHECK([whether the NaN long double encoding is IEEE 754-2008 compliant],
+ [gl_cv_nan2008_l],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <float.h>
+ long double volatile zero;
+ #define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ union { long double value; unsigned int word[NWORDS]; } qnan;
+ ]],
+ [[qnan.value = zero / zero;
+ #if defined _MIPSEB /* equivalent: __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__ */
+ return !((qnan.word[0] >> ((LDBL_MANT_DIG - 2) % 32)) & 1);
+ #else
+ return !((qnan.word[NWORDS - 1] >> ((LDBL_MANT_DIG - 2) % 32)) & 1);
+ #endif
+ ]])
+ ],
+ [gl_cv_nan2008_l=yes],
+ [gl_cv_nan2008_l=no],
+ [gl_cv_nan2008_l="guessing no"])
+ ])
+ case "$gl_cv_nan2008_l" in
+ *yes) gl_mips_nan2008_l=1 ;;
+ *) gl_mips_nan2008_l=0 ;;
+ esac
+ AC_DEFINE_UNQUOTED([MIPS_NAN2008_LONG_DOUBLE], [$gl_mips_nan2008_l],
+ [Define to 1 if the encoding of NaN 'long double's is as in IEEE 754-2008 § 6.2.1.])
+ ;;
+ esac
+])
diff --git a/gnulib-m4/nanosleep.m4 b/gnulib-m4/nanosleep.m4
index dfe21f56..3a9967c8 100644
--- a/gnulib-m4/nanosleep.m4
+++ b/gnulib-m4/nanosleep.m4
@@ -1,15 +1,14 @@
-# serial 42
+# nanosleep.m4
+# serial 48
+dnl Copyright (C) 1999-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.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
dnl Check for the nanosleep function.
dnl If not found, use the supplied replacement.
-dnl
-
-# Copyright (C) 1999-2001, 2003-2022 Free Software Foundation, Inc.
-
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_FUNC_NANOSLEEP],
[
@@ -21,15 +20,15 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
AC_CHECK_DECLS_ONCE([alarm])
- nanosleep_save_libs=$LIBS
+ gl_saved_LIBS=$LIBS
# Solaris 2.5.1 needs -lposix4 to get the nanosleep function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
- LIB_NANOSLEEP=
- AC_SUBST([LIB_NANOSLEEP])
+ NANOSLEEP_LIB=
+ AC_SUBST([NANOSLEEP_LIB])
AC_SEARCH_LIBS([nanosleep], [rt posix4],
[test "$ac_cv_search_nanosleep" = "none required" ||
- LIB_NANOSLEEP=$ac_cv_search_nanosleep])
+ NANOSLEEP_LIB=$ac_cv_search_nanosleep])
if test "x$ac_cv_search_nanosleep" != xno; then
dnl The system has a nanosleep function.
@@ -116,19 +115,24 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
*) gl_cv_func_nanosleep=no ;;
esac],
[case "$host_os" in
- linux*) # Guess it halfway works when the kernel is Linux.
+ # Guess it halfway works when the kernel is Linux.
+ linux*)
gl_cv_func_nanosleep='guessing no (mishandles large arguments)' ;;
- mingw*) # Guess no on native Windows.
+ # Midipix generally emulates the Linux system calls,
+ # but here it handles large arguments correctly.
+ midipix*)
+ gl_cv_func_nanosleep='guessing yes' ;;
+ # Guess no on native Windows.
+ mingw* | windows*)
gl_cv_func_nanosleep='guessing no' ;;
- *) # If we don't know, obey --enable-cross-guesses.
+ # If we don't know, obey --enable-cross-guesses.
+ *)
gl_cv_func_nanosleep="$gl_cross_guess_normal" ;;
esac
])
])
case "$gl_cv_func_nanosleep" in
- *yes)
- REPLACE_NANOSLEEP=0
- ;;
+ *yes) ;;
*)
REPLACE_NANOSLEEP=1
case "$gl_cv_func_nanosleep" in
@@ -140,7 +144,30 @@ AC_DEFUN([gl_FUNC_NANOSLEEP],
;;
esac
else
+ # Replace the static inline function on mingw which requires linking to
+ # libwinpthreads.
+ AC_CACHE_CHECK([for static inline nanosleep],
+ [gl_cv_static_inline_nanosleep],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <time.h>]],
+ [[
+ static struct timespec ts1;
+ static struct timespec ts2;
+ return nanosleep (&ts1, &ts2);
+ ]])
+ ],
+ [gl_cv_static_inline_nanosleep=yes],
+ [gl_cv_static_inline_nanosleep=no])
+ ])
+ if test $gl_cv_static_inline_nanosleep = yes; then
+ REPLACE_NANOSLEEP=1
+ fi
HAVE_NANOSLEEP=0
fi
- LIBS=$nanosleep_save_libs
+ LIBS=$gl_saved_LIBS
+
+ # For backward compatibility.
+ LIB_NANOSLEEP="$NANOSLEEP_LIB"
+ AC_SUBST([LIB_NANOSLEEP])
])
diff --git a/gnulib-m4/netinet_in_h.m4 b/gnulib-m4/netinet_in_h.m4
index de26fe85..6d9eaf97 100644
--- a/gnulib-m4/netinet_in_h.m4
+++ b/gnulib-m4/netinet_in_h.m4
@@ -1,8 +1,10 @@
-# netinet_in_h.m4 serial 6
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# netinet_in_h.m4
+# serial 6
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_HEADER_NETINET_IN],
[
diff --git a/gnulib-m4/nocrash.m4 b/gnulib-m4/nocrash.m4
index 91f00c1b..5c1af8c7 100644
--- a/gnulib-m4/nocrash.m4
+++ b/gnulib-m4/nocrash.m4
@@ -1,8 +1,10 @@
-# nocrash.m4 serial 5
-dnl Copyright (C) 2005, 2009-2022 Free Software Foundation, Inc.
+# nocrash.m4
+# serial 5
+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.
+dnl This file is offered as-is, without any warranty.
dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini.
diff --git a/gnulib-m4/off64_t.m4 b/gnulib-m4/off64_t.m4
new file mode 100644
index 00000000..93d9e37b
--- /dev/null
+++ b/gnulib-m4/off64_t.m4
@@ -0,0 +1,32 @@
+# off64_t.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl Check whether <sys/types.h> defines the 'off64_t' type.
+dnl Set HAVE_OFF64_T.
+
+AC_DEFUN([gl_TYPE_OFF64_T],
+[
+ dnl Persuade glibc <sys/types.h>, <stdio.h>, <fcntl.h>, <unistd.h>, <aio.h>
+ dnl to define off64_t.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CACHE_CHECK([for off64_t], [gl_cv_off64_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>]],
+ [[int x = sizeof (off64_t *) + sizeof (off64_t);
+ return !x;]])],
+ [gl_cv_off64_t=yes], [gl_cv_off64_t=no])])
+
+ if test $gl_cv_off64_t != no; then
+ HAVE_OFF64_T=1
+ else
+ HAVE_OFF64_T=0
+ fi
+ AC_SUBST([HAVE_OFF64_T])
+])
diff --git a/gnulib-m4/off_t.m4 b/gnulib-m4/off_t.m4
index 0890adaf..d7d6aa0c 100644
--- a/gnulib-m4/off_t.m4
+++ b/gnulib-m4/off_t.m4
@@ -1,8 +1,10 @@
-# off_t.m4 serial 1
-dnl Copyright (C) 2012-2022 Free Software Foundation, Inc.
+# off_t.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
dnl Check whether to override the 'off_t' type.
dnl Set WINDOWS_64_BIT_OFF_T.
diff --git a/gnulib-m4/once.m4 b/gnulib-m4/once.m4
new file mode 100644
index 00000000..a478d81a
--- /dev/null
+++ b/gnulib-m4/once.m4
@@ -0,0 +1,14 @@
+# once.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_ONCE],
+[
+ AC_REQUIRE([gl_THREADLIB])
+])
diff --git a/gnulib-m4/open-cloexec.m4 b/gnulib-m4/open-cloexec.m4
index 16cd5ec4..9c9aef23 100644
--- a/gnulib-m4/open-cloexec.m4
+++ b/gnulib-m4/open-cloexec.m4
@@ -1,9 +1,12 @@
-# Test whether O_CLOEXEC is defined.
-
-dnl Copyright 2017-2022 Free Software Foundation, Inc.
+# open-cloexec.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+# Test whether O_CLOEXEC is defined.
AC_DEFUN([gl_PREPROC_O_CLOEXEC],
[
diff --git a/gnulib-m4/open-slash.m4 b/gnulib-m4/open-slash.m4
index 4fbf491a..c36bdced 100644
--- a/gnulib-m4/open-slash.m4
+++ b/gnulib-m4/open-slash.m4
@@ -1,8 +1,10 @@
-# open-slash.m4 serial 2
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# open-slash.m4
+# serial 2
+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.
+dnl This file is offered as-is, without any warranty.
dnl Tests whether open() and creat() recognize a trailing slash.
dnl Sets gl_cv_func_open_slash.
diff --git a/gnulib-m4/open.m4 b/gnulib-m4/open.m4
index f82fd6ca..f5b2a91c 100644
--- a/gnulib-m4/open.m4
+++ b/gnulib-m4/open.m4
@@ -1,15 +1,20 @@
-# open.m4 serial 15
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# open.m4
+# serial 17
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_OPEN],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_PREPROC_O_CLOEXEC])
+ AC_REQUIRE([gl_FCNTL_O_FLAGS])
+ AS_CASE([$gl_cv_header_working_fcntl_h],
+ [*O_DIRECTORY* | *no], [REPLACE_OPEN=1])
case "$host_os" in
- mingw* | pw*)
+ mingw* | windows* | pw*)
REPLACE_OPEN=1
;;
*)
diff --git a/gnulib-m4/pathmax.m4 b/gnulib-m4/pathmax.m4
index 44add990..d6bdf43e 100644
--- a/gnulib-m4/pathmax.m4
+++ b/gnulib-m4/pathmax.m4
@@ -1,9 +1,11 @@
-# pathmax.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2022 Free Software Foundation,
+# pathmax.m4
+# serial 11
+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,
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_PATHMAX],
[
diff --git a/gnulib-m4/perror.m4 b/gnulib-m4/perror.m4
index 02d44ca2..4052ab4a 100644
--- a/gnulib-m4/perror.m4
+++ b/gnulib-m4/perror.m4
@@ -1,8 +1,10 @@
-# perror.m4 serial 10
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# perror.m4
+# serial 13
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_PERROR],
[
@@ -10,7 +12,7 @@ AC_DEFUN([gl_FUNC_PERROR],
AC_REQUIRE([gl_HEADER_ERRNO_H])
AC_REQUIRE([gl_FUNC_STRERROR_R])
AC_REQUIRE([gl_FUNC_STRERROR_0])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([AC_CANONICAL_HOST])
dnl We intentionally do not check for the broader REPLACE_STRERROR_R,
dnl since on glibc systems, strerror_r is replaced only for signature
dnl issues, and perror is just fine. Rather, we only want to
@@ -48,12 +50,12 @@ AC_DEFUN([gl_FUNC_PERROR],
rm -rf conftest.txt1 conftest.txt2],
[gl_cv_func_perror_works=no],
[case "$host_os" in
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_perror_works="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_perror_works="guessing yes" ;;
- # Otherwise obey --enable-cross-guesses.
- *) gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_perror_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_perror_works="guessing yes" ;;
+ # Otherwise obey --enable-cross-guesses.
+ *) gl_cv_func_perror_works="$gl_cross_guess_normal" ;;
esac
])
])
@@ -68,4 +70,9 @@ AC_DEFUN([gl_FUNC_PERROR],
REPLACE_PERROR=1
;;
esac
+ dnl Does perror clobber the strerror buffer?
+ case "$host_os" in
+ # Yes on Android 11.
+ linux*-android*) REPLACE_PERROR=1 ;;
+ esac
])
diff --git a/gnulib-m4/pipe.m4 b/gnulib-m4/pipe.m4
index 62871c6d..41fed87b 100644
--- a/gnulib-m4/pipe.m4
+++ b/gnulib-m4/pipe.m4
@@ -1,8 +1,10 @@
-# pipe.m4 serial 2
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+# pipe.m4
+# serial 2
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_PIPE],
[
diff --git a/gnulib-m4/printf-frexp.m4 b/gnulib-m4/printf-frexp.m4
index 0628b5ab..e1d1f4b0 100644
--- a/gnulib-m4/printf-frexp.m4
+++ b/gnulib-m4/printf-frexp.m4
@@ -1,8 +1,10 @@
-# printf-frexp.m4 serial 5
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# printf-frexp.m4
+# serial 5
+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.
+dnl This file is offered as-is, without any warranty.
dnl Check how to define printf_frexp() without linking with libm.
diff --git a/gnulib-m4/printf-frexpl.m4 b/gnulib-m4/printf-frexpl.m4
index 137c8718..22e69639 100644
--- a/gnulib-m4/printf-frexpl.m4
+++ b/gnulib-m4/printf-frexpl.m4
@@ -1,8 +1,10 @@
-# printf-frexpl.m4 serial 10
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# printf-frexpl.m4
+# serial 10
+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.
+dnl This file is offered as-is, without any warranty.
dnl Check how to define printf_frexpl() without linking with libm.
diff --git a/gnulib-m4/printf.m4 b/gnulib-m4/printf.m4
index 667452e3..0de493b6 100644
--- a/gnulib-m4/printf.m4
+++ b/gnulib-m4/printf.m4
@@ -1,8 +1,10 @@
-# printf.m4 serial 73
-dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
+# printf.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
dnl Test whether the *printf family of functions supports the 'j', 'z', 't',
dnl 'L' size specifiers. (ISO C99, POSIX:2001)
@@ -63,7 +65,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_printf_sizes_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_printf_sizes_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
@@ -86,7 +88,8 @@ changequote(,)dnl
linux*-android*) gl_cv_func_printf_sizes_c99="guessing yes";;
changequote([,])dnl
# Guess yes on MSVC, no on mingw.
- mingw*) AC_EGREP_CPP([Known], [
+ windows*-msvc*) gl_cv_func_printf_sizes_c99="guessing yes" ;;
+ mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
@@ -101,6 +104,92 @@ changequote([,])dnl
])
])
+dnl Test whether the *printf family of functions supports the 'w8', 'w16',
+dnl 'w32', 'w64', 'wf8', 'wf16', 'wf32', 'wf64' size specifiers. (ISO C23)
+dnl Result is gl_cv_func_printf_sizes_c23.
+
+AC_DEFUN([gl_PRINTF_SIZES_C23],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports size specifiers as in C23],
+ [gl_cv_func_printf_sizes_c23],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+static char buf[100];
+int main ()
+{
+ int result = 0;
+ buf[0] = '\0';
+ if (sprintf (buf, "%w8u %d", (uint8_t) 123, 33, 44, 55) < 0
+ || strcmp (buf, "123 33") != 0)
+ result |= 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%wf8u %d", (uint_fast8_t) 123, 33, 44, 55) < 0
+ || strcmp (buf, "123 33") != 0)
+ result |= 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%w16u %d", (uint16_t) 12345, 33, 44, 55) < 0
+ || strcmp (buf, "12345 33") != 0)
+ result |= 2;
+ buf[0] = '\0';
+ if (sprintf (buf, "%wf16u %d", (uint_fast16_t) 12345, 33, 44, 55) < 0
+ || strcmp (buf, "12345 33") != 0)
+ result |= 2;
+ buf[0] = '\0';
+ if (sprintf (buf, "%w32u %d", (uint32_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ result |= 4;
+ buf[0] = '\0';
+ if (sprintf (buf, "%wf32u %d", (uint_fast32_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ result |= 4;
+#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
+ buf[0] = '\0';
+ if (sprintf (buf, "%w64u %d", (uint64_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ result |= 8;
+ buf[0] = '\0';
+ if (sprintf (buf, "%wf64u %d", (uint_fast64_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ result |= 8;
+#else
+ result |= 8;
+#endif
+ return result;
+}]])],
+ [gl_cv_func_printf_sizes_c23=yes],
+ [gl_cv_func_printf_sizes_c23=no],
+ [
+ case "$host_os" in
+ # Guess no on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_printf_sizes_c23="guessing no";;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_printf_sizes_c23="guessing no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_sizes_c23="guessing no";;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_printf_sizes_c23="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_printf_sizes_c23="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
dnl Test whether the *printf family of functions supports 'long double'
dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001)
dnl Result is gl_cv_func_printf_long_double.
@@ -137,20 +226,21 @@ int main ()
[gl_cv_func_printf_long_double=yes],
[gl_cv_func_printf_long_double=no],
[case "$host_os" in
- # Guess no on BeOS.
- beos*) gl_cv_func_printf_long_double="guessing no";;
- # Guess yes on Android.
- linux*-android*) gl_cv_func_printf_long_double="guessing yes";;
- # Guess yes on MSVC, no on mingw.
- mingw*) AC_EGREP_CPP([Known], [
+ # Guess no on BeOS.
+ beos*) gl_cv_func_printf_long_double="guessing no";;
+ # Guess yes on Android.
+ linux*-android*) gl_cv_func_printf_long_double="guessing yes";;
+ # Guess yes on MSVC, no on mingw.
+ windows*-msvc*) gl_cv_func_printf_long_double="guessing yes" ;;
+ mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
- ],
- [gl_cv_func_printf_long_double="guessing yes"],
- [gl_cv_func_printf_long_double="guessing no"])
- ;;
- *) gl_cv_func_printf_long_double="guessing yes";;
+ ],
+ [gl_cv_func_printf_long_double="guessing yes"],
+ [gl_cv_func_printf_long_double="guessing no"])
+ ;;
+ *) gl_cv_func_printf_long_double="guessing yes";;
esac
])
])
@@ -244,7 +334,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_infinite="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_printf_infinite="guessing yes";;
# Guess yes on FreeBSD >= 6.
freebsd[1-5].*) gl_cv_func_printf_infinite="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
@@ -268,7 +358,8 @@ changequote(,)dnl
linux*-android*) gl_cv_func_printf_infinite="guessing no";;
changequote([,])dnl
# Guess yes on MSVC, no on mingw.
- mingw*) AC_EGREP_CPP([Known], [
+ windows*-msvc*) gl_cv_func_printf_infinite="guessing yes" ;;
+ mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
@@ -467,7 +558,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_printf_infinite_long_double="guessing yes";;
# Guess yes on FreeBSD >= 6.
freebsd[1-5].*) gl_cv_func_printf_infinite_long_double="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
@@ -482,7 +573,8 @@ changequote(,)dnl
linux*-android*) gl_cv_func_printf_infinite_long_double="guessing no";;
changequote([,])dnl
# Guess yes on MSVC, no on mingw.
- mingw*) AC_EGREP_CPP([Known], [
+ windows*-msvc*) gl_cv_func_printf_infinite_long_double="guessing yes" ;;
+ mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
@@ -525,6 +617,7 @@ static double zero = 0.0;
int main ()
{
int result = 0;
+ /* This fails on FreeBSD 5.2.1, Solaris 11.4. */
if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
|| (strcmp (buf, "0x1.922p+1 33") != 0
&& strcmp (buf, "0x3.244p+0 33") != 0
@@ -536,27 +629,29 @@ int main ()
&& strcmp (buf, "-0X3.244P+0 33") != 0
&& strcmp (buf, "-0X6.488P-1 33") != 0
&& strcmp (buf, "-0XC.91P-2 33") != 0))
- result |= 2;
- /* This catches a FreeBSD 13.0 bug: it doesn't round. */
+ result |= 1;
+ /* This catches a Mac OS X 10.5, FreeBSD 6.4, NetBSD 10.0 bug:
+ it doesn't round. */
if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
|| (strcmp (buf, "0x1.83p+0 33") != 0
&& strcmp (buf, "0x3.05p-1 33") != 0
&& strcmp (buf, "0x6.0ap-2 33") != 0
&& strcmp (buf, "0xc.14p-3 33") != 0))
- result |= 4;
- /* This catches a Mac OS X 10.12.4 (Darwin 16.5) bug: it doesn't round. */
+ result |= 2;
+ /* This catches a macOS 14 (Darwin 23), FreeBSD 14.0, OpenBSD 7.5, AIX 7.3,
+ Solaris 11.4 bug: it doesn't round. */
if (sprintf (buf, "%.0a %d", 1.51, 33, 44, 55) < 0
|| (strcmp (buf, "0x2p+0 33") != 0
&& strcmp (buf, "0x3p-1 33") != 0
&& strcmp (buf, "0x6p-2 33") != 0
&& strcmp (buf, "0xcp-3 33") != 0))
result |= 4;
- /* This catches a FreeBSD 6.1 bug. See
+ /* This catches a Mac OS X 10.5, FreeBSD 6.4 bug. See
<https://lists.gnu.org/r/bug-gnulib/2007-04/msg00107.html> */
if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0
|| buf[0] == '0')
result |= 8;
- /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */
+ /* This catches a Mac OS X 10.3.9 (Darwin 7.9), FreeBSD 6.4 bug. */
if (sprintf (buf, "%.1a", 1.999) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
&& strcmp (buf, "0x2.0p+0") != 0
@@ -564,7 +659,8 @@ 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 <https://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ glibc 2.4 bug <https://sourceware.org/PR2908>
+ and a FreeBSD 6.4, NetBSD 10.0 bug. */
if (sprintf (buf, "%.1La", 1.999L) < 0
|| (strcmp (buf, "0x1.0p+1") != 0
&& strcmp (buf, "0x2.0p+0") != 0
@@ -591,11 +687,11 @@ int main ()
[gl_cv_func_printf_directive_a="guessing no"])
;;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_directive_a="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_printf_directive_a="guessing yes";;
# Guess no on Android.
linux*-android*) gl_cv_func_printf_directive_a="guessing no";;
# Guess no on native Windows.
- mingw*) gl_cv_func_printf_directive_a="guessing no";;
+ mingw* | windows*) gl_cv_func_printf_directive_a="guessing no";;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_printf_directive_a="$gl_cross_guess_normal";;
esac
@@ -603,6 +699,116 @@ int main ()
])
])
+dnl Test whether the *printf family of functions supports the 'b' conversion
+dnl specifier for binary output of integers.
+dnl (ISO C23)
+dnl Result is gl_cv_func_printf_directive_b.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_B],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'b' directive],
+ [gl_cv_func_printf_directive_b],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ int result = 0;
+ if (sprintf (buf, "%b %d", 12345, 33, 44, 55) < 0
+ || strcmp (buf, "11000000111001 33") != 0)
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_printf_directive_b=yes],
+ [gl_cv_func_printf_directive_b=no],
+ [
+ case "$host_os" in
+ # Guess yes on glibc >= 2.35 systems.
+ *-gnu* | gnu*)
+ AC_EGREP_CPP([Lucky], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 35) || (__GLIBC__ > 2)
+ Lucky user
+ #endif
+ #endif
+ ],
+ [gl_cv_func_printf_directive_uppercase_b="guessing yes"],
+ [gl_cv_func_printf_directive_uppercase_b="guessing no"])
+ ;;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_printf_directive_b="guessing no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_directive_b="guessing no";;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_printf_directive_b="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_printf_directive_b="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the 'B' conversion
+dnl specifier for binary output of integers.
+dnl (GNU, encouraged by ISO C23 § 7.23.6.1)
+dnl Result is gl_cv_func_printf_directive_uppercase_b.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_UPPERCASE_B],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'B' directive],
+ [gl_cv_func_printf_directive_uppercase_b],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ int result = 0;
+ if (sprintf (buf, "%#B %d", 12345, 33, 44, 55) < 0
+ || strcmp (buf, "0B11000000111001 33") != 0)
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_printf_directive_uppercase_b=yes],
+ [gl_cv_func_printf_directive_uppercase_b=no],
+ [
+ case "$host_os" in
+ # Guess yes on glibc >= 2.35 systems.
+ *-gnu* | gnu*)
+ AC_EGREP_CPP([Lucky], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 35) || (__GLIBC__ > 2)
+ Lucky user
+ #endif
+ #endif
+ ],
+ [gl_cv_func_printf_directive_uppercase_b="guessing yes"],
+ [gl_cv_func_printf_directive_uppercase_b="guessing no"])
+ ;;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_printf_directive_uppercase_b="guessing no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_directive_uppercase_b="guessing no";;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_printf_directive_uppercase_b="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_printf_directive_uppercase_b="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
dnl Test whether the *printf family of functions supports the %F format
dnl directive. (ISO C99, POSIX:2001)
dnl Result is gl_cv_func_printf_directive_f.
@@ -643,7 +849,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_directive_f="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_printf_directive_f="guessing yes";;
# Guess yes on FreeBSD >= 6.
freebsd[1-5].*) gl_cv_func_printf_directive_f="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
@@ -661,7 +867,8 @@ changequote(,)dnl
linux*-android*) gl_cv_func_printf_directive_f="guessing no";;
changequote([,])dnl
# Guess yes on MSVC, no on mingw.
- mingw*) AC_EGREP_CPP([Known], [
+ windows*-msvc*) gl_cv_func_printf_directive_f="guessing yes" ;;
+ mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
@@ -689,10 +896,16 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
[
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
+#include <signal.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
+#if defined _WIN32 && !defined __CYGWIN__
+# include <stdlib.h>
+#else
+# include <unistd.h>
+#endif
#ifdef _MSC_VER
+#include <crtdbg.h>
#include <inttypes.h>
/* See page about "Parameter Validation" on msdn.microsoft.com.
<https://docs.microsoft.com/en-us/cpp/c-runtime-library/parameter-validation>
@@ -706,6 +919,12 @@ invalid_parameter_handler (const wchar_t *expression,
exit (1);
}
#endif
+static void
+abort_handler (int sig)
+{
+ (void) sig;
+ _exit (1);
+}
static char fmtstring[10];
static char buf[100];
int main ()
@@ -713,8 +932,12 @@ int main ()
int count = -1;
#ifdef _MSC_VER
_set_invalid_parameter_handler (invalid_parameter_handler);
+ /* Also avoid an Abort/Retry/Ignore dialog in debug builds.
+ <https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/crtsetreportmode> */
+ _CrtSetReportMode (_CRT_ASSERT, 0);
#endif
- /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ signal (SIGABRT, abort_handler);
+ /* 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");
@@ -727,21 +950,21 @@ int main ()
[gl_cv_func_printf_directive_n=yes],
[gl_cv_func_printf_directive_n=no],
[case "$host_os" in
- # Guess no on glibc when _FORTIFY_SOURCE >= 2.
- *-gnu* | gnu*) AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if _FORTIFY_SOURCE >= 2
- error fail
- #endif
- ]])],
- [gl_cv_func_printf_directive_n="guessing yes"],
- [gl_cv_func_printf_directive_n="guessing no"])
- ;;
- # Guess no on Android.
- linux*-android*) gl_cv_func_printf_directive_n="guessing no";;
- # Guess no on native Windows.
- mingw*) gl_cv_func_printf_directive_n="guessing no";;
- *) gl_cv_func_printf_directive_n="guessing yes";;
+ # Guess no on glibc when _FORTIFY_SOURCE >= 2.
+ *-gnu* | gnu*) AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#if _FORTIFY_SOURCE >= 2
+ error fail
+ #endif
+ ]])],
+ [gl_cv_func_printf_directive_n="guessing yes"],
+ [gl_cv_func_printf_directive_n="guessing no"])
+ ;;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_directive_n="guessing no";;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_printf_directive_n="guessing no";;
+ *) gl_cv_func_printf_directive_n="guessing yes";;
esac
])
])
@@ -771,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 };
@@ -780,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';
@@ -811,18 +1034,63 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- # Guess yes on OpenBSD >= 6.0.
- openbsd[1-5].*) gl_cv_func_printf_directive_ls="guessing no";;
- openbsd*) gl_cv_func_printf_directive_ls="guessing yes";;
- irix*) gl_cv_func_printf_directive_ls="guessing no";;
- solaris*) gl_cv_func_printf_directive_ls="guessing no";;
- cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
- beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
- # Guess no on Android.
- linux*-android*) gl_cv_func_printf_directive_ls="guessing no";;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_printf_directive_ls="guessing yes";;
- *) gl_cv_func_printf_directive_ls="guessing yes";;
+ # 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";;
+ solaris*) gl_cv_func_printf_directive_ls="guessing no";;
+ cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
+ beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_directive_ls="guessing no";;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_printf_directive_ls="guessing yes";;
+ *) gl_cv_func_printf_directive_ls="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the %lc format
+dnl directive and in particular, when the argument is a null wide character,
+dnl whether the functions produce a NUL byte, as specified in ISO C 23
+dnl after the issue GB-141 was fixed.
+dnl Result is gl_cv_func_printf_directive_lc.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_LC],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'lc' directive correctly],
+ [gl_cv_func_printf_directive_lc],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+ int result = 0;
+ char buf[100];
+ /* This test fails on musl libc 1.2.4. */
+ {
+ buf[0] = '\0';
+ if (sprintf (buf, "%lc%lc%lc", (wint_t) 'a', (wint_t) 0, (wint_t) 'z') < 0
+ || memcmp (buf, "a\0z", 4) != 0)
+ result |= 1;
+ }
+ return result;
+}]])],
+ [gl_cv_func_printf_directive_lc=yes],
+ [gl_cv_func_printf_directive_lc=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on musl libc.
+ *-musl* | midipix*) gl_cv_func_printf_directive_lc="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_printf_directive_lc="guessing yes";;
esac
changequote([,])dnl
])
@@ -833,7 +1101,7 @@ dnl Test whether the *printf family of functions supports POSIX/XSI format
dnl strings with positions. (POSIX:2001)
dnl Result is gl_cv_func_printf_positions.
-AC_DEFUN([gl_PRINTF_POSITIONS],
+AC_DEFUN_ONCE([gl_PRINTF_POSITIONS],
[
AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -859,13 +1127,17 @@ int main ()
changequote(,)dnl
case "$host_os" in
netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
- gl_cv_func_printf_positions="guessing no";;
- beos*) gl_cv_func_printf_positions="guessing no";;
- # Guess yes on Android.
- linux*-android*) gl_cv_func_printf_positions="guessing yes";;
- # Guess no on native Windows.
- mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
- *) gl_cv_func_printf_positions="guessing yes";;
+ gl_cv_func_printf_positions="guessing no";;
+ beos*)
+ gl_cv_func_printf_positions="guessing no";;
+ # Guess yes on Android.
+ linux*-android*)
+ gl_cv_func_printf_positions="guessing yes";;
+ # Guess no on native Windows.
+ mingw* | windows* | pw*)
+ gl_cv_func_printf_positions="guessing no";;
+ *)
+ gl_cv_func_printf_positions="guessing yes";;
esac
changequote([,])dnl
])
@@ -900,19 +1172,125 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
- netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
- # Guess no on Android.
- linux*-android*) gl_cv_func_printf_flag_grouping="guessing no";;
- # Guess no on native Windows.
- mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
- *) gl_cv_func_printf_flag_grouping="guessing yes";;
+ cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
+ netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_flag_grouping="guessing no";;
+ # Guess no on native Windows.
+ mingw* | windows* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
+ *) gl_cv_func_printf_flag_grouping="guessing yes";;
esac
changequote([,])dnl
])
])
])
+dnl Test whether the *printf family of functions supports POSIX/XSI format
+dnl strings with the ' flag for grouping of decimal digits on integers,
+dnl together with a precision.
+dnl Result is gl_cv_func_printf_flag_grouping_int_precision.
+
+AC_DEFUN([gl_PRINTF_FLAG_GROUPING_INT_PRECISION],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([whether printf supports grouping on integers with a precision],
+ [gl_cv_func_printf_flag_grouping_int_precision],
+ [
+ dnl Prepare a guess, used when cross-compiling or when specific locales
+ dnl are not available.
+ case "$host_os" in
+ # Guess no on FreeBSD, NetBSD, Solaris, Cygwin, Haiku.
+ freebsd* | dragonfly* | netbsd* | solaris* | cygwin* | haiku*)
+ gl_cv_func_printf_flag_grouping_int_precision="guessing no";;
+ *)
+ gl_cv_func_printf_flag_grouping_int_precision="guessing yes";;
+ esac
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL
+ || setlocale (LC_ALL, "fr_FR") != NULL
+ || setlocale (LC_ALL, "fr_FR.ISO-8859-1") != NULL
+ || setlocale (LC_ALL, "fr_FR.ISO8859-1") != NULL)
+ {
+ if (sprintf (buf, "%'.10d", 1000) < 0)
+ return 1;
+ if (strlen (buf) == 10 && strcmp (buf, "0000001000") != 0)
+ /* The sprintf implementation has produced fewer than 10 digits. */
+ return 2;
+ else
+ return 0;
+ }
+ return 3;
+}]])],
+ [gl_cv_func_printf_flag_grouping_int_precision=yes],
+ [if test $? = 2; then
+ gl_cv_func_printf_flag_grouping_int_precision=no
+ fi
+ ],
+ [:])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports POSIX/XSI format
+dnl strings with the ' flag for grouping of decimal digits, when the thousands
+dnl separator is a multibyte character (such as U+00A0 or U+202F in a UTF-8
+dnl locale).
+dnl Result is gl_cv_func_printf_flag_grouping_multibyte.
+
+AC_DEFUN([gl_PRINTF_FLAG_GROUPING_MULTIBYTE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([whether printf supports grouping with a multibyte separator],
+ [gl_cv_func_printf_flag_grouping_multibyte],
+ [
+ dnl Prepare a guess, used when cross-compiling or when specific locales
+ dnl are not available.
+ case "$host_os" in
+ # Guess no on NetBSD and Solaris 11 OpenIndiana.
+ netbsd* | solaris*)
+ gl_cv_func_printf_flag_grouping_multibyte="guessing no";;
+ *)
+ gl_cv_func_printf_flag_grouping_multibyte="guessing yes";;
+ esac
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL)
+ return 0;
+ if (sprintf (buf, "%'.0f", 1000.0) < 0)
+ return 1;
+ if (strlen (localeconv ()->thousands_sep) > 1)
+ {
+ if (strlen (buf) <= 4 + 1)
+ return 2;
+ else
+ return 3;
+ }
+ return 0;
+}]])],
+ [:],
+ [case $? in
+ 2) gl_cv_func_printf_flag_grouping_multibyte=no ;;
+ 3) gl_cv_func_printf_flag_grouping_multibyte=yes ;;
+ esac
+ ],
+ [:])
+ ])
+])
+
dnl Test whether the *printf family of functions supports the - flag correctly.
dnl (ISO C99.) See
dnl <https://lists.gnu.org/r/bug-coreutils/2008-02/msg00035.html>
@@ -943,16 +1321,16 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- # Guess yes on HP-UX 11.
- hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
- # Guess no on HP-UX 10 and older.
- hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
- # Guess yes on Android.
- linux*-android*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
- # Guess yes otherwise.
- *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ # Guess yes on HP-UX 11.
+ hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ # Guess no on HP-UX 10 and older.
+ hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
+ # Guess yes on Android.
+ linux*-android*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ # Guess yes otherwise.
+ *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
esac
changequote([,])dnl
])
@@ -990,18 +1368,62 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_printf_flag_zero="guessing yes";;
- # Guess yes on BeOS.
- beos*) gl_cv_func_printf_flag_zero="guessing yes";;
- # Guess no on Android.
- linux*-android*) gl_cv_func_printf_flag_zero="guessing no";;
- # Guess no on native Windows.
- mingw*) gl_cv_func_printf_flag_zero="guessing no";;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_printf_flag_zero="guessing no";;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_printf_flag_zero="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_printf_flag_zero="$gl_cross_guess_normal";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the # flag with a
+dnl zero precision and a zero value in the 'x' and 'X' directives correctly.
+dnl ISO C and POSIX specify that for the 'd', 'i', 'b', 'o', 'u', 'x', 'X'
+dnl directives: "The result of converting a zero value with a precision of
+dnl zero is no characters." But on Mac OS X 10.5, for the 'x', 'X' directives,
+dnl when a # flag is present, the output is "0" instead of "".
+dnl Result is gl_cv_func_printf_flag_alt_precision_zero.
+
+AC_DEFUN([gl_PRINTF_FLAG_ALT_PRECISION_ZERO],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the alternative flag with a zero precision],
+ [gl_cv_func_printf_flag_alt_precision_zero],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+static char buf[10];
+int main ()
+{
+ int result = 0;
+ if (sprintf (buf, "%#.0x %d", 0, 33, 44) > 0 + 3)
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_printf_flag_alt_precision_zero=yes],
+ [gl_cv_func_printf_flag_alt_precision_zero=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no only on macOS 10..12 systems.
+ darwin[0-9] | darwin[0-9].* | \
+ darwin1[0-9] | darwin1[0-9].* | \
+ darwin2[0-1] | darwin2[0-1].*)
+ gl_cv_func_printf_flag_alt_precision_zero="guessing no" ;;
+ darwin*) gl_cv_func_printf_flag_alt_precision_zero="guessing yes" ;;
+ *) gl_cv_func_printf_flag_alt_precision_zero="guessing yes" ;;
esac
changequote([,])dnl
])
@@ -1054,12 +1476,12 @@ int main ()
changequote(,)dnl
case "$host_os" in
# Guess no only on Solaris, native Windows, and BeOS systems.
- solaris*) gl_cv_func_printf_precision="guessing no" ;;
- mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
- beos*) gl_cv_func_printf_precision="guessing no" ;;
- # Guess yes on Android.
- linux*-android*) gl_cv_func_printf_precision="guessing yes" ;;
- *) gl_cv_func_printf_precision="guessing yes" ;;
+ solaris*) gl_cv_func_printf_precision="guessing no" ;;
+ mingw* | windows* | pw*) gl_cv_func_printf_precision="guessing no" ;;
+ beos*) gl_cv_func_printf_precision="guessing no" ;;
+ # Guess yes on Android.
+ linux*-android*) gl_cv_func_printf_precision="guessing yes" ;;
+ *) gl_cv_func_printf_precision="guessing yes" ;;
esac
changequote([,])dnl
])
@@ -1166,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.
@@ -1239,7 +1657,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
@@ -1261,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";;
@@ -1275,7 +1688,7 @@ changequote(,)dnl
# Guess yes on Android.
linux*-android*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
# Guess no on native Windows.
- mingw*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ mingw* | windows*) gl_cv_func_snprintf_truncation_c99="guessing no";;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_snprintf_truncation_c99="$gl_cross_guess_normal";;
esac
@@ -1287,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 <stdio.h>
dnl int main()
@@ -1344,7 +1757,7 @@ changequote(,)dnl
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on musl systems.
- *-musl*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_snprintf_retval_c99="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
@@ -1372,7 +1785,8 @@ changequote(,)dnl
linux*-android*) gl_cv_func_snprintf_retval_c99="guessing yes";;
changequote([,])dnl
# Guess yes on MSVC, no on mingw.
- mingw*) AC_EGREP_CPP([Known], [
+ windows*-msvc*) gl_cv_func_snprintf_retval_c99="guessing yes" ;;
+ mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
@@ -1401,8 +1815,14 @@ AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N],
[
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
+#include <signal.h>
#include <stdio.h>
#include <string.h>
+#if defined _WIN32 && !defined __CYGWIN__
+# include <stdlib.h>
+#else
+# include <unistd.h>
+#endif
#if HAVE_SNPRINTF
# define my_snprintf snprintf
#else
@@ -1417,12 +1837,19 @@ static int my_snprintf (char *buf, int size, const char *format, ...)
return ret;
}
#endif
+static void
+abort_handler (int sig)
+{
+ (void) sig;
+ _exit (1);
+}
static char fmtstring[10];
static char buf[100];
int main ()
{
int count = -1;
- /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ signal (SIGABRT, abort_handler);
+ /* 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");
@@ -1447,7 +1874,7 @@ int main ()
;;
changequote(,)dnl
# Guess yes on musl systems.
- *-musl*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ *-musl* | midipix*) gl_cv_func_snprintf_directive_n="guessing yes";;
# Guess yes on FreeBSD >= 5.
freebsd[1-4].*) gl_cv_func_snprintf_directive_n="guessing no";;
freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
@@ -1462,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";;
@@ -1476,7 +1898,7 @@ changequote(,)dnl
# Guess no on Android.
linux*-android*) gl_cv_func_snprintf_directive_n="guessing no";;
# Guess no on native Windows.
- mingw*) gl_cv_func_snprintf_directive_n="guessing no";;
+ mingw* | windows*) gl_cv_func_snprintf_directive_n="guessing no";;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_snprintf_directive_n="$gl_cross_guess_normal";;
changequote([,])dnl
@@ -1524,11 +1946,11 @@ int main()
[gl_cv_func_snprintf_size1=yes],
[gl_cv_func_snprintf_size1=no],
[case "$host_os" in
- # Guess yes on Android.
- linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_snprintf_size1="guessing yes" ;;
- *) gl_cv_func_snprintf_size1="guessing yes" ;;
+ # Guess yes on Android.
+ linux*-android*) gl_cv_func_snprintf_size1="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_snprintf_size1="guessing yes" ;;
+ *) gl_cv_func_snprintf_size1="guessing yes" ;;
esac
])
])
@@ -1601,128 +2023,322 @@ int main()
[
changequote(,)dnl
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on FreeBSD >= 5.
- freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
- freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- midnightbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on Mac OS X >= 10.3.
- darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
- darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on Cygwin.
- cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on Solaris >= 2.6.
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ midnightbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Mac OS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
solaris2.[0-5] | solaris2.[0-5].*)
- gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
- solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # 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.
+ gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # 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 NetBSD >= 3.
netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
- gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
- netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on BeOS.
- beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on Android.
- linux*-android*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # Guess yes on native Windows.
- mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_vsnprintf_zerosize_c99="$gl_cross_guess_normal";;
+ gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Android.
+ linux*-android*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on native Windows.
+ mingw* | windows* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_vsnprintf_zerosize_c99="$gl_cross_guess_normal";;
esac
changequote([,])dnl
])
])
])
+dnl Test whether the swprintf function works correctly when it produces output
+dnl that contains null wide characters.
+dnl Result is gl_cv_func_swprintf_works.
+
+AC_DEFUN([gl_SWPRINTF_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_FUNCS_ONCE([swprintf])
+ AC_CACHE_CHECK([whether swprintf works],
+ [gl_cv_func_swprintf_works],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#ifndef __USE_MINGW_ANSI_STDIO
+# define __USE_MINGW_ANSI_STDIO 1
+#endif
+#include <stdio.h>
+#include <wchar.h>
+int main()
+{
+ int result = 0;
+ { /* This test fails on musl libc 1.2.3, FreeBSD, NetBSD, OpenBSD, macOS, AIX. */
+ wchar_t buf[5] = { 0xBEEF, 0xBEEF, 0xBEEF, 0xBEEF, 0xBEEF };
+ int ret = swprintf (buf, 4, L"%cz", '\0');
+ /* Expected result:
+ ret = 2, buf[0] = 0x0, buf[1] = 0x7a, buf[2] = 0x0, buf[3] = 0xbeef
+ musl libc 1.2.3:
+ ret = 2, buf[0] = 0x0, buf[1] = 0x0, buf[2] = 0x0, buf[3] = 0x0
+ Reported at <https://www.openwall.com/lists/musl/2023/03/22/9>.
+ FreeBSD 13.1, NetBSD 9.0, OpenBSD 7.2, macOS 12.5, AIX 7.2:
+ ret = 2, buf[0] = 0x0, buf[1] = 0xbeef, buf[2] = 0xbeef, buf[3] = 0xbeef
+ */
+ if (ret < 0 || buf[1] != 'z')
+ result |= 1;
+ }
+ { /* This test fails on mingw. */
+ wchar_t buf[2];
+ int ret = swprintf (buf, 2, L"%lc", (wint_t)0);
+ /* Expected: ret = 1
+ mingw: ret = 0
+ */
+ if (ret != 1)
+ result |= 2;
+ }
+ return result;
+}]])],
+ [gl_cv_func_swprintf_works=yes],
+ [gl_cv_func_swprintf_works=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_swprintf_works="guessing yes";;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_swprintf_works="guessing no";;
+ # Guess no on FreeBSD, NetBSD, OpenBSD, macOS, AIX.
+ freebsd* | midnightbsd* | netbsd* | openbsd* | darwin* | aix*)
+ gl_cv_func_swprintf_works="guessing no";;
+ # Guess no on native Windows.
+ mingw* | windows* | pw*) gl_cv_func_swprintf_works="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_swprintf_works="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether the *wprintf family of functions supports the 'a' and 'A'
+dnl conversion specifier for hexadecimal output of 'long double' numbers.
+dnl (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_swprintf_directive_la.
+
+AC_DEFUN([gl_SWPRINTF_DIRECTIVE_LA],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether swprintf supports the 'La' and 'LA' directives],
+ [gl_cv_func_swprintf_directive_la],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <wchar.h>
+static wchar_t buf[100];
+int main ()
+{
+ int result = 0;
+ /* This catches a glibc 2.15, Haiku 2022, NetBSD 10.0 bug. */
+ if (swprintf (buf, sizeof (buf) / sizeof (wchar_t),
+ L"%La %d", 3.1416015625L, 33, 44, 55) < 0
+ || (wcscmp (buf, L"0x1.922p+1 33") != 0
+ && wcscmp (buf, L"0x3.244p+0 33") != 0
+ && wcscmp (buf, L"0x6.488p-1 33") != 0
+ && wcscmp (buf, L"0xc.91p-2 33") != 0))
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_swprintf_directive_la=yes],
+ [gl_cv_func_swprintf_directive_la=no],
+ [case "$host_os" in
+ # Guess yes on glibc >= 2.17 systems.
+ *-gnu* | gnu*)
+ AC_EGREP_CPP([Unlucky], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 16) || (__GLIBC__ > 2)) && !defined __UCLIBC__
+ Unlucky
+ #endif
+ #endif
+ ],
+ [gl_cv_func_swprintf_directive_la="guessing yes"],
+ [gl_cv_func_swprintf_directive_la="guessing no"])
+ ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_swprintf_directive_la="guessing yes";;
+ # Guess yes on Android.
+ linux*-android*) gl_cv_func_swprintf_directive_la="guessing yes";;
+ # Guess no on NetBSD.
+ netbsd*) gl_cv_func_swprintf_directive_la="guessing no";;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_swprintf_directive_la="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_swprintf_directive_la="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether the *wprintf family of functions supports the 'lc' conversion
+dnl specifier for all wide characters.
+dnl (ISO C11, POSIX:2001)
+dnl Result is gl_cv_func_swprintf_directive_lc.
+
+AC_DEFUN([gl_SWPRINTF_DIRECTIVE_LC],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether swprintf supports the 'lc' directive],
+ [gl_cv_func_swprintf_directive_lc],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <stdio.h>
+#include <wchar.h>
+static wchar_t buf[100];
+static wint_t L_invalid = (wchar_t) 0x76543210;
+int main ()
+{
+ int result = 0;
+ /* This catches a musl libc 1.2.4, Android bug.
+ Reported at <https://www.openwall.com/lists/musl/2023/06/12/3>. */
+ if (swprintf (buf, sizeof (buf) / sizeof (wchar_t),
+ L"%lc %d", L_invalid, 33, 44, 55) < 0)
+ result |= 1;
+ return result;
+}]])],
+ [gl_cv_func_swprintf_directive_lc=yes],
+ [gl_cv_func_swprintf_directive_lc=no],
+ [case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_swprintf_directive_lc="guessing yes";;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_swprintf_directive_lc="guessing no";;
+ # Guess no on Android.
+ linux*-android*) gl_cv_func_swprintf_directive_lc="guessing no";;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_swprintf_directive_lc="guessing yes";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_swprintf_directive_lc="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+])
+
dnl The results of these tests on various platforms are:
dnl
dnl 1 = gl_PRINTF_SIZES_C99
-dnl 2 = gl_PRINTF_LONG_DOUBLE
-dnl 3 = gl_PRINTF_INFINITE
-dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE
-dnl 5 = gl_PRINTF_DIRECTIVE_A
-dnl 6 = gl_PRINTF_DIRECTIVE_F
-dnl 7 = gl_PRINTF_DIRECTIVE_N
-dnl 8 = gl_PRINTF_DIRECTIVE_LS
-dnl 9 = gl_PRINTF_POSITIONS
-dnl 10 = gl_PRINTF_FLAG_GROUPING
-dnl 11 = gl_PRINTF_FLAG_LEFTADJUST
-dnl 12 = gl_PRINTF_FLAG_ZERO
-dnl 13 = gl_PRINTF_PRECISION
-dnl 14 = gl_PRINTF_ENOMEM
-dnl 15 = gl_SNPRINTF_PRESENCE
-dnl 16 = gl_SNPRINTF_TRUNCATION_C99
-dnl 17 = gl_SNPRINTF_RETVAL_C99
-dnl 18 = gl_SNPRINTF_DIRECTIVE_N
-dnl 19 = gl_SNPRINTF_SIZE1
-dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl 2 = gl_PRINTF_SIZES_C23
+dnl 3 = gl_PRINTF_LONG_DOUBLE
+dnl 4 = gl_PRINTF_INFINITE
+dnl 5 = gl_PRINTF_INFINITE_LONG_DOUBLE
+dnl 6 = gl_PRINTF_DIRECTIVE_A
+dnl 7 = gl_PRINTF_DIRECTIVE_B
+dnl 8 = gl_PRINTF_DIRECTIVE_UPPERCASE_B
+dnl 9 = gl_PRINTF_DIRECTIVE_F
+dnl 10 = gl_PRINTF_DIRECTIVE_N
+dnl 11 = gl_PRINTF_DIRECTIVE_LS
+dnl 12 = gl_PRINTF_DIRECTIVE_LC
+dnl 13 = gl_PRINTF_POSITIONS
+dnl 14 = gl_PRINTF_FLAG_GROUPING
+dnl 15 = gl_PRINTF_FLAG_GROUPING_INT_PRECISION
+dnl 16 = gl_PRINTF_FLAG_GROUPING_MULTIBYTE
+dnl 17 = gl_PRINTF_FLAG_LEFTADJUST
+dnl 18 = gl_PRINTF_FLAG_ZERO
+dnl 19 = gl_PRINTF_FLAG_ALT_PRECISION_ZERO
+dnl 20 = gl_PRINTF_PRECISION
+dnl 21 = gl_PRINTF_ENOMEM
+dnl 22 = gl_SNPRINTF_PRESENCE
+dnl 23 = gl_SNPRINTF_TRUNCATION_C99
+dnl 24 = gl_SNPRINTF_RETVAL_C99
+dnl 25 = gl_SNPRINTF_DIRECTIVE_N
+dnl 26 = gl_SNPRINTF_SIZE1
+dnl 27 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl 28 = gl_SWPRINTF_WORKS
+dnl 29 = gl_SWPRINTF_DIRECTIVE_LA
+dnl 30 = gl_SWPRINTF_DIRECTIVE_LC
dnl
dnl 1 = checking whether printf supports size specifiers as in C99...
-dnl 2 = checking whether printf supports 'long double' arguments...
-dnl 3 = checking whether printf supports infinite 'double' arguments...
-dnl 4 = checking whether printf supports infinite 'long double' arguments...
-dnl 5 = checking whether printf supports the 'a' and 'A' directives...
-dnl 6 = checking whether printf supports the 'F' directive...
-dnl 7 = checking whether printf supports the 'n' directive...
-dnl 8 = checking whether printf supports the 'ls' directive...
-dnl 9 = checking whether printf supports POSIX/XSI format strings with positions...
-dnl 10 = checking whether printf supports the grouping flag...
-dnl 11 = checking whether printf supports the left-adjust flag correctly...
-dnl 12 = checking whether printf supports the zero flag correctly...
-dnl 13 = checking whether printf supports large precisions...
-dnl 14 = checking whether printf survives out-of-memory conditions...
-dnl 15 = checking for snprintf...
-dnl 16 = checking whether snprintf truncates the result as in C99...
-dnl 17 = checking whether snprintf returns a byte count as in C99...
-dnl 18 = checking whether snprintf fully supports the 'n' directive...
-dnl 19 = checking whether snprintf respects a size of 1...
-dnl 20 = checking whether vsnprintf respects a zero size as in C99...
+dnl 2 = checking whether printf supports size specifiers as in C23...
+dnl 3 = checking whether printf supports 'long double' arguments...
+dnl 4 = checking whether printf supports infinite 'double' arguments...
+dnl 5 = checking whether printf supports infinite 'long double' arguments...
+dnl 6 = checking whether printf supports the 'a' and 'A' directives...
+dnl 7 = checking whether printf supports the 'b' directive...
+dnl 8 = checking whether printf supports the 'B' directive...
+dnl 9 = checking whether printf supports the 'F' directive...
+dnl 10 = checking whether printf supports the 'n' directive...
+dnl 11 = checking whether printf supports the 'ls' directive...
+dnl 12 = checking whether printf supports the 'lc' directive correctly...
+dnl 13 = checking whether printf supports POSIX/XSI format strings with positions...
+dnl 14 = checking whether printf supports the grouping flag...
+dnl 15 = checking whether printf supports grouping on integers with a precision...
+dnl 16 = checking whether printf supports grouping with a multibyte separator...
+dnl 17 = checking whether printf supports the left-adjust flag correctly...
+dnl 18 = checking whether printf supports the zero flag correctly...
+dnl 19 = checking whether printf supports the alternative flag with a zero precision...
+dnl 20 = checking whether printf supports large precisions...
+dnl 21 = checking whether printf survives out-of-memory conditions...
+dnl 22 = checking for snprintf...
+dnl 23 = checking whether snprintf truncates the result as in C99...
+dnl 24 = checking whether snprintf returns a byte count as in C99...
+dnl 25 = checking whether snprintf fully supports the 'n' directive...
+dnl 26 = checking whether snprintf respects a size of 1...
+dnl 27 = checking whether vsnprintf respects a zero size as in C99...
+dnl 28 = checking whether swprintf works...
+dnl 29 = checking whether swprintf supports the 'La' and 'LA' directives...
+dnl 30 = checking whether swprintf supports the 'lc' directive...
dnl
dnl . = yes, # = no.
dnl
-dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
-dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . .
-dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . .
-dnl FreeBSD 13.0 . . . . # . . . . . . . . # . . . . . .
-dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . .
-dnl Mac OS X 10.13.5 . . . # # . # . . . . . . . . . . # . .
-dnl Mac OS X 10.5.8 . . . # # . . . . . . # . . . . . . . .
-dnl Mac OS X 10.3.9 . . . . # . . . . . . # . # . . . . . .
-dnl OpenBSD 6.0, 6.7 . . . . # . . . . . . . . # . . . . . .
-dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . .
-dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . .
-dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . .
-dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . .
-dnl Solaris 11.4 . . # # # . . # . . . # . . . . . . . .
-dnl Solaris 11.3 . . . . # . . # . . . . . . . . . . . .
-dnl Solaris 11.0 . . # # # . . # . . . # . . . . . . . .
-dnl Solaris 10 . . # # # . . # . . . # # . . . . . . .
-dnl Solaris 2.6 ... 9 # . # # # # . # . . . # # . . . # . . .
-dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # #
-dnl AIX 7.1 . . # # # . . . . . . # # . . . . . . .
-dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . .
-dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . # . . .
-dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . .
-dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . #
-dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? #
-dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . .
-dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . #
-dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # #
-dnl NetBSD 9.0 . . . . # . . . . . . . . . . . . . . .
-dnl NetBSD 5.0 . . . # # . . . . . . # . # . . . . . .
-dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ?
-dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . .
-dnl Haiku . . . # # # . # . . . . . ? . . ? . . .
-dnl BeOS # # . # # # . ? # . ? . # ? . . ? . . .
-dnl Android 4.3 . . # # # # # # . # . # . # . . . # . .
-dnl old mingw / msvcrt # # # # # # . . # # . # # ? . # # # . .
-dnl MSVC 9 # # # # # # # . # # . # # ? # # # # . .
-dnl mingw 2009-2011 . # . # . . . . # # . . . ? . . . . . .
-dnl mingw-w64 2011 # # # # # # . . # # . # # ? . # # # . .
+dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
+dnl musl libc 1.2.3 . # . . . . # # . . . # . . . . . . . . . . . . . . . # . #
+dnl glibc 2.35 . # . . . . . . . . . . . . # . . . . . . . . . . . . . . .
+dnl glibc 2.5 . # . . . . # # . . . . . . # . . . . . . . . . . . . . # .
+dnl glibc 2.3.6 . # . . . # # # . . . . . . . . . . . . . . . . . . . . # .
+dnl FreeBSD 14.0 . . . . . # . . . . . . . . # . . . . . # . . . . . . # . #
+dnl FreeBSD 13.0 . # . . . # # # . . . . . . # . . . . . # . . . . . . # . #
+dnl FreeBSD 5.4, 6.1 . # . . . # # # . . . . . . . . . # ? . # . . . . . . # ? ?
+dnl Mac OS X 10.13.5 . # . . # # # # . # . . . . ? ? . . . . . . . . # . . # ? ?
+dnl Mac OS X 10.5.8 . # . . # # # # . . . . . . ? ? . # # . . . . . . . . # ? ?
+dnl Mac OS X 10.3.9 . # . . . # # # . . . . . . ? ? . # # . # . . . . . . # ? ?
+dnl OpenBSD 6.0, 6.7 . # . . . # # # . . . . . . . . . . . . # . . . . . . # . #
+dnl OpenBSD 3.9, 4.0 . # . # # # # # # . # . . # ? ? . # ? . # . . . . . . # ? ?
+dnl Cygwin 1.7.0 (2009) . # . . # . # # . . ? ? . . ? ? . . ? . ? . . . . . . ? ? ?
+dnl Cygwin 1.5.25 (2008) . # . . # # # # . . # ? . . ? ? . . ? . # . . . . . . ? ? ?
+dnl Cygwin 1.5.19 (2006) # # . . # # # # # . # ? . # ? ? . # ? # # . . . . . . ? ? ?
+dnl Solaris 11.4 . # . # # # # # . . # . . . # # . # . . . . . . . . . . # .
+dnl Solaris 11.3 . # . . . # # # . . # . . . ? ? . . . . . . . . . . . . # .
+dnl Solaris 11.0 . # . # # # # # . . # . . . ? ? . # . . . . . . . . . ? ? ?
+dnl Solaris 10 . # . # # # # # . . # . . . # # . # . # . . . . . . . . # .
+dnl Solaris 2.6 ... 9 # # . # # # # # # . # . . . ? ? . # ? # . . . # . . . ? ? ?
+dnl Solaris 2.5.1 # # . # # # # # # . # . . . ? ? . # ? . . # # # # # # ? ? ?
+dnl AIX 7.1 . # . # # # # # . . . . . . . . . # . # . . . . . . . # . .
+dnl AIX 5.2 . # . # # # # # . . . . . . ? ? . # ? . . . . . . . . # ? ?
+dnl AIX 4.3.2, 5.1 # # . # # # # # # . . . . . ? ? . # ? . . . . # . . . # ? ?
+dnl HP-UX 11.31 . # . . . # # # . . . ? . . ? ? . # ? . . . . # # . . ? ? ?
+dnl HP-UX 11.{00,11,23} # # . . . # # # # . . ? . . ? ? . # ? . . . . # # . # ? ? ?
+dnl HP-UX 10.20 # # . # . # # # # . ? ? . . ? ? # # ? . . . . # # ? # ? ? ?
+dnl IRIX 6.5 # # . # # # # # # . # . . . ? ? . # ? . . . . # . . . # ? ?
+dnl OSF/1 5.1 # # . # # # # # # . . ? . . ? ? . # ? . . . . # . . # ? ? ?
+dnl OSF/1 4.0d # # . # # # # # # . . ? . . ? ? . # ? . . # # # # # # ? ? ?
+dnl NetBSD 9.0 . # . . . # # # . . . . . . # # . . . . . . . . . . . # . #
+dnl NetBSD 5.0 . # . . # # # # . . . . . . ? ? . # ? . # . . . . . . # ? ?
+dnl NetBSD 4.0 . # ? ? ? ? # # ? . ? . . ? ? ? ? ? ? ? ? . . . ? ? ? # ? ?
+dnl NetBSD 3.0 . # . . . # # # # . ? . # # ? ? ? # ? . # . . . . . . # ? ?
+dnl Haiku . # . . # # # # # . # ? . . # . . . ? . ? . . ? . . . . # .
+dnl BeOS # # # . # # # # # . ? ? # . ? ? ? . ? # ? . . ? . . . ? ? ?
+dnl Android 4.3 . # . # # # # # # # # ? . # ? ? . # ? . # . . . # . . ? ? ?
+dnl old mingw / msvcrt # # # # # # # # # . . ? # # ? ? . # ? # ? . # # # . . # ? ?
+dnl MSVC 9 # # # # # # # # # # . ? # # ? ? . # ? # ? # # # # . . # ? ?
+dnl mingw 2009-2011 . # # . # . # # . . . ? # # ? ? . . ? . ? . . . . . . # ? ?
+dnl mingw-w64 2011 # # # # # # # # # . . ? # # ? ? . # ? # ? . # # # . . # ? ?
diff --git a/gnulib-m4/pselect.m4 b/gnulib-m4/pselect.m4
index 86114416..829910b8 100644
--- a/gnulib-m4/pselect.m4
+++ b/gnulib-m4/pselect.m4
@@ -1,8 +1,10 @@
-# pselect.m4 serial 10
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# pselect.m4
+# serial 11
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_PSELECT],
[
@@ -54,6 +56,8 @@ AC_DEFUN([gl_FUNC_PSELECT],
case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_pselect_detects_ebadf="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
diff --git a/gnulib-m4/pthread-cond.m4 b/gnulib-m4/pthread-cond.m4
new file mode 100644
index 00000000..02d6efc2
--- /dev/null
+++ b/gnulib-m4/pthread-cond.m4
@@ -0,0 +1,38 @@
+# pthread-cond.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_PTHREAD_COND],
+[
+ AC_REQUIRE([gl_PTHREAD_H])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
+ && test $gl_threads_api = windows; then
+ dnl Choose function names that don't conflict with the mingw-w64 winpthreads
+ dnl library.
+ REPLACE_PTHREAD_COND_INIT=1
+ REPLACE_PTHREAD_CONDATTR_INIT=1
+ REPLACE_PTHREAD_CONDATTR_DESTROY=1
+ REPLACE_PTHREAD_COND_WAIT=1
+ REPLACE_PTHREAD_COND_TIMEDWAIT=1
+ REPLACE_PTHREAD_COND_SIGNAL=1
+ REPLACE_PTHREAD_COND_BROADCAST=1
+ REPLACE_PTHREAD_COND_DESTROY=1
+ else
+ if test $HAVE_PTHREAD_H = 0; then
+ HAVE_PTHREAD_COND_INIT=0
+ HAVE_PTHREAD_CONDATTR_INIT=0
+ HAVE_PTHREAD_CONDATTR_DESTROY=0
+ HAVE_PTHREAD_COND_WAIT=0
+ HAVE_PTHREAD_COND_TIMEDWAIT=0
+ HAVE_PTHREAD_COND_SIGNAL=0
+ HAVE_PTHREAD_COND_BROADCAST=0
+ HAVE_PTHREAD_COND_DESTROY=0
+ fi
+ fi
+])
diff --git a/gnulib-m4/pthread-mutex.m4 b/gnulib-m4/pthread-mutex.m4
new file mode 100644
index 00000000..38c525da
--- /dev/null
+++ b/gnulib-m4/pthread-mutex.m4
@@ -0,0 +1,73 @@
+# pthread-mutex.m4
+# serial 4
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_PTHREAD_MUTEX],
+[
+ AC_REQUIRE([gl_PTHREAD_H])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
+ && test $gl_threads_api = windows; then
+ dnl Choose function names that don't conflict with the mingw-w64 winpthreads
+ dnl library.
+ REPLACE_PTHREAD_MUTEX_INIT=1
+ REPLACE_PTHREAD_MUTEXATTR_INIT=1
+ REPLACE_PTHREAD_MUTEXATTR_GETTYPE=1
+ REPLACE_PTHREAD_MUTEXATTR_SETTYPE=1
+ REPLACE_PTHREAD_MUTEXATTR_GETROBUST=1
+ REPLACE_PTHREAD_MUTEXATTR_SETROBUST=1
+ REPLACE_PTHREAD_MUTEXATTR_DESTROY=1
+ REPLACE_PTHREAD_MUTEX_LOCK=1
+ REPLACE_PTHREAD_MUTEX_TRYLOCK=1
+ REPLACE_PTHREAD_MUTEX_TIMEDLOCK=1
+ REPLACE_PTHREAD_MUTEX_UNLOCK=1
+ REPLACE_PTHREAD_MUTEX_DESTROY=1
+ else
+ if test $HAVE_PTHREAD_H = 0; then
+ HAVE_PTHREAD_MUTEX_INIT=0
+ HAVE_PTHREAD_MUTEXATTR_INIT=0
+ HAVE_PTHREAD_MUTEXATTR_GETTYPE=0
+ HAVE_PTHREAD_MUTEXATTR_SETTYPE=0
+ HAVE_PTHREAD_MUTEXATTR_GETROBUST=0
+ HAVE_PTHREAD_MUTEXATTR_SETROBUST=0
+ HAVE_PTHREAD_MUTEXATTR_DESTROY=0
+ HAVE_PTHREAD_MUTEX_LOCK=0
+ HAVE_PTHREAD_MUTEX_TRYLOCK=0
+ dnl HAVE_PTHREAD_MUTEX_TIMEDLOCK is set in pthread_mutex_timedlock.m4.
+ HAVE_PTHREAD_MUTEX_UNLOCK=0
+ HAVE_PTHREAD_MUTEX_DESTROY=0
+ else
+ AC_CACHE_CHECK([for pthread_mutexattr_getrobust],
+ [gl_cv_func_pthread_mutexattr_getrobust],
+ [saved_LIBS="$LIBS"
+ LIBS="$LIBS $LIBPMULTITHREAD"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [[extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ int pthread_mutexattr_getrobust (void);
+ int main ()
+ {
+ return pthread_mutexattr_getrobust ();
+ }
+ ]])],
+ [gl_cv_func_pthread_mutexattr_getrobust=yes],
+ [gl_cv_func_pthread_mutexattr_getrobust=no])
+ LIBS="$saved_LIBS"
+ ])
+ if test $gl_cv_func_pthread_mutexattr_getrobust = no; then
+ HAVE_PTHREAD_MUTEXATTR_GETROBUST=0
+ HAVE_PTHREAD_MUTEXATTR_SETROBUST=0
+ AC_DEFINE([PTHREAD_MUTEXATTR_ROBUST_UNIMPLEMENTED], [1],
+ [Define if the 'robust' attribute of pthread_mutex* doesn't exist.])
+ fi
+ fi
+ fi
+])
diff --git a/gnulib-m4/pthread-once.m4 b/gnulib-m4/pthread-once.m4
new file mode 100644
index 00000000..9080363d
--- /dev/null
+++ b/gnulib-m4/pthread-once.m4
@@ -0,0 +1,83 @@
+# pthread-once.m4
+# serial 6
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_PTHREAD_ONCE],
+[
+ AC_REQUIRE([gl_PTHREAD_H])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_PTHREADLIB])
+
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
+ && test $gl_threads_api = windows; then
+ dnl Choose function names that don't conflict with the mingw-w64 winpthreads
+ dnl library.
+ REPLACE_PTHREAD_ONCE=1
+ PTHREAD_ONCE_LIB=
+ else
+ if test $HAVE_PTHREAD_H = 0; then
+ HAVE_PTHREAD_ONCE=0
+ PTHREAD_ONCE_LIB=
+ else
+ dnl Work around Cygwin 3.5.3 bug.
+ AC_CACHE_CHECK([whether pthread_once works],
+ [gl_cv_func_pthread_once_works],
+ [case "$host_os" in
+ cygwin*) gl_cv_func_pthread_once_works="guessing no" ;;
+ *) gl_cv_func_pthread_once_works="yes" ;;
+ esac
+ ])
+ case "$gl_cv_func_pthread_once_works" in
+ *yes) ;;
+ *) REPLACE_PTHREAD_ONCE=1 ;;
+ esac
+ dnl Determine whether linking requires $(LIBPMULTITHREAD) or only
+ dnl $(LIBPTHREAD).
+ if test -z "$LIBPTHREAD" && test -n "$LIBPMULTITHREAD"; then
+ AC_CACHE_CHECK([whether pthread_once can be used without linking with libpthread],
+ [gl_cv_func_pthread_once_no_lib],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ static pthread_once_t a_once = PTHREAD_ONCE_INIT;
+ static int a;
+ static void a_init (void) { a = 8647; }
+ ]],
+ [[if (pthread_once (&a_once, a_init)) return 1;
+ if (a != 8647) return 2;
+ return 0;
+ ]])],
+ [gl_cv_func_pthread_once_no_lib=yes],
+ [gl_cv_func_pthread_once_no_lib=no],
+ [case "$host_os" in
+ # Guess no on glibc.
+ *-gnu* | gnu*)
+ gl_cv_func_pthread_once_no_lib="guessing no" ;;
+ # Guess no on FreeBSD.
+ freebsd* | dragonfly* | midnightbsd*)
+ gl_cv_func_pthread_once_no_lib="guessing no" ;;
+ # Guess yes otherwise.
+ *)
+ gl_cv_func_pthread_once_no_lib="guessing yes" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_pthread_once_no_lib" in
+ *yes) PTHREAD_ONCE_LIB="$LIBPTHREAD" ;;
+ *) PTHREAD_ONCE_LIB="$LIBPMULTITHREAD" ;;
+ esac
+ dnl Expected result:
+ dnl PTHREAD_ONCE_LIB is $(LIBPMULTITHREAD) on glibc < 2.34, FreeBSD.
+ dnl PTHREAD_ONCE_LIB is $(LIBPTHREAD) in particular on
+ dnl musl libc, macOS, NetBSD, Solaris, Cygwin, Haiku, Android.
+ else
+ PTHREAD_ONCE_LIB="$LIBPTHREAD"
+ fi
+ fi
+ fi
+ AC_SUBST([PTHREAD_ONCE_LIB])
+])
diff --git a/gnulib-m4/pthread-rwlock.m4 b/gnulib-m4/pthread-rwlock.m4
new file mode 100644
index 00000000..ace80721
--- /dev/null
+++ b/gnulib-m4/pthread-rwlock.m4
@@ -0,0 +1,462 @@
+# pthread-rwlock.m4
+# serial 9
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_PTHREAD_RWLOCK],
+[
+ AC_REQUIRE([gl_PTHREAD_H])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
+ && test $gl_threads_api = windows; then
+ dnl Choose function names that don't conflict with the mingw-w64 winpthreads
+ dnl library.
+ REPLACE_PTHREAD_RWLOCK_INIT=1
+ REPLACE_PTHREAD_RWLOCKATTR_INIT=1
+ REPLACE_PTHREAD_RWLOCKATTR_DESTROY=1
+ REPLACE_PTHREAD_RWLOCK_RDLOCK=1
+ REPLACE_PTHREAD_RWLOCK_WRLOCK=1
+ REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=1
+ REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=1
+ REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=1
+ REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=1
+ REPLACE_PTHREAD_RWLOCK_UNLOCK=1
+ REPLACE_PTHREAD_RWLOCK_DESTROY=1
+ else
+ if test $HAVE_PTHREAD_H = 0; then
+ HAVE_PTHREAD_RWLOCK_INIT=0
+ HAVE_PTHREAD_RWLOCKATTR_INIT=0
+ HAVE_PTHREAD_RWLOCKATTR_DESTROY=0
+ HAVE_PTHREAD_RWLOCK_RDLOCK=0
+ HAVE_PTHREAD_RWLOCK_WRLOCK=0
+ HAVE_PTHREAD_RWLOCK_TRYRDLOCK=0
+ HAVE_PTHREAD_RWLOCK_TRYWRLOCK=0
+ HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=0
+ HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=0
+ HAVE_PTHREAD_RWLOCK_UNLOCK=0
+ HAVE_PTHREAD_RWLOCK_DESTROY=0
+ else
+ dnl On Mac OS X 10.4, the pthread_rwlock_* functions exist but are not
+ dnl usable because PTHREAD_RWLOCK_INITIALIZER is not defined.
+ dnl On Android 4.3, the pthread_rwlock_* functions are declared in
+ dnl <pthread.h> but don't exist in libc.
+ AC_CACHE_CHECK([for pthread_rwlock_init],
+ [gl_cv_func_pthread_rwlock_init],
+ [case "$host_os" in
+ darwin*)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#include <pthread.h>
+ pthread_rwlock_t l = PTHREAD_RWLOCK_INITIALIZER;
+ ]])],
+ [gl_cv_func_pthread_rwlock_init=yes],
+ [gl_cv_func_pthread_rwlock_init=no])
+ ;;
+ *)
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $LIBPMULTITHREAD"
+ AC_LINK_IFELSE(
+ [AC_LANG_SOURCE(
+ [[extern
+ #ifdef __cplusplus
+ "C"
+ #endif
+ int pthread_rwlock_init (void);
+ int main ()
+ {
+ return pthread_rwlock_init ();
+ }
+ ]])],
+ [gl_cv_func_pthread_rwlock_init=yes],
+ [gl_cv_func_pthread_rwlock_init=no])
+ LIBS="$saved_LIBS"
+ ;;
+ esac
+ ])
+ if test $gl_cv_func_pthread_rwlock_init = no; then
+ REPLACE_PTHREAD_RWLOCK_INIT=1
+ REPLACE_PTHREAD_RWLOCKATTR_INIT=1
+ REPLACE_PTHREAD_RWLOCKATTR_DESTROY=1
+ REPLACE_PTHREAD_RWLOCK_RDLOCK=1
+ REPLACE_PTHREAD_RWLOCK_WRLOCK=1
+ REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=1
+ REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=1
+ REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=1
+ REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=1
+ REPLACE_PTHREAD_RWLOCK_UNLOCK=1
+ REPLACE_PTHREAD_RWLOCK_DESTROY=1
+ AC_DEFINE([PTHREAD_RWLOCK_UNIMPLEMENTED], [1],
+ [Define if all pthread_rwlock* functions don't exist.])
+ else
+ dnl On Mac OS X 10.5, FreeBSD 5.2.1, OpenBSD 3.8, AIX 5.1, HP-UX 11,
+ dnl Solaris 9, Cygwin, the pthread_rwlock_timed*lock functions don't
+ dnl exist, although the other pthread_rwlock* functions exist.
+ AC_CHECK_DECL([pthread_rwlock_timedrdlock], ,
+ [HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=0
+ HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=0
+ AC_DEFINE([PTHREAD_RWLOCK_LACKS_TIMEOUT], [1],
+ [Define if the functions pthread_rwlock_timedrdlock and pthread_rwlock_timedwrlock don't exist.])
+ ],
+ [[#include <pthread.h>]])
+ dnl In glibc ≥ 2.25 on Linux, test-pthread-rwlock-waitqueue reports
+ dnl "This implementation always prefers readers.", and this wait queue
+ dnl handling is unsuitable, because it leads to writer starvation:
+ dnl On machines with 8 or more CPUs, test-pthread-rwlock may never
+ dnl terminate. See
+ dnl <https://lists.gnu.org/archive/html/bug-gnulib/2024-06/msg00291.html>
+ dnl <https://lists.gnu.org/archive/html/bug-gnulib/2024-07/msg00081.html>
+ dnl for details.
+ AC_CACHE_CHECK([for reasonable pthread_rwlock wait queue handling],
+ [gl_cv_func_pthread_rwlock_good_waitqueue],
+ [case "$host_os" in
+ linux*-gnu*)
+ saved_LIBS="$LIBS"
+ LIBS="$LIBS $LIBPMULTITHREAD"
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+/* This test is a simplified variant of tests/test-pthread-rwlock-waitqueue.c. */
+#include <pthread.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+
+#if defined __hppa
+# define STEP_INTERVAL 20000000 /* nanoseconds */
+#else
+# define STEP_INTERVAL 10000000 /* nanoseconds */
+#endif
+
+static pthread_rwlock_t lock;
+
+static pthread_rwlock_t sprintf_lock;
+
+struct locals
+{
+ const char *name;
+ unsigned int wait_before;
+ unsigned int wait_after;
+ char *result;
+};
+
+static void *
+reader_func (void *arg)
+{
+ struct locals *l = arg;
+ int err;
+
+ if (l->wait_before > 0)
+ {
+ struct timespec duration;
+ duration.tv_sec = l->wait_before / 1000000000;
+ duration.tv_nsec = l->wait_before % 1000000000;
+ nanosleep (&duration, NULL);
+ }
+ err = pthread_rwlock_rdlock (&lock);
+ if (err)
+ {
+ fprintf (stderr, "pthread_rwlock_rdlock failed, error = %d\n", err);
+ abort ();
+ }
+ if (pthread_rwlock_wrlock (&sprintf_lock))
+ {
+ fprintf (stderr, "pthread_rwlock_wrlock on sprintf_lock failed\n");
+ abort ();
+ }
+ sprintf (l->result + strlen (l->result), " %s", l->name);
+ if (pthread_rwlock_unlock (&sprintf_lock))
+ {
+ fprintf (stderr, "pthread_rwlock_unlock on sprintf_lock failed\n");
+ abort ();
+ }
+ if (l->wait_after > 0)
+ {
+ struct timespec duration;
+ duration.tv_sec = l->wait_after / 1000000000;
+ duration.tv_nsec = l->wait_after % 1000000000;
+ nanosleep (&duration, NULL);
+ }
+ err = pthread_rwlock_unlock (&lock);
+ if (err)
+ {
+ fprintf (stderr, "pthread_rwlock_unlock failed, error = %d\n", err);
+ abort ();
+ }
+
+ return NULL;
+}
+
+static void *
+writer_func (void *arg)
+{
+ struct locals *l = arg;
+ int err;
+
+ if (l->wait_before > 0)
+ {
+ struct timespec duration;
+ duration.tv_sec = l->wait_before / 1000000000;
+ duration.tv_nsec = l->wait_before % 1000000000;
+ nanosleep (&duration, NULL);
+ }
+ err = pthread_rwlock_wrlock (&lock);
+ if (err)
+ {
+ fprintf (stderr, "pthread_rwlock_rdlock failed, error = %d\n", err);
+ abort ();
+ }
+ if (pthread_rwlock_wrlock (&sprintf_lock))
+ {
+ fprintf (stderr, "pthread_rwlock_wrlock on sprintf_lock failed\n");
+ abort ();
+ }
+ sprintf (l->result + strlen (l->result), " %s", l->name);
+ if (pthread_rwlock_unlock (&sprintf_lock))
+ {
+ fprintf (stderr, "pthread_rwlock_unlock on sprintf_lock failed\n");
+ abort ();
+ }
+ if (l->wait_after > 0)
+ {
+ struct timespec duration;
+ duration.tv_sec = l->wait_after / 1000000000;
+ duration.tv_nsec = l->wait_after % 1000000000;
+ nanosleep (&duration, NULL);
+ }
+ err = pthread_rwlock_unlock (&lock);
+ if (err)
+ {
+ fprintf (stderr, "pthread_rwlock_unlock failed, error = %d\n", err);
+ abort ();
+ }
+
+ return NULL;
+}
+
+static const char *
+do_test (const char *rw_string)
+{
+ size_t n = strlen (rw_string);
+ int err;
+ char resultbuf[100];
+
+ char **names = (char **) malloc (n * sizeof (char *));
+ for (size_t i = 0; i < n; i++)
+ {
+ char name[12];
+ sprintf (name, "%c%u", rw_string[i], (unsigned int) (i+1));
+ names[i] = strdup (name);
+ }
+
+ resultbuf[0] = '\0';
+
+ /* Create the threads. */
+ struct locals *locals = (struct locals *) malloc (n * sizeof (struct locals));
+ pthread_t *threads = (pthread_t *) malloc (n * sizeof (pthread_t));
+ for (size_t i = 0; i < n; i++)
+ {
+ locals[i].name = names[i];
+ locals[i].wait_before = i * STEP_INTERVAL;
+ locals[i].wait_after = (i == 0 ? n * STEP_INTERVAL : 0);
+ locals[i].result = resultbuf;
+ err = pthread_create (&threads[i], NULL,
+ rw_string[i] == 'R' ? reader_func :
+ rw_string[i] == 'W' ? writer_func :
+ (abort (), (void * (*) (void *)) NULL),
+ &locals[i]);
+ if (err)
+ {
+ fprintf (stderr, "pthread_create failed to create thread %u, error = %d\n",
+ (unsigned int) (i+1), err);
+ abort ();
+ }
+ }
+
+ /* Wait until the threads are done. */
+ for (size_t i = 0; i < n; i++)
+ {
+ void *retcode;
+ err = pthread_join (threads[i], &retcode);
+ if (err)
+ {
+ fprintf (stderr, "pthread_join failed to wait for thread %u, error = %d\n",
+ (unsigned int) (i+1), err);
+ abort ();
+ }
+ }
+
+ /* Clean up. */
+ free (threads);
+ free (locals);
+ for (size_t i = 0; i < n; i++)
+ free (names[i]);
+ free (names);
+
+ return strdup (resultbuf);
+}
+
+static bool
+startswith (const char *str, const char *prefix)
+{
+ return strncmp (str, prefix, strlen (prefix)) == 0;
+}
+
+static int
+find_wait_queue_handling (void)
+{
+ bool final_r_prefers_readers = true;
+ bool final_w_prefers_readers = true;
+
+ /* Perform the test a few times, so that in case of a non-deterministic
+ behaviour that happens to look like deterministic in one round, we get
+ a higher probability of finding that it is non-deterministic. */
+ for (int repeat = 3; repeat > 0; repeat--)
+ {
+ bool r_prefers_readers = false;
+ bool w_prefers_readers = false;
+
+ {
+ const char * RWR = do_test ("RWR");
+ const char * RWRR = do_test ("RWRR");
+ const char * RWRW = do_test ("RWRW");
+ const char * RWWR = do_test ("RWWR");
+ const char * RWRRR = do_test ("RWRRR");
+ const char * RWRRW = do_test ("RWRRW");
+ const char * RWRWR = do_test ("RWRWR");
+ const char * RWRWW = do_test ("RWRWW");
+ const char * RWWRR = do_test ("RWWRR");
+ const char * RWWRW = do_test ("RWWRW");
+ const char * RWWWR = do_test ("RWWWR");
+
+ if ( startswith (RWR, " R1 R")
+ && startswith (RWRR, " R1 R")
+ && startswith (RWRW, " R1 R")
+ && startswith (RWWR, " R1 R")
+ && startswith (RWRRR, " R1 R")
+ && startswith (RWRRW, " R1 R")
+ && startswith (RWRWR, " R1 R")
+ && startswith (RWRWW, " R1 R")
+ && startswith (RWWRR, " R1 R")
+ && startswith (RWWRW, " R1 R")
+ && startswith (RWWWR, " R1 R"))
+ r_prefers_readers = true;
+ }
+
+ {
+ const char * WRR = do_test ("WRR");
+ const char * WRW = do_test ("WRW");
+ const char * WWR = do_test ("WWR");
+ const char * WRRR = do_test ("WRRR");
+ const char * WRRW = do_test ("WRRW");
+ const char * WRWR = do_test ("WRWR");
+ const char * WRWW = do_test ("WRWW");
+ const char * WWRR = do_test ("WWRR");
+ const char * WWRW = do_test ("WWRW");
+ const char * WWWR = do_test ("WWWR");
+ const char * WRRRR = do_test ("WRRRR");
+ const char * WRRRW = do_test ("WRRRW");
+ const char * WRRWR = do_test ("WRRWR");
+ const char * WRRWW = do_test ("WRRWW");
+ const char * WRWRR = do_test ("WRWRR");
+ const char * WRWRW = do_test ("WRWRW");
+ const char * WRWWR = do_test ("WRWWR");
+ const char * WRWWW = do_test ("WRWWW");
+ const char * WWRRR = do_test ("WWRRR");
+ const char * WWRRW = do_test ("WWRRW");
+ const char * WWRWR = do_test ("WWRWR");
+ const char * WWRWW = do_test ("WWRWW");
+ const char * WWWRR = do_test ("WWWRR");
+ const char * WWWRW = do_test ("WWWRW");
+ const char * WWWWR = do_test ("WWWWR");
+
+ if ( startswith (WRR, " W1 R")
+ && startswith (WRW, " W1 R")
+ && startswith (WWR, " W1 R")
+ && startswith (WRRR, " W1 R")
+ && startswith (WRRW, " W1 R")
+ && startswith (WRWR, " W1 R")
+ && startswith (WRWW, " W1 R")
+ && startswith (WWRR, " W1 R")
+ && startswith (WWRW, " W1 R")
+ && startswith (WWWR, " W1 R")
+ && startswith (WRRRR, " W1 R")
+ && startswith (WRRRW, " W1 R")
+ && startswith (WRRWR, " W1 R")
+ && startswith (WRRWW, " W1 R")
+ && startswith (WRWRR, " W1 R")
+ && startswith (WRWRW, " W1 R")
+ && startswith (WRWWR, " W1 R")
+ && startswith (WRWWW, " W1 R")
+ && startswith (WWRRR, " W1 R")
+ && startswith (WWRRW, " W1 R")
+ && startswith (WWRWR, " W1 R")
+ && startswith (WWRWW, " W1 R")
+ && startswith (WWWRR, " W1 R")
+ && startswith (WWWRW, " W1 R")
+ && startswith (WWWWR, " W1 R"))
+ w_prefers_readers = true;
+ }
+
+ final_r_prefers_readers &= r_prefers_readers;
+ final_w_prefers_readers &= w_prefers_readers;
+ }
+
+ /* The wait queue handling is unsuitable if it always prefers readers,
+ because it leads to writer starvation: On machines with 8 or more CPUs,
+ test-pthread-rwlock may never terminate. */
+ return final_r_prefers_readers && final_w_prefers_readers;
+}
+
+int
+main ()
+{
+ /* Initialize the sprintf_lock. */
+ if (pthread_rwlock_init (&sprintf_lock, NULL))
+ {
+ fprintf (stderr, "pthread_rwlock_init failed\n");
+ abort ();
+ }
+
+ /* Find the wait queue handling of a default-initialized lock. */
+ if (pthread_rwlock_init (&lock, NULL))
+ {
+ fprintf (stderr, "pthread_rwlock_init failed\n");
+ abort ();
+ }
+ {
+ int fail = find_wait_queue_handling ();
+ return fail;
+ }
+}
+ ]])
+ ],
+ [gl_cv_func_pthread_rwlock_good_waitqueue=yes],
+ [gl_cv_func_pthread_rwlock_good_waitqueue=no],
+ [dnl Guess no on glibc/Linux.
+ gl_cv_func_pthread_rwlock_good_waitqueue="guessing no"
+ ])
+ LIBS="$saved_LIBS"
+ ;;
+ *) dnl Guess yes on other platforms.
+ gl_cv_func_pthread_rwlock_good_waitqueue="guessing yes"
+ ;;
+ esac
+ ])
+ case "$gl_cv_func_pthread_rwlock_good_waitqueue" in
+ *yes) ;;
+ *no)
+ REPLACE_PTHREAD_RWLOCK_INIT=1
+ REPLACE_PTHREAD_RWLOCKATTR_INIT=1
+ AC_DEFINE([PTHREAD_RWLOCK_BAD_WAITQUEUE], [1],
+ [Define if the pthread_rwlock wait queue handling is not reasonable.])
+ ;;
+ esac
+ fi
+ fi
+ fi
+])
diff --git a/gnulib-m4/pthread-spin.m4 b/gnulib-m4/pthread-spin.m4
new file mode 100644
index 00000000..17fa3b5e
--- /dev/null
+++ b/gnulib-m4/pthread-spin.m4
@@ -0,0 +1,72 @@
+# pthread-spin.m4
+# serial 8
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN_ONCE([gl_PTHREAD_SPIN],
+[
+ AC_REQUIRE([gl_PTHREAD_H_PART1])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
+ && test $gl_threads_api = windows; then
+ dnl Choose function names that don't conflict with the mingw-w64 winpthreads
+ dnl library.
+ REPLACE_PTHREAD_SPIN_INIT=1
+ REPLACE_PTHREAD_SPIN_LOCK=1
+ REPLACE_PTHREAD_SPIN_TRYLOCK=1
+ REPLACE_PTHREAD_SPIN_UNLOCK=1
+ REPLACE_PTHREAD_SPIN_DESTROY=1
+ else
+ if test $HAVE_PTHREAD_H = 0 || test $HAVE_PTHREAD_SPINLOCK_T = 0; then
+ HAVE_PTHREAD_SPIN_INIT=0
+ HAVE_PTHREAD_SPIN_LOCK=0
+ HAVE_PTHREAD_SPIN_TRYLOCK=0
+ HAVE_PTHREAD_SPIN_UNLOCK=0
+ HAVE_PTHREAD_SPIN_DESTROY=0
+ else
+ dnl Test whether the gnulib module 'threadlib' is in use.
+ dnl Some packages like Emacs use --avoid=threadlib.
+ dnl Write the symbol in such a way that it does not cause 'aclocal' to pick
+ dnl the threadlib.m4 file that is installed in $PREFIX/share/aclocal/.
+ m4_ifdef([gl_][THREADLIB], [
+ AC_REQUIRE([gl_][THREADLIB])
+ dnl Test whether the functions actually exist.
+ dnl FreeBSD 5.2.1 declares them but does not define them.
+ AC_CACHE_CHECK([for pthread_spin_init],
+ [gl_cv_func_pthread_spin_init_in_LIBMULTITHREAD],
+ [gl_saved_LIBS="$LIBS"
+ LIBS="$LIBS $LIBMULTITHREAD"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ ]],
+ [[pthread_spinlock_t lock;
+ return pthread_spin_init (&lock, 0);
+ ]])
+ ],
+ [gl_cv_func_pthread_spin_init_in_LIBMULTITHREAD=yes],
+ [gl_cv_func_pthread_spin_init_in_LIBMULTITHREAD=no])
+ LIBS="$gl_saved_LIBS"
+ ])
+ if test $gl_cv_func_pthread_spin_init_in_LIBMULTITHREAD != yes; then
+ HAVE_PTHREAD_SPIN_INIT=0
+ REPLACE_PTHREAD_SPIN_INIT=1
+ HAVE_PTHREAD_SPIN_LOCK=0
+ REPLACE_PTHREAD_SPIN_LOCK=1
+ HAVE_PTHREAD_SPIN_TRYLOCK=0
+ REPLACE_PTHREAD_SPIN_TRYLOCK=1
+ HAVE_PTHREAD_SPIN_UNLOCK=0
+ REPLACE_PTHREAD_SPIN_UNLOCK=1
+ HAVE_PTHREAD_SPIN_DESTROY=0
+ REPLACE_PTHREAD_SPIN_DESTROY=1
+ fi
+ ], [
+ :
+ ])
+ fi
+ fi
+])
diff --git a/gnulib-m4/pthread-thread.m4 b/gnulib-m4/pthread-thread.m4
index 969628ea..35929600 100644
--- a/gnulib-m4/pthread-thread.m4
+++ b/gnulib-m4/pthread-thread.m4
@@ -1,15 +1,17 @@
-# pthread-thread.m4 serial 2
-dnl Copyright (C) 2019-2022 Free Software Foundation, Inc.
+# pthread-thread.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_PTHREAD_THREAD],
[
AC_REQUIRE([gl_PTHREAD_H])
AC_REQUIRE([AC_CANONICAL_HOST])
- if { case "$host_os" in mingw*) true;; *) false;; esac; } \
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
&& test $gl_threads_api = windows; then
dnl Choose function names that don't conflict with the mingw-w64 winpthreads
dnl library.
diff --git a/gnulib-m4/pthread_h.m4 b/gnulib-m4/pthread_h.m4
index 4146aef3..f01dc3d3 100644
--- a/gnulib-m4/pthread_h.m4
+++ b/gnulib-m4/pthread_h.m4
@@ -1,10 +1,12 @@
-# pthread_h.m4 serial 8
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# pthread_h.m4
+# serial 11
+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.
+dnl This file is offered as-is, without any warranty.
-AC_DEFUN_ONCE([gl_PTHREAD_H],
+AC_DEFUN_ONCE([gl_PTHREAD_H_PART1],
[
dnl Ensure to expand the default settings once only, before all statements
dnl that occur in other macros.
@@ -20,7 +22,7 @@ AC_DEFUN_ONCE([gl_PTHREAD_H],
dnl ignore the <pthread.h> from the mingw-w64 winpthreads library.
m4_ifdef([gl_][THREADLIB], [
AC_REQUIRE([gl_][THREADLIB])
- if { case "$host_os" in mingw*) true;; *) false;; esac; } \
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
&& test $gl_threads_api = windows; then
HAVE_PTHREAD_H=0
fi
@@ -41,6 +43,14 @@ AC_DEFUN_ONCE([gl_PTHREAD_H],
if test $ac_cv_type_pthread_spinlock_t != yes; then
HAVE_PTHREAD_SPINLOCK_T=0
fi
+])
+
+AC_DEFUN([gl_PTHREAD_H],
+[
+ AC_REQUIRE([gl_PTHREAD_H_PART1])
+
+ dnl Set HAVE_PTHREAD_SPIN_INIT, REPLACE_PTHREAD_SPIN_INIT.
+ gl_PTHREAD_SPIN
dnl Constants may be defined as C preprocessor macros or as enum items.
diff --git a/gnulib-m4/pthread_mutex_timedlock.m4 b/gnulib-m4/pthread_mutex_timedlock.m4
new file mode 100644
index 00000000..48375e88
--- /dev/null
+++ b/gnulib-m4/pthread_mutex_timedlock.m4
@@ -0,0 +1,49 @@
+# pthread_mutex_timedlock.m4
+# serial 6
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_FUNC_PTHREAD_MUTEX_TIMEDLOCK],
+[
+ AC_REQUIRE([gl_PTHREAD_H_DEFAULTS])
+
+ AC_CHECK_DECL([pthread_mutex_timedlock],
+ [dnl Test whether the gnulib module 'threadlib' is in use.
+ dnl Some packages like Emacs use --avoid=threadlib.
+ dnl Write the symbol in such a way that it does not cause 'aclocal' to pick
+ dnl the threadlib.m4 file that is installed in $PREFIX/share/aclocal/.
+ m4_ifdef([gl_][THREADLIB], [
+ AC_REQUIRE([gl_][THREADLIB])
+ dnl Test whether the function actually exists.
+ dnl FreeBSD 5.2.1 declares it but does not define it.
+ AC_CACHE_CHECK([for pthread_mutex_timedlock],
+ [gl_cv_func_pthread_mutex_timedlock_in_LIBMULTITHREAD],
+ [gl_saved_LIBS="$LIBS"
+ LIBS="$LIBS $LIBMULTITHREAD"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ #include <time.h>
+ ]],
+ [[pthread_mutex_t lock;
+ struct timespec ts = { 0 };
+ return pthread_mutex_timedlock (&lock, &ts);
+ ]])
+ ],
+ [gl_cv_func_pthread_mutex_timedlock_in_LIBMULTITHREAD=yes],
+ [gl_cv_func_pthread_mutex_timedlock_in_LIBMULTITHREAD=no])
+ LIBS="$gl_saved_LIBS"
+ ])
+ if test $gl_cv_func_pthread_mutex_timedlock_in_LIBMULTITHREAD != yes; then
+ HAVE_PTHREAD_MUTEX_TIMEDLOCK=0
+ fi
+ ], [
+ :
+ ])
+ ],
+ [HAVE_PTHREAD_MUTEX_TIMEDLOCK=0],
+ [[#include <pthread.h>]])
+])
diff --git a/gnulib-m4/pthread_rwlock_rdlock.m4 b/gnulib-m4/pthread_rwlock_rdlock.m4
index 8ad78392..c16c781d 100644
--- a/gnulib-m4/pthread_rwlock_rdlock.m4
+++ b/gnulib-m4/pthread_rwlock_rdlock.m4
@@ -1,8 +1,10 @@
-# pthread_rwlock_rdlock.m4 serial 4
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
+# pthread_rwlock_rdlock.m4
+# serial 8
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
dnl Inspired by
@@ -30,15 +32,15 @@ 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],
[
- AC_REQUIRE([gl_THREADLIB_EARLY])
+ AC_REQUIRE([gl_THREADLIB])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CACHE_CHECK([whether pthread_rwlock_rdlock prefers a writer to a reader],
[gl_cv_pthread_rwlock_rdlock_prefer_writer],
- [save_LIBS="$LIBS"
+ [saved_LIBS="$LIBS"
LIBS="$LIBS $LIBMULTITHREAD"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
@@ -156,25 +158,25 @@ main ()
[gl_cv_pthread_rwlock_rdlock_prefer_writer=yes],
[gl_cv_pthread_rwlock_rdlock_prefer_writer=no],
[case "$host_os" in
- # Guess no on glibc systems.
- *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
- # Guess no on musl systems.
- *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
- # Guess no on bionic systems.
- *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
- # Guess yes on native Windows with the mingw-w64 winpthreads library.
- # Guess no on native Windows with the gnulib windows-rwlock module.
- mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
- gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
- else
- gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
- fi
- ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
+ # Guess no on glibc systems.
+ *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+ # Guess no on bionic systems.
+ *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;;
+ # Guess yes on native Windows with the mingw-w64 winpthreads library.
+ # Guess no on native Windows with the gnulib windows-rwlock module.
+ mingw* | windows*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes"
+ else
+ gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no"
+ fi
+ ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
esac
])
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
])
case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
*yes)
diff --git a/gnulib-m4/pthread_sigmask.m4 b/gnulib-m4/pthread_sigmask.m4
index 0aa8c53f..2984dcdc 100644
--- a/gnulib-m4/pthread_sigmask.m4
+++ b/gnulib-m4/pthread_sigmask.m4
@@ -1,8 +1,10 @@
-# pthread_sigmask.m4 serial 21
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# pthread_sigmask.m4
+# serial 24
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[
@@ -24,7 +26,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
[gl_cv_func_pthread_sigmask_macro=no])
])
- LIB_PTHREAD_SIGMASK=
+ PTHREAD_SIGMASK_LIB=
if test $gl_cv_func_pthread_sigmask_macro = yes; then
dnl pthread_sigmask is a dummy macro.
@@ -47,7 +49,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
if test -n "$LIBMULTITHREAD"; then
AC_CACHE_CHECK([for pthread_sigmask in $LIBMULTITHREAD],
[gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD],
- [gl_save_LIBS="$LIBS"
+ [gl_saved_LIBS="$LIBS"
LIBS="$LIBS $LIBMULTITHREAD"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -58,11 +60,11 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
],
[gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=yes],
[gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD=no])
- LIBS="$gl_save_LIBS"
+ LIBS="$gl_saved_LIBS"
])
if test $gl_cv_func_pthread_sigmask_in_LIBMULTITHREAD = yes; then
dnl pthread_sigmask is available with -pthread or -lpthread.
- LIB_PTHREAD_SIGMASK="$LIBMULTITHREAD"
+ PTHREAD_SIGMASK_LIB="$LIBMULTITHREAD"
else
dnl pthread_sigmask is not available at all.
HAVE_PTHREAD_SIGMASK=0
@@ -95,12 +97,15 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
HAVE_PTHREAD_SIGMASK=0
dnl Define the symbol rpl_pthread_sigmask, not pthread_sigmask,
dnl so as to not accidentally override the system's pthread_sigmask
- dnl symbol from libpthread. This is necessary on IRIX 6.5.
+ dnl symbol from libpthread.
REPLACE_PTHREAD_SIGMASK=1
fi
])
fi
+ AC_SUBST([PTHREAD_SIGMASK_LIB])
+ dnl For backward compatibility.
+ LIB_PTHREAD_SIGMASK="$PTHREAD_SIGMASK_LIB"
AC_SUBST([LIB_PTHREAD_SIGMASK])
dnl We don't need a variable LTLIB_PTHREAD_SIGMASK, because when
dnl "$gl_threads_api" = posix, $LTLIBMULTITHREAD and $LIBMULTITHREAD are the
@@ -114,7 +119,7 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
dnl On FreeBSD 13.0, MidnightBSD 1.1, HP-UX 11.31, Solaris 9, in programs
dnl that are not linked with -lpthread, the pthread_sigmask() function
dnl always returns 0 and has no effect.
- if test -z "$LIB_PTHREAD_SIGMASK"; then
+ if test -z "$PTHREAD_SIGMASK_LIB"; then
case " $LIBS " in
*' -pthread '*) ;;
*' -lpthread '*) ;;
@@ -161,8 +166,8 @@ AC_DEFUN([gl_FUNC_PTHREAD_SIGMASK],
AC_CACHE_CHECK([whether pthread_sigmask returns error numbers],
[gl_cv_func_pthread_sigmask_return_works],
[
- gl_save_LIBS="$LIBS"
- LIBS="$LIBS $LIB_PTHREAD_SIGMASK"
+ gl_saved_LIBS="$LIBS"
+ LIBS="$LIBS $PTHREAD_SIGMASK_LIB"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <pthread.h>
@@ -185,7 +190,7 @@ int main ()
gl_cv_func_pthread_sigmask_return_works="guessing yes";;
esac
])
- LIBS="$gl_save_LIBS"
+ LIBS="$gl_saved_LIBS"
])
case "$gl_cv_func_pthread_sigmask_return_works" in
*no)
@@ -194,73 +199,6 @@ int main ()
[Define to 1 if pthread_sigmask(), when it fails, returns -1 and sets errno.])
;;
esac
-
- dnl On IRIX 6.5, in a single-threaded program, pending signals are not
- dnl immediately delivered when they are unblocked through pthread_sigmask,
- dnl only a little while later.
- AC_CACHE_CHECK([whether pthread_sigmask unblocks signals correctly],
- [gl_cv_func_pthread_sigmask_unblock_works],
- [
- case "$host_os" in
- irix*)
- gl_cv_func_pthread_sigmask_unblock_works="guessing no";;
- *)
- gl_cv_func_pthread_sigmask_unblock_works="guessing yes";;
- esac
- m4_ifdef([gl_][THREADLIB],
- [dnl Link against $LIBMULTITHREAD, not only $LIB_PTHREAD_SIGMASK.
- dnl Otherwise we get a false positive on those platforms where
- dnl $gl_cv_func_pthread_sigmask_in_libc_works is "no".
- gl_save_LIBS=$LIBS
- LIBS="$LIBS $LIBMULTITHREAD"])
- AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <pthread.h>
-#include <signal.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-]GL_MDA_DEFINES[
-static volatile int sigint_occurred;
-static void
-sigint_handler (int sig)
-{
- sigint_occurred++;
-}
-int main ()
-{
- sigset_t set;
- int pid = getpid ();
- char command[80];
- signal (SIGINT, sigint_handler);
- sigemptyset (&set);
- sigaddset (&set, SIGINT);
- if (!(pthread_sigmask (SIG_BLOCK, &set, NULL) == 0))
- return 1;
- sprintf (command, "sh -c 'sleep 1; kill -%d %d' &", SIGINT, pid);
- if (!(system (command) == 0))
- return 2;
- sleep (2);
- if (!(sigint_occurred == 0))
- return 3;
- if (!(pthread_sigmask (SIG_UNBLOCK, &set, NULL) == 0))
- return 4;
- if (!(sigint_occurred == 1)) /* This fails on IRIX. */
- return 5;
- return 0;
-}]])],
- [:],
- [gl_cv_func_pthread_sigmask_unblock_works=no],
- [:])
- m4_ifdef([gl_][THREADLIB], [LIBS=$gl_save_LIBS])
- ])
- case "$gl_cv_func_pthread_sigmask_unblock_works" in
- *no)
- REPLACE_PTHREAD_SIGMASK=1
- AC_DEFINE([PTHREAD_SIGMASK_UNBLOCK_BUG], [1],
- [Define to 1 if pthread_sigmask() unblocks signals incorrectly.])
- ;;
- esac
fi
])
diff --git a/gnulib-m4/putenv.m4 b/gnulib-m4/putenv.m4
index c7b45034..207f5003 100644
--- a/gnulib-m4/putenv.m4
+++ b/gnulib-m4/putenv.m4
@@ -1,8 +1,10 @@
-# putenv.m4 serial 25
-dnl Copyright (C) 2002-2022 Free Software Foundation, Inc.
+# putenv.m4
+# serial 28
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Jim Meyering.
dnl
@@ -38,14 +40,14 @@ AC_DEFUN([gl_FUNC_PUTENV],
[gl_cv_func_svid_putenv=no],
[dnl When crosscompiling, assume putenv is broken.
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_svid_putenv="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_svid_putenv="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_svid_putenv="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_svid_putenv="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_svid_putenv="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_svid_putenv="$gl_cross_guess_normal" ;;
esac
])
])
@@ -60,5 +62,5 @@ AC_DEFUN([gl_FUNC_PUTENV],
# Prerequisites of lib/putenv.c.
AC_DEFUN([gl_PREREQ_PUTENV],
[
- AC_CHECK_DECLS([_putenv])
+ AC_CHECK_DECLS_ONCE([_putenv])
])
diff --git a/gnulib-m4/raise.m4 b/gnulib-m4/raise.m4
index 0c78d095..be6021ab 100644
--- a/gnulib-m4/raise.m4
+++ b/gnulib-m4/raise.m4
@@ -1,8 +1,10 @@
-# raise.m4 serial 4
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# raise.m4
+# serial 4
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_RAISE],
[
diff --git a/gnulib-m4/random.m4 b/gnulib-m4/random.m4
new file mode 100644
index 00000000..9a646f3b
--- /dev/null
+++ b/gnulib-m4/random.m4
@@ -0,0 +1,81 @@
+# random.m4
+# serial 8
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_FUNC_RANDOM],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ dnl We can't use AC_CHECK_FUNC here, because random() is defined as a
+ dnl static inline function when compiling for Android 4.4 or older.
+ AC_CACHE_CHECK([for random], [gl_cv_func_random],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>]],
+ [[return random() == 0;]])
+ ],
+ [gl_cv_func_random=yes],
+ [gl_cv_func_random=no])
+ ])
+ gl_CHECK_FUNCS_ANDROID([initstate], [[#include <stdlib.h>]])
+ gl_CHECK_FUNCS_ANDROID([setstate], [[#include <stdlib.h>]])
+ if test $gl_cv_func_random = no; then
+ HAVE_RANDOM=0
+ HAVE_INITSTATE=0
+ HAVE_SETSTATE=0
+ else
+ if test $ac_cv_func_initstate = no; then
+ HAVE_INITSTATE=0
+ fi
+ if test $ac_cv_func_setstate = no; then
+ HAVE_SETSTATE=0
+ fi
+ fi
+ if test $HAVE_INITSTATE = 0; then
+ case "$gl_cv_onwards_func_initstate" in
+ future*) REPLACE_INITSTATE=1 ;;
+ esac
+ fi
+ if test $HAVE_SETSTATE = 0; then
+ case "$gl_cv_onwards_func_setstate" in
+ future*) REPLACE_SETSTATE=1 ;;
+ esac
+ fi
+ dnl On several platforms, random() is not multithread-safe.
+ if test $ac_cv_func_initstate = no || test $ac_cv_func_setstate = no \
+ || case "$host_os" in \
+ darwin* | freebsd* | solaris* | cygwin* | haiku*) true ;; \
+ *) false ;; \
+ esac
+ then
+ dnl In order to define initstate or setstate, we need to define all the
+ dnl functions at once.
+ REPLACE_RANDOM=1
+ if test $ac_cv_func_initstate = yes; then
+ REPLACE_INITSTATE=1
+ fi
+ if test $ac_cv_func_setstate = yes; then
+ REPLACE_SETSTATE=1
+ fi
+ fi
+
+ AC_CHECK_DECLS_ONCE([initstate])
+ if test $ac_cv_have_decl_initstate = no; then
+ HAVE_DECL_INITSTATE=0
+ fi
+
+ AC_CHECK_DECLS_ONCE([setstate])
+ if test $ac_cv_have_decl_setstate = no; then
+ HAVE_DECL_SETSTATE=0
+ fi
+])
+
+# Prerequisites of lib/random.c.
+AC_DEFUN([gl_PREREQ_RANDOM], [
+ :
+])
diff --git a/gnulib-m4/random_r.m4 b/gnulib-m4/random_r.m4
new file mode 100644
index 00000000..2ee52f9d
--- /dev/null
+++ b/gnulib-m4/random_r.m4
@@ -0,0 +1,42 @@
+# random_r.m4
+# serial 6
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_FUNC_RANDOM_R],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT])
+
+ AC_CHECK_TYPES([struct random_data],
+ [], [HAVE_STRUCT_RANDOM_DATA=0],
+ [[#include <stdlib.h>
+ #if HAVE_RANDOM_H
+ # include <random.h>
+ #endif
+ ]])
+
+ dnl On AIX, these functions exist, but with different declarations.
+ dnl Override them all.
+ case "$host_os" in
+ aix*)
+ REPLACE_RANDOM_R=1
+ ;;
+ *)
+ AC_CHECK_FUNCS([random_r])
+ if test $ac_cv_func_random_r = no; then
+ HAVE_RANDOM_R=0
+ fi
+ ;;
+ esac
+])
+
+# Prerequisites of lib/random_r.c.
+AC_DEFUN([gl_PREREQ_RANDOM_R], [
+ :
+])
diff --git a/gnulib-m4/realloc.m4 b/gnulib-m4/realloc.m4
index 86e57c25..8938db92 100644
--- a/gnulib-m4/realloc.m4
+++ b/gnulib-m4/realloc.m4
@@ -1,52 +1,22 @@
-# realloc.m4 serial 26
-dnl Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
+# realloc.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
-# This is adapted with modifications from upstream Autoconf here:
-# https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/functions.m4?id=v2.70#n1455
-AC_DEFUN([_AC_FUNC_REALLOC_IF],
+# An an experimental option, the user can request a sanitized realloc()
+# implementation, i.e. one that aborts upon undefined behaviour,
+# by setting
+# gl_cv_func_realloc_sanitize=yes
+# at configure time.
+AC_DEFUN([gl_FUNC_REALLOC_SANITIZED],
[
- AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
- AC_CACHE_CHECK([whether realloc (0, 0) returns nonnull],
- [ac_cv_func_realloc_0_nonnull],
- [AC_RUN_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stdlib.h>
- ]],
- [[void *p = realloc (0, 0);
- int result = !p;
- free (p);
- return result;]])
- ],
- [ac_cv_func_realloc_0_nonnull=yes],
- [ac_cv_func_realloc_0_nonnull=no],
- [case "$host_os" in
- # Guess yes on platforms where we know the result.
- *-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
- | gnu* | *-musl* | midnightbsd* \
- | hpux* | solaris* | cygwin* | mingw* | msys* )
- ac_cv_func_realloc_0_nonnull="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) ac_cv_func_realloc_0_nonnull="$gl_cross_guess_normal" ;;
- esac
- ])
- ])
- AS_CASE([$ac_cv_func_realloc_0_nonnull], [*yes], [$1], [$2])
-])# AC_FUNC_REALLOC
-
-# gl_FUNC_REALLOC_GNU
-# -------------------
-# Replace realloc if it is not compatible with GNU libc.
-AC_DEFUN([gl_FUNC_REALLOC_GNU],
-[
- AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
- AC_REQUIRE([gl_FUNC_REALLOC_POSIX])
- if test $REPLACE_REALLOC_FOR_REALLOC_GNU = 0; then
- _AC_FUNC_REALLOC_IF([], [REPLACE_REALLOC_FOR_REALLOC_GNU=1])
- fi
-])# gl_FUNC_REALLOC_GNU
+ AC_CACHE_CHECK([whether realloc should abort upon undefined behaviour],
+ [gl_cv_func_realloc_sanitize],
+ [test -n "$gl_cv_func_realloc_sanitize" || gl_cv_func_realloc_sanitize=no])
+])
# gl_FUNC_REALLOC_POSIX
# ---------------------
@@ -57,7 +27,100 @@ AC_DEFUN([gl_FUNC_REALLOC_POSIX],
[
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_FUNC_MALLOC_POSIX])
- if test $REPLACE_MALLOC_FOR_MALLOC_POSIX = 1; then
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([whether realloc sets errno on failure],
+ [gl_cv_func_realloc_posix],
+ [
+ dnl FreeBSD 15.0 realloc() does not set errno when asked for more than
+ dnl 0x7000000000000000 bytes.
+ case "$host_os" in
+ darwin* | freebsd* | dragonfly* | midnightbsd* | netbsd* | openbsd*)
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#include <errno.h>
+ #include <stdlib.h>
+ int main (int argc, char **argv)
+ {
+ void *p;
+ errno = 1729;
+ p = realloc (malloc (1), (size_t)(-1) / 100 * 49);
+ return (!p && errno == 1729);
+ }
+ ]])
+ ],
+ [gl_cv_func_realloc_posix=yes],
+ [gl_cv_func_realloc_posix=no],
+ [case "$host_os" in
+ freebsd*) gl_cv_func_realloc_posix="guessing no" ;;
+ *) gl_cv_func_realloc_posix="guessing yes" ;;
+ esac
+ ])
+ ;;
+ *)
+ gl_cv_func_realloc_posix="$gl_cv_func_malloc_posix"
+ ;;
+ esac
+ ])
+ case "$gl_cv_func_realloc_posix" in
+ *yes)
+ AC_DEFINE([HAVE_REALLOC_POSIX], [1],
+ [Define if realloc sets errno on allocation failure.])
+ ;;
+ *)
+ REPLACE_REALLOC_FOR_REALLOC_POSIX=1
+ ;;
+ esac
+ AC_REQUIRE([gl_FUNC_REALLOC_SANITIZED])
+ if test "$gl_cv_func_realloc_sanitize" != no; then
REPLACE_REALLOC_FOR_REALLOC_POSIX=1
+ AC_DEFINE([NEED_SANITIZED_REALLOC], [1],
+ [Define to 1 if realloc should abort upon undefined behaviour.])
fi
])
+
+# gl_FUNC_REALLOC_0_NONNULL
+# -------------------------
+# Replace realloc if realloc (..., 0) returns null.
+# Modules that use this macro directly or indirectly should depend
+# on extensions-aix, so that _LINUX_SOURCE_COMPAT gets defined
+# before this macro gets invoked. This helps if !(__VEC__ || __AIXVEC),
+# and doesn't hurt otherwise.
+AC_DEFUN([gl_FUNC_REALLOC_0_NONNULL],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl for cross-compiles
+ AC_REQUIRE([gl_FUNC_REALLOC_POSIX])
+ AC_CACHE_CHECK([whether realloc (..., 0) returns nonnull],
+ [gl_cv_func_realloc_0_nonnull],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ /* Use prealloc to test; "volatile" prevents the compiler
+ from optimizing the realloc call away. */
+ void *(*volatile prealloc) (void *, size_t) = realloc;]],
+ [[void *p = prealloc (0, 0);
+ int result = !p;
+ p = prealloc (p, 0);
+ result |= !p;
+ free (p);
+ return result;]])],
+ [gl_cv_func_realloc_0_nonnull=yes],
+ [gl_cv_func_realloc_0_nonnull=no],
+ [AS_CASE([$host_os],
+ [# Guess yes on platforms where we know the result.
+ freebsd* | netbsd* | openbsd* | darwin* | bitrig* \
+ | *-musl* | midipix* | midnightbsd* \
+ | hpux* | solaris* | cygwin*],
+ [gl_cv_func_realloc_0_nonnull="guessing yes"],
+ [# Guess as follows if we don't know.
+ gl_cv_func_realloc_0_nonnull=$gl_cross_guess_normal])])])
+ AS_CASE([$gl_cv_func_realloc_0_nonnull],
+ [*yes],
+ [AC_DEFINE([HAVE_REALLOC_0_NONNULL], [1],
+ [Define to 1 if realloc (..., 0) returns nonnull.])],
+ [AS_CASE([$gl_cv_func_realloc_sanitize,$gl_cv_malloc_ptrdiff,$gl_cv_func_malloc_posix,$host],
+ [yes,*,*,* | *,no,*,* | *,*,*no,* | *,*,*,aarch64c-*-freebsd*],
+ [REPLACE_REALLOC_FOR_REALLOC_POSIX=1],
+ [# Optimize for common case of glibc 2.1.1+ and compatibles.
+ REPLACE_REALLOC_FOR_REALLOC_POSIX=2])])
+])
diff --git a/gnulib-m4/reallocarray.m4 b/gnulib-m4/reallocarray.m4
index f39ab6ea..e789967c 100644
--- a/gnulib-m4/reallocarray.m4
+++ b/gnulib-m4/reallocarray.m4
@@ -1,8 +1,10 @@
-# reallocarray.m4 serial 3
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
+# reallocarray.m4
+# serial 7
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_REALLOCARRAY],
[
@@ -11,11 +13,21 @@ AC_DEFUN([gl_FUNC_REALLOCARRAY],
AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
AC_REQUIRE([gl_CHECK_MALLOC_PTRDIFF])
- AC_CHECK_FUNCS([reallocarray])
+ AC_REQUIRE([gl_FUNC_REALLOC_0_NONNULL])
+ gl_CHECK_FUNCS_ANDROID([reallocarray], [[#include <stdlib.h>]])
if test "$ac_cv_func_reallocarray" = no; then
HAVE_REALLOCARRAY=0
- elif test "$gl_cv_malloc_ptrdiff" = no; then
- REPLACE_REALLOCARRAY=1
+ case "$gl_cv_onwards_func_reallocarray" in
+ future*) REPLACE_REALLOCARRAY=1 ;;
+ esac
+ else
+ if test "$gl_cv_malloc_ptrdiff" = no; then
+ REPLACE_REALLOCARRAY=1
+ fi
+ case "$gl_cv_func_realloc_0_nonnull" in
+ *yes) ;;
+ *) REPLACE_REALLOCARRAY=1 ;;
+ esac
fi
])
diff --git a/gnulib-m4/relocatable-lib.m4 b/gnulib-m4/relocatable-lib.m4
index b8a33e77..d270ad97 100644
--- a/gnulib-m4/relocatable-lib.m4
+++ b/gnulib-m4/relocatable-lib.m4
@@ -1,8 +1,10 @@
-# relocatable-lib.m4 serial 6
-dnl Copyright (C) 2003, 2005-2007, 2009-2022 Free Software Foundation, Inc.
+# relocatable-lib.m4
+# serial 9
+dnl Copyright (C) 2003, 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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
@@ -20,13 +22,23 @@ AC_DEFUN([gl_RELOCATABLE_LIBRARY_BODY],
else
reloc_final_prefix="$prefix"
fi
- AC_DEFINE_UNQUOTED([INSTALLPREFIX], ["${reloc_final_prefix}"],
+ dnl Define reloc_final_prefix_c and reloc_final_prefix_c_make.
+ gl_BUILD_TO_HOST([reloc_final_prefix])
+ AC_DEFINE_UNQUOTED([INSTALLPREFIX], [${reloc_final_prefix_c}],
[Define to the value of ${prefix}, as a string.])
if test $RELOCATABLE = yes; then
AC_DEFINE([ENABLE_RELOCATABLE], [1],
[Define to 1 if the package shall run at any location in the file
system.])
fi
+ dnl Determine whether dladdr() exists in libc.
+ gl_LIBDL
+ if test -z "$LIBDL"; then
+ AC_CHECK_FUNC([dladdr],
+ [AC_DEFINE([HAVE_DLADDR_IN_LIBC], [1],
+ [Define to 1 if dladdr exists and is defined in libc.])
+ ])
+ fi
])
dnl Support for relocatable packages for which it is a nop.
@@ -34,7 +46,7 @@ AC_DEFUN([gl_RELOCATABLE_NOP],
[
AC_MSG_CHECKING([whether to activate relocatable installation])
AC_ARG_ENABLE([relocatable],
- [AS_HELP_STRING([--enable-relocatable],
+ [AS_HELP_STRING([[--enable-relocatable]],
[install a package that can be moved in the file system])],
[if test "$enableval" != no; then
RELOCATABLE=yes
diff --git a/gnulib-m4/sched_h.m4 b/gnulib-m4/sched_h.m4
index ce44f7b3..92ebe1b7 100644
--- a/gnulib-m4/sched_h.m4
+++ b/gnulib-m4/sched_h.m4
@@ -1,8 +1,10 @@
-# sched_h.m4 serial 15
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# sched_h.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
dnl Written by Bruno Haible.
@@ -14,7 +16,8 @@ AC_DEFUN_ONCE([gl_SCHED_H],
AC_REQUIRE([AC_CANONICAL_HOST])
- AC_CHECK_HEADERS_ONCE([sys/cdefs.h])
+ AC_REQUIRE([gl_CHECK_HEADER_SYS_CDEFS_H])
+
AC_CHECK_HEADERS([sched.h], [], [],
[[#if HAVE_SYS_CDEFS_H
#include <sys/cdefs.h>
@@ -56,13 +59,6 @@ AC_DEFUN_ONCE([gl_SCHED_H],
fi
AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
- if test "$ac_cv_header_sys_cdefs_h" = yes; then
- HAVE_SYS_CDEFS_H=1
- else
- HAVE_SYS_CDEFS_H=0
- fi
- AC_SUBST([HAVE_SYS_CDEFS_H])
-
dnl Ensure the type pid_t gets defined.
AC_REQUIRE([AC_TYPE_PID_T])
diff --git a/gnulib-m4/sched_yield.m4 b/gnulib-m4/sched_yield.m4
index d463a702..3c23d768 100644
--- a/gnulib-m4/sched_yield.m4
+++ b/gnulib-m4/sched_yield.m4
@@ -1,8 +1,10 @@
-# sched_yield.m4 serial 2
-dnl Copyright (C) 2019-2022 Free Software Foundation, Inc.
+# sched_yield.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_SCHED_YIELD],
[
@@ -10,7 +12,7 @@ AC_DEFUN([gl_FUNC_SCHED_YIELD],
AC_REQUIRE([gl_PTHREADLIB])
AC_REQUIRE([AC_CANONICAL_HOST])
- if { case "$host_os" in mingw*) true;; *) false;; esac; } \
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
&& test $gl_threads_api = windows; then
dnl Choose function names that don't conflict with the mingw-w64 winpthreads
dnl library.
diff --git a/gnulib-m4/select.m4 b/gnulib-m4/select.m4
index 163f8fbf..1e4a0344 100644
--- a/gnulib-m4/select.m4
+++ b/gnulib-m4/select.m4
@@ -1,8 +1,10 @@
-# select.m4 serial 13
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# select.m4
+# serial 16
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_SELECT],
[
@@ -77,6 +79,8 @@ changequote([,])dnl
case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_select_detects_ebadf="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_select_detects_ebadf="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
@@ -91,10 +95,10 @@ changequote([,])dnl
fi
dnl Determine the needed libraries.
- LIB_SELECT="$LIBSOCKET"
+ SELECT_LIB="$LIBSOCKET"
if test $REPLACE_SELECT = 1; then
case "$host_os" in
- mingw*)
+ mingw* | windows*)
dnl On the MSVC platform, the function MsgWaitForMultipleObjects
dnl (used in lib/select.c) requires linking with -luser32. On mingw,
dnl it is implicit.
@@ -109,9 +113,12 @@ main ()
return 0;
}]])],
[],
- [LIB_SELECT="$LIB_SELECT -luser32"])
+ [SELECT_LIB="$SELECT_LIB -luser32"])
;;
esac
fi
+ AC_SUBST([SELECT_LIB])
+ dnl For backward compatibility.
+ LIB_SELECT="$LIB_SELECT"
AC_SUBST([LIB_SELECT])
])
diff --git a/gnulib-m4/semaphore.m4 b/gnulib-m4/semaphore.m4
index c6be7b94..1091550e 100644
--- a/gnulib-m4/semaphore.m4
+++ b/gnulib-m4/semaphore.m4
@@ -1,8 +1,10 @@
-# semaphore.m4 serial 1
-dnl Copyright (C) 2019-2022 Free Software Foundation, Inc.
+# semaphore.m4
+# serial 4
+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.
+dnl This file is offered as-is, without any warranty.
# Sets LIB_SEMAPHORE to the library needed, in addition to $(LIBMULTITHREAD),
# for getting the <semaphore.h> functions.
@@ -11,15 +13,15 @@ AC_DEFUN([gl_SEMAPHORE],
[
AC_REQUIRE([gl_THREADLIB])
dnl sem_post is
- dnl - in libc on macOS, FreeBSD, AIX, IRIX, Solaris 11, Haiku, Cygwin,
+ dnl - in libc on macOS, FreeBSD, AIX, Solaris 11, Haiku, Cygwin,
dnl - in libpthread on glibc systems, OpenBSD,
dnl - in libpthread or librt on NetBSD,
- dnl - in librt on HP-UX 11, OSF/1, Solaris 10.
+ dnl - in librt on HP-UX 11, Solaris 10.
dnl On the platforms where -lpthread is needed, it is contained in
dnl $LIBMULTITHREAD. Therefore, the only library we need to test for is -lrt.
AC_CACHE_CHECK([for library needed for semaphore functions],
[gl_cv_semaphore_lib],
- [save_LIBS="$LIBS"
+ [saved_LIBS="$LIBS"
LIBS="$LIBS $LIBMULTITHREAD"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -34,7 +36,7 @@ AC_DEFUN([gl_SEMAPHORE],
[gl_cv_semaphore_lib='-lrt'],
[gl_cv_semaphore_lib=none])
])
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
])
if test "x$gl_cv_semaphore_lib" = xnone; then
LIB_SEMAPHORE=
diff --git a/gnulib-m4/setenv.m4 b/gnulib-m4/setenv.m4
index 2000039a..5faf28d2 100644
--- a/gnulib-m4/setenv.m4
+++ b/gnulib-m4/setenv.m4
@@ -1,8 +1,10 @@
-# setenv.m4 serial 30
-dnl Copyright (C) 2001-2004, 2006-2022 Free Software Foundation, Inc.
+# setenv.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_SETENV],
[
@@ -35,12 +37,12 @@ AC_DEFUN([gl_FUNC_SETENV],
]])],
[gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_setenv_works="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_setenv_works="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_setenv_works" in
@@ -83,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 <stdlib.h> */
#include <stdlib.h>
extern
#ifdef __cplusplus
@@ -151,11 +151,11 @@ int unsetenv (const char *name);
# Prerequisites of lib/setenv.c.
AC_DEFUN([gl_PREREQ_SETENV],
[
- AC_REQUIRE([AC_FUNC_ALLOCA])
AC_REQUIRE([gl_ENVIRON])
AC_CHECK_HEADERS_ONCE([unistd.h])
AC_CHECK_HEADERS([search.h])
- AC_CHECK_FUNCS([tsearch])
+ AC_CHECK_DECLS_ONCE([_putenv])
+ gl_CHECK_FUNCS_ANDROID([tsearch], [[#include <search.h>]])
])
# Prerequisites of lib/unsetenv.c.
@@ -163,4 +163,5 @@ AC_DEFUN([gl_PREREQ_UNSETENV],
[
AC_REQUIRE([gl_ENVIRON])
AC_CHECK_HEADERS_ONCE([unistd.h])
+ AC_CHECK_DECLS_ONCE([_putenv])
])
diff --git a/gnulib-m4/setlocale.m4 b/gnulib-m4/setlocale.m4
index c0023d9c..8a8841b8 100644
--- a/gnulib-m4/setlocale.m4
+++ b/gnulib-m4/setlocale.m4
@@ -1,8 +1,10 @@
-# setlocale.m4 serial 7
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# setlocale.m4
+# serial 11
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_SETLOCALE],
[
@@ -15,7 +17,10 @@ AC_DEFUN([gl_FUNC_SETLOCALE],
case "$host_os" in
dnl On native Windows systems, setlocale(category,NULL) does not look at
dnl the environment variables LC_ALL, category, and LANG.
- mingw*) NEED_SETLOCALE_IMPROVED=1 ;;
+ mingw* | windows*) NEED_SETLOCALE_IMPROVED=1 ;;
+ dnl On Android, setlocale(category,name) treats all categories as equivalent
+ dnl to LC_CTYPE. And on Android 4.3, setlocale(category,"C") always fails.
+ *-android*) NEED_SETLOCALE_IMPROVED=1 ;;
dnl On Cygwin 1.5.x, setlocale always succeeds but setlocale(LC_CTYPE,NULL)
dnl is then still "C".
cygwin*)
@@ -23,32 +28,6 @@ AC_DEFUN([gl_FUNC_SETLOCALE],
1.5.*) NEED_SETLOCALE_IMPROVED=1 ;;
esac
;;
- dnl On Android 4.3, setlocale(category,"C") always fails.
- *)
- AC_CACHE_CHECK([whether setlocale supports the C locale],
- [gl_cv_func_setlocale_works],
- [AC_RUN_IFELSE(
- [AC_LANG_SOURCE([[
-#include <locale.h>
-int main ()
-{
- return setlocale (LC_ALL, "C") == NULL;
-}]])],
- [gl_cv_func_setlocale_works=yes],
- [gl_cv_func_setlocale_works=no],
- [case "$host_os" in
- # Guess no on Android.
- linux*-android*) gl_cv_func_setlocale_works="guessing no";;
- # Guess yes otherwise.
- *) gl_cv_func_setlocale_works="guessing yes";;
- esac
- ])
- ])
- case "$gl_cv_func_setlocale_works" in
- *yes) ;;
- *) NEED_SETLOCALE_IMPROVED=1 ;;
- esac
- ;;
esac
AC_DEFINE_UNQUOTED([NEED_SETLOCALE_IMPROVED], [$NEED_SETLOCALE_IMPROVED],
[Define to 1 to enable general improvements of setlocale.])
@@ -66,12 +45,15 @@ int main ()
fi
if test $NEED_SETLOCALE_MTSAFE = 1; then
- LIB_SETLOCALE="$LIB_SETLOCALE_NULL"
+ SETLOCALE_LIB="$SETLOCALE_NULL_LIB"
else
- LIB_SETLOCALE=
+ SETLOCALE_LIB=
fi
- dnl LIB_SETLOCALE is expected to be '-pthread' or '-lpthread' on AIX with gcc
+ dnl SETLOCALE_LIB is expected to be '-pthread' or '-lpthread' on AIX with gcc
dnl or xlc, and empty otherwise.
+ AC_SUBST([SETLOCALE_LIB])
+ dnl For backward compatibility.
+ LIB_SETLOCALE="$SETLOCALE_LIB"
AC_SUBST([LIB_SETLOCALE])
])
diff --git a/gnulib-m4/setlocale_null.m4 b/gnulib-m4/setlocale_null.m4
index 09ea50ea..b6727245 100644
--- a/gnulib-m4/setlocale_null.m4
+++ b/gnulib-m4/setlocale_null.m4
@@ -1,10 +1,12 @@
-# setlocale_null.m4 serial 5
-dnl Copyright (C) 2019-2022 Free Software Foundation, Inc.
+# setlocale_null.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
-AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
+AC_DEFUN_ONCE([gl_FUNC_SETLOCALE_NULL],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_PTHREADLIB])
@@ -13,11 +15,25 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
AC_CACHE_CHECK([whether setlocale (LC_ALL, NULL) is multithread-safe],
[gl_cv_func_setlocale_null_all_mtsafe],
[case "$host_os" in
- # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
- *-musl* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*)
+ # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku.
+ *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | openbsd* | aix* | haiku*)
gl_cv_func_setlocale_null_all_mtsafe=no ;;
- # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
- *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
+ # Guess no on Cygwin < 3.4.6.
+ cygwin*)
+ AC_EGREP_CPP([Lucky user],
+ [
+#if defined __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_COMBINED >= CYGWIN_VERSION_DLL_MAKE_COMBINED (3004, 6)
+ Lucky user
+ #endif
+#endif
+ ],
+ [gl_cv_func_setlocale_null_all_mtsafe=yes],
+ [gl_cv_func_setlocale_null_all_mtsafe=no])
+ ;;
+ # Guess yes on glibc, HP-UX, 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.
*)
@@ -26,7 +42,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
])
dnl On platforms without multithreading, there is no issue.
case "$host_os" in
- mingw*) ;;
+ mingw* | windows*) ;;
*)
if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
gl_cv_func_setlocale_null_all_mtsafe="trivially yes"
@@ -47,8 +63,8 @@ AC_DEFUN([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* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
+ # 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.
*)
@@ -57,7 +73,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
])
dnl On platforms without multithreading, there is no issue.
case "$host_os" in
- mingw*) ;;
+ mingw* | windows*) ;;
*)
if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then
gl_cv_func_setlocale_null_one_mtsafe="trivially yes"
@@ -74,20 +90,25 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
dnl Determine link dependencies of lib/setlocale_null.c and lib/setlocale-lock.c.
if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
case "$host_os" in
- mingw*) LIB_SETLOCALE_NULL= ;;
+ mingw* | windows*)
+ SETLOCALE_NULL_LIB=
+ ;;
*)
gl_WEAK_SYMBOLS
case "$gl_cv_have_weak" in
- *yes) LIB_SETLOCALE_NULL= ;;
- *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;;
+ *yes) SETLOCALE_NULL_LIB= ;;
+ *) SETLOCALE_NULL_LIB="$LIBPTHREAD" ;;
esac
;;
esac
else
- LIB_SETLOCALE_NULL=
+ SETLOCALE_NULL_LIB=
fi
- dnl LIB_SETLOCALE_NULL is expected to be '-pthread' or '-lpthread' on AIX
+ dnl SETLOCALE_NULL_LIB is expected to be '-pthread' or '-lpthread' on AIX
dnl with gcc or xlc, and empty otherwise.
+ AC_SUBST([SETLOCALE_NULL_LIB])
+ dnl For backward compatibility.
+ LIB_SETLOCALE_NULL="$SETLOCALE_NULL_LIB"
AC_SUBST([LIB_SETLOCALE_NULL])
])
diff --git a/gnulib-m4/signal_h.m4 b/gnulib-m4/signal_h.m4
index 4c05c627..7c12652b 100644
--- a/gnulib-m4/signal_h.m4
+++ b/gnulib-m4/signal_h.m4
@@ -1,8 +1,10 @@
-# signal_h.m4 serial 22
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# signal_h.m4
+# serial 23
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SIGNAL_H],
[
@@ -31,7 +33,8 @@ AC_DEFUN_ONCE([gl_SIGNAL_H],
dnl Check for declarations of anything we want to poison if the
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[#include <signal.h>
- ]], [pthread_sigmask sigaction
+ ]], [sig2str str2sig
+ pthread_sigmask sigaction
sigaddset sigdelset sigemptyset sigfillset sigismember
sigpending sigprocmask])
@@ -73,6 +76,7 @@ AC_DEFUN([gl_SIGNAL_H_REQUIRE_DEFAULTS],
m4_defun(GL_MODULE_INDICATOR_PREFIX[_SIGNAL_H_MODULE_INDICATOR_DEFAULTS], [
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_SIGMASK])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAISE])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIG2STR])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNAL_H_SIGPIPE])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGPROCMASK])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGACTION])
@@ -87,9 +91,11 @@ AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
HAVE_PTHREAD_SIGMASK=1; AC_SUBST([HAVE_PTHREAD_SIGMASK])
HAVE_RAISE=1; AC_SUBST([HAVE_RAISE])
+ HAVE_SIG2STR=1; AC_SUBST([HAVE_SIG2STR])
HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
+ HAVE_STR2SIG=1; AC_SUBST([HAVE_STR2SIG])
HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
diff --git a/gnulib-m4/signalblocking.m4 b/gnulib-m4/signalblocking.m4
index b586ef53..55a1495f 100644
--- a/gnulib-m4/signalblocking.m4
+++ b/gnulib-m4/signalblocking.m4
@@ -1,8 +1,10 @@
-# signalblocking.m4 serial 17
-dnl Copyright (C) 2001-2002, 2006-2022 Free Software Foundation, Inc.
+# signalblocking.m4
+# serial 17
+dnl Copyright (C) 2001-2002, 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.
+dnl This file is offered as-is, without any warranty.
# Determine available signal blocking primitives. Three different APIs exist:
# 1) POSIX: sigemptyset, sigaddset, sigprocmask
diff --git a/gnulib-m4/signbit.m4 b/gnulib-m4/signbit.m4
index 8a4114db..8124cc81 100644
--- a/gnulib-m4/signbit.m4
+++ b/gnulib-m4/signbit.m4
@@ -1,8 +1,10 @@
-# signbit.m4 serial 20
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# signbit.m4
+# serial 23
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_SIGNBIT],
[
@@ -29,14 +31,14 @@ AC_DEFUN([gl_SIGNBIT],
[gl_cv_func_signbit=yes],
[gl_cv_func_signbit=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_signbit="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_signbit="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_signbit="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_signbit="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_signbit="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_signbit="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_signbit="$gl_cross_guess_normal" ;;
esac
])
])
@@ -63,19 +65,19 @@ AC_DEFUN([gl_SIGNBIT],
[gl_cv_func_signbit_builtins=yes],
[gl_cv_func_signbit_builtins=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_signbit_builtins="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_signbit_builtins="guessing yes" ;;
- # Guess yes on mingw, no on MSVC.
- mingw*) if test -n "$GCC"; then
- gl_cv_func_signbit_builtins="guessing yes"
- else
- gl_cv_func_signbit_builtins="guessing no"
- fi
- ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_signbit_builtins="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_signbit_builtins="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_signbit_builtins="guessing yes" ;;
+ # Guess yes on mingw, no on MSVC.
+ mingw* | windows*) if test -n "$GCC"; then
+ gl_cv_func_signbit_builtins="guessing yes"
+ else
+ gl_cv_func_signbit_builtins="guessing no"
+ fi
+ ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_signbit_builtins="$gl_cross_guess_normal" ;;
esac
])
])
@@ -197,7 +199,7 @@ double m0d = -p0d;
But that expression does not work on other platforms, such as when
cross-compiling to PowerPC on Mac OS X 10.5. */
long double p0l = 0.0L;
-#if defined __hpux || defined __sgi
+#if defined __hpux
long double m0l = -LDBL_MIN * LDBL_MIN;
#else
long double m0l = -p0l;
diff --git a/gnulib-m4/size_max.m4 b/gnulib-m4/size_max.m4
index 1d6abaea..b7a5153a 100644
--- a/gnulib-m4/size_max.m4
+++ b/gnulib-m4/size_max.m4
@@ -1,8 +1,10 @@
-# size_max.m4 serial 12
-dnl Copyright (C) 2003, 2005-2006, 2008-2022 Free Software Foundation, Inc.
+# size_max.m4
+# serial 12
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
diff --git a/gnulib-m4/sleep.m4 b/gnulib-m4/sleep.m4
index e73651f5..6416cd5f 100644
--- a/gnulib-m4/sleep.m4
+++ b/gnulib-m4/sleep.m4
@@ -1,8 +1,10 @@
-# sleep.m4 serial 11
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# sleep.m4
+# serial 14
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_SLEEP],
[
@@ -32,7 +34,7 @@ handle_alarm (int sig)
}
]], [[
/* Failure to compile this test due to missing alarm is okay,
- since all such platforms (mingw) also lack sleep. */
+ since all such platforms (mingw, MSVC) also lack sleep. */
unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
unsigned int remaining;
signal (SIGALRM, handle_alarm);
@@ -46,14 +48,16 @@ handle_alarm (int sig)
]])],
[gl_cv_func_sleep_works=yes], [gl_cv_func_sleep_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_sleep_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_sleep_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_sleep_works="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl*) gl_cv_func_sleep_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_sleep_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_sleep_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_sleep_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_sleep_works" in
diff --git a/gnulib-m4/snan.m4 b/gnulib-m4/snan.m4
new file mode 100644
index 00000000..64d20a82
--- /dev/null
+++ b/gnulib-m4/snan.m4
@@ -0,0 +1,16 @@
+# snan.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
+
+# Prerequisites for lib/snan.h.
+AC_DEFUN_ONCE([gl_SNAN],
+[
+ gl_FLOAT_EXPONENT_LOCATION
+ gl_DOUBLE_EXPONENT_LOCATION
+ gl_LONG_DOUBLE_EXPONENT_LOCATION
+ AC_REQUIRE([gl_LONG_DOUBLE_VS_DOUBLE])
+])
diff --git a/gnulib-m4/socketlib.m4 b/gnulib-m4/socketlib.m4
index b8bd0afa..f62ffcfd 100644
--- a/gnulib-m4/socketlib.m4
+++ b/gnulib-m4/socketlib.m4
@@ -1,8 +1,10 @@
-# socketlib.m4 serial 3
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# socketlib.m4
+# serial 4
+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.
+dnl This file is offered as-is, without any warranty.
dnl gl_SOCKETLIB
dnl Determines the library to use for socket functions.
@@ -18,7 +20,7 @@ AC_DEFUN([gl_SOCKETLIB],
dnl defined through -lws2_32), we need to call it.
AC_CACHE_CHECK([for WSAStartup],
[gl_cv_func_wsastartup], [
- gl_save_LIBS="$LIBS"
+ gl_saved_LIBS="$LIBS"
LIBS="$LIBS -lws2_32"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
@@ -33,7 +35,7 @@ AC_DEFUN([gl_SOCKETLIB],
],
[gl_cv_func_wsastartup=yes],
[gl_cv_func_wsastartup=no])
- LIBS="$gl_save_LIBS"
+ LIBS="$gl_saved_LIBS"
])
if test "$gl_cv_func_wsastartup" = "yes"; then
AC_DEFINE([WINDOWS_SOCKETS], [1], [Define if WSAStartup is needed.])
@@ -56,8 +58,8 @@ AC_DEFUN([gl_SOCKETLIB],
#endif
char setsockopt();]], [[setsockopt();]])],
[],
- [gl_save_LIBS="$LIBS"
- LIBS="$gl_save_LIBS -lsocket"
+ [gl_saved_LIBS="$LIBS"
+ LIBS="$gl_saved_LIBS -lsocket"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern
#ifdef __cplusplus
"C"
@@ -65,7 +67,7 @@ char setsockopt();]], [[setsockopt();]])],
char setsockopt();]], [[setsockopt();]])],
[gl_cv_lib_socket="-lsocket"])
if test -z "$gl_cv_lib_socket"; then
- LIBS="$gl_save_LIBS -lnetwork"
+ LIBS="$gl_saved_LIBS -lnetwork"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern
#ifdef __cplusplus
"C"
@@ -73,7 +75,7 @@ char setsockopt();]], [[setsockopt();]])],
char setsockopt();]], [[setsockopt();]])],
[gl_cv_lib_socket="-lnetwork"])
if test -z "$gl_cv_lib_socket"; then
- LIBS="$gl_save_LIBS -lnet"
+ LIBS="$gl_saved_LIBS -lnet"
AC_LINK_IFELSE([AC_LANG_PROGRAM([[extern
#ifdef __cplusplus
"C"
@@ -82,7 +84,7 @@ char setsockopt();]], [[setsockopt();]])],
[gl_cv_lib_socket="-lnet"])
fi
fi
- LIBS="$gl_save_LIBS"
+ LIBS="$gl_saved_LIBS"
])
if test -z "$gl_cv_lib_socket"; then
gl_cv_lib_socket="none needed"
diff --git a/gnulib-m4/sockets.m4 b/gnulib-m4/sockets.m4
index aa04acc3..95800d2e 100644
--- a/gnulib-m4/sockets.m4
+++ b/gnulib-m4/sockets.m4
@@ -1,8 +1,10 @@
-# sockets.m4 serial 7
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# sockets.m4
+# serial 7
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_SOCKETS],
[
diff --git a/gnulib-m4/socklen.m4 b/gnulib-m4/socklen.m4
index 1390ac41..e5156511 100644
--- a/gnulib-m4/socklen.m4
+++ b/gnulib-m4/socklen.m4
@@ -1,15 +1,17 @@
-# socklen.m4 serial 11
-dnl Copyright (C) 2005-2007, 2009-2022 Free Software Foundation, Inc.
+# socklen.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
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/gnulib-m4/sockpfaf.m4 b/gnulib-m4/sockpfaf.m4
index b1c4068a..6379766d 100644
--- a/gnulib-m4/sockpfaf.m4
+++ b/gnulib-m4/sockpfaf.m4
@@ -1,8 +1,10 @@
-# sockpfaf.m4 serial 10
-dnl Copyright (C) 2004, 2006, 2009-2022 Free Software Foundation, Inc.
+# sockpfaf.m4
+# serial 11
+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.
+dnl This file is offered as-is, without any warranty.
dnl Test for some common socket protocol families (PF_INET, PF_INET6, ...)
dnl and some common address families (AF_INET, AF_INET6, ...).
@@ -63,6 +65,13 @@ AC_DEFUN([gl_SOCKET_FAMILY_UNIX],
AC_REQUIRE([gl_SYS_SOCKET_H])
AC_CHECK_HEADERS_ONCE([sys/un.h])
+ dnl Windows versions released after 2017 may have support for AF_UNIX.
+ dnl Including it requires types from <winsock2.h> to be defined.
+ dnl <https://devblogs.microsoft.com/commandline/af_unix-comes-to-windows/>.
+ if test "$ac_cv_header_winsock2_h" = yes; then
+ AC_CHECK_HEADERS([afunix.h], [], [], [#include <winsock2.h>])
+ fi
+
AC_CACHE_CHECK([for UNIX domain sockets],
[gl_cv_socket_unix],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
@@ -74,6 +83,9 @@ AC_DEFUN([gl_SOCKET_FAMILY_UNIX],
#endif
#ifdef HAVE_WINSOCK2_H
#include <winsock2.h>
+#endif
+#ifdef HAVE_AFUNIX_H
+#include <afunix.h>
#endif]],
[[int x = AF_UNIX; struct sockaddr_un y;
if (&x && &y) return 0;]])],
diff --git a/gnulib-m4/ssize_t.m4 b/gnulib-m4/ssize_t.m4
index 03b2b895..8710cb72 100644
--- a/gnulib-m4/ssize_t.m4
+++ b/gnulib-m4/ssize_t.m4
@@ -1,23 +1,39 @@
-# ssize_t.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2001-2003, 2006, 2010-2022 Free Software Foundation, Inc.
+# ssize_t.m4
+# serial 6
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
-dnl Test whether ssize_t is defined.
+dnl Define ssize_t if it does not already exist.
AC_DEFUN([gt_TYPE_SSIZE_T],
[
- AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
+ AC_CACHE_CHECK([for ssize_t], [gl_cv_ssize_t],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <sys/types.h>]],
[[int x = sizeof (ssize_t *) + sizeof (ssize_t);
return !x;]])],
- [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
- if test $gt_cv_ssize_t = no; then
- AC_DEFINE([ssize_t], [int],
- [Define as a signed type of the same size as size_t.])
+ [gl_cv_ssize_t=yes], [gl_cv_ssize_t=no])])
+ if test $gl_cv_ssize_t = no; then
+ dnl On 64-bit native Windows, ssize_t needs to be defined as 'long long',
+ dnl for consistency with the 64-bit size_t.
+ AC_CACHE_CHECK([whether size_t is wider than 'long'], [gl_cv_size_t_large],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ typedef int array [2 * (sizeof (size_t) > sizeof (long)) - 1];
+ ]])],
+ [gl_cv_size_t_large=yes], [gl_cv_size_t_large=no])])
+ if test $gl_cv_size_t_large = yes; then
+ gl_def_ssize_t='long long'
+ else
+ gl_def_ssize_t='long'
+ fi
+ AC_DEFINE_UNQUOTED([ssize_t], [$gl_def_ssize_t],
+ [Define as a signed type of the same size as size_t.])
fi
])
diff --git a/gnulib-m4/stat-time.m4 b/gnulib-m4/stat-time.m4
index 342857d3..10eb1dfa 100644
--- a/gnulib-m4/stat-time.m4
+++ b/gnulib-m4/stat-time.m4
@@ -1,11 +1,13 @@
-# Checks for stat-related time functions.
-
-# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2022 Free Software
-# Foundation, Inc.
+# stat-time.m4
+# serial 1
+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,
+dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Checks for stat-related time functions.
dnl From Paul Eggert.
diff --git a/gnulib-m4/stat.m4 b/gnulib-m4/stat.m4
index 916eb886..3764ec0b 100644
--- a/gnulib-m4/stat.m4
+++ b/gnulib-m4/stat.m4
@@ -1,10 +1,10 @@
-# serial 18
-
-# Copyright (C) 2009-2022 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# stat.m4
+# serial 21
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_STAT],
[
@@ -12,7 +12,7 @@ AC_DEFUN([gl_FUNC_STAT],
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
AC_CHECK_FUNCS_ONCE([lstat])
case "$host_os" in
- mingw*)
+ mingw* | windows*)
dnl On this platform, the original stat() returns st_atime, st_mtime,
dnl st_ctime values that are affected by the time zone.
REPLACE_STAT=1
@@ -45,6 +45,8 @@ AC_DEFUN([gl_FUNC_STAT],
[case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_stat_file_slash="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
@@ -59,8 +61,8 @@ AC_DEFUN([gl_FUNC_STAT],
help when passed a file name with a trailing slash]);;
esac
case $host_os in
- dnl Solaris stat can return a negative tv_nsec.
- solaris*)
+ dnl macOS and Solaris stat can return a negative tv_nsec.
+ darwin* | solaris*)
REPLACE_FSTAT=1 ;;
esac
;;
@@ -78,7 +80,7 @@ AC_DEFUN([gl_PREREQ_STAT], [
AC_DEFUN([gl_PREREQ_STAT_W32], [
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
- mingw*)
+ mingw* | windows*)
AC_CHECK_HEADERS([sdkddkver.h])
;;
esac
diff --git a/gnulib-m4/stdalign.m4 b/gnulib-m4/stdalign.m4
index 324e91da..7177d034 100644
--- a/gnulib-m4/stdalign.m4
+++ b/gnulib-m4/stdalign.m4
@@ -1,20 +1,25 @@
-# Check for alignas and alignof that conform to C23.
-
-dnl Copyright 2011-2022 Free Software Foundation, Inc.
+# stdalign.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
+
+# Check for alignas and alignof that conform to C23.
+
+dnl Written by Paul Eggert and Bruno Haible.
# Prepare for substituting <stdalign.h> if it is not supported.
-AC_DEFUN([gl_STDALIGN_H],
+AC_DEFUN([gl_ALIGNASOF],
[
AC_CACHE_CHECK([for alignas and alignof],
[gl_cv_header_working_stdalign_h],
- [gl_save_CFLAGS=$CFLAGS
+ [gl_saved_CFLAGS=$CFLAGS
for gl_working in "yes, keywords" "yes, <stdalign.h> macros"; do
AS_CASE([$gl_working],
- [*stdalign.h*], [CFLAGS="$gl_save_CFLAGS -DINCLUDE_STDALIGN_H"])
+ [*stdalign.h*], [CFLAGS="$gl_saved_CFLAGS -DINCLUDE_STDALIGN_H"])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdint.h>
@@ -25,7 +30,7 @@ AC_DEFUN([gl_STDALIGN_H],
/* Test that alignof yields a result consistent with offsetof.
This catches GCC bug 52023
- <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
+ <https://gcc.gnu.org/PR52023>. */
#ifdef __cplusplus
template <class t> struct alignof_helper { char a; t b; };
# define ao(type) offsetof (alignof_helper<type>, b)
@@ -54,81 +59,154 @@ AC_DEFUN([gl_STDALIGN_H],
[gl_cv_header_working_stdalign_h=$gl_working],
[gl_cv_header_working_stdalign_h=no])
- CFLAGS=$gl_save_CFLAGS
+ CFLAGS=$gl_saved_CFLAGS
test "$gl_cv_header_working_stdalign_h" != no && break
done])
- GL_GENERATE_STDALIGN_H=false
AS_CASE([$gl_cv_header_working_stdalign_h],
- [no],
- [GL_GENERATE_STDALIGN_H=true],
[yes*keyword*],
[AC_DEFINE([HAVE_C_ALIGNASOF], [1],
[Define to 1 if the alignas and alignof keywords work.])])
- AC_CHECK_HEADERS_ONCE([stdalign.h])
-
dnl The "zz" puts this toward config.h's end, to avoid potential
dnl collisions with other definitions.
AH_VERBATIM([zzalignas],
-[#if !defined HAVE_C_ALIGNASOF && __cplusplus < 201103 && !defined alignof
-# if HAVE_STDALIGN_H
+[#if !defined HAVE_C_ALIGNASOF \
+ && !(defined __cplusplus && 201103 <= __cplusplus) \
+ && !defined alignof
+# if defined HAVE_STDALIGN_H
# include <stdalign.h>
-# else
- /* Substitute. Keep consistent with gnulib/lib/stdalign.in.h. */
-# ifndef _GL_STDALIGN_H
-# define _GL_STDALIGN_H
-# undef _Alignas
-# undef _Alignof
-# if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
- || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
- && !defined __clang__) \
- || (defined __clang__ && __clang_major__ < 8))
-# ifdef __cplusplus
-# if (201103 <= __cplusplus || defined _MSC_VER)
-# define _Alignof(type) alignof (type)
+# endif
+
+/* ISO C23 alignas and alignof for platforms that lack it.
+
+ References:
+ ISO C23 (latest free draft
+ <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3220.pdf>)
+ sections 6.2.8, 6.7.6.
+ C++11 (latest free draft
+ <https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
+ section 18.10. */
+
+/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
+ requirement of a structure member (i.e., slot or field) that is of
+ type TYPE, as an integer constant expression.
+
+ This differs from GCC's and clang's __alignof__ operator, which can
+ yield a better-performing alignment for an object of that type. For
+ example, on x86 with GCC and on Linux/x86 with clang,
+ __alignof__ (double) and __alignof__ (long long) are 8, whereas
+ alignof (double) and alignof (long long) are 4 unless the option
+ '-malign-double' is used.
+
+ The result cannot be used as a value for an 'enum' constant, if you
+ want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc. */
+
+/* GCC releases before GCC 4.9 had a bug in _Alignof. See GCC bug 52023
+ <https://gcc.gnu.org/PR52023>.
+ 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 \
+ || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
+ && !defined __clang__) \
+ || (defined __clang__ && __clang_major__ < 8) \
+ || defined __xlC__)
+# undef/**/_Alignof
+# ifdef __cplusplus
+# if (201103 <= __cplusplus || defined _MSC_VER)
+# define _Alignof(type) alignof (type)
+# else
+ template <class __t> struct __alignof_helper { char __a; __t __b; };
+# if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__
+# define _Alignof(type) __builtin_offsetof (__alignof_helper<type>, __b)
# else
- template <class __t> struct __alignof_helper { char __a; __t __b; };
# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
-# define _GL_STDALIGN_NEEDS_STDDEF 1
# endif
+# define _GL_STDALIGN_NEEDS_STDDEF 1
+# endif
+# else
+# if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__
+# define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
# else
# define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
# define _GL_STDALIGN_NEEDS_STDDEF 1
# endif
# endif
-# if ! (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER))
-# define alignof _Alignof
-# endif
-# define __alignof_is_defined 1
-# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
-# if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
-# define _Alignas(a) alignas (a)
-# elif (!defined __attribute__ \
- && ((defined __APPLE__ && defined __MACH__ \
- ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
- : __GNUC__ && !defined __ibmxl__) \
- || (4 <= __clang_major__) \
- || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
- || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
-# define _Alignas(a) __attribute__ ((__aligned__ (a)))
-# elif 1300 <= _MSC_VER
-# define _Alignas(a) __declspec (align (a))
-# endif
-# endif
-# if ((defined _Alignas \
- && !(defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER))) \
- || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
-# define alignas _Alignas
-# endif
-# if (defined alignas \
- || (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)))
-# define __alignas_is_defined 1
-# endif
-# if _GL_STDALIGN_NEEDS_STDDEF
-# include <stddef.h>
-# endif
-# endif /* _GL_STDALIGN_H */
+# endif
+# if ! (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER))
+# undef/**/alignof
+# define alignof _Alignof
+# endif
+
+/* alignas (A), also known as _Alignas (A), aligns a variable or type
+ to the alignment A, where A is an integer constant expression. For
+ example:
+
+ int alignas (8) foo;
+ struct s { int a; int alignas (8) bar; };
+
+ aligns the address of FOO and the offset of BAR to be multiples of 8.
+
+ A should be a power of two that is at least the type's alignment
+ and at most the implementation's alignment limit. This limit is
+ 2**28 on typical GNUish hosts, and 2**13 on MSVC. To be portable
+ to MSVC through at least version 10.0, A should be an integer
+ constant, as MSVC does not support expressions such as 1 << 3.
+ To be portable to Sun C 5.11, do not align auto variables to
+ anything stricter than their default alignment.
+
+ The following C23 requirements are not supported here:
+
+ - If A is zero, alignas has no effect.
+ - alignas can be used multiple times; the strictest one wins.
+ - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
+
+ */
+# if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+# if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
+# define _Alignas(a) alignas (a)
+# elif (!defined __attribute__ \
+ && ((defined __APPLE__ && defined __MACH__ \
+ ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+ : __GNUC__ && !defined __ibmxl__) \
+ || (4 <= __clang_major__) \
+ || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+ || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
+# define _Alignas(a) __attribute__ ((__aligned__ (a)))
+# elif 1300 <= _MSC_VER
+# define _Alignas(a) __declspec (align (a))
+# endif
+# endif
+# if !defined HAVE_STDALIGN_H
+# if ((defined _Alignas \
+ && !(defined __cplusplus \
+ && (201103 <= __cplusplus || defined _MSC_VER))) \
+ || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__ \
+ && !defined __xlC__))
+# define alignas _Alignas
+# endif
+# endif
+
+# if defined _GL_STDALIGN_NEEDS_STDDEF
+# include <stddef.h>
# endif
#endif])
])
+
+AC_DEFUN([gl_STDALIGN_H],
+[
+ AC_REQUIRE([gl_ALIGNASOF])
+ if test "$gl_cv_header_working_stdalign_h" = no; then
+ GL_GENERATE_STDALIGN_H=true
+ else
+ GL_GENERATE_STDALIGN_H=false
+ fi
+
+ gl_CHECK_NEXT_HEADERS([stdalign.h])
+ if test $ac_cv_header_stdalign_h = yes; then
+ HAVE_STDALIGN_H=1
+ else
+ HAVE_STDALIGN_H=0
+ fi
+ AC_SUBST([HAVE_STDALIGN_H])
+])
diff --git a/gnulib-m4/stdckdint_h.m4 b/gnulib-m4/stdckdint_h.m4
new file mode 100644
index 00000000..eb8c858a
--- /dev/null
+++ b/gnulib-m4/stdckdint_h.m4
@@ -0,0 +1,136 @@
+# stdckdint_h.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl Written by Collin Funk.
+
+AC_DEFUN_ONCE([gl_STDCKDINT_H],
+[
+ gl_CHECK_NEXT_HEADERS([stdckdint.h])
+ if test $ac_cv_header_stdckdint_h = yes; then
+ HAVE_STDCKDINT_H=1
+ else
+ HAVE_STDCKDINT_H=0
+ fi
+ AC_SUBST([HAVE_STDCKDINT_H])
+
+ if test $HAVE_STDCKDINT_H = 1; then
+ AC_CACHE_CHECK([whether stdckdint.h can be included in C],
+ [gl_cv_header_c_stdckdint_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdckdint.h>
+ ]])],
+ [gl_cv_header_c_stdckdint_h=yes],
+ [gl_cv_header_c_stdckdint_h=no])])
+ if test $gl_cv_header_c_stdckdint_h = yes; then
+ HAVE_C_STDCKDINT_H=1
+ AC_CACHE_CHECK([checking for an ISO C23 compliant stdckdint.h in C],
+ [gl_cv_header_c_stdckdint_h_works],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdckdint.h>
+ ]],
+ [[int r;
+ int a = 1;
+ int b = 1;
+ return !!(ckd_add (&r, a, b) || ckd_sub (&r, a, b)
+ || ckd_mul (&r, a, b));
+ ]])],
+ [gl_cv_header_c_stdckdint_h_works=yes],
+ [gl_cv_header_c_stdckdint_h_works=no])])
+ if test $gl_cv_header_c_stdckdint_h_works = yes; then
+ HAVE_WORKING_C_STDCKDINT_H=1
+ else
+ HAVE_WORKING_C_STDCKDINT_H=0
+ fi
+ else
+ HAVE_C_STDCKDINT_H=0
+ HAVE_WORKING_C_STDCKDINT_H=0
+ fi
+ if test "$CXX" != no; then
+ AC_CACHE_CHECK([whether stdckdint.h can be included in C++],
+ [gl_cv_header_cxx_stdckdint_h],
+ [dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to
+ dnl an autoconf bug <https://savannah.gnu.org/support/?110294>.
+ cat > conftest.cpp <<\EOF
+#include <stdckdint.h>
+EOF
+ gl_command="$CXX $CXXFLAGS $CPPFLAGS -c conftest.cpp"
+ if AC_TRY_EVAL([gl_command]); then
+ gl_cv_header_cxx_stdckdint_h=yes
+ else
+ gl_cv_header_cxx_stdckdint_h=no
+ fi
+ rm -fr conftest*
+ ])
+ if test $gl_cv_header_cxx_stdckdint_h = yes; then
+ HAVE_CXX_STDCKDINT_H=1
+ AC_CACHE_CHECK([checking for an ISO C++26 compliant stdckdint.h in C++],
+ [gl_cv_header_cxx_stdckdint_h_works],
+ [dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to
+ dnl an autoconf bug <https://savannah.gnu.org/support/?110294>.
+ cat > conftest.cpp <<\EOF
+#include <stdckdint.h>
+int
+main (void)
+{
+ int r;
+ int a = 1;
+ int b = 1;
+ return !!(ckd_add (&r, a, b) || ckd_sub (&r, a, b) || ckd_mul (&r, a, b));
+}
+EOF
+ gl_command="$CXX $CXXFLAGS $CPPFLAGS -c conftest.cpp"
+ if AC_TRY_EVAL([gl_command]); then
+ gl_cv_header_cxx_stdckdint_h_works=yes
+ else
+ gl_cv_header_cxx_stdckdint_h_works=no
+ fi
+ rm -fr conftest*
+ ])
+ if test $gl_cv_header_cxx_stdckdint_h_works = yes; then
+ HAVE_WORKING_CXX_STDCKDINT_H=1
+ else
+ HAVE_WORKING_CXX_STDCKDINT_H=0
+ fi
+ else
+ HAVE_CXX_STDCKDINT_H=0
+ HAVE_WORKING_CXX_STDCKDINT_H=0
+ fi
+ fi
+ else
+ HAVE_C_STDCKDINT_H=0
+ HAVE_WORKING_C_STDCKDINT_H=0
+ HAVE_CXX_STDCKDINT_H=0
+ HAVE_WORKING_CXX_STDCKDINT_H=0
+ fi
+ AC_SUBST([HAVE_C_STDCKDINT_H])
+ AC_SUBST([HAVE_WORKING_C_STDCKDINT_H])
+ AC_SUBST([HAVE_CXX_STDCKDINT_H])
+ AC_SUBST([HAVE_WORKING_CXX_STDCKDINT_H])
+
+ if test "$CXX" != no; then
+ dnl We might need the header for C or C++.
+ if test $HAVE_C_STDCKDINT_H = 1 \
+ && test $HAVE_WORKING_C_STDCKDINT_H = 1 \
+ && test $HAVE_CXX_STDCKDINT_H = 1 \
+ && test $HAVE_WORKING_CXX_STDCKDINT_H = 1; then
+ GL_GENERATE_STDCKDINT_H=false
+ else
+ GL_GENERATE_STDCKDINT_H=true
+ fi
+ else
+ dnl We don't care about C++ here.
+ if test $HAVE_C_STDCKDINT_H = 1 \
+ && test $HAVE_WORKING_C_STDCKDINT_H = 1; then
+ GL_GENERATE_STDCKDINT_H=false
+ else
+ GL_GENERATE_STDCKDINT_H=true
+ fi
+ fi
+])
diff --git a/gnulib-m4/stddef_h.m4 b/gnulib-m4/stddef_h.m4
index abfd2030..299472b1 100644
--- a/gnulib-m4/stddef_h.m4
+++ b/gnulib-m4/stddef_h.m4
@@ -1,15 +1,16 @@
-# stddef_h.m4 serial 12
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# stddef_h.m4
+# serial 23
+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.
+dnl This file is offered as-is, without any warranty.
dnl A placeholder for <stddef.h>, for platforms that have issues.
AC_DEFUN_ONCE([gl_STDDEF_H],
[
AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
dnl Persuade OpenBSD <stddef.h> to declare max_align_t.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
@@ -22,7 +23,14 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
[gl_cv_type_max_align_t],
[AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
- [[#include <stddef.h>
+ [[/* On FreeBSD 12.0/x86, max_align_t defined by <stddef.h> has
+ the correct alignment with the default (wrong) definition of
+ _Alignof, but a wrong alignment as soon as we activate an
+ ISO C compliant _Alignof definition. */
+ #if ((defined __GNUC__ && 4 <= __GNUC__) || defined __clang__) && !defined __cplusplus
+ #define _Alignof(type) __builtin_offsetof (struct { char __a; type __b; }, __b)
+ #endif
+ #include <stddef.h>
unsigned int s = sizeof (max_align_t);
#if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
@@ -44,11 +52,6 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
GL_GENERATE_STDDEF_H=true
fi
- if test $gt_cv_c_wchar_t = no; then
- HAVE_WCHAR_T=0
- GL_GENERATE_STDDEF_H=true
- fi
-
AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
[gl_cv_decl_null_works],
[AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
@@ -61,6 +64,60 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
GL_GENERATE_STDDEF_H=true
fi
+ AC_CACHE_CHECK([for unreachable in C],
+ [gl_cv_c_func_unreachable],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stddef.h>
+ ]],
+ [[unreachable ();
+ ]])],
+ [gl_cv_c_func_unreachable=yes],
+ [gl_cv_c_func_unreachable=no])
+ ])
+ if test $gl_cv_c_func_unreachable = no; then
+ GL_GENERATE_STDDEF_H=true
+ HAVE_C_UNREACHABLE=0
+ else
+ HAVE_C_UNREACHABLE=1
+ fi
+ AC_SUBST([HAVE_C_UNREACHABLE])
+ dnl Provide gl_unreachable() unconditionally.
+ GL_GENERATE_STDDEF_H=true
+
+ dnl https://gcc.gnu.org/PR114869
+ AC_CACHE_CHECK([whether nullptr_t needs <stddef.h>],
+ [gl_cv_nullptr_t_needs_stddef],
+ [AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[nullptr_t x;]],
+ [gl_cv_nullptr_t_needs_stddef=no],
+ [gl_cv_nullptr_t_needs_stddef=yes])])
+ if test "$gl_cv_nullptr_t_needs_stddef" = no; then
+ NULLPTR_T_NEEDS_STDDEF=0
+ GL_GENERATE_STDDEF_H=true
+ fi
+
+ dnl https://gcc.gnu.org/PR114870
+ dnl affects GCC 13.3 and 14.2.
+ AC_CACHE_CHECK([whether <stddef.h> is idempotent],
+ [gl_cv_stddef_idempotent],
+ [AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+ [[
+ #if \
+ ((__GNUC__ == 13 && __GNUC_MINOR__ <= 3) \
+ || (__GNUC__ == 14 && __GNUC_MINOR__ <= 2))
+ #error "bug 114870 is present"
+ #endif
+ ]])],
+ [gl_cv_stddef_idempotent="guessing yes"],
+ [gl_cv_stddef_idempotent="guessing no"])
+ ])
+ case "$gl_cv_stddef_idempotent" in
+ *yes) ;;
+ *) STDDEF_NOT_IDEMPOTENT=1
+ GL_GENERATE_STDDEF_H=true
+ ;;
+ esac
+
if $GL_GENERATE_STDDEF_H; then
gl_NEXT_HEADERS([stddef.h])
fi
@@ -91,7 +148,8 @@ AC_DEFUN([gl_STDDEF_H_REQUIRE_DEFAULTS],
AC_DEFUN([gl_STDDEF_H_DEFAULTS],
[
dnl Assume proper GNU behavior unless another module says otherwise.
+ NULLPTR_T_NEEDS_STDDEF=1; AC_SUBST([NULLPTR_T_NEEDS_STDDEF])
+ STDDEF_NOT_IDEMPOTENT=0; AC_SUBST([STDDEF_NOT_IDEMPOTENT])
REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T])
- HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
])
diff --git a/gnulib-m4/stdint.m4 b/gnulib-m4/stdint.m4
index c3f08942..410da153 100644
--- a/gnulib-m4/stdint.m4
+++ b/gnulib-m4/stdint.m4
@@ -1,8 +1,10 @@
-# stdint.m4 serial 61
-dnl Copyright (C) 2001-2022 Free Software Foundation, Inc.
+# stdint.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert and Bruno Haible.
dnl Test whether <stdint.h> is supported or must be substituted.
@@ -150,10 +152,13 @@ intmax_t i = INTMAX_MAX;
uintmax_t j = UINTMAX_MAX;
/* Check that SIZE_MAX has the correct type, if possible. */
-#if 201112 <= __STDC_VERSION__
+/* ISO C 11 mandates _Generic, but GCC versions < 4.9 lack it. */
+#if 201112 <= __STDC_VERSION__ \
+ && (!defined __GNUC__ || 4 < __GNUC__ + (9 <= __GNUC_MINOR__) \
+ || defined __clang__)
int k = _Generic (SIZE_MAX, size_t: 0);
#elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
- || (0x5110 <= __SUNPRO_C && !__STDC__))
+ || (0x5110 <= __SUNPRO_C && !__STDC__) || 1939 <= _MSC_VER)
extern size_t k;
extern __typeof__ (SIZE_MAX) k;
#endif
@@ -283,10 +288,10 @@ static const char *macro_values[] =
[gl_cv_header_working_stdint_h=yes],
[],
[case "$host_os" in
- # Guess yes on native Windows.
- mingw*) gl_cv_header_working_stdint_h="guessing yes" ;;
- # In general, assume it works.
- *) gl_cv_header_working_stdint_h="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_header_working_stdint_h="guessing yes" ;;
+ # In general, assume it works.
+ *) gl_cv_header_working_stdint_h="guessing yes" ;;
esac
])
])
@@ -386,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/gnulib-m4/stdint_h.m4 b/gnulib-m4/stdint_h.m4
index b8684b61..7f60af20 100644
--- a/gnulib-m4/stdint_h.m4
+++ b/gnulib-m4/stdint_h.m4
@@ -1,8 +1,10 @@
-# stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2022 Free Software Foundation, Inc.
+# stdint_h.m4
+# serial 9
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Paul Eggert.
diff --git a/gnulib-m4/stdio_h.m4 b/gnulib-m4/stdio_h.m4
index 42e96071..9d4126f5 100644
--- a/gnulib-m4/stdio_h.m4
+++ b/gnulib-m4/stdio_h.m4
@@ -1,12 +1,24 @@
-# stdio_h.m4 serial 59
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# stdio_h.m4
+# serial 75
+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.
+dnl This file is offered as-is, without any warranty.
-AC_DEFUN_ONCE([gl_STDIO_H],
+AC_DEFUN([gl_STDIO_H_EARLY],
[
- AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ dnl Defining __USE_MINGW_ANSI_STDIO to 1 must be done early, because
+ dnl the results of several configure tests depend on it: The tests
+ dnl - checking whether snprintf returns a byte count as in C99...
+ dnl - checking whether snprintf truncates the result as in C99...
+ dnl - checking whether printf supports the 'F' directive...
+ dnl - checking whether printf supports the grouping flag...
+ dnl - checking whether printf supports the zero flag correctly...
+ dnl - checking whether printf supports infinite 'double' arguments...
+ dnl - checking whether printf supports large precisions...
+ dnl report 'yes' if __USE_MINGW_ANSI_STDIO is 1 but 'no' if
+ dnl __USE_MINGW_ANSI_STDIO is not set.
AH_VERBATIM([MINGW_ANSI_STDIO],
[/* Use GNU style printf and scanf. */
#ifndef __USE_MINGW_ANSI_STDIO
@@ -14,6 +26,11 @@ AC_DEFUN_ONCE([gl_STDIO_H],
#endif
])
AC_DEFINE([__USE_MINGW_ANSI_STDIO])
+])
+
+AC_DEFUN_ONCE([gl_STDIO_H],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
gl_NEXT_HEADERS([stdio.h])
dnl Determine whether __USE_MINGW_ANSI_STDIO makes printf and
@@ -40,6 +57,9 @@ AC_DEFUN_ONCE([gl_STDIO_H],
attribute "__gnu_printf__" instead of "__printf__"])
fi
+ dnl For defining _PRINTF_NAN_LEN_MAX.
+ gl_MUSL_LIBC
+
dnl This ifdef is an optimization, to avoid performing a configure check whose
dnl result is not used. But it does not make the test of
dnl GNULIB_STDIO_H_NONBLOCKING or GNULIB_NONBLOCKING redundant.
@@ -82,6 +102,16 @@ AC_DEFUN_ONCE([gl_STDIO_H],
if test $ac_cv_have_decl_fcloseall = no; then
HAVE_DECL_FCLOSEALL=0
fi
+
+ AC_CHECK_DECLS_ONCE([getw])
+ if test $ac_cv_have_decl_getw = no; then
+ HAVE_DECL_GETW=0
+ fi
+
+ AC_CHECK_DECLS_ONCE([putw])
+ if test $ac_cv_have_decl_putw = no; then
+ HAVE_DECL_PUTW=0
+ fi
])
# gl_STDIO_MODULE_INDICATOR([modulename])
@@ -104,6 +134,7 @@ AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS],
[
m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDIO_H_MODULE_INDICATOR_DEFAULTS], [
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DPRINTF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DZPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FCLOSE])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FDOPEN])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FFLUSH])
@@ -124,12 +155,14 @@ AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FTELLO])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FWRITE])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FZPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETCHAR])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETDELIM])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLINE])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_PRINTF_POSIX])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_OBSTACK_ZPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PCLOSE])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PERROR])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_POPEN])
@@ -143,20 +176,29 @@ AC_DEFUN([gl_STDIO_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RENAMEAT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCANF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SNPRINTF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SNZPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SPRINTF_POSIX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_NONBLOCKING])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDIO_H_SIGPIPE])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SZPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TMPFILE])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VASPRINTF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VASZPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFSCANF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSCANF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VDPRINTF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VDZPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFPRINTF_POSIX])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VFZPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VPRINTF_POSIX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSNPRINTF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSNZPRINTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSPRINTF_POSIX])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VSZPRINTF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_VZPRINTF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ZPRINTF])
dnl Support Microsoft deprecated alias function names by default.
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FCLOSEALL], [1])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_FDOPEN], [1])
@@ -178,7 +220,9 @@ AC_DEFUN([gl_STDIO_H_DEFAULTS],
HAVE_DECL_FTELLO=1; AC_SUBST([HAVE_DECL_FTELLO])
HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM])
HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE])
+ HAVE_DECL_GETW=1; AC_SUBST([HAVE_DECL_GETW])
HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
+ HAVE_DECL_PUTW=1; AC_SUBST([HAVE_DECL_PUTW])
HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF])
HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF])
HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF])
diff --git a/gnulib-m4/stdlib_h.m4 b/gnulib-m4/stdlib_h.m4
index 9e209697..f35d6611 100644
--- a/gnulib-m4/stdlib_h.m4
+++ b/gnulib-m4/stdlib_h.m4
@@ -1,8 +1,10 @@
-# stdlib_h.m4 serial 66
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# stdlib_h.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_STDLIB_H],
[
@@ -23,15 +25,65 @@ AC_DEFUN_ONCE([gl_STDLIB_H],
# include <random.h>
#endif
]], [_Exit aligned_alloc atoll canonicalize_file_name free
- getloadavg getsubopt grantpt
- initstate initstate_r mbtowc mkdtemp mkostemp mkostemps mkstemp mkstemps
- posix_memalign posix_openpt ptsname ptsname_r qsort_r
+ getloadavg getprogname getsubopt grantpt
+ initstate initstate_r mbstowcs mbtowc mkdtemp mkostemp mkostemps mkstemp
+ mkstemps posix_memalign posix_openpt ptsname ptsname_r qsort_r
random random_r reallocarray realpath rpmatch secure_getenv setenv
setstate setstate_r srandom srandom_r
strtod strtol strtold strtoll strtoul strtoull unlockpt unsetenv])
AC_REQUIRE([AC_C_RESTRICT])
+ dnl Test whether MB_CUR_MAX needs to be overridden.
+ dnl On Solaris 10, in UTF-8 locales, its value is 3 but needs to be 4.
+ dnl Fortunately, we can do this because on this platform MB_LEN_MAX is 5.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gt_LOCALE_EN_UTF8])
+ AC_CACHE_CHECK([whether MB_CUR_MAX is correct],
+ [gl_cv_macro_MB_CUR_MAX_good],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdlib.h>
+ ]],
+ [[return !!MB_CUR_MAX;]])
+ ],
+ [dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+ # Guess no on Solaris and Haiku, yes otherwise.
+ AS_CASE([$host_os],
+ [solaris* | haiku*],
+ [gl_cv_macro_MB_CUR_MAX_good="guessing no"],
+ [gl_cv_macro_MB_CUR_MAX_good="guessing yes"])
+ if test "$LOCALE_EN_UTF8" != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+int main ()
+{
+ int result = 0;
+ if (setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
+ {
+ if (MB_CUR_MAX < 4)
+ result |= 1;
+ }
+ return result;
+}]])],
+ [gl_cv_macro_MB_CUR_MAX_good=yes],
+ [gl_cv_macro_MB_CUR_MAX_good=no],
+ [:])
+ fi
+ ],
+ [gl_cv_macro_MB_CUR_MAX_good="link failed - so no"])
+ ])
+ AS_CASE([$gl_cv_macro_MB_CUR_MAX_good],
+ [*yes],
+ [],
+ ["link failed - so no"],
+ [# 4 suffices as a workaround in Android NDK 16,
+ # the only known platform with the bug.
+ REPLACE_MB_CUR_MAX=4],
+ [REPLACE_MB_CUR_MAX="(-1)"])
+
AC_CHECK_DECLS_ONCE([ecvt])
if test $ac_cv_have_decl_ecvt = no; then
HAVE_DECL_ECVT=0
@@ -66,6 +118,7 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
[
m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS], [
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ABORT_DEBUG])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_GNU])
@@ -73,10 +126,12 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CANONICALIZE_FILE_NAME])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREE_POSIX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETLOADAVG])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPROGNAME])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETSUBOPT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GRANTPT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_GNU])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MALLOC_POSIX])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSTOWCS])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBTOWC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKDTEMP])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MKOSTEMP])
@@ -89,16 +144,18 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTSNAME_R])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PUTENV])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_QSORT_R])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAND])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RANDOM_R])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOCARRAY])
- gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_GNU])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALLOC_POSIX])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_REALPATH])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RPMATCH])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SECURE_GETENV])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETENV])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STACK_TRACE])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOD])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLD])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLL])
@@ -130,6 +187,8 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_DECL_FCVT=1; AC_SUBST([HAVE_DECL_FCVT])
HAVE_DECL_GCVT=1; AC_SUBST([HAVE_DECL_GCVT])
HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
+ HAVE_DECL_PROGRAM_INVOCATION_NAME=1; AC_SUBST([HAVE_DECL_PROGRAM_INVOCATION_NAME])
+ HAVE_GETPROGNAME=1; AC_SUBST([HAVE_GETPROGNAME])
HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
HAVE_GRANTPT=1; AC_SUBST([HAVE_GRANTPT])
HAVE_INITSTATE=1; AC_SUBST([HAVE_INITSTATE])
@@ -146,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])
@@ -157,6 +215,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_SETSTATE=1; AC_SUBST([HAVE_SETSTATE])
HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE])
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
+ HAVE_STRTOF=1; AC_SUBST([HAVE_STRTOF])
HAVE_STRTOL=1; AC_SUBST([HAVE_STRTOL])
HAVE_STRTOLD=1; AC_SUBST([HAVE_STRTOLD])
HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
@@ -164,32 +223,44 @@ 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])
+ REPLACE_ABORT=0; AC_SUBST([REPLACE_ABORT])
REPLACE_ALIGNED_ALLOC=0; AC_SUBST([REPLACE_ALIGNED_ALLOC])
REPLACE_CALLOC_FOR_CALLOC_GNU=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_GNU])
REPLACE_CALLOC_FOR_CALLOC_POSIX=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_POSIX])
REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
REPLACE_FREE=0; AC_SUBST([REPLACE_FREE])
+ REPLACE_GETLOADAVG=0; AC_SUBST([REPLACE_GETLOADAVG])
+ REPLACE_GETPROGNAME=0; AC_SUBST([REPLACE_GETPROGNAME])
+ REPLACE_GETSUBOPT=0; AC_SUBST([REPLACE_GETSUBOPT])
REPLACE_INITSTATE=0; AC_SUBST([REPLACE_INITSTATE])
REPLACE_MALLOC_FOR_MALLOC_GNU=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_GNU])
REPLACE_MALLOC_FOR_MALLOC_POSIX=0; AC_SUBST([REPLACE_MALLOC_FOR_MALLOC_POSIX])
+ REPLACE_MB_CUR_MAX=0; AC_SUBST([REPLACE_MB_CUR_MAX])
+ REPLACE_MBSTOWCS=0; AC_SUBST([REPLACE_MBSTOWCS])
REPLACE_MBTOWC=0; AC_SUBST([REPLACE_MBTOWC])
+ REPLACE_MKOSTEMP=0; AC_SUBST([REPLACE_MKOSTEMP])
+ REPLACE_MKOSTEMPS=0; AC_SUBST([REPLACE_MKOSTEMPS])
REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
REPLACE_POSIX_MEMALIGN=0; AC_SUBST([REPLACE_POSIX_MEMALIGN])
+ REPLACE_POSIX_OPENPT=0; AC_SUBST([REPLACE_POSIX_OPENPT])
REPLACE_PTSNAME=0; AC_SUBST([REPLACE_PTSNAME])
REPLACE_PTSNAME_R=0; AC_SUBST([REPLACE_PTSNAME_R])
REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
REPLACE_QSORT_R=0; AC_SUBST([REPLACE_QSORT_R])
+ REPLACE_RAND=0; AC_SUBST([REPLACE_RAND])
REPLACE_RANDOM=0; AC_SUBST([REPLACE_RANDOM])
REPLACE_RANDOM_R=0; AC_SUBST([REPLACE_RANDOM_R])
- REPLACE_REALLOC_FOR_REALLOC_GNU=0; AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_GNU])
REPLACE_REALLOC_FOR_REALLOC_POSIX=0; AC_SUBST([REPLACE_REALLOC_FOR_REALLOC_POSIX])
REPLACE_REALLOCARRAY=0; AC_SUBST([REPLACE_REALLOCARRAY])
REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
REPLACE_SETSTATE=0; AC_SUBST([REPLACE_SETSTATE])
REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
+ REPLACE_STRTOF=0; AC_SUBST([REPLACE_STRTOF])
REPLACE_STRTOL=0; AC_SUBST([REPLACE_STRTOL])
REPLACE_STRTOLD=0; AC_SUBST([REPLACE_STRTOLD])
REPLACE_STRTOLL=0; AC_SUBST([REPLACE_STRTOLL])
@@ -197,4 +268,5 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_STRTOULL=0; AC_SUBST([REPLACE_STRTOULL])
REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV])
REPLACE_WCTOMB=0; AC_SUBST([REPLACE_WCTOMB])
+ CAN_PRINT_STACK_TRACE=0; AC_SUBST([CAN_PRINT_STACK_TRACE])
])
diff --git a/gnulib-m4/stpcpy.m4 b/gnulib-m4/stpcpy.m4
new file mode 100644
index 00000000..4b9e774b
--- /dev/null
+++ b/gnulib-m4/stpcpy.m4
@@ -0,0 +1,30 @@
+# stpcpy.m4
+# serial 11
+dnl Copyright (C) 2002, 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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_FUNC_STPCPY],
+[
+ dnl Persuade glibc <string.h> to declare stpcpy().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ dnl The stpcpy() declaration in lib/string.in.h uses 'restrict'.
+ AC_REQUIRE([AC_C_RESTRICT])
+
+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
+ gl_CHECK_FUNCS_ANDROID([stpcpy], [[#include <string.h>]])
+ if test $ac_cv_func_stpcpy = no; then
+ HAVE_STPCPY=0
+ case "$gl_cv_onwards_func_stpcpy" in
+ future*) REPLACE_STPCPY=1 ;;
+ esac
+ fi
+])
+
+# Prerequisites of lib/stpcpy.c.
+AC_DEFUN([gl_PREREQ_STPCPY], [
+ :
+])
diff --git a/gnulib-m4/strerror.m4 b/gnulib-m4/strerror.m4
index 4716649b..9bb60c3f 100644
--- a/gnulib-m4/strerror.m4
+++ b/gnulib-m4/strerror.m4
@@ -1,8 +1,10 @@
-# strerror.m4 serial 23
-dnl Copyright (C) 2002, 2007-2022 Free Software Foundation, Inc.
+# strerror.m4
+# serial 25
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_STRERROR],
[
@@ -24,12 +26,12 @@ AC_DEFUN([gl_FUNC_STRERROR],
[gl_cv_func_working_strerror=yes],
[gl_cv_func_working_strerror=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_working_strerror="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_working_strerror="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;;
esac
])
])
@@ -80,14 +82,14 @@ AC_DEFUN([gl_FUNC_STRERROR_0],
[gl_cv_func_strerror_0_works=yes],
[gl_cv_func_strerror_0_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;;
esac
])
])
diff --git a/gnulib-m4/strerror_r.m4 b/gnulib-m4/strerror_r.m4
index 23c3b423..9b056c0f 100644
--- a/gnulib-m4/strerror_r.m4
+++ b/gnulib-m4/strerror_r.m4
@@ -1,8 +1,10 @@
-# strerror_r.m4 serial 24
-dnl Copyright (C) 2002, 2007-2022 Free Software Foundation, Inc.
+# strerror_r.m4
+# serial 29
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_STRERROR_R],
[
@@ -40,7 +42,7 @@ AC_DEFUN([gl_PREREQ_STRERROR_R], [
AC_REQUIRE([AC_FUNC_STRERROR_R])
dnl glibc >= 2.3.4 and cygwin 1.7.9 have a function __xpg_strerror_r.
AC_CHECK_FUNCS_ONCE([__xpg_strerror_r])
- AC_CHECK_FUNCS_ONCE([catgets])
+ gl_CHECK_FUNCS_ANDROID([catgets], [[#include <nl_types.h>]])
AC_CHECK_FUNCS_ONCE([snprintf])
])
@@ -57,12 +59,12 @@ AC_DEFUN([gl_FUNC_STRERROR_R_WORKS],
AC_REQUIRE([gl_FUNC_STRERROR_0])
- AC_CHECK_FUNCS_ONCE([strerror_r])
+ gl_CHECK_FUNCS_ANDROID([strerror_r], [[#include <string.h>]])
if test $ac_cv_func_strerror_r = yes; then
if test "$GL_GENERATE_ERRNO_H:$REPLACE_STRERROR_0" = false:0; then
dnl The POSIX prototype is: int strerror_r (int, char *, size_t);
dnl glibc, Cygwin: char *strerror_r (int, char *, size_t);
- dnl AIX 5.1, OSF/1 5.1: int strerror_r (int, char *, int);
+ dnl AIX 5.1: int strerror_r (int, char *, int);
AC_CACHE_CHECK([for strerror_r with POSIX signature],
[gl_cv_func_strerror_r_posix_signature],
[AC_COMPILE_IFELSE(
@@ -172,5 +174,9 @@ changequote([,])dnl
fi
fi
fi
+ else
+ case "$gl_cv_onwards_func_strerror_r" in
+ future*) REPLACE_STRERROR_R=1 ;;
+ esac
fi
])
diff --git a/gnulib-m4/string_h.m4 b/gnulib-m4/string_h.m4
index 9e09b96e..93a5d354 100644
--- a/gnulib-m4/string_h.m4
+++ b/gnulib-m4/string_h.m4
@@ -1,11 +1,12 @@
-# Configure a GNU-like replacement for <string.h>.
-
-# Copyright (C) 2007-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# string_h.m4
+# serial 47
+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.
+dnl This file is offered as-is, without any warranty.
-# serial 34
+# Configure a GNU-like replacement for <string.h>.
# Written by Paul Eggert.
@@ -21,9 +22,11 @@ AC_DEFUN_ONCE([gl_STRING_H],
dnl guaranteed by C89.
gl_WARN_ON_USE_PREPARE([[#include <string.h>
]],
- [ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul
- strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r
- strerror_r strerrorname_np sigabbrev_np sigdescr_np strsignal strverscmp])
+ [explicit_bzero ffsl ffsll memmem mempcpy memrchr memset_explicit
+ rawmemchr stpcpy stpncpy strchrnul
+ strdup strncat strncpy strndup strnlen strpbrk strsep strcasestr strtok_r
+ strerror_l strerror_r strerrorname_np
+ sigabbrev_np sigdescr_np strsignal strverscmp])
AC_REQUIRE([AC_C_RESTRICT])
])
@@ -54,12 +57,15 @@ AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMMEM])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMPCPY])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMRCHR])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MEMSET_EXPLICIT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_RAWMEMCHR])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPCPY])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STPNCPY])
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])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNLEN])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPBRK])
@@ -67,6 +73,9 @@ AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRSTR])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRCASESTR])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOK_R])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRNUL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STR_STARTSWITH])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STR_ENDSWITH])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSLEN])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNLEN])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSCHR])
@@ -81,8 +90,11 @@ AC_DEFUN([gl_STRING_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSPN])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSSEP])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSTOK_R])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBS_STARTSWITH])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBS_ENDSWITH])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR_R])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERROR_L])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRERRORNAME_NP])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGABBREV_NP])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGDESCR_NP])
@@ -105,14 +117,17 @@ 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])
HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
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])
@@ -120,6 +135,7 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
HAVE_DECL_STRERROR_R=1; AC_SUBST([HAVE_DECL_STRERROR_R])
+ HAVE_STRERROR_L=1; AC_SUBST([HAVE_STRERROR_L])
HAVE_STRERRORNAME_NP=1; AC_SUBST([HAVE_STRERRORNAME_NP])
HAVE_SIGABBREV_NP=1; AC_SUBST([HAVE_SIGABBREV_NP])
HAVE_SIGDESCR_NP=1; AC_SUBST([HAVE_SIGDESCR_NP])
@@ -128,10 +144,14 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
REPLACE_FFSLL=0; AC_SUBST([REPLACE_FFSLL])
REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
+ REPLACE_MEMPCPY=0; AC_SUBST([REPLACE_MEMPCPY])
+ REPLACE_MEMSET_EXPLICIT=0; AC_SUBST([REPLACE_MEMSET_EXPLICIT])
+ REPLACE_STPCPY=0; AC_SUBST([REPLACE_STPCPY])
REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY])
REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
REPLACE_STRNCAT=0; AC_SUBST([REPLACE_STRNCAT])
+ REPLACE_STRNCPY=0; AC_SUBST([REPLACE_STRNCPY])
REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
REPLACE_STRNLEN=0; AC_SUBST([REPLACE_STRNLEN])
REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
@@ -139,7 +159,9 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
+ REPLACE_STRERROR_L=0; AC_SUBST([REPLACE_STRERROR_L])
REPLACE_STRERRORNAME_NP=0; AC_SUBST([REPLACE_STRERRORNAME_NP])
REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
+ REPLACE_STRVERSCMP=0; AC_SUBST([REPLACE_STRVERSCMP])
UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
])
diff --git a/gnulib-m4/stringeq.m4 b/gnulib-m4/stringeq.m4
new file mode 100644
index 00000000..ffea8afc
--- /dev/null
+++ b/gnulib-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/gnulib-m4/strncat.m4 b/gnulib-m4/strncat.m4
index 627280cf..8af276fc 100644
--- a/gnulib-m4/strncat.m4
+++ b/gnulib-m4/strncat.m4
@@ -1,8 +1,10 @@
-# strncat.m4 serial 6
-dnl Copyright (C) 2002-2004, 2009-2022 Free Software Foundation, Inc.
+# strncat.m4
+# serial 10
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_FUNC_STRNCAT],
[
@@ -15,7 +17,7 @@ AC_DEFUN_ONCE([gl_FUNC_STRNCAT],
AC_CHECK_HEADERS_ONCE([sys/mman.h])
AC_CHECK_FUNCS_ONCE([mprotect])
- dnl Detect bug in Solaris 8..10 on SPARC and Solaris 11.0 on x86:
+ dnl Detect bug in Solaris 8..11.4 on SPARC and Solaris 11.0 on x86:
dnl strncat should not dereference more than n bytes, but always dereferences
dnl n+1 bytes if the first n bytes don't contain a NUL byte.
dnl Assume that strncat works on platforms that lack mprotect.
@@ -27,31 +29,20 @@ AC_DEFUN_ONCE([gl_FUNC_STRNCAT],
# include <unistd.h>
# include <sys/types.h>
# include <sys/mman.h>
-# ifndef MAP_FILE
-# define MAP_FILE 0
-# endif
#endif
]GL_MDA_DEFINES],
[[
char *fence = NULL;
#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
-# if HAVE_MAP_ANONYMOUS
- const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
- const int fd = -1;
-# else /* !HAVE_MAP_ANONYMOUS */
- const int flags = MAP_FILE | MAP_PRIVATE;
- int fd = open ("/dev/zero", O_RDONLY, 0666);
- if (fd >= 0)
-# endif
- {
- int pagesize = getpagesize ();
- char *two_pages =
- (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
- flags, fd, 0);
- if (two_pages != (char *)(-1)
- && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
- fence = two_pages + pagesize;
- }
+ {
+ 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)
{
@@ -84,12 +75,12 @@ AC_DEFUN_ONCE([gl_FUNC_STRNCAT],
]])], [gl_cv_func_strncat_works=yes], [gl_cv_func_strncat_works=no],
[
case "$host_os" in
- # Guess no on Solaris.
- solaris*) gl_cv_func_strncat_works="guessing no" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_strncat_works="guessing yes" ;;
- # Guess yes otherwise.
- *) gl_cv_func_strncat_works="guessing yes" ;;
+ # Guess no on Solaris.
+ solaris*) gl_cv_func_strncat_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_strncat_works="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_strncat_works="guessing yes" ;;
esac
])
])
diff --git a/gnulib-m4/strncpy.m4 b/gnulib-m4/strncpy.m4
new file mode 100644
index 00000000..b94abede
--- /dev/null
+++ b/gnulib-m4/strncpy.m4
@@ -0,0 +1,94 @@
+# strncpy.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN_ONCE([gl_FUNC_STRNCPY],
+[
+ AC_REQUIRE([gl_STRING_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Check for prerequisites for memory fence checks.
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+
+ dnl Detect bug in FreeBSD 15.0 on x86_64:
+ dnl strncpy should not dereference more than n bytes, but always dereferences
+ dnl n+1 bytes if the first n bytes don't contain a NUL byte.
+ dnl Assume that strncpy works on platforms that lack mprotect.
+ AC_CACHE_CHECK([whether strncpy works], [gl_cv_func_strncpy_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <string.h>
+#if HAVE_SYS_MMAN_H
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+#endif
+]GL_MDA_DEFINES],
+[[
+ char *fence = NULL;
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+ {
+ 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)
+ {
+ char dest[8];
+
+ dest[0] = 'a';
+ dest[1] = 'b';
+ dest[2] = 'c';
+ dest[3] = 'd';
+ dest[4] = 'e';
+ dest[5] = 'f';
+ dest[6] = 'g';
+
+ *(fence - 3) = '7';
+ *(fence - 2) = '2';
+ *(fence - 1) = '9';
+
+ if (strncpy (dest + 1, fence - 3, 3) != dest + 1)
+ return 1;
+ if (dest[0] != 'a')
+ return 2;
+ if (dest[1] != '7' || dest[2] != '2' || dest[3] != '9')
+ return 3;
+ if (dest[4] != 'e')
+ return 4;
+ }
+ return 0;
+]])], [gl_cv_func_strncpy_works=yes], [gl_cv_func_strncpy_works=no],
+ [
+ case "$host_os" in
+ # Guess no on FreeBSD.
+ freebsd* | dragonfly*) gl_cv_func_strncpy_works="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_strncpy_works="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_strncpy_works="guessing yes" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_strncpy_works" in
+ *yes) ;;
+ *) REPLACE_STRNCPY=1 ;;
+ esac
+])
+
+# Prerequisites of lib/strncpy.c.
+AC_DEFUN([gl_PREREQ_STRNCPY], [
+ :
+])
diff --git a/gnulib-m4/strstr.m4 b/gnulib-m4/strstr.m4
index 6cc20727..3a9e9c60 100644
--- a/gnulib-m4/strstr.m4
+++ b/gnulib-m4/strstr.m4
@@ -1,8 +1,10 @@
-# strstr.m4 serial 24
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# strstr.m4
+# serial 25
+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.
+dnl This file is offered as-is, without any warranty.
dnl Check that strstr works.
AC_DEFUN([gl_FUNC_STRSTR_SIMPLE],
@@ -12,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(
@@ -94,7 +96,7 @@ static void quit (int sig) { _exit (sig + 128); }
char *haystack = (char *) malloc (2 * m + 2);
char *needle = (char *) malloc (m + 2);
/* Failure to compile this test due to missing alarm is okay,
- since all such platforms (mingw) also have quadratic strstr. */
+ since all such platforms (mingw, MSVC) also have quadratic strstr. */
signal (SIGALRM, quit);
alarm (5);
/* Check for quadratic performance. */
diff --git a/gnulib-m4/symlink.m4 b/gnulib-m4/symlink.m4
index 5be2babb..f6b59f25 100644
--- a/gnulib-m4/symlink.m4
+++ b/gnulib-m4/symlink.m4
@@ -1,10 +1,12 @@
-# serial 9
-# See if we need to provide symlink replacement.
-
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# symlink.m4
+# serial 10
+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.
+dnl This file is offered as-is, without any warranty.
+
+# See if we need to provide symlink replacement.
# Written by Eric Blake.
@@ -38,6 +40,8 @@ AC_DEFUN([gl_FUNC_SYMLINK],
[case "$host_os" in
# Guess yes on Linux systems.
linux-* | linux) gl_cv_func_symlink_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_symlink_works="guessing yes" ;;
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_symlink_works="guessing yes" ;;
# If we don't know, obey --enable-cross-guesses.
diff --git a/gnulib-m4/sys_cdefs_h.m4 b/gnulib-m4/sys_cdefs_h.m4
new file mode 100644
index 00000000..a1398a29
--- /dev/null
+++ b/gnulib-m4/sys_cdefs_h.m4
@@ -0,0 +1,26 @@
+# sys_cdefs_h.m4 - Is <sys/cdefs.h> compatible enough with glibc?
+# serial 2
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN_ONCE([gl_CHECK_HEADER_SYS_CDEFS_H],
+ [AC_CACHE_CHECK([for glibc-compatible sys/cdefs.h],
+ [gl_cv_header_sys_cdefs_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_DEFINES_PROVIDED
+ [#include <sys/cdefs.h>
+ enum { foo = __GNUC_PREREQ (14, 1) } bar;
+ ]],
+ [gl_cv_header_sys_cdefs_h=yes],
+ [gl_cv_header_sys_cdefs_h=no])])
+ if test "$gl_cv_header_sys_cdefs_h" = yes; then
+ HAVE_SYS_CDEFS_H=1
+ else
+ HAVE_SYS_CDEFS_H=0
+ fi
+ AC_SUBST([HAVE_SYS_CDEFS_H])])
diff --git a/gnulib-m4/sys_ioctl_h.m4 b/gnulib-m4/sys_ioctl_h.m4
index be653643..8fa69913 100644
--- a/gnulib-m4/sys_ioctl_h.m4
+++ b/gnulib-m4/sys_ioctl_h.m4
@@ -1,8 +1,10 @@
-# sys_ioctl_h.m4 serial 15
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# sys_ioctl_h.m4
+# serial 15
+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.
+dnl This file is offered as-is, without any warranty.
dnl Written by Bruno Haible.
diff --git a/gnulib-m4/sys_select_h.m4 b/gnulib-m4/sys_select_h.m4
index 2743cd17..ac9fc535 100644
--- a/gnulib-m4/sys_select_h.m4
+++ b/gnulib-m4/sys_select_h.m4
@@ -1,8 +1,10 @@
-# sys_select_h.m4 serial 23
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# sys_select_h.m4
+# serial 24
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SYS_SELECT_H],
[
@@ -11,17 +13,14 @@ AC_DEFUN_ONCE([gl_SYS_SELECT_H],
AC_CACHE_CHECK([whether <sys/select.h> is self-contained],
[gl_cv_header_sys_select_h_selfcontained],
[
- dnl Test against two bugs:
+ dnl Test against a bug:
dnl 1. On many platforms, <sys/select.h> assumes prior inclusion of
dnl <sys/types.h>.
- dnl 2. On OSF/1 4.0, <sys/select.h> provides only a forward declaration
- dnl of 'struct timeval', and no definition of this type.
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]],
- [[struct timeval b;]])],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/select.h>]], [])],
[gl_cv_header_sys_select_h_selfcontained=yes],
[gl_cv_header_sys_select_h_selfcontained=no])
dnl Test against another bug:
- dnl 3. On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
+ dnl 2. On Solaris 10, <sys/select.h> provides an FD_ZERO implementation
dnl that relies on memset(), but without including <string.h>.
if test $gl_cv_header_sys_select_h_selfcontained = yes; then
AC_COMPILE_IFELSE(
diff --git a/gnulib-m4/sys_socket_h.m4 b/gnulib-m4/sys_socket_h.m4
index ba3ae68e..cdc374e4 100644
--- a/gnulib-m4/sys_socket_h.m4
+++ b/gnulib-m4/sys_socket_h.m4
@@ -1,8 +1,10 @@
-# sys_socket_h.m4 serial 29
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+# sys_socket_h.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
dnl From Simon Josefsson.
@@ -11,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 <sys/socket.h> is self-contained],
[gl_cv_header_sys_socket_h_selfcontained],
@@ -51,24 +42,10 @@ AC_DEFUN_ONCE([gl_SYS_SOCKET_H],
fi
# We need to check for ws2tcpip.h now.
gl_PREREQ_SYS_H_SOCKET
- AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[
- /* sys/types.h is not needed according to POSIX, but the
- sys/socket.h in i386-unknown-freebsd4.10 and
- powerpc-apple-darwin5.5 required it. */
-#include <sys/types.h>
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-#ifdef HAVE_WS2TCPIP_H
-#include <ws2tcpip.h>
-#endif
-])
+ gl_PREREQ_SYS_SA_FAMILY
if test $ac_cv_type_struct_sockaddr_storage = no; then
HAVE_STRUCT_SOCKADDR_STORAGE=0
fi
- if test $ac_cv_type_sa_family_t = no; then
- HAVE_SA_FAMILY_T=0
- fi
if test $ac_cv_type_struct_sockaddr_storage != no; then
AC_CHECK_MEMBERS([struct sockaddr_storage.ss_family],
[],
@@ -157,6 +134,32 @@ AC_DEFUN([gl_PREREQ_SYS_H_WS2TCPIP],
AC_SUBST([HAVE_WS2TCPIP_H])
])
+# Common prerequisites of the <sys/socket.h> replacement and of the <sys/un.h>
+# replacement.
+# Sets and substitutes HAVE_SA_FAMILY_T.
+AC_DEFUN([gl_PREREQ_SYS_SA_FAMILY],
+[
+ AC_REQUIRE([gl_CHECK_SOCKET_HEADERS])
+ AC_CHECK_TYPES([struct sockaddr_storage, sa_family_t],,,[
+ /* sys/types.h is not needed according to POSIX, but the
+ sys/socket.h in i386-unknown-freebsd4.10 and
+ powerpc-apple-darwin5.5 required it. */
+#include <sys/types.h>
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+#ifdef HAVE_WS2TCPIP_H
+#include <ws2tcpip.h>
+#endif
+])
+ if test $ac_cv_type_sa_family_t = yes; then
+ HAVE_SA_FAMILY_T=1
+ else
+ HAVE_SA_FAMILY_T=0
+ fi
+ AC_SUBST([HAVE_SA_FAMILY_T])
+])
+
# gl_SYS_SOCKET_MODULE_INDICATOR([modulename])
# sets the shell variable that indicates the presence of the given module
# to a C preprocessor expression that will evaluate to 1.
@@ -201,6 +204,5 @@ AC_DEFUN([gl_SYS_SOCKET_H_DEFAULTS],
HAVE_STRUCT_SOCKADDR_STORAGE=1; AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE])
HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1;
AC_SUBST([HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY])
- HAVE_SA_FAMILY_T=1; AC_SUBST([HAVE_SA_FAMILY_T])
HAVE_ACCEPT4=1; AC_SUBST([HAVE_ACCEPT4])
])
diff --git a/gnulib-m4/sys_stat_h.m4 b/gnulib-m4/sys_stat_h.m4
index 2adbfdee..04dfce7e 100644
--- a/gnulib-m4/sys_stat_h.m4
+++ b/gnulib-m4/sys_stat_h.m4
@@ -1,8 +1,10 @@
-# sys_stat_h.m4 serial 42 -*- Autoconf -*-
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# sys_stat_h.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
dnl From Eric Blake.
dnl Provide a GNU-like <sys/stat.h>.
diff --git a/gnulib-m4/sys_time_h.m4 b/gnulib-m4/sys_time_h.m4
index bc5e2b13..6e48cddb 100644
--- a/gnulib-m4/sys_time_h.m4
+++ b/gnulib-m4/sys_time_h.m4
@@ -1,10 +1,12 @@
-# Configure a replacement for <sys/time.h>.
+# sys_time_h.m4
# serial 12
+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.
+dnl This file is offered as-is, without any warranty.
-# Copyright (C) 2007, 2009-2022 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Configure a replacement for <sys/time.h>.
# Written by Paul Eggert and Martin Lambers.
diff --git a/gnulib-m4/sys_types_h.m4 b/gnulib-m4/sys_types_h.m4
index a5bef220..b284e08e 100644
--- a/gnulib-m4/sys_types_h.m4
+++ b/gnulib-m4/sys_types_h.m4
@@ -1,8 +1,10 @@
-# sys_types_h.m4 serial 13
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# sys_types_h.m4
+# serial 15
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SYS_TYPES_H],
[
@@ -22,6 +24,9 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H],
dnl Whether to override the 'off_t' type.
AC_REQUIRE([gl_TYPE_OFF_T])
+ dnl Whether to define the 'off64_t' type.
+ AC_REQUIRE([gl_TYPE_OFF64_T])
+
dnl Whether to override the 'dev_t' and 'ino_t' types.
m4_ifdef([gl_WINDOWS_STAT_INODES], [
AC_REQUIRE([gl_WINDOWS_STAT_INODES])
@@ -29,6 +34,14 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H],
WINDOWS_STAT_INODES=0
])
AC_SUBST([WINDOWS_STAT_INODES])
+
+ dnl Test whether the 'blksize_t' type is defined.
+ AC_CHECK_TYPE([blksize_t], [HAVE_BLKSIZE_T=1], [HAVE_BLKSIZE_T=0])
+ AC_SUBST([HAVE_BLKSIZE_T])
+
+ dnl Test whether the 'blkcnt_t' type is defined.
+ AC_CHECK_TYPE([blkcnt_t], [HAVE_BLKCNT_T=1], [HAVE_BLKCNT_T=0])
+ AC_SUBST([HAVE_BLKCNT_T])
])
# Initializes the default values for AC_SUBSTed shell variables.
diff --git a/gnulib-m4/sys_uio_h.m4 b/gnulib-m4/sys_uio_h.m4
index 36f55ead..59496e01 100644
--- a/gnulib-m4/sys_uio_h.m4
+++ b/gnulib-m4/sys_uio_h.m4
@@ -1,8 +1,10 @@
-# sys_uio_h.m4 serial 3
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# sys_uio_h.m4
+# serial 3
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN_ONCE([gl_SYS_UIO_H],
[
diff --git a/gnulib-m4/thread.m4 b/gnulib-m4/thread.m4
index 1a8e543c..91f73666 100644
--- a/gnulib-m4/thread.m4
+++ b/gnulib-m4/thread.m4
@@ -1,17 +1,19 @@
-# thread.m4 serial 3
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# thread.m4
+# serial 5
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_THREAD],
[
AC_REQUIRE([gl_THREADLIB])
if test $gl_threads_api = posix; then
- gl_save_LIBS="$LIBS"
+ gl_saved_LIBS="$LIBS"
LIBS="$LIBS $LIBMULTITHREAD"
- AC_CHECK_FUNCS([pthread_atfork])
- LIBS="$gl_save_LIBS"
+ gl_CHECK_FUNCS_ANDROID([pthread_atfork], [[#include <pthread.h>]])
+ LIBS="$gl_saved_LIBS"
fi
])
diff --git a/gnulib-m4/threadlib.m4 b/gnulib-m4/threadlib.m4
index ecb4970a..bdea4b97 100644
--- a/gnulib-m4/threadlib.m4
+++ b/gnulib-m4/threadlib.m4
@@ -1,8 +1,10 @@
-# threadlib.m4 serial 32
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+# threadlib.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
@@ -55,24 +57,12 @@ AC_DEFUN([gl_ANYTHREADLIB_EARLY],
[
AC_REQUIRE([AC_CANONICAL_HOST])
if test -z "$gl_anythreadlib_early_done"; then
- case "$host_os" in
- osf*)
- # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
- # groks <pthread.h>. cc also understands the flag -pthread, but
- # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
- # 2. putting a flag into CPPFLAGS that has an effect on the linker
- # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
- # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
- CPPFLAGS="$CPPFLAGS -D_REENTRANT"
- ;;
- esac
# Some systems optimize for single-threaded programs by default, and
# need special flags to disable these optimizations. For example, the
- # definition of 'errno' in <errno.h>.
- case "$host_os" in
- aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
- solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
- esac
+ # definition of errno in <errno.h>.
+ AS_CASE([$host_os],
+ [aix* | freebsd*], [CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE"],
+ [hpux* | solaris*], [CPPFLAGS="$CPPFLAGS -D_REENTRANT"])
gl_anythreadlib_early_done=done
fi
])
@@ -84,23 +74,26 @@ AC_DEFUN([gl_WEAK_SYMBOLS],
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([whether imported symbols can be declared weak],
[gl_cv_have_weak],
- [case "$host_os" in
- cygwin*)
- dnl On Cygwin 3.2.0 with gcc 10.2, the test below would succeed, but
- dnl programs that use pthread_in_use() with weak symbol references
- dnl crash miserably at runtime.
+ [AS_CASE([$host_os],
+ [cygwin* | mingw* | windows*],
+ [
+ dnl On Cygwin 3.2.0 with gcc 10.2, and likewise on mingw 10.0.0 with
+ dnl gcc 11.3, the test below would succeed, but programs that use
+ dnl pthread_in_use() with weak symbol references crash miserably at
+ dnl runtime.
gl_cv_have_weak="guessing no"
- ;;
- *)
+ ],
+ [
gl_cv_have_weak=no
dnl First, test whether the compiler accepts it syntactically.
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[extern void xyzzy ();
-#pragma weak xyzzy]],
+#pragma weak xyzzy
+ ]],
[[xyzzy();]])],
[gl_cv_have_weak=maybe])
- if test $gl_cv_have_weak = maybe; then
+ AS_IF([test $gl_cv_have_weak = maybe], [
dnl Second, test whether it actually works. On Cygwin 1.7.2, with
dnl gcc 4.3, symbols declared weak always evaluate to the address 0.
AC_RUN_IFELSE(
@@ -123,20 +116,19 @@ int main ()
[gl_cv_have_weak="guessing yes"],
[gl_cv_have_weak="guessing no"])
])
- fi
- ;;
- esac
- dnl But when linking statically, weak symbols don't work.
- case " $LDFLAGS " in
- *" -static "*) gl_cv_have_weak=no ;;
- esac
+ ])
+ ])
+ dnl But when linking statically, weak symbols do not work.
+ AS_CASE([" $LDFLAGS "],
+ [*" -static "*], [gl_cv_have_weak=no])
dnl Test for a bug in FreeBSD 11: A link error occurs when using a weak
dnl symbol and linking against a shared library that has a dependency on
dnl the shared library that defines the symbol.
- case "$gl_cv_have_weak" in
- *yes)
- case "$host_os" in
- freebsd* | dragonfly* | midnightbsd*)
+ AS_CASE([$gl_cv_have_weak],
+ [*yes],
+ [AS_CASE([$host_os],
+ [freebsd* | dragonfly* | midnightbsd*],
+ [
: > conftest1.c
$CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&AS_MESSAGE_LOG_FD 2>&1
cat <<EOF > conftest2.c
@@ -150,17 +142,15 @@ EOF
$CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&AS_MESSAGE_LOG_FD 2>&1 \
|| gl_cv_have_weak=no
rm -f conftest1.c libempty.so conftest2.c conftest
- ;;
- esac
- ;;
- esac
+ ])
+ ])
])
- case "$gl_cv_have_weak" in
- *yes)
+ AS_CASE([$gl_cv_have_weak],
+ [*yes],
+ [
AC_DEFINE([HAVE_WEAK_SYMBOLS], [1],
[Define to 1 if the compiler and linker support weak declarations of symbols.])
- ;;
- esac
+ ])
])
dnl ============================================================================
@@ -174,7 +164,7 @@ dnl Sets the variable LIBPMULTITHREAD, for programs that really need
dnl multithread functionality. The difference between LIBPTHREAD and
dnl LIBPMULTITHREAD is that on platforms supporting weak symbols, typically
dnl LIBPTHREAD is empty whereas LIBPMULTITHREAD is not.
-dnl Sets the variable LIB_SCHED_YIELD to the linker options needed to use the
+dnl Sets the variable SCHED_YIELD_LIB to the linker options needed to use the
dnl sched_yield() function.
dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
dnl multithread-safe programs.
@@ -186,40 +176,34 @@ dnl The guts of gl_PTHREADLIB. Needs to be expanded only once.
AC_DEFUN([gl_PTHREADLIB_BODY],
[
AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
- if test -z "$gl_pthreadlib_body_done"; then
+ AS_IF([test -z "$gl_pthreadlib_body_done"], [
gl_pthread_api=no
LIBPTHREAD=
LIBPMULTITHREAD=
- # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
- # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
AC_CHECK_HEADER([pthread.h],
[gl_have_pthread_h=yes], [gl_have_pthread_h=no])
- if test "$gl_have_pthread_h" = yes; then
+ 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:
# https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
- save_LIBS=$LIBS
- for gl_pthread in '' '-pthread'; do
+ saved_LIBS="$LIBS"
+ for gl_pthread in "" "-pthread"; do
LIBS="$LIBS $gl_pthread"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[#include <pthread.h>
pthread_mutex_t m;
- pthread_mutexattr_t ma;
]],
- [[pthread_mutex_lock (&m);
- pthread_mutexattr_init (&ma);]])],
+ [[pthread_mutex_lock (&m);]])],
[gl_pthread_api=yes
LIBPTHREAD=$gl_pthread
LIBPMULTITHREAD=$gl_pthread])
- LIBS=$save_LIBS
+ LIBS="$saved_LIBS"
test $gl_pthread_api = yes && break
done
echo "$as_me:__oline__: gl_pthread_api=$gl_pthread_api" >&AS_MESSAGE_LOG_FD
@@ -228,8 +212,9 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
gl_pthread_in_glibc=no
# On Linux with glibc >= 2.34, libc contains the fully functional
# pthread functions.
- case "$host_os" in
- linux*)
+ AS_CASE([$host_os],
+ [linux*],
+ [
AC_EGREP_CPP([Lucky user],
[#include <features.h>
#ifdef __GNU_LIBRARY__
@@ -240,19 +225,17 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
],
[gl_pthread_in_glibc=yes],
[])
- ;;
- esac
+ ])
echo "$as_me:__oline__: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&AS_MESSAGE_LOG_FD
- # Test for libpthread by looking for pthread_kill. (Not pthread_self,
- # since it is defined as a macro on OSF/1.)
- if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
+ # 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.
AC_CHECK_LIB([pthread], [pthread_kill],
- [if test $gl_pthread_in_glibc = yes; then
+ [AS_IF([test $gl_pthread_in_glibc = yes], [
LIBPMULTITHREAD=
- else
+ ], [
LIBPMULTITHREAD=-lpthread
# On Solaris and HP-UX, most pthread functions exist also in libc.
# Therefore pthread_in_use() needs to actually try to create a
@@ -260,54 +243,68 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
# pthread_create will actually create a thread.
# On Solaris 10 or newer, this test is no longer needed, because
# libc contains the fully functional pthread functions.
- case "$host_os" in
- solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
- AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
- [Define if the pthread_in_use() detection is hard.])
- esac
- fi
+ AS_CASE([$host_os],
+ [[solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*]],
+ [
+ AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+ [Define if the pthread_in_use() detection is hard.])
+ ])
+ ])
+ ],
+ [dnl This is needed on FreeBSD 5.2.1.
+ AC_CHECK_LIB([thr], [pthread_kill],
+ [if test $gl_pthread_in_glibc = yes; then
+ LIBPMULTITHREAD=
+ else
+ LIBPMULTITHREAD=-lthr
+ fi
+ ])
])
- elif test $gl_pthread_api != yes; then
+ ], [test $gl_pthread_api != yes], [
# Some library is needed. Try libpthread and libc_r.
AC_CHECK_LIB([pthread], [pthread_kill],
[gl_pthread_api=yes
LIBPTHREAD=-lpthread
LIBPMULTITHREAD=-lpthread])
- if test $gl_pthread_api != yes; then
+ AS_IF([test $gl_pthread_api != yes], [
# For FreeBSD 4.
AC_CHECK_LIB([c_r], [pthread_kill],
[gl_pthread_api=yes
LIBPTHREAD=-lc_r
LIBPMULTITHREAD=-lc_r])
- fi
- fi
+ ])
+ ])
echo "$as_me:__oline__: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&AS_MESSAGE_LOG_FD
- fi
+ ])
AC_MSG_CHECKING([whether POSIX threads API is available])
AC_MSG_RESULT([$gl_pthread_api])
AC_SUBST([LIBPTHREAD])
AC_SUBST([LIBPMULTITHREAD])
- if test $gl_pthread_api = yes; then
+ AS_IF([test $gl_pthread_api = yes], [
AC_DEFINE([HAVE_PTHREAD_API], [1],
[Define if you have the <pthread.h> header and the POSIX threads API.])
- fi
+ ])
dnl On some systems, sched_yield is in librt, rather than in libpthread.
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
- [[#include <sched.h>]],
+ [[#include <sched.h>
+ ]],
[[sched_yield ();]])],
- [LIB_SCHED_YIELD=
+ [SCHED_YIELD_LIB=
],
[dnl Solaris 7...10 has sched_yield in librt, not in libpthread or libc.
- AC_CHECK_LIB([rt], [sched_yield], [LIB_SCHED_YIELD=-lrt],
+ AC_CHECK_LIB([rt], [sched_yield], [SCHED_YIELD_LIB=-lrt],
[dnl Solaris 2.5.1, 2.6 has sched_yield in libposix4, not librt.
- AC_CHECK_LIB([posix4], [sched_yield], [LIB_SCHED_YIELD=-lposix4])])
+ AC_CHECK_LIB([posix4], [sched_yield], [SCHED_YIELD_LIB=-lposix4])])
])
+ AC_SUBST([SCHED_YIELD_LIB])
+ dnl For backward compatibility.
+ LIB_SCHED_YIELD="$SCHED_YIELD_LIB"
AC_SUBST([LIB_SCHED_YIELD])
gl_pthreadlib_body_done=done
- fi
+ ])
])
AC_DEFUN([gl_PTHREADLIB],
@@ -334,44 +331,45 @@ AC_DEFUN([gl_STDTHREADLIB_BODY],
[
AC_REQUIRE([gl_ANYTHREADLIB_EARLY])
AC_REQUIRE([AC_CANONICAL_HOST])
- if test -z "$gl_stdthreadlib_body_done"; then
+ AS_IF([test -z "$gl_stdthreadlib_body_done"], [
AC_CHECK_HEADERS_ONCE([threads.h])
- case "$host_os" in
- mingw*)
+ AS_CASE([$host_os],
+ [mingw* | windows*],
+ [
LIBSTDTHREAD=
- ;;
- *)
+ ],
+ [
gl_PTHREADLIB_BODY
- if test $ac_cv_header_threads_h = yes; then
+ AS_IF([test $ac_cv_header_threads_h = yes], [
dnl glibc >= 2.29 has thrd_create in libpthread.
dnl FreeBSD >= 10 has thrd_create in libstdthreads; this library depends
- dnl on libpthread (for the symbol 'pthread_mutexattr_gettype').
+ dnl on libpthread (for the symbol pthread_mutexattr_gettype).
dnl glibc >= 2.34, AIX >= 7.1, and Solaris >= 11.4 have thrd_create in
dnl libc.
- AC_CHECK_FUNCS([thrd_create])
- if test $ac_cv_func_thrd_create = yes; then
+ gl_CHECK_FUNCS_ANDROID([thrd_create], [[#include <threads.h>
+ ]])
+ AS_IF([test $ac_cv_func_thrd_create = yes], [
LIBSTDTHREAD=
- else
+ ], [
AC_CHECK_LIB([stdthreads], [thrd_create], [
- LIBSTDTHREAD='-lstdthreads -lpthread'
+ LIBSTDTHREAD="-lstdthreads -lpthread"
], [
dnl Guess that thrd_create is in libpthread.
LIBSTDTHREAD="$LIBPMULTITHREAD"
])
- fi
- else
+ ])
+ ], [
dnl Libraries needed by thrd.c, mtx.c, cnd.c, tss.c.
- LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
- fi
- ;;
- esac
+ LIBSTDTHREAD="$LIBPMULTITHREAD $SCHED_YIELD_LIB"
+ ])
+ ])
AC_SUBST([LIBSTDTHREAD])
AC_MSG_CHECKING([whether ISO C threads API is available])
AC_MSG_RESULT([$ac_cv_header_threads_h])
gl_stdthreadlib_body_done=done
- fi
+ ])
])
AC_DEFUN([gl_STDTHREADLIB],
@@ -388,7 +386,7 @@ dnl ------------
dnl Tests for a multithreading library to be used.
dnl If the configure.ac contains a definition of the gl_THREADLIB_DEFAULT_NO
dnl (it must be placed before the invocation of gl_THREADLIB_EARLY!), then the
-dnl default is 'no', otherwise it is system dependent. In both cases, the user
+dnl default is "no", otherwise it is system dependent. In both cases, the user
dnl can change the choice through the options --enable-threads=choice or
dnl --disable-threads.
dnl Defines at most one of the macros USE_ISOC_THREADS, USE_POSIX_THREADS,
@@ -433,49 +431,46 @@ AC_DEFUN([gl_THREADLIB_EARLY_BODY],
m4_ifdef([gl_THREADLIB_DEFAULT_NO],
[m4_divert_text([DEFAULTS], [gl_use_threads_default=no])],
[m4_divert_text([DEFAULTS], [gl_use_threads_default=])])
- m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=])
+ dnl gl_use_winpthreads_default defaults to "no", because in mingw 10, like
+ dnl in mingw 5, the use of libwinpthread still makes test-pthread-tss crash.
+ m4_divert_text([DEFAULTS], [gl_use_winpthreads_default=no])
+ 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
-changequote(,)dnl
- case "$host_os" in
- dnl Disable multithreading by default on OSF/1, because it interferes
- dnl with fork()/exec(): When msgexec is linked with -lpthread, its
- dnl child process gets an endless segmentation fault inside execvp().
- osf*) gl_use_threads=no ;;
+ AS_CASE([$host_os],
dnl Disable multithreading by default on Cygwin 1.5.x, because it has
dnl bugs that lead to endless loops or crashes. See
dnl <https://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
- cygwin*)
- case `uname -r` in
- 1.[0-5].*) gl_use_threads=no ;;
- *) gl_use_threads=yes ;;
- esac
- ;;
+ [cygwin*],
+ [AS_CASE([$(uname -r)],
+ [[1.[0-5].*]], [gl_use_threads=no],
+ [gl_use_threads=yes])
+ ],
dnl Obey gl_AVOID_WINPTHREAD on mingw.
- mingw*)
- case "$gl_use_winpthreads_default" in
- yes) gl_use_threads=posix ;;
- no) gl_use_threads=windows ;;
- *) gl_use_threads=yes ;;
- esac
- ;;
- *) gl_use_threads=yes ;;
- esac
-changequote([,])dnl
+ [mingw* | windows*],
+ [AS_CASE([$gl_use_winpthreads_default],
+ [yes], [gl_use_threads=posix],
+ [no], [gl_use_threads=windows],
+ [gl_use_threads=yes])
+ ],
+ [gl_use_threads=yes])
fi
])
- if test "$gl_use_threads" = yes \
- || test "$gl_use_threads" = isoc \
- || test "$gl_use_threads" = posix \
- || test "$gl_use_threads" = isoc+posix; then
- # For using <threads.h> or <pthread.h>:
- gl_ANYTHREADLIB_EARLY
- fi
+ AS_CASE([$gl_use_threads],
+ [yes | isoc | posix | isoc+posix],
+ [
+ # For using <threads.h> or <pthread.h>:
+ gl_ANYTHREADLIB_EARLY
+ ])
])
dnl The guts of gl_THREADLIB. Needs to be expanded only once.
@@ -488,86 +483,95 @@ AC_DEFUN([gl_THREADLIB_BODY],
LTLIBTHREAD=
LIBMULTITHREAD=
LTLIBMULTITHREAD=
- if test "$gl_use_threads" != no; then
+ AS_IF([test "$gl_use_threads" = no],
+ [AC_DEFINE([AVOID_ANY_THREADS], [1],
+ [Define if no multithread safety and no multithreading is desired.])],
+ [
dnl Check whether the compiler and linker support weak declarations.
gl_WEAK_SYMBOLS
- if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
- dnl If we use weak symbols to implement pthread_in_use / pth_in_use /
- dnl thread_in_use, we also need to test whether the ISO C 11 thrd_create
- dnl facility is in use.
- AC_CHECK_HEADERS_ONCE([threads.h])
- :
- fi
- if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then
- AC_CHECK_HEADERS_ONCE([threads.h])
- gl_have_isoc_threads="$ac_cv_header_threads_h"
- fi
- if test "$gl_use_threads" = yes \
- || test "$gl_use_threads" = posix \
- || test "$gl_use_threads" = isoc+posix; then
- gl_PTHREADLIB_BODY
- LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
- LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
- if test $gl_pthread_api = yes; then
- if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then
- gl_threads_api='isoc+posix'
- AC_DEFINE([USE_ISOC_AND_POSIX_THREADS], [1],
- [Define if the combination of the ISO C and POSIX multithreading APIs can be used.])
- LIBTHREAD= LTLIBTHREAD=
- else
- gl_threads_api=posix
- AC_DEFINE([USE_POSIX_THREADS], [1],
- [Define if the POSIX multithreading library can be used.])
- if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then
- AC_DEFINE([USE_POSIX_THREADS_FROM_LIBC], [1],
- [Define if references to the POSIX multithreading library are satisfied by libc.])
- else
- if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then
- AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
- [Define if references to the POSIX multithreading library should be made weak.])
- LIBTHREAD= LTLIBTHREAD=
- else
- case "$host_os" in
- freebsd* | dragonfly* | midnightbsd*)
- if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
- dnl If weak symbols can't tell whether pthread_create(), pthread_key_create()
- dnl etc. will succeed, we need a runtime test.
- AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
- [Define if the pthread_in_use() detection is hard.])
- fi
- ;;
- esac
- fi
- fi
- fi
- fi
- fi
- if test $gl_threads_api = none; then
- if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then
+ AS_CASE([$gl_cv_have_weak],
+ [*yes],
+ [
+ dnl If we use weak symbols to implement pthread_in_use / pth_in_use /
+ dnl thread_in_use, we also need to test whether the ISO C 11 thrd_create
+ dnl facility is in use.
+ AC_CHECK_HEADERS_ONCE([threads.h])
+ :
+ ])
+ AS_CASE([$gl_use_threads],
+ [isoc | isoc+posix],
+ [
+ AC_CHECK_HEADERS_ONCE([threads.h])
+ gl_have_isoc_threads="$ac_cv_header_threads_h"
+ ])
+ AS_CASE([$gl_use_threads],
+ [yes | posix | isoc+posix],
+ [
+ gl_PTHREADLIB_BODY
+ LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD
+ LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD
+ AS_IF([test $gl_pthread_api = yes], [
+ AS_IF([test "$gl_use_threads" = isoc+posix &&
+ test "$gl_have_isoc_threads" = yes], [
+ gl_threads_api="isoc+posix"
+ AC_DEFINE([USE_ISOC_AND_POSIX_THREADS], [1],
+ [Define if the combination of the ISO C and POSIX multithreading APIs can be used.])
+ LIBTHREAD= LTLIBTHREAD=
+ ], [
+ gl_threads_api=posix
+ AC_DEFINE([USE_POSIX_THREADS], [1],
+ [Define if the POSIX multithreading library can be used.])
+ AS_IF([test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"], [
+ AC_DEFINE([USE_POSIX_THREADS_FROM_LIBC], [1],
+ [Define if references to the POSIX multithreading library are satisfied by libc.])
+ ], [
+ AS_CASE([$gl_cv_have_weak],
+ [*yes],
+ [
+ AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
+ [Define if references to the POSIX multithreading library should be made weak.])
+ LIBTHREAD= LTLIBTHREAD=
+ ],
+ [AS_CASE([$host_os],
+ [freebsd* | dragonfly* | midnightbsd*],
+ [
+ AS_IF([test "x$LIBTHREAD" != "x$LIBMULTITHREAD"], [
+ dnl If weak symbols cannot tell whether
+ dnl pthread_create(), dnl pthread_key_create()
+ dnl etc. will succeed, we need a runtime test.
+ AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+ [Define if the pthread_in_use() detection is hard.])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ])
+ AS_IF([test $gl_threads_api = none], [
+ AS_IF([test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes], [
gl_STDTHREADLIB_BODY
LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD
LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD
gl_threads_api=isoc
AC_DEFINE([USE_ISOC_THREADS], [1],
[Define if the ISO C multithreading library can be used.])
- fi
- fi
- if test $gl_threads_api = none; then
- case "$gl_use_threads" in
- yes | windows | win32) # The 'win32' is for backward compatibility.
- if { case "$host_os" in
- mingw*) true;;
- *) false;;
- esac
- }; then
- gl_threads_api=windows
- AC_DEFINE([USE_WINDOWS_THREADS], [1],
- [Define if the native Windows multithreading API can be used.])
- fi
- ;;
- esac
- fi
- fi
+ ])
+ ])
+ AS_IF([test $gl_threads_api = none], [
+ # The "win32" is for backward compatibility.
+ AS_CASE([$gl_use_threads],
+ [yes | windows | win32],
+ [AS_CASE([$host_os],
+ [mingw* | windows*],
+ [
+ gl_threads_api=windows
+ AC_DEFINE([USE_WINDOWS_THREADS], [1],
+ [Define if the native Windows multithreading API can be used.])
+ ])
+ ])
+ ])
+ ])
AC_MSG_CHECKING([for multithread API to use])
AC_MSG_RESULT([$gl_threads_api])
AC_SUBST([LIBTHREAD])
@@ -587,7 +591,7 @@ dnl gl_DISABLE_THREADS
dnl ------------------
dnl Sets the gl_THREADLIB default so that threads are not used by default.
dnl The user can still override it at installation time, by using the
-dnl configure option '--enable-threads'.
+dnl configure option "--enable-threads".
AC_DEFUN([gl_DISABLE_THREADS], [
m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
@@ -599,7 +603,8 @@ dnl -------------------
dnl Sets the gl_THREADLIB default so that on mingw, a dependency to the
dnl libwinpthread DLL (mingw-w64 winpthreads library) is avoided.
dnl The user can still override it at installation time, by using the
-dnl configure option '--enable-threads'.
+dnl configure option "--enable-threads=posix".
+dnl As of 2023, this is now the default.
AC_DEFUN([gl_AVOID_WINPTHREAD], [
m4_divert_text([INIT_PREPARE], [gl_use_winpthreads_default=no])
@@ -644,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/gnulib-m4/time.m4 b/gnulib-m4/time.m4
new file mode 100644
index 00000000..5cacb701
--- /dev/null
+++ b/gnulib-m4/time.m4
@@ -0,0 +1,52 @@
+# time.m4
+# serial 6
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_FUNC_TIME],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ dnl glibc has the bug https://sourceware.org/PR30200 .
+ AC_CACHE_CHECK([whether time() works],
+ [gl_cv_func_time_works],
+ [dnl Guess that it works except on
+ dnl - glibc >= 2.31 with Linux. And binaries produced on glibc < 2.31
+ dnl need to run fine on newer glibc versions as well; therefore ignore
+ dnl __GLIBC_MINOR__.
+ dnl - FreeBSD, on machines with 2 or more CPUs,
+ dnl - AIX,
+ dnl - native Windows.
+ case "$host_os" in
+ linux*-gnu*)
+ AC_EGREP_CPP([Unlucky], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if __GLIBC__ == 2
+ Unlucky GNU user
+ #endif
+ #endif
+ ],
+ [gl_cv_func_time_works="guessing no"],
+ [gl_cv_func_time_works="guessing yes"])
+ ;;
+ freebsd*) gl_cv_func_time_works="guessing no";;
+ aix*) gl_cv_func_time_works="guessing no";;
+ mingw* | windows*) gl_cv_func_time_works="guessing no";;
+ *) gl_cv_func_time_works="guessing yes";;
+ esac
+ ])
+ case "$gl_cv_func_time_works" in
+ *no) REPLACE_TIME=1 ;;
+ esac
+])
+
+# Prerequisites of lib/time.c.
+AC_DEFUN([gl_PREREQ_TIME],
+[
+ :
+])
diff --git a/gnulib-m4/time_h.m4 b/gnulib-m4/time_h.m4
index 4ac8fd00..8d896ea5 100644
--- a/gnulib-m4/time_h.m4
+++ b/gnulib-m4/time_h.m4
@@ -1,12 +1,13 @@
-# Configure a more-standard replacement for <time.h>.
-
-# Copyright (C) 2000-2001, 2003-2007, 2009-2022 Free Software Foundation, Inc.
-
-# serial 20
+# time_h.m4
+# serial 27
+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,
+dnl with or without modifications, as long as this notice is preserved.
+dnl This file is offered as-is, without any warranty.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Configure a more-standard replacement for <time.h>.
# Written by Paul Eggert and Jim Meyering.
@@ -23,7 +24,10 @@ AC_DEFUN_ONCE([gl_TIME_H],
dnl corresponding gnulib module is not in use.
gl_WARN_ON_USE_PREPARE([[
#include <time.h>
- ]], [asctime_r ctime_r])
+ ]], [
+ asctime asctime_r ctime ctime_r gmtime_r localtime localtime_r mktime
+ nanosleep strftime strptime time timegm timespec_get timespec_getres tzset
+ ])
AC_REQUIRE([AC_C_RESTRICT])
@@ -137,11 +141,13 @@ AC_DEFUN([gl_TIME_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_NANOSLEEP])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRFTIME])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRPTIME])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMEGM])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GET])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIMESPEC_GETRES])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_R])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TIME_RZ])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZNAME])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TZSET])
dnl Support Microsoft deprecated alias function names by default.
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_TZSET], [1])
@@ -159,25 +165,21 @@ AC_DEFUN([gl_TIME_H_DEFAULTS],
HAVE_TIMEGM=1; AC_SUBST([HAVE_TIMEGM])
HAVE_TIMESPEC_GET=1; AC_SUBST([HAVE_TIMESPEC_GET])
HAVE_TIMESPEC_GETRES=1; AC_SUBST([HAVE_TIMESPEC_GETRES])
- dnl Even GNU libc does not have timezone_t yet.
+ dnl Even GNU libc does not have timezone_t and tzalloc() yet.
HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T])
- dnl If another module says to replace or to not replace, do that.
- dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
- dnl this lets maintainers check for portability.
- REPLACE_CTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_CTIME])
- REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
- REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
- REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
- REPLACE_STRFTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRFTIME])
- REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
- REPLACE_TZSET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TZSET])
-
- dnl Hack so that the time module doesn't depend on the sys_time module.
- dnl First, default GNULIB_GETTIMEOFDAY to 0 if sys_time is absent.
- : ${GNULIB_GETTIMEOFDAY=0}; AC_SUBST([GNULIB_GETTIMEOFDAY])
- dnl Second, it's OK to not use GNULIB_PORTCHECK for REPLACE_GMTIME
- dnl and REPLACE_LOCALTIME, as portability to Solaris 2.6 and earlier
- dnl is no longer a big deal.
+ HAVE_TZALLOC=0; AC_SUBST([HAVE_TZALLOC])
+ REPLACE_CTIME=0; AC_SUBST([REPLACE_CTIME])
REPLACE_GMTIME=0; AC_SUBST([REPLACE_GMTIME])
REPLACE_LOCALTIME=0; AC_SUBST([REPLACE_LOCALTIME])
+ REPLACE_LOCALTIME_R=0; AC_SUBST([REPLACE_LOCALTIME_R])
+ REPLACE_LOCALTIME_RZ=0; AC_SUBST([REPLACE_LOCALTIME_RZ])
+ REPLACE_MKTIME=0; AC_SUBST([REPLACE_MKTIME])
+ REPLACE_MKTIME_Z=0; AC_SUBST([REPLACE_MKTIME_Z])
+ REPLACE_NANOSLEEP=0; AC_SUBST([REPLACE_NANOSLEEP])
+ REPLACE_STRFTIME=0; AC_SUBST([REPLACE_STRFTIME])
+ REPLACE_TIME=0; AC_SUBST([REPLACE_TIME])
+ REPLACE_TIMEGM=0; AC_SUBST([REPLACE_TIMEGM])
+ REPLACE_TIMESPEC_GET=0; AC_SUBST([REPLACE_TIMESPEC_GET])
+ REPLACE_TIMESPEC_GETRES=0; AC_SUBST([REPLACE_TIMESPEC_GETRES])
+ REPLACE_TZSET=0; AC_SUBST([REPLACE_TZSET])
])
diff --git a/gnulib-m4/uchar_h.m4 b/gnulib-m4/uchar_h.m4
new file mode 100644
index 00000000..20b63b6c
--- /dev/null
+++ b/gnulib-m4/uchar_h.m4
@@ -0,0 +1,279 @@
+# uchar_h.m4
+# serial 32
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl From Bruno Haible.
+dnl Prepare the overridden <uchar.h>.
+
+AC_DEFUN_ONCE([gl_UCHAR_H],
+[
+ AC_REQUIRE([gl_UCHAR_H_DEFAULTS])
+
+ gl_CHECK_NEXT_HEADERS([uchar.h])
+ if test $ac_cv_header_uchar_h = yes; then
+ HAVE_UCHAR_H=1
+ else
+ HAVE_UCHAR_H=0
+ fi
+ AC_SUBST([HAVE_UCHAR_H])
+
+ dnl On macOS 15, in C mode, <uchar.h> does not exist. But in C++ mode,
+ dnl it exists, and we need to #include_next it, otherwise we get an error
+ dnl "<cuchar> tried including <uchar.h> but didn't find libc++'s <uchar.h>
+ dnl header."
+ m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
+ CXX_HAVE_UCHAR_H=0
+ if test "$CXX" != no; then
+ AC_CACHE_CHECK([whether the C++ compiler has <uchar.h>],
+ [gl_cv_cxx_have_uchar_h],
+ [dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to
+ dnl an autoconf bug <https://savannah.gnu.org/support/?110294>.
+ cat > conftest.cpp <<\EOF
+#include <uchar.h>
+EOF
+ gl_command="$CXX $CXXFLAGS $CPPFLAGS -c conftest.cpp"
+ if AC_TRY_EVAL([gl_command]); then
+ gl_cv_cxx_have_uchar_h=yes
+ else
+ gl_cv_cxx_have_uchar_h=no
+ fi
+ rm -fr conftest*
+ ])
+ if test $gl_cv_cxx_have_uchar_h = yes; then
+ CXX_HAVE_UCHAR_H=1
+ fi
+ fi
+ AC_SUBST([CXX_HAVE_UCHAR_H])
+
+ gl_TYPE_CHAR8_T
+ gl_TYPE_CHAR16_T
+ gl_TYPE_CHAR32_T
+
+ dnl In C++ mode, clang defines 'char16_t' and 'char32_t' as built-in types
+ dnl on some platforms (e.g. OpenBSD 6.7), and as types defined by many
+ dnl header files (<limits.h>, <stddef.h>, <stdint.h>, <stdio.h>, <stdlib.h>
+ dnl and others) on some platforms (e.g. Mac OS X 10.13).
+ dnl The same thing may also happen for 'char8_t'; so, be prepared for it.
+ m4_ifdef([gl_ANSI_CXX], [AC_REQUIRE([gl_ANSI_CXX])])
+ CXX_HAS_UCHAR_TYPES=0
+ if test $HAVE_UCHAR_H = 0; then
+ if test "$CXX" != no; then
+ AC_CACHE_CHECK([whether the C++ compiler predefines the <uchar.h> types],
+ [gl_cv_cxx_has_uchar_types],
+ [dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to
+ dnl an autoconf bug <https://savannah.gnu.org/support/?110294>.
+ cat > conftest.cpp <<\EOF
+#include <stddef.h>
+char16_t a;
+char32_t b;
+EOF
+ gl_command="$CXX $CXXFLAGS $CPPFLAGS -c conftest.cpp"
+ if AC_TRY_EVAL([gl_command]); then
+ gl_cv_cxx_has_uchar_types=yes
+ else
+ gl_cv_cxx_has_uchar_types=no
+ fi
+ rm -fr conftest*
+ ])
+ if test $gl_cv_cxx_has_uchar_types = yes; then
+ CXX_HAS_UCHAR_TYPES=1
+ fi
+ fi
+ fi
+ AC_SUBST([CXX_HAS_UCHAR_TYPES])
+ CXX_HAS_CHAR8_TYPE=0
+ if test $HAVE_UCHAR_H = 0; then
+ if test "$CXX" != no; then
+ AC_CACHE_CHECK([whether the C++ compiler predefines the char8_t type],
+ [gl_cv_cxx_has_char8_type],
+ [dnl We can't use AC_LANG_PUSH([C++]) and AC_LANG_POP([C++]) here, due to
+ dnl an autoconf bug <https://savannah.gnu.org/support/?110294>.
+ cat > conftest.cpp <<\EOF
+#include <stddef.h>
+char8_t a;
+EOF
+ gl_command="$CXX $CXXFLAGS $CPPFLAGS -c conftest.cpp"
+ if AC_TRY_EVAL([gl_command]); then
+ gl_cv_cxx_has_char8_type=yes
+ else
+ gl_cv_cxx_has_char8_type=no
+ fi
+ rm -fr conftest*
+ ])
+ if test $gl_cv_cxx_has_char8_type = yes; then
+ CXX_HAS_CHAR8_TYPE=1
+ fi
+ fi
+ fi
+ AC_SUBST([CXX_HAS_CHAR8_TYPE])
+
+ dnl Test whether a 'char32_t' can hold more characters than a 'wchar_t'.
+ gl_STDINT_BITSIZEOF([wchar_t], [gl_STDINT_INCLUDES])
+ if test $BITSIZEOF_WCHAR_T -lt 32; then
+ SMALL_WCHAR_T=1
+ else
+ SMALL_WCHAR_T=0
+ fi
+ dnl SMALL_WCHAR_T is expected to be 1 on 32-bit AIX, Cygwin, native Windows.
+ AC_SUBST([SMALL_WCHAR_T])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+ dnl guaranteed by C11.
+ gl_WARN_ON_USE_PREPARE([[
+ #ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ ]], [c32rtomb mbrtoc16 mbrtoc32])
+])
+
+AC_DEFUN_ONCE([gl_TYPE_CHAR8_T],
+[
+ dnl Determine whether gnulib's <uchar.h> would, if present, override char8_t.
+ AC_CACHE_CHECK([whether char8_t is correctly defined],
+ [gl_cv_type_char8_t_works],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ int verify[(char8_t)(-1) >= 0 && sizeof (char8_t) == sizeof (unsigned char) ? 1 : -1];
+ ]])
+ ],
+ [gl_cv_type_char8_t_works=yes],
+ [gl_cv_type_char8_t_works=no])
+ ])
+ if test $gl_cv_type_char8_t_works = no; then
+ GNULIBHEADERS_OVERRIDE_CHAR8_T=1
+ else
+ GNULIBHEADERS_OVERRIDE_CHAR8_T=0
+ fi
+ AC_SUBST([GNULIBHEADERS_OVERRIDE_CHAR8_T])
+])
+
+dnl On Haiku 2020, char16_t and char32_t are incorrectly defined.
+dnl See <https://dev.haiku-os.org/ticket/15990>.
+AC_DEFUN_ONCE([gl_TYPE_CHAR16_T],
+[
+ dnl Determine whether gnulib's <uchar.h> would, if present, override char16_t.
+ AC_CACHE_CHECK([whether char16_t is correctly defined],
+ [gl_cv_type_char16_t_works],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ /* For simplicity, assume that uint16_least_t is equivalent to
+ 'unsigned short'. */
+ int verify[(char16_t)(-1) >= 0 && sizeof (char16_t) == sizeof (unsigned short) ? 1 : -1];
+ ]])
+ ],
+ [gl_cv_type_char16_t_works=yes],
+ [gl_cv_type_char16_t_works=no])
+ ])
+ if test $gl_cv_type_char16_t_works = no; then
+ GNULIBHEADERS_OVERRIDE_CHAR16_T=1
+ else
+ GNULIBHEADERS_OVERRIDE_CHAR16_T=0
+ fi
+ AC_SUBST([GNULIBHEADERS_OVERRIDE_CHAR16_T])
+])
+AC_DEFUN_ONCE([gl_TYPE_CHAR32_T],
+[
+ dnl Determine whether gnulib's <uchar.h> would, if present, override char32_t.
+ AC_CACHE_CHECK([whether char32_t is correctly defined],
+ [gl_cv_type_char32_t_works],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ /* For simplicity, assume that uint32_least_t is equivalent to
+ 'unsigned int'. */
+ int verify[(char32_t)(-1) >= 0 && sizeof (char32_t) == sizeof (unsigned int) ? 1 : -1];
+ ]])
+ ],
+ [gl_cv_type_char32_t_works=yes],
+ [gl_cv_type_char32_t_works=no])
+ ])
+ if test $gl_cv_type_char32_t_works = no; then
+ GNULIBHEADERS_OVERRIDE_CHAR32_T=1
+ else
+ GNULIBHEADERS_OVERRIDE_CHAR32_T=0
+ fi
+ AC_SUBST([GNULIBHEADERS_OVERRIDE_CHAR32_T])
+])
+
+# gl_UCHAR_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_UCHAR_MODULE_INDICATOR],
+[
+ dnl Ensure to expand the default settings once only.
+ gl_UCHAR_H_REQUIRE_DEFAULTS
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd. It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_UCHAR_H_REQUIRE_DEFAULTS],
+[
+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_UCHAR_H_MODULE_INDICATOR_DEFAULTS], [
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BTOC32])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISALNUM])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISALPHA])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISBLANK])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISCNTRL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISDIGIT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISGRAPH])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISLOWER])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISPRINT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISPUNCT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISSPACE])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISUPPER])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32ISXDIGIT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32TOLOWER])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32TOUPPER])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32WIDTH])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32RTOMB])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32SNRTOMBS])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32SRTOMBS])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32STOMBS])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32SWIDTH])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32TOB])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32_APPLY_MAPPING])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32_APPLY_TYPE_TEST])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32_GET_MAPPING])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_C32_GET_TYPE_TEST])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRTOC16])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRTOC32])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSNRTOC32S])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRTOC32S])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSTOC32S])
+ ])
+ m4_require(GL_MODULE_INDICATOR_PREFIX[_UCHAR_H_MODULE_INDICATOR_DEFAULTS])
+ AC_REQUIRE([gl_UCHAR_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_UCHAR_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_C32RTOMB=1; AC_SUBST([HAVE_C32RTOMB])
+ HAVE_MBRTOC16=1; AC_SUBST([HAVE_MBRTOC16])
+ HAVE_MBRTOC32=1; AC_SUBST([HAVE_MBRTOC32])
+ REPLACE_C32RTOMB=0; AC_SUBST([REPLACE_C32RTOMB])
+ REPLACE_MBRTOC16=0; AC_SUBST([REPLACE_MBRTOC16])
+ REPLACE_MBRTOC32=0; AC_SUBST([REPLACE_MBRTOC32])
+])
diff --git a/gnulib-m4/unicase_h.m4 b/gnulib-m4/unicase_h.m4
new file mode 100644
index 00000000..71dccf06
--- /dev/null
+++ b/gnulib-m4/unicase_h.m4
@@ -0,0 +1,45 @@
+# unicase_h.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN_ONCE([gl_UNICASE_H],
+[
+ dnl Ensure to expand the default settings once only, before all statements
+ dnl that occur in other macros.
+ AC_REQUIRE([gl_UNICASE_H_DEFAULTS])
+])
+
+# gl_UNICASE_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_UNICASE_MODULE_INDICATOR],
+[
+ dnl Ensure to expand the default settings once only.
+ gl_UNICASE_H_REQUIRE_DEFAULTS
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd. It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_UNICASE_H_REQUIRE_DEFAULTS],
+[
+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_UNICASE_H_MODULE_INDICATOR_DEFAULTS], [
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICASE_EMPTY_PREFIX_CONTEXT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICASE_EMPTY_SUFFIX_CONTEXT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ ])
+ m4_require(GL_MODULE_INDICATOR_PREFIX[_UNICASE_H_MODULE_INDICATOR_DEFAULTS])
+ AC_REQUIRE([gl_UNICASE_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_UNICASE_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+])
diff --git a/gnulib-m4/unictype_h.m4 b/gnulib-m4/unictype_h.m4
new file mode 100644
index 00000000..ba5a3688
--- /dev/null
+++ b/gnulib-m4/unictype_h.m4
@@ -0,0 +1,179 @@
+# unictype_h.m4
+# serial 4
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN_ONCE([gl_UNICTYPE_H],
+[
+ dnl Ensure to expand the default settings once only, before all statements
+ dnl that occur in other macros.
+ AC_REQUIRE([gl_UNICTYPE_H_DEFAULTS])
+])
+
+# gl_UNICTYPE_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_UNICTYPE_MODULE_INDICATOR],
+[
+ dnl Ensure to expand the default settings once only.
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd. It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_UNICTYPE_H_REQUIRE_DEFAULTS],
+[
+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_UNICTYPE_H_MODULE_INDICATOR_DEFAULTS], [
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_L_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_LC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_LU_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_LL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_LT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_LM_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_LO_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_M_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_MN_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_MC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_ME_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_N_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_ND_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_NL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_NO_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_P_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_PC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_PD_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_PS_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_PE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_PI_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_PF_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_PO_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_S_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_SM_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_SC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_SK_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_SO_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_Z_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_ZS_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_ZL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_ZP_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_C_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_CC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_CF_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_CS_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_CO_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_CATEGORY_CN_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_WHITE_SPACE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ALPHABETIC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_OTHER_ALPHABETIC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_NOT_A_CHARACTER_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_DEFAULT_IGNORABLE_CODE_POINT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_OTHER_DEFAULT_IGNORABLE_CODE_POINT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_DEPRECATED_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_LOGICAL_ORDER_EXCEPTION_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_VARIATION_SELECTOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PRIVATE_USE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_UNASSIGNED_CODE_VALUE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_UPPERCASE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_OTHER_UPPERCASE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_LOWERCASE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_OTHER_LOWERCASE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_TITLECASE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_CASED_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_CASE_IGNORABLE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_LOWERCASED_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_UPPERCASED_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_TITLECASED_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_CASEFOLDED_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_CHANGES_WHEN_CASEMAPPED_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_SOFT_DOTTED_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ID_START_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_OTHER_ID_START_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ID_CONTINUE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_OTHER_ID_CONTINUE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_XID_START_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_XID_CONTINUE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PATTERN_WHITE_SPACE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PATTERN_SYNTAX_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_JOIN_CONTROL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_GRAPHEME_BASE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_GRAPHEME_EXTEND_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_OTHER_GRAPHEME_EXTEND_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_GRAPHEME_LINK_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_MODIFIER_COMBINING_MARK_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_CONTROL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_LEFT_TO_RIGHT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_HEBREW_RIGHT_TO_LEFT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_ARABIC_RIGHT_TO_LEFT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_EUROPEAN_DIGIT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_EUR_NUM_SEPARATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_EUR_NUM_TERMINATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_ARABIC_DIGIT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_COMMON_SEPARATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_BLOCK_SEPARATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_SEGMENT_SEPARATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_WHITESPACE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_NON_SPACING_MARK_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_BOUNDARY_NEUTRAL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_PDF_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_EMBEDDING_OR_OVERRIDE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_BIDI_OTHER_NEUTRAL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_HEX_DIGIT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ASCII_HEX_DIGIT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_IDEOGRAPHIC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_UNIFIED_IDEOGRAPH_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_RADICAL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_IDS_BINARY_OPERATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_IDS_TRINARY_OPERATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_EMOJI_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_EMOJI_PRESENTATION_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_EMOJI_MODIFIER_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_EMOJI_MODIFIER_BASE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_EMOJI_COMPONENT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_EXTENDED_PICTOGRAPHIC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ZERO_WIDTH_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_SPACE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_NON_BREAK_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ISO_CONTROL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_FORMAT_CONTROL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_DASH_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_HYPHEN_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PUNCTUATION_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_LINE_SEPARATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PARAGRAPH_SEPARATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_QUOTATION_MARK_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_SENTENCE_TERMINAL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_TERMINAL_PUNCTUATION_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_CURRENCY_SYMBOL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_MATH_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_OTHER_MATH_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PAIRED_PUNCTUATION_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_LEFT_OF_PAIR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_COMBINING_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_COMPOSITE_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_DECIMAL_DIGIT_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_NUMERIC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_DIACRITIC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_EXTENDER_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_IGNORABLE_CONTROL_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_REGIONAL_INDICATOR_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ ])
+ m4_require(GL_MODULE_INDICATOR_PREFIX[_UNICTYPE_H_MODULE_INDICATOR_DEFAULTS])
+ AC_REQUIRE([gl_UNICTYPE_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_UNICTYPE_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+])
diff --git a/gnulib-m4/unimetadata_h.m4 b/gnulib-m4/unimetadata_h.m4
new file mode 100644
index 00000000..9530ef44
--- /dev/null
+++ b/gnulib-m4/unimetadata_h.m4
@@ -0,0 +1,44 @@
+# unimetadata_h.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN_ONCE([gl_UNIMETADATA_H],
+[
+ dnl Ensure to expand the default settings once only, before all statements
+ dnl that occur in other macros.
+ AC_REQUIRE([gl_UNIMETADATA_H_DEFAULTS])
+])
+
+# gl_UNIMETADATA_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_UNIMETADATA_MODULE_INDICATOR],
+[
+ dnl Ensure to expand the default settings once only.
+ gl_UNIMETADATA_H_REQUIRE_DEFAULTS
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd. It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_UNIMETADATA_H_REQUIRE_DEFAULTS],
+[
+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_UNIMETADATA_H_MODULE_INDICATOR_DEFAULTS], [
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNIMETADATA_UNICODE_VERSION_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ ])
+ m4_require(GL_MODULE_INDICATOR_PREFIX[_UNIMETADATA_H_MODULE_INDICATOR_DEFAULTS])
+ AC_REQUIRE([gl_UNIMETADATA_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_UNIMETADATA_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+])
diff --git a/gnulib-m4/uninorm_h.m4 b/gnulib-m4/uninorm_h.m4
new file mode 100644
index 00000000..5ec9ea67
--- /dev/null
+++ b/gnulib-m4/uninorm_h.m4
@@ -0,0 +1,47 @@
+# uninorm_h.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN_ONCE([gl_UNINORM_H],
+[
+ dnl Ensure to expand the default settings once only, before all statements
+ dnl that occur in other macros.
+ AC_REQUIRE([gl_UNINORM_H_DEFAULTS])
+])
+
+# gl_UNINORM_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_UNINORM_MODULE_INDICATOR],
+[
+ dnl Ensure to expand the default settings once only.
+ gl_UNINORM_H_REQUIRE_DEFAULTS
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd. It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_UNINORM_H_REQUIRE_DEFAULTS],
+[
+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_UNINORM_H_MODULE_INDICATOR_DEFAULTS], [
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNINORM_NFD_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNINORM_NFC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNINORM_NFKD_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNINORM_NFKC_DLL_VARIABLE], ['LIBUNISTRING_DLL_VARIABLE'])
+ ])
+ m4_require(GL_MODULE_INDICATOR_PREFIX[_UNINORM_H_MODULE_INDICATOR_DEFAULTS])
+ AC_REQUIRE([gl_UNINORM_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_UNINORM_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+])
diff --git a/gnulib-m4/unistd_h.m4 b/gnulib-m4/unistd_h.m4
index 4c66ccc0..8000e888 100644
--- a/gnulib-m4/unistd_h.m4
+++ b/gnulib-m4/unistd_h.m4
@@ -1,8 +1,10 @@
-# unistd_h.m4 serial 90
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# unistd_h.m4
+# serial 97
+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.
+dnl This file is offered as-is, without any warranty.
dnl Written by Simon Josefsson, Bruno Haible.
@@ -225,6 +227,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_COPY_FILE_RANGE=0; AC_SUBST([REPLACE_COPY_FILE_RANGE])
REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
+ REPLACE_DUP3=0; AC_SUBST([REPLACE_DUP3])
REPLACE_EXECL=0; AC_SUBST([REPLACE_EXECL])
REPLACE_EXECLE=0; AC_SUBST([REPLACE_EXECLE])
REPLACE_EXECLP=0; AC_SUBST([REPLACE_EXECLP])
@@ -233,27 +236,34 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_EXECVP=0; AC_SUBST([REPLACE_EXECVP])
REPLACE_EXECVPE=0; AC_SUBST([REPLACE_EXECVPE])
REPLACE_FACCESSAT=0; AC_SUBST([REPLACE_FACCESSAT])
+ REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR])
REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
+ REPLACE_FDATASYNC=0; AC_SUBST([REPLACE_FDATASYNC])
REPLACE_FTRUNCATE=0; AC_SUBST([REPLACE_FTRUNCATE])
REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
REPLACE_GETDOMAINNAME=0; AC_SUBST([REPLACE_GETDOMAINNAME])
REPLACE_GETDTABLESIZE=0; AC_SUBST([REPLACE_GETDTABLESIZE])
+ REPLACE_GETENTROPY=0; AC_SUBST([REPLACE_GETENTROPY])
+ REPLACE_GETLOGIN=0; AC_SUBST([REPLACE_GETLOGIN])
REPLACE_GETLOGIN_R=0; AC_SUBST([REPLACE_GETLOGIN_R])
REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS])
REPLACE_GETPASS_FOR_GETPASS_GNU=0; AC_SUBST([REPLACE_GETPASS_FOR_GETPASS_GNU])
+ REPLACE_GETUSERSHELL=0; AC_SUBST([REPLACE_GETUSERSHELL])
REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY])
REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
+ REPLACE_PIPE2=0; AC_SUBST([REPLACE_PIPE2])
REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
REPLACE_PWRITE=0; AC_SUBST([REPLACE_PWRITE])
REPLACE_READ=0; AC_SUBST([REPLACE_READ])
REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
REPLACE_READLINKAT=0; AC_SUBST([REPLACE_READLINKAT])
REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
+ REPLACE_SETHOSTNAME=0; AC_SUBST([REPLACE_SETHOSTNAME])
REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
REPLACE_SYMLINKAT=0; AC_SUBST([REPLACE_SYMLINKAT])
diff --git a/gnulib-m4/unitypes_h.m4 b/gnulib-m4/unitypes_h.m4
new file mode 100644
index 00000000..733b9ee2
--- /dev/null
+++ b/gnulib-m4/unitypes_h.m4
@@ -0,0 +1,26 @@
+# unitypes_h.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN_ONCE([gl_UNITYPES_H],
+[
+ AH_VERBATIM([unitypes_restrict], [
+/* This definition is a duplicate of the one in unitypes.h.
+ It is here so that we can cope with an older version of unitypes.h
+ that does not contain this definition and that is pre-installed among
+ the public header files. */
+# if defined __restrict \
+ || 2 < __GNUC__ + (95 <= __GNUC_MINOR__) \
+ || __clang_major__ >= 3
+# define _UC_RESTRICT __restrict
+# elif 199901L <= __STDC_VERSION__ || defined restrict
+# define _UC_RESTRICT restrict
+# else
+# define _UC_RESTRICT
+# endif
+])
+])
diff --git a/gnulib-m4/usleep.m4 b/gnulib-m4/usleep.m4
index 25d23f51..74a34198 100644
--- a/gnulib-m4/usleep.m4
+++ b/gnulib-m4/usleep.m4
@@ -1,8 +1,10 @@
-# usleep.m4 serial 7
-dnl Copyright (C) 2009-2022 Free Software Foundation, Inc.
+# usleep.m4
+# serial 9
+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.
+dnl This file is offered as-is, without any warranty.
dnl This macro intentionally does not check for select or nanosleep;
dnl both of those modules can require external libraries.
@@ -29,14 +31,16 @@ AC_DEFUN([gl_FUNC_USLEEP],
]], [[return !!usleep (1000000);]])],
[gl_cv_func_usleep_works=yes], [gl_cv_func_usleep_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_usleep_works="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_usleep_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_usleep_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_usleep_works="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_usleep_works="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl*) gl_cv_func_usleep_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_usleep_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_usleep_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_usleep_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_usleep_works" in
diff --git a/gnulib-m4/vasnprintf.m4 b/gnulib-m4/vasnprintf.m4
index afdece71..4e01fbc9 100644
--- a/gnulib-m4/vasnprintf.m4
+++ b/gnulib-m4/vasnprintf.m4
@@ -1,13 +1,47 @@
-# vasnprintf.m4 serial 38
-dnl Copyright (C) 2002-2004, 2006-2022 Free Software Foundation, Inc.
+# vasnprintf.m4
+# serial 56
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_VASNPRINTF],
[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
AC_CHECK_FUNCS_ONCE([vasnprintf])
- if test $ac_cv_func_vasnprintf = no; then
+ if test $ac_cv_func_vasnprintf = yes; then
+ dnl On Cygwin, in directives with a huge width, the width is ignored, and
+ dnl the function returns a wrong result.
+ AC_CACHE_CHECK([whether vasnprintf works],
+ [gl_cv_func_vasnprintf_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#include <stdio.h>
+ ]],
+ [[size_t len;
+ char *res = vasnprintf (NULL, &len, "x%03000000000dy\n", -17);
+ /* On Cygwin 3.4.6, res is "x-17y\n" and len == 6: wrong. */
+ return (res != NULL && len < 10);
+ ]])
+ ],
+ [gl_cv_func_vasnprintf_works=yes],
+ [gl_cv_func_vasnprintf_works=no],
+ [case "$host_os" in
+ # Guess no on Cygwin.
+ cygwin*) gl_cv_func_vasnprintf_works="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_vasnprintf_works="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+ fi
+ if test $ac_cv_func_vasnprintf != yes \
+ || case "$gl_cv_func_vasnprintf_works" in
+ *yes) false;;
+ *) true;;
+ esac
+ then
gl_REPLACE_VASNPRINTF
fi
])
@@ -29,18 +63,26 @@ AC_DEFUN([gl_REPLACE_VASNPRINTF],
gl_PREREQ_ASNPRINTF
])
+AC_DEFUN([gl_FUNC_VASNWPRINTF],
+[
+ AC_LIBOBJ([printf-args])
+ gl_PREREQ_PRINTF_ARGS
+ gl_PREREQ_PRINTF_PARSE
+ gl_PREREQ_VASNWPRINTF
+ gl_PREREQ_ASNPRINTF
+])
+
# Prerequisites of lib/printf-args.h, lib/printf-args.c.
AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
[
- AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
])
# Prerequisites of lib/printf-parse.h, lib/printf-parse.c.
+# Prerequisites of lib/wprintf-parse.h, lib/wprintf-parse.c.
AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
[
AC_REQUIRE([gl_FEATURES_H])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
AC_REQUIRE([AC_TYPE_SIZE_T])
AC_CHECK_TYPE([ptrdiff_t], ,
@@ -50,19 +92,13 @@ AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
AC_REQUIRE([gt_AC_TYPE_INTMAX_T])
])
-# Prerequisites of lib/vasnprintf.c.
+# Prerequisites of lib/vasnprintf.c if !WIDE_CHAR_VERSION.
AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
[
- AC_REQUIRE([AC_FUNC_ALLOCA])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
- AC_REQUIRE([gt_TYPE_WINT_T])
- AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
+ AC_CHECK_FUNCS([snprintf strnlen wcrtomb])
dnl Use the _snprintf function only if it is declared (because on NetBSD it
dnl is defined as a weak alias of snprintf; we prefer to use the latter).
AC_CHECK_DECLS([_snprintf], , , [[#include <stdio.h>]])
- dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization
- dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE.
- AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
dnl We can avoid a lot of code by assuming that snprintf's return value
dnl conforms to ISO C99. So check that.
AC_REQUIRE([gl_SNPRINTF_RETVAL_C99])
@@ -84,6 +120,107 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
terminated.])
;;
esac
+ gl_PREREQ_VASNXPRINTF
+])
+
+# Prerequisites of lib/vasnwprintf.c.
+AC_DEFUN_ONCE([gl_PREREQ_VASNWPRINTF],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CHECK_FUNCS_ONCE([swprintf wcsnlen mbrtowc])
+ AC_CHECK_DECLS([_snwprintf], , , [[#include <stdio.h>]])
+ AC_CHECK_DECLS([wcsnlen], , , [[#include <wchar.h>]])
+ gl_SWPRINTF_WORKS
+ case "$gl_cv_func_swprintf_works" in
+ *yes)
+ AC_DEFINE([HAVE_WORKING_SWPRINTF], [1],
+ [Define if the swprintf function works correctly when it produces output
+ that contains null wide characters.])
+ ;;
+ esac
+ gl_MBRTOWC_C_LOCALE
+ case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+ *yes)
+ AC_CACHE_CHECK([whether swprintf in the C locale is free of encoding errors],
+ [gl_cv_func_swprintf_C_locale_sans_EILSEQ],
+ [
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#ifndef __USE_MINGW_ANSI_STDIO
+# define __USE_MINGW_ANSI_STDIO 1
+#endif
+#include <stdio.h>
+#include <wchar.h>
+int main()
+{
+ int result = 0;
+ { /* This test fails on glibc 2.35, musl libc 1.2.4, FreeBSD 13.2, NetBSD 9.3,
+ OpenBSD 7.2, Cygwin 2.9.0.
+ Reported at <https://www.openwall.com/lists/musl/2023/06/12/2>. */
+ wchar_t buf[12];
+ int ret = swprintf (buf, 12, L"%c", '\377');
+ if (ret < 0)
+ result |= 1;
+ }
+ return result;
+}]])],
+ [gl_cv_func_swprintf_C_locale_sans_EILSEQ=yes],
+ [gl_cv_func_swprintf_C_locale_sans_EILSEQ=no],
+ [case "$host_os" in
+ # Guess no on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_swprintf_C_locale_sans_EILSEQ="guessing yes";;
+ # Guess no on musl systems.
+ *-musl* | midipix*) gl_cv_func_swprintf_C_locale_sans_EILSEQ="guessing no";;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_swprintf_C_locale_sans_EILSEQ="$gl_cross_guess_normal";;
+ esac
+ ])
+ ])
+ ;;
+ esac
+ if case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
+ *yes) false ;;
+ *) true ;;
+ esac \
+ || case "$gl_cv_func_swprintf_C_locale_sans_EILSEQ" in
+ *yes) false ;;
+ *) true ;;
+ esac; then
+ AC_DEFINE([NEED_WPRINTF_DIRECTIVE_C], [1],
+ [Define if the vasnwprintf implementation needs special code for
+ the 'c' directive.])
+ fi
+ gl_SWPRINTF_DIRECTIVE_LA
+ case "$gl_cv_func_swprintf_directive_la" in
+ *yes) ;;
+ *)
+ AC_DEFINE([NEED_WPRINTF_DIRECTIVE_LA], [1],
+ [Define if the vasnwprintf implementation needs special code for
+ the 'a' directive with 'long double' arguments.])
+ ;;
+ esac
+ gl_SWPRINTF_DIRECTIVE_LC
+ case "$gl_cv_func_swprintf_directive_lc" in
+ *yes) ;;
+ *)
+ AC_DEFINE([NEED_WPRINTF_DIRECTIVE_LC], [1],
+ [Define if the vasnwprintf implementation needs special code for
+ the 'lc' directive.])
+ ;;
+ esac
+ gl_MUSL_LIBC
+ gl_PREREQ_VASNXPRINTF
+])
+
+# Common prerequisites of lib/vasnprintf.c and lib/vasnwprintf.c.
+AC_DEFUN_ONCE([gl_PREREQ_VASNXPRINTF],
+[
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ AC_CHECK_FUNCS([wcslen])
+ dnl Knowing DBL_EXPBIT0_WORD and DBL_EXPBIT0_BIT enables an optimization
+ dnl in the code for NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE.
+ AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
])
# Extra prerequisites of lib/vasnprintf.c for supporting 'long double'
@@ -152,7 +289,22 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A],
AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1],
[Define if the vasnprintf implementation needs special code for
the 'a' and 'A' directives.])
- AC_CHECK_FUNCS([nl_langinfo])
+ gl_CHECK_FUNCS_ANDROID([nl_langinfo], [[#include <langinfo.h>]])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'b' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_B],
+[
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_B])
+ case "$gl_cv_func_printf_directive_b" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_B], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'b' directive.])
;;
esac
])
@@ -187,18 +339,57 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS],
esac
])
-# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag.
-AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'lc' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LC],
[
- AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
- case "$gl_cv_func_printf_flag_grouping" in
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LC])
+ case "$gl_cv_func_printf_directive_lc" in
*yes)
;;
*)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_LC], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'lc' directive.])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING_INT_PRECISION])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING_MULTIBYTE])
+ case "$host_os" in
+ mingw* | windows*)
+ dnl MSVC does not support the ' flag at all.
+ dnl mingw does not support it, unless __USE_MINGW_ANSI_STDIO is defined.
+ dnl mingw also has other bugs regarding the ' flag.
AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1],
[Define if the vasnprintf implementation needs special code for the
' flag.])
;;
+ *)
+ case "$gl_cv_func_printf_flag_grouping,$gl_cv_func_printf_flag_grouping_multibyte" in
+ *yes,*yes)
+ case "$gl_cv_func_printf_flag_grouping_int_precision" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_FLAG_GROUPING_INT], [1],
+ [Define if the vasnprintf implementation needs special code for the
+ ' flag, for integer directives only.])
+ ;;
+ esac
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1],
+ [Define if the vasnprintf implementation needs special code for the
+ ' flag.])
+ ;;
+ esac
+ ;;
esac
])
@@ -232,6 +423,22 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO],
esac
])
+# Extra prerequisites of lib/vasnprintf.c for supporting the # flag with a
+# zero precision and a zero value in the 'x' and 'X' directives.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ALT_PRECISION_ZERO],
+[
+ AC_REQUIRE([gl_PRINTF_FLAG_ALT_PRECISION_ZERO])
+ case "$gl_cv_func_printf_flag_alt_precision_zero" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_FLAG_ALT_PRECISION_ZERO], [1],
+ [Define if the vasnprintf implementation needs special code for the
+ # flag with a zero precision and a zero value in the 'x' and 'X' directives.])
+ ;;
+ esac
+])
+
# Extra prerequisites of lib/vasnprintf.c for supporting large precisions.
AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION],
[
@@ -276,23 +483,53 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM],
])
# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance.
-AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS],
+AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS],
[
AC_REQUIRE([gl_PREREQ_VASNPRINTF])
gl_PREREQ_VASNPRINTF_LONG_DOUBLE
gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_B
gl_PREREQ_VASNPRINTF_DIRECTIVE_F
gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LC
gl_PREREQ_VASNPRINTF_FLAG_GROUPING
gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_FLAG_ALT_PRECISION_ZERO
gl_PREREQ_VASNPRINTF_PRECISION
gl_PREREQ_VASNPRINTF_ENOMEM
])
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'B' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_UPPERCASE_B],
+[
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_UPPERCASE_B])
+ case "$gl_cv_func_printf_directive_uppercase_b" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_UPPERCASE_B], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'B' directive.])
+ ;;
+ esac
+])
+
+# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance
+# and GNU compatibility.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_GNU_EXTRAS],
+[
+ gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS
+ AC_DEFINE([SUPPORT_GNU_PRINTF_DIRECTIVES], [1],
+ [Define if the vasnprintf implementation should support GNU compatible
+ printf directives.])
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_UPPERCASE_B
+])
+
# Prerequisites of lib/asnprintf.c.
+# Prerequisites of lib/asnwprintf.c.
AC_DEFUN([gl_PREREQ_ASNPRINTF],
[
])
diff --git a/gnulib-m4/visibility.m4 b/gnulib-m4/visibility.m4
index 4a212a4e..55ceb672 100644
--- a/gnulib-m4/visibility.m4
+++ b/gnulib-m4/visibility.m4
@@ -1,8 +1,10 @@
-# visibility.m4 serial 8
-dnl Copyright (C) 2005, 2008, 2010-2022 Free Software Foundation, Inc.
+# visibility.m4
+# serial 9
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
@@ -31,18 +33,18 @@ AC_DEFUN([gl_VISIBILITY],
dnl user has put into $CC $CFLAGS $CPPFLAGS.
AC_CACHE_CHECK([whether the -Werror option is usable],
[gl_cv_cc_vis_werror],
- [gl_save_CFLAGS="$CFLAGS"
+ [gl_saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]], [[]])],
[gl_cv_cc_vis_werror=yes],
[gl_cv_cc_vis_werror=no])
- CFLAGS="$gl_save_CFLAGS"
+ CFLAGS="$gl_saved_CFLAGS"
])
dnl Now check whether visibility declarations are supported.
AC_CACHE_CHECK([for simple visibility declarations],
[gl_cv_cc_visibility],
- [gl_save_CFLAGS="$CFLAGS"
+ [gl_saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden"
dnl We use the option -Werror and a function dummyfunc, because on some
dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
@@ -68,7 +70,7 @@ AC_DEFUN([gl_VISIBILITY],
[[]])],
[gl_cv_cc_visibility=yes],
[gl_cv_cc_visibility=no])
- CFLAGS="$gl_save_CFLAGS"
+ CFLAGS="$gl_saved_CFLAGS"
])
if test $gl_cv_cc_visibility = yes; then
CFLAG_VISIBILITY="-fvisibility=hidden"
diff --git a/gnulib-m4/warn-on-use.m4 b/gnulib-m4/warn-on-use.m4
index a81731f3..3765368c 100644
--- a/gnulib-m4/warn-on-use.m4
+++ b/gnulib-m4/warn-on-use.m4
@@ -1,8 +1,10 @@
-# warn-on-use.m4 serial 10
-dnl Copyright (C) 2010-2022 Free Software Foundation, Inc.
+# warn-on-use.m4
+# serial 11
+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.
+dnl This file is offered as-is, without any warranty.
# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES)
# ---------------------------------------
@@ -36,7 +38,7 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
dnl clang (e.g. strndup), reference ac_compile_for_check_decl instead
dnl of ac_compile. If, for whatever reason, the override of AC_PROG_CC
dnl in zzgnulib.m4 is inactive, use the original ac_compile.
- ac_save_ac_compile="$ac_compile"
+ ac_saved_ac_compile="$ac_compile"
if test -n "$ac_compile_for_check_decl"; then
ac_compile="$ac_compile_for_check_decl"
fi
@@ -46,7 +48,7 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
[[#undef $gl_func
(void) $gl_func;]])],
[AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])])
- ac_compile="$ac_save_ac_compile"
+ ac_compile="$ac_saved_ac_compile"
AS_VAR_IF([gl_Symbol], [yes],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
dnl Shortcut for an AC_CHECK_DECL invocation that may come later:
diff --git a/gnulib-m4/wchar_h.m4 b/gnulib-m4/wchar_h.m4
index 4baba1af..42338a00 100644
--- a/gnulib-m4/wchar_h.m4
+++ b/gnulib-m4/wchar_h.m4
@@ -1,13 +1,14 @@
-dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-
-dnl Copyright (C) 2007-2022 Free Software Foundation, Inc.
+# wchar_h.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
-dnl Written by Eric Blake.
+dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-# wchar_h.m4 serial 55
+dnl Written by Eric Blake.
AC_DEFUN_ONCE([gl_WCHAR_H],
[
@@ -64,8 +65,8 @@ dnl Check whether <wchar.h> is usable at all.
AC_DEFUN([gl_WCHAR_H_INLINE_OK],
[
dnl Test whether <wchar.h> suffers due to the transition from '__inline' to
- dnl 'gnu_inline'. See <https://sourceware.org/bugzilla/show_bug.cgi?id=4022>
- dnl and <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
+ dnl 'gnu_inline'. See <https://sourceware.org/PR4022>
+ dnl and <https://gcc.gnu.org/PR42440>. In summary,
dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
AC_REQUIRE([AC_CANONICAL_HOST])
@@ -86,8 +87,8 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK],
dnl z/OS when using the XPLINK object format (due to duplicate
dnl CSECT names). Instead, temporarily redefine $ac_compile so
dnl that the object file has the latter name from the start.
- save_ac_compile="$ac_compile"
- ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
+ saved_ac_compile="$ac_compile"
+ ac_compile=`echo "$saved_ac_compile" | sed s/conftest/conftest1/`
if echo '#include "conftest.c"' >conftest1.c \
&& AC_TRY_EVAL([ac_compile]); then
AC_LANG_CONFTEST([
@@ -97,7 +98,7 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK],
int zero (void) { return 0; }
]])])
dnl See note above about renaming object files.
- ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
+ ac_compile=`echo "$saved_ac_compile" | sed s/conftest/conftest2/`
if echo '#include "conftest.c"' >conftest2.c \
&& AC_TRY_EVAL([ac_compile]); then
if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
@@ -107,7 +108,7 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK],
fi
fi
fi
- ac_compile="$save_ac_compile"
+ ac_compile="$saved_ac_compile"
rm -f conftest[12].c conftest[12].$ac_objext conftest$ac_exeext
;;
esac
@@ -147,6 +148,7 @@ AC_DEFUN([gl_WCHAR_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_BTOWC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTOB])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSINIT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSZERO])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRTOWC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBRLEN])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MBSRTOWCS])
@@ -185,6 +187,7 @@ AC_DEFUN([gl_WCHAR_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSTOK])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSWIDTH])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCSFTIME])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WGETCWD])
dnl Support Microsoft deprecated alias function names by default.
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_WCSDUP], [1])
])
@@ -236,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])
@@ -253,5 +256,11 @@ AC_DEFUN([gl_WCHAR_H_DEFAULTS],
REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
REPLACE_WCSWIDTH=0; AC_SUBST([REPLACE_WCSWIDTH])
REPLACE_WCSFTIME=0; AC_SUBST([REPLACE_WCSFTIME])
+ REPLACE_WCSCMP=0; AC_SUBST([REPLACE_WCSCMP])
+ REPLACE_WCSNCAT=0; AC_SUBST([REPLACE_WCSNCAT])
+ REPLACE_WCSNCMP=0; AC_SUBST([REPLACE_WCSNCMP])
+ REPLACE_WCSSTR=0; AC_SUBST([REPLACE_WCSSTR])
REPLACE_WCSTOK=0; AC_SUBST([REPLACE_WCSTOK])
+ REPLACE_WMEMCMP=0; AC_SUBST([REPLACE_WMEMCMP])
+ REPLACE_WMEMPCPY=0; AC_SUBST([REPLACE_WMEMPCPY])
])
diff --git a/gnulib-m4/wchar_t.m4 b/gnulib-m4/wchar_t.m4
deleted file mode 100644
index 268e3e51..00000000
--- a/gnulib-m4/wchar_t.m4
+++ /dev/null
@@ -1,24 +0,0 @@
-# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2022 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl From Bruno Haible.
-dnl Test whether <stddef.h> has the 'wchar_t' type.
-dnl Prerequisite: AC_PROG_CC
-
-AC_DEFUN([gt_TYPE_WCHAR_T],
-[
- AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
- [AC_COMPILE_IFELSE(
- [AC_LANG_PROGRAM(
- [[#include <stddef.h>
- wchar_t foo = (wchar_t)'\0';]],
- [[]])],
- [gt_cv_c_wchar_t=yes],
- [gt_cv_c_wchar_t=no])])
- if test $gt_cv_c_wchar_t = yes; then
- AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
- fi
-])
diff --git a/gnulib-m4/wcrtomb.m4 b/gnulib-m4/wcrtomb.m4
index fee21d7e..a69f17c4 100644
--- a/gnulib-m4/wcrtomb.m4
+++ b/gnulib-m4/wcrtomb.m4
@@ -1,8 +1,10 @@
-# wcrtomb.m4 serial 17
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# wcrtomb.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_WCRTOMB],
[
@@ -31,11 +33,11 @@ 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])
- AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_EN_UTF8])
AC_REQUIRE([gt_LOCALE_JA])
AC_REQUIRE([gt_LOCALE_ZH_CN])
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
@@ -81,13 +83,15 @@ 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*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess no on AIX 4, Solaris, native Windows.
+ aix4* | solaris* | mingw* | windows*)
+ gl_cv_func_wcrtomb_retval="guessing no" ;;
# Guess yes otherwise.
- *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
+ *)
+ gl_cv_func_wcrtomb_retval="guessing yes" ;;
esac
changequote([,])dnl
- if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+ if test $LOCALE_FR != none || test "$LOCALE_EN_UTF8" != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
@@ -97,12 +101,14 @@ changequote([,])dnl
int main ()
{
int result = 0;
- if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ if (strcmp ("$LOCALE_FR", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
{
if (wcrtomb (NULL, 0, NULL) != 1)
result |= 1;
}
- if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ if (strcmp ("$LOCALE_EN_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
{
if (wcrtomb (NULL, 0, NULL) != 1)
result |= 2;
@@ -113,12 +119,14 @@ int main ()
result |= 2;
}
}
- if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
{
if (wcrtomb (NULL, 0, NULL) != 1)
result |= 4;
}
- if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
{
if (wcrtomb (NULL, 0, NULL) != 1)
result |= 8;
diff --git a/gnulib-m4/wctob.m4 b/gnulib-m4/wctob.m4
index af172cd1..76acd289 100644
--- a/gnulib-m4/wctob.m4
+++ b/gnulib-m4/wctob.m4
@@ -1,8 +1,10 @@
-# wctob.m4 serial 13
-dnl Copyright (C) 2008-2022 Free Software Foundation, Inc.
+# wctob.m4
+# serial 15
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_WCTOB],
[
@@ -11,7 +13,6 @@ AC_DEFUN([gl_FUNC_WCTOB],
AC_CHECK_FUNCS_ONCE([wctob])
if test $ac_cv_func_wctob = no; then
HAVE_WCTOB=0
- HAVE_DECL_WCTOB=0
else
HAVE_WCTOB=1
@@ -32,7 +33,7 @@ changequote(,)dnl
solaris2.[1-9] | solaris2.[1-9].* | cygwin*)
gl_cv_func_wctob_works="guessing no" ;;
# Guess no on native Windows.
- mingw*)
+ mingw* | windows*)
gl_cv_func_wctob_works="guessing no" ;;
# Guess yes otherwise.
*) gl_cv_func_wctob_works="guessing yes" ;;
@@ -90,16 +91,6 @@ int main ()
*yes) ;;
*) REPLACE_WCTOB=1 ;;
esac
- if test $REPLACE_WCTOB = 0; then
-
- dnl IRIX 6.5 has the wctob() function but does not declare it.
- AC_CHECK_DECLS([wctob], [], [], [[
- #include <wchar.h>
- ]])
- if test $ac_cv_have_decl_wctob != yes; then
- HAVE_DECL_WCTOB=0
- fi
- fi
fi
])
diff --git a/gnulib-m4/wctomb.m4 b/gnulib-m4/wctomb.m4
index 12329d8e..6b8884fd 100644
--- a/gnulib-m4/wctomb.m4
+++ b/gnulib-m4/wctomb.m4
@@ -1,8 +1,10 @@
-# wctomb.m4 serial 2
-dnl Copyright (C) 2011-2022 Free Software Foundation, Inc.
+# wctomb.m4
+# serial 2
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_WCTOMB],
[
diff --git a/gnulib-m4/wctype_h.m4 b/gnulib-m4/wctype_h.m4
index 702cb39c..12b4c618 100644
--- a/gnulib-m4/wctype_h.m4
+++ b/gnulib-m4/wctype_h.m4
@@ -1,11 +1,13 @@
-# wctype_h.m4 serial 30
+# wctype_h.m4
+# serial 33
dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-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.
dnl Written by Paul Eggert.
@@ -178,6 +180,7 @@ AC_DEFUN([gl_WCTYPE_H_REQUIRE_DEFAULTS],
m4_defun(GL_MODULE_INDICATOR_PREFIX[_WCTYPE_H_MODULE_INDICATOR_DEFAULTS], [
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWBLANK])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWDIGIT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWPUNCT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWXDIGIT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_WCTYPE])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ISWCTYPE])
@@ -196,5 +199,8 @@ AC_DEFUN([gl_WCTYPE_H_DEFAULTS],
HAVE_WCTRANS_T=1; AC_SUBST([HAVE_WCTRANS_T])
REPLACE_ISWBLANK=0; AC_SUBST([REPLACE_ISWBLANK])
REPLACE_ISWDIGIT=0; AC_SUBST([REPLACE_ISWDIGIT])
+ REPLACE_ISWPUNCT=0; AC_SUBST([REPLACE_ISWPUNCT])
REPLACE_ISWXDIGIT=0; AC_SUBST([REPLACE_ISWXDIGIT])
+ REPLACE_WCTRANS=0; AC_SUBST([REPLACE_WCTRANS])
+ REPLACE_WCTYPE=0; AC_SUBST([REPLACE_WCTYPE])
])
diff --git a/gnulib-m4/wcwidth.m4 b/gnulib-m4/wcwidth.m4
index 9dd59579..515076ba 100644
--- a/gnulib-m4/wcwidth.m4
+++ b/gnulib-m4/wcwidth.m4
@@ -1,8 +1,10 @@
-# wcwidth.m4 serial 34
-dnl Copyright (C) 2006-2022 Free Software Foundation, Inc.
+# wcwidth.m4
+# 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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_FUNC_WCWIDTH],
[
@@ -12,7 +14,6 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
dnl Persuade glibc <wchar.h> to declare wcwidth().
AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
- AC_REQUIRE([gt_TYPE_WCHAR_T])
AC_REQUIRE([gt_TYPE_WINT_T])
AC_CHECK_HEADERS_ONCE([wchar.h])
@@ -41,9 +42,9 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes; then
HAVE_WCWIDTH=1
dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
- dnl On NetBSD 9.0, OpenBSD 5.0, MidnightBSD 1.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 NetBSD 9.0, 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).
@@ -86,13 +87,13 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_wcwidth_works="guessing yes";;
- # Guess yes on AIX 7 systems.
- aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
- *) gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_wcwidth_works="guessing yes";;
+ # Guess yes on musl systems.
+ *-musl* | midipix*) gl_cv_func_wcwidth_works="guessing yes";;
+ # Guess yes on AIX 7 systems.
+ aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
+ *) gl_cv_func_wcwidth_works="$gl_cross_guess_normal";;
esac
changequote([,])dnl
])
diff --git a/gnulib-m4/windows-rc.m4 b/gnulib-m4/windows-rc.m4
new file mode 100644
index 00000000..808b64df
--- /dev/null
+++ b/gnulib-m4/windows-rc.m4
@@ -0,0 +1,21 @@
+# windows-rc.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
+
+dnl Find the tool that "compiles" a Windows resource file (.rc) to an
+dnl object file.
+
+AC_DEFUN_ONCE([gl_WINDOWS_RC],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ mingw* | windows*)
+ dnl Check for a program that compiles Windows resource files.
+ AC_CHECK_TOOL([WINDRES], [windres])
+ ;;
+ esac
+])
diff --git a/gnulib-m4/wint_t.m4 b/gnulib-m4/wint_t.m4
index adc58661..384462d2 100644
--- a/gnulib-m4/wint_t.m4
+++ b/gnulib-m4/wint_t.m4
@@ -1,8 +1,10 @@
-# wint_t.m4 serial 11
-dnl Copyright (C) 2003, 2007-2022 Free Software Foundation, Inc.
+# wint_t.m4
+# serial 11
+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.
+dnl This file is offered as-is, without any warranty.
dnl From Bruno Haible.
dnl Test whether <wchar.h> has the 'wint_t' type and whether gnulib's
diff --git a/gnulib-m4/xalloc.m4 b/gnulib-m4/xalloc.m4
index 17a9c06d..a0d0f060 100644
--- a/gnulib-m4/xalloc.m4
+++ b/gnulib-m4/xalloc.m4
@@ -1,7 +1,9 @@
-# xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2022 Free Software Foundation, Inc.
+# xalloc.m4
+# serial 18
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_XALLOC], [:])
diff --git a/gnulib-m4/xgetcwd.m4 b/gnulib-m4/xgetcwd.m4
new file mode 100644
index 00000000..8e514a25
--- /dev/null
+++ b/gnulib-m4/xgetcwd.m4
@@ -0,0 +1,12 @@
+# xgetcwd.m4
+# serial 8
+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.
+dnl This file is offered as-is, without any warranty.
+
+AC_DEFUN([gl_XGETCWD],
+[
+ :
+])
diff --git a/gnulib-m4/xsize.m4 b/gnulib-m4/xsize.m4
index 0109049e..4e35a5fe 100644
--- a/gnulib-m4/xsize.m4
+++ b/gnulib-m4/xsize.m4
@@ -1,8 +1,10 @@
-# xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2022 Free Software Foundation, Inc.
+# xsize.m4
+# serial 5
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_XSIZE],
[
diff --git a/gnulib-m4/year2038.m4 b/gnulib-m4/year2038.m4
deleted file mode 100644
index 2e4427e6..00000000
--- a/gnulib-m4/year2038.m4
+++ /dev/null
@@ -1,132 +0,0 @@
-# year2038.m4 serial 8
-dnl Copyright (C) 2017-2022 Free Software Foundation, Inc.
-dnl This file is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl Attempt to ensure that 'time_t' can go past the year 2038 and that
-dnl the functions 'time', 'stat', etc. work with post-2038 timestamps.
-
-m4_ifdef([AC_SYS_YEAR2038], [
- AC_DEFUN([gl_YEAR2038_EARLY])
- AC_DEFUN([gl_YEAR2038], [AC_SYS_YEAR2038])
- AC_DEFUN([gl_YEAR2038_BODY], [_AC_SYS_YEAR2038])
-], [
-
-AC_DEFUN([gl_YEAR2038_EARLY],
-[
- AC_REQUIRE([AC_CANONICAL_HOST])
- case "$host_os" in
- mingw*)
- AC_DEFINE([__MINGW_USE_VC2005_COMPAT], [1],
- [For 64-bit time_t on 32-bit mingw.])
- ;;
- esac
-])
-
-# gl_YEAR2038_TEST_INCLUDES
-# -------------------------
-AC_DEFUN([gl_YEAR2038_TEST_INCLUDES],
-[[
- #include <time.h>
- /* Check that time_t can represent 2**32 - 1 correctly. */
- #define LARGE_TIME_T \\
- ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30)))
- int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535
- && LARGE_TIME_T % 65537 == 0)
- ? 1 : -1];
-]])
-
-# gl_YEAR2038_BODY(REQUIRE-YEAR2038-SAFE)
------------------------------------------
-AC_DEFUN([gl_YEAR2038_BODY],
-[
- AC_ARG_ENABLE([year2038],
- [ --disable-year2038 omit support for timestamps past the year 2038])
- AS_IF([test "$enable_year2038" != no],
- [
- dnl On many systems, time_t is already a 64-bit type.
- dnl On those systems where time_t is still 32-bit, it requires kernel
- dnl and libc support to make it 64-bit. For glibc 2.34 and later on Linux,
- dnl defining _TIME_BITS=64 and _FILE_OFFSET_BITS=64 is needed on x86 and ARM.
- dnl
- dnl On native Windows, the system include files define types __time32_t
- dnl and __time64_t. By default, time_t is an alias of
- dnl - __time32_t on 32-bit mingw,
- dnl - __time64_t on 64-bit mingw and on MSVC (since MSVC 8).
- dnl But when compiling with -D__MINGW_USE_VC2005_COMPAT, time_t is an
- dnl alias of __time64_t.
- dnl And when compiling with -D_USE_32BIT_TIME_T, time_t is an alias of
- dnl __time32_t.
- AC_CACHE_CHECK([for time_t past the year 2038], [gl_cv_type_time_t_y2038],
- [AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE([gl_YEAR2038_TEST_INCLUDES])],
- [gl_cv_type_time_t_y2038=yes], [gl_cv_type_time_t_y2038=no])
- ])
- if test "$gl_cv_type_time_t_y2038" = no; then
- AC_CACHE_CHECK([for 64-bit time_t with _TIME_BITS=64],
- [gl_cv_type_time_t_bits_macro],
- [AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE([[#define _TIME_BITS 64
- #define _FILE_OFFSET_BITS 64
- ]gl_YEAR2038_TEST_INCLUDES])],
- [gl_cv_type_time_t_bits_macro=yes],
- [gl_cv_type_time_t_bits_macro=no])
- ])
- if test "$gl_cv_type_time_t_bits_macro" = yes; then
- AC_DEFINE([_TIME_BITS], [64],
- [Number of bits in a timestamp, on hosts where this is settable.])
- dnl AC_SYS_LARGFILE also defines this; it's OK if we do too.
- AC_DEFINE([_FILE_OFFSET_BITS], [64],
- [Number of bits in a file offset, on hosts where this is settable.])
- gl_cv_type_time_t_y2038=yes
- fi
- fi
- if test $gl_cv_type_time_t_y2038 = no; then
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef _USE_32BIT_TIME_T
- int ok;
- #else
- error fail
- #endif
- ]])],
- [AC_MSG_FAILURE(
- [The 'time_t' type stops working after January 2038.
- Remove _USE_32BIT_TIME_T from the compiler flags.])],
- [# If not cross-compiling and $1 says we should check,
- # and 'touch' works with a large timestamp, then evidently wider time_t
- # is desired and supported, so fail and ask the builder to fix the
- # problem. Otherwise, just warn the builder.
- m4_ifval([$1],
- [if test $cross_compiling = no \
- && TZ=UTC0 touch -t 210602070628.15 conftest.time 2>/dev/null; then
- case `TZ=UTC0 LC_ALL=C ls -l conftest.time 2>/dev/null` in
- *'Feb 7 2106'* | *'Feb 7 17:10'*)
- AC_MSG_FAILURE(
- [The 'time_t' type stops working after January 2038,
- and your system appears to support a wider 'time_t'.
- Try configuring with 'CC="${CC} -m64"'.
- To build with a 32-bit time_t anyway (not recommended),
- configure with '--disable-year2038'.]);;
- esac
- rm -f conftest.time
- fi])
- if test "$gl_warned_about_y2038" != yes; then
- AC_MSG_WARN(
- [The 'time_t' type stops working after January 2038,
- and this package needs a wider 'time_t' type
- if there is any way to access timestamps after that.
- Configure with 'CC="${CC} -m64"' perhaps?])
- gl_warned_about_y2038=yes
- fi
- ])
- fi])
-])
-
-AC_DEFUN([gl_YEAR2038],
-[
- gl_YEAR2038_BODY([require-year2038-safe])
-])
-
-]) # m4_ifndef AC_SYS_YEAR2038
diff --git a/gnulib-m4/yield.m4 b/gnulib-m4/yield.m4
index 58bdb519..850d8848 100644
--- a/gnulib-m4/yield.m4
+++ b/gnulib-m4/yield.m4
@@ -1,8 +1,10 @@
-# yield.m4 serial 4
-dnl Copyright (C) 2005-2022 Free Software Foundation, Inc.
+# yield.m4
+# serial 5
+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.
+dnl This file is offered as-is, without any warranty.
AC_DEFUN([gl_YIELD],
[
@@ -10,7 +12,7 @@ AC_DEFUN([gl_YIELD],
AC_REQUIRE([gl_THREADLIB])
if test $gl_threads_api = posix; then
- YIELD_LIB="$LIB_SCHED_YIELD"
+ YIELD_LIB="$SCHED_YIELD_LIB"
else
YIELD_LIB=
fi
diff --git a/gnulib-m4/zzgnulib.m4 b/gnulib-m4/zzgnulib.m4
index fd73a201..fed091ca 100644
--- a/gnulib-m4/zzgnulib.m4
+++ b/gnulib-m4/zzgnulib.m4
@@ -1,8 +1,10 @@
-# zzgnulib.m4 serial 1
-dnl Copyright (C) 2020-2022 Free Software Foundation, Inc.
+# zzgnulib.m4
+# serial 1
+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.
+dnl This file is offered as-is, without any warranty.
dnl This file must be named something that sorts after all other
dnl package- or gnulib-provided .m4 files - at least for those packages