summaryrefslogtreecommitdiffstats
path: root/gl/m4
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:38:57 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:38:57 +0000
commitf5b6b735a731901f09d7f3cc153c1d869269ee83 (patch)
tree565a1b0f3c6a4094a5f2198879fb239053549f1e /gl/m4
parentAdding upstream version 2.12.0. (diff)
downloadman-db-upstream.tar.xz
man-db-upstream.zip
Adding upstream version 2.12.1.upstream/2.12.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'gl/m4')
-rw-r--r--gl/m4/00gnulib.m42
-rw-r--r--gl/m4/__inline.m42
-rw-r--r--gl/m4/absolute-header.m46
-rw-r--r--gl/m4/alloca.m42
-rw-r--r--gl/m4/argp.m42
-rw-r--r--gl/m4/asm-underscore.m42
-rw-r--r--gl/m4/assert_h.m42
-rw-r--r--gl/m4/btowc.m445
-rw-r--r--gl/m4/builtin-expect.m42
-rw-r--r--gl/m4/c-bool.m42
-rw-r--r--gl/m4/calloc.m46
-rw-r--r--gl/m4/canonicalize.m428
-rw-r--r--gl/m4/chdir-long.m42
-rw-r--r--gl/m4/chown.m420
-rw-r--r--gl/m4/clock_time.m434
-rw-r--r--gl/m4/close.m42
-rw-r--r--gl/m4/closedir.m411
-rw-r--r--gl/m4/codeset.m42
-rw-r--r--gl/m4/ctype_h.m42
-rw-r--r--gl/m4/d-ino.m424
-rw-r--r--gl/m4/d-type.m42
-rw-r--r--gl/m4/dirent_h.m411
-rw-r--r--gl/m4/dirfd.m411
-rw-r--r--gl/m4/double-slash-root.m42
-rw-r--r--gl/m4/dup.m410
-rw-r--r--gl/m4/dup2.m46
-rw-r--r--gl/m4/eealloc.m42
-rw-r--r--gl/m4/environ.m42
-rw-r--r--gl/m4/errno_h.m42
-rw-r--r--gl/m4/error.m42
-rw-r--r--gl/m4/error_h.m42
-rw-r--r--gl/m4/exponentd.m42
-rw-r--r--gl/m4/extensions.m42
-rw-r--r--gl/m4/extern-inline.m42
-rw-r--r--gl/m4/fchdir.m434
-rw-r--r--gl/m4/fcntl-o.m410
-rw-r--r--gl/m4/fcntl.m42
-rw-r--r--gl/m4/fcntl_h.m42
-rw-r--r--gl/m4/fdopendir.m42
-rw-r--r--gl/m4/filenamecat.m42
-rw-r--r--gl/m4/flexmember.m42
-rw-r--r--gl/m4/float_h.m412
-rw-r--r--gl/m4/flock.m42
-rw-r--r--gl/m4/fnmatch.m435
-rw-r--r--gl/m4/fnmatch_h.m42
-rw-r--r--gl/m4/free.m42
-rw-r--r--gl/m4/fstat.m48
-rw-r--r--gl/m4/fstatat.m46
-rw-r--r--gl/m4/getcwd-abort-bug.m42
-rw-r--r--gl/m4/getcwd-path-max.m42
-rw-r--r--gl/m4/getcwd.m46
-rw-r--r--gl/m4/getdelim.m42
-rw-r--r--gl/m4/getdtablesize.m42
-rw-r--r--gl/m4/getline.m42
-rw-r--r--gl/m4/getlogin.m46
-rw-r--r--gl/m4/getlogin_r.m42
-rw-r--r--gl/m4/getopt.m48
-rw-r--r--gl/m4/getpagesize.m46
-rw-r--r--gl/m4/getprogname.m42
-rw-r--r--gl/m4/getrandom.m48
-rw-r--r--gl/m4/gettime.m42
-rw-r--r--gl/m4/gettimeofday.m46
-rw-r--r--gl/m4/glob.m42
-rw-r--r--gl/m4/glob_h.m42
-rw-r--r--gl/m4/gnulib-common.m448
-rw-r--r--gl/m4/gnulib-comp.m4342
-rw-r--r--gl/m4/host-cpu-c-abi.m49
-rw-r--r--gl/m4/idpriv.m42
-rw-r--r--gl/m4/include_next.m42
-rw-r--r--gl/m4/inline.m440
-rw-r--r--gl/m4/intmax_t.m42
-rw-r--r--gl/m4/inttypes.m42
-rw-r--r--gl/m4/inttypes_h.m42
-rw-r--r--gl/m4/ioctl.m42
-rw-r--r--gl/m4/isblank.m42
-rw-r--r--gl/m4/iswblank.m438
-rw-r--r--gl/m4/iswctype.m413
-rw-r--r--gl/m4/iswdigit.m4120
-rw-r--r--gl/m4/iswpunct.m448
-rw-r--r--gl/m4/iswxdigit.m4110
-rw-r--r--gl/m4/langinfo_h.m42
-rw-r--r--gl/m4/largefile.m46
-rw-r--r--gl/m4/lchown.m42
-rw-r--r--gl/m4/lib-ignore.m42
-rw-r--r--gl/m4/lib-ld.m46
-rw-r--r--gl/m4/lib-link.m42
-rw-r--r--gl/m4/lib-prefix.m42
-rw-r--r--gl/m4/libunistring-base.m4196
-rw-r--r--gl/m4/limits-h.m42
-rw-r--r--gl/m4/localcharset.m42
-rw-r--r--gl/m4/locale-fr.m420
-rw-r--r--gl/m4/locale-ja.m412
-rw-r--r--gl/m4/locale-zh.m412
-rw-r--r--gl/m4/locale_h.m48
-rw-r--r--gl/m4/localeconv.m46
-rw-r--r--gl/m4/lock.m42
-rw-r--r--gl/m4/lstat.m48
-rw-r--r--gl/m4/malloc.m411
-rw-r--r--gl/m4/malloca.m42
-rw-r--r--gl/m4/manywarnings.m42
-rw-r--r--gl/m4/math_h.m419
-rw-r--r--gl/m4/mbrtoc32.m4266
-rw-r--r--gl/m4/mbrtowc.m438
-rw-r--r--gl/m4/mbsinit.m46
-rw-r--r--gl/m4/mbsrtowcs.m414
-rw-r--r--gl/m4/mbstate_t.m42
-rw-r--r--gl/m4/mbtowc.m42
-rw-r--r--gl/m4/memchr.m416
-rw-r--r--gl/m4/memmem.m42
-rw-r--r--gl/m4/mempcpy.m42
-rw-r--r--gl/m4/memrchr.m42
-rw-r--r--gl/m4/minmax.m42
-rw-r--r--gl/m4/mkdir.m453
-rw-r--r--gl/m4/mkdtemp.m42
-rw-r--r--gl/m4/mkstemp.m46
-rw-r--r--gl/m4/mmap-anon.m42
-rw-r--r--gl/m4/mode_t.m42
-rw-r--r--gl/m4/msvc-inval.m42
-rw-r--r--gl/m4/msvc-nothrow.m42
-rw-r--r--gl/m4/multiarch.m42
-rw-r--r--gl/m4/musl.m42
-rw-r--r--gl/m4/nanosleep.m417
-rw-r--r--gl/m4/nl_langinfo.m42
-rw-r--r--gl/m4/nocrash.m42
-rw-r--r--gl/m4/nonblocking.m412
-rw-r--r--gl/m4/off_t.m42
-rw-r--r--gl/m4/open-cloexec.m42
-rw-r--r--gl/m4/open-slash.m42
-rw-r--r--gl/m4/open.m46
-rw-r--r--gl/m4/openat.m42
-rw-r--r--gl/m4/opendir.m412
-rw-r--r--gl/m4/pathmax.m42
-rw-r--r--gl/m4/pipe.m42
-rw-r--r--gl/m4/printf.m4496
-rw-r--r--gl/m4/pselect.m42
-rw-r--r--gl/m4/pthread_rwlock_rdlock.m48
-rw-r--r--gl/m4/pthread_sigmask.m42
-rw-r--r--gl/m4/raise.m42
-rw-r--r--gl/m4/rawmemchr.m42
-rw-r--r--gl/m4/readdir.m47
-rw-r--r--gl/m4/readlink.m42
-rw-r--r--gl/m4/readlinkat.m42
-rw-r--r--gl/m4/realloc.m49
-rw-r--r--gl/m4/reallocarray.m42
-rw-r--r--gl/m4/regex.m412
-rw-r--r--gl/m4/rename.m484
-rw-r--r--gl/m4/renameat.m42
-rw-r--r--gl/m4/rewinddir.m47
-rw-r--r--gl/m4/rmdir.m424
-rw-r--r--gl/m4/save-cwd.m42
-rw-r--r--gl/m4/select.m46
-rw-r--r--gl/m4/setenv.m42
-rw-r--r--gl/m4/setlocale_null.m416
-rw-r--r--gl/m4/sigaction.m42
-rw-r--r--gl/m4/signal_h.m42
-rw-r--r--gl/m4/signalblocking.m42
-rw-r--r--gl/m4/sigpipe.m42
-rw-r--r--gl/m4/size_max.m42
-rw-r--r--gl/m4/sleep.m424
-rw-r--r--gl/m4/socketlib.m42
-rw-r--r--gl/m4/sockets.m42
-rw-r--r--gl/m4/socklen.m42
-rw-r--r--gl/m4/sockpfaf.m42
-rw-r--r--gl/m4/ssize_t.m42
-rw-r--r--gl/m4/stat-time.m42
-rw-r--r--gl/m4/stat.m412
-rw-r--r--gl/m4/stdalign.m418
-rw-r--r--gl/m4/stdarg.m42
-rw-r--r--gl/m4/stddef_h.m42
-rw-r--r--gl/m4/stdint.m417
-rw-r--r--gl/m4/stdint_h.m42
-rw-r--r--gl/m4/stdio_h.m42
-rw-r--r--gl/m4/stdlib_h.m46
-rw-r--r--gl/m4/stpcpy.m42
-rw-r--r--gl/m4/strcase.m42
-rw-r--r--gl/m4/strcasestr.m42
-rw-r--r--gl/m4/strchrnul.m42
-rw-r--r--gl/m4/strdup.m42
-rw-r--r--gl/m4/strerror.m46
-rw-r--r--gl/m4/string_h.m45
-rw-r--r--gl/m4/strings_h.m42
-rw-r--r--gl/m4/strndup.m42
-rw-r--r--gl/m4/strnlen.m42
-rw-r--r--gl/m4/strsep.m42
-rw-r--r--gl/m4/sys_file_h.m42
-rw-r--r--gl/m4/sys_ioctl_h.m42
-rw-r--r--gl/m4/sys_random_h.m42
-rw-r--r--gl/m4/sys_select_h.m42
-rw-r--r--gl/m4/sys_socket_h.m42
-rw-r--r--gl/m4/sys_stat_h.m42
-rw-r--r--gl/m4/sys_time_h.m42
-rw-r--r--gl/m4/sys_types_h.m42
-rw-r--r--gl/m4/sys_uio_h.m42
-rw-r--r--gl/m4/sysexits.m42
-rw-r--r--gl/m4/tempname.m42
-rw-r--r--gl/m4/termios_h.m42
-rw-r--r--gl/m4/threadlib.m425
-rw-r--r--gl/m4/time_h.m437
-rw-r--r--gl/m4/timespec.m42
-rw-r--r--gl/m4/uchar_h.m4249
-rw-r--r--gl/m4/unicase_h.m443
-rw-r--r--gl/m4/unictype_h.m4172
-rw-r--r--gl/m4/uninorm_h.m445
-rw-r--r--gl/m4/unistd-safer.m42
-rw-r--r--gl/m4/unistd_h.m45
-rw-r--r--gl/m4/unlink.m424
-rw-r--r--gl/m4/unlinkat.m42
-rw-r--r--gl/m4/utime.m46
-rw-r--r--gl/m4/utime_h.m42
-rw-r--r--gl/m4/utimens.m42
-rw-r--r--gl/m4/utimes.m414
-rw-r--r--gl/m4/vasnprintf.m422
-rw-r--r--gl/m4/vasprintf.m42
-rw-r--r--gl/m4/visibility.m42
-rw-r--r--gl/m4/vsnprintf.m42
-rw-r--r--gl/m4/warn-on-use.m42
-rw-r--r--gl/m4/warnings.m42
-rw-r--r--gl/m4/wchar_h.m46
-rw-r--r--gl/m4/wchar_t.m42
-rw-r--r--gl/m4/wcrtomb.m410
-rw-r--r--gl/m4/wctype.m451
-rw-r--r--gl/m4/wctype_h.m48
-rw-r--r--gl/m4/wint_t.m42
-rw-r--r--gl/m4/wmemchr.m42
-rw-r--r--gl/m4/wmempcpy.m42
-rw-r--r--gl/m4/xalloc.m42
-rw-r--r--gl/m4/xgetcwd.m42
-rw-r--r--gl/m4/xsize.m42
-rw-r--r--gl/m4/xstrndup.m42
-rw-r--r--gl/m4/xvasprintf.m42
-rw-r--r--gl/m4/zzgnulib.m42
231 files changed, 2789 insertions, 848 deletions
diff --git a/gl/m4/00gnulib.m4 b/gl/m4/00gnulib.m4
index 7fe03e0..3448c40 100644
--- a/gl/m4/00gnulib.m4
+++ b/gl/m4/00gnulib.m4
@@ -1,5 +1,5 @@
# 00gnulib.m4 serial 8
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/__inline.m4 b/gl/m4/__inline.m4
index acf8668..992e16f 100644
--- a/gl/m4/__inline.m4
+++ b/gl/m4/__inline.m4
@@ -1,5 +1,5 @@
# Test for __inline keyword
-dnl Copyright 2017-2023 Free Software Foundation, Inc.
+dnl Copyright 2017-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/absolute-header.m4 b/gl/m4/absolute-header.m4
index e794764..0e9f9ba 100644
--- a/gl/m4/absolute-header.m4
+++ b/gl/m4/absolute-header.m4
@@ -1,5 +1,5 @@
-# absolute-header.m4 serial 17
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+# absolute-header.m4 serial 18
+dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -66,7 +66,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/gl/m4/alloca.m4 b/gl/m4/alloca.m4
index c685fac..9096021 100644
--- a/gl/m4/alloca.m4
+++ b/gl/m4/alloca.m4
@@ -1,5 +1,5 @@
# alloca.m4 serial 21
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/argp.m4 b/gl/m4/argp.m4
index 1f8578b..7afaa06 100644
--- a/gl/m4/argp.m4
+++ b/gl/m4/argp.m4
@@ -1,5 +1,5 @@
# argp.m4 serial 16
-dnl Copyright (C) 2003-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/asm-underscore.m4 b/gl/m4/asm-underscore.m4
index 65ae55a..cc63465 100644
--- a/gl/m4/asm-underscore.m4
+++ b/gl/m4/asm-underscore.m4
@@ -1,5 +1,5 @@
# asm-underscore.m4 serial 5
-dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/assert_h.m4 b/gl/m4/assert_h.m4
index d255855..a73e45f 100644
--- a/gl/m4/assert_h.m4
+++ b/gl/m4/assert_h.m4
@@ -1,5 +1,5 @@
# assert-h.m4
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/btowc.m4 b/gl/m4/btowc.m4
index 1cd100a..8bb55dc 100644
--- a/gl/m4/btowc.m4
+++ b/gl/m4/btowc.m4
@@ -1,5 +1,5 @@
-# btowc.m4 serial 13
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+# btowc.m4 serial 14
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -40,12 +40,12 @@ 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
])
@@ -59,12 +59,12 @@ changequote([,])dnl
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" ;;
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_btowc_eof="guessing yes" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
esac
changequote([,])dnl
if test $LOCALE_FR != none; then
@@ -116,17 +116,18 @@ int main ()
[gl_cv_func_btowc_consistent=yes],
[gl_cv_func_btowc_consistent=no],
[case "$host_os" in
- # Guess no on mingw.
- mingw*) AC_EGREP_CPP([Problem], [
+ # 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" ;;
+ ],
+ [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
])
])
diff --git a/gl/m4/builtin-expect.m4 b/gl/m4/builtin-expect.m4
index 531ed48..8faffc5 100644
--- a/gl/m4/builtin-expect.m4
+++ b/gl/m4/builtin-expect.m4
@@ -1,6 +1,6 @@
dnl Check for __builtin_expect.
-dnl Copyright 2016-2023 Free Software Foundation, Inc.
+dnl Copyright 2016-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/c-bool.m4 b/gl/m4/c-bool.m4
index f614371..44fba3c 100644
--- a/gl/m4/c-bool.m4
+++ b/gl/m4/c-bool.m4
@@ -1,6 +1,6 @@
# Check for bool that conforms to C2023.
-dnl Copyright 2022-2023 Free Software Foundation, Inc.
+dnl Copyright 2022-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/calloc.m4 b/gl/m4/calloc.m4
index 3789cbf..49303d9 100644
--- a/gl/m4/calloc.m4
+++ b/gl/m4/calloc.m4
@@ -1,6 +1,6 @@
-# calloc.m4 serial 30
+# calloc.m4 serial 31
-# Copyright (C) 2004-2023 Free Software Foundation, Inc.
+# Copyright (C) 2004-2024 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.
@@ -41,7 +41,7 @@ AC_DEFUN([_AC_FUNC_CALLOC_IF],
# Guess yes on musl systems.
*-musl* | midipix*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
# Guess yes on native Windows.
- mingw*) ac_cv_func_calloc_0_nonnull="guessing yes" ;;
+ mingw* | windows*) 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
diff --git a/gl/m4/canonicalize.m4 b/gl/m4/canonicalize.m4
index d319645..05dc6dd 100644
--- a/gl/m4/canonicalize.m4
+++ b/gl/m4/canonicalize.m4
@@ -1,6 +1,6 @@
-# canonicalize.m4 serial 38
+# canonicalize.m4 serial 39
-dnl Copyright (C) 2003-2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
@@ -66,8 +66,8 @@ AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
dnl available through the linker option '-loldnames'.
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
- mingw*) ;;
- *) AC_CHECK_FUNCS([getcwd]) ;;
+ mingw* | windows*) ;;
+ *) AC_CHECK_FUNCS([getcwd]) ;;
esac
AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
@@ -158,16 +158,16 @@ AC_DEFUN([gl_FUNC_REALPATH_WORKS],
esac
],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
- # Guess 'nearly' on musl systems.
- *-musl*) gl_cv_func_realpath_works="guessing nearly" ;;
- # Guess no on Cygwin.
- cygwin*) gl_cv_func_realpath_works="guessing no" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_realpath_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
+ # Guess 'nearly' on musl systems.
+ *-musl*) gl_cv_func_realpath_works="guessing nearly" ;;
+ # Guess no on Cygwin.
+ cygwin*) gl_cv_func_realpath_works="guessing no" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_realpath_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.a conftest.l conftest.d
diff --git a/gl/m4/chdir-long.m4 b/gl/m4/chdir-long.m4
index 4a92b30..62c7a79 100644
--- a/gl/m4/chdir-long.m4
+++ b/gl/m4/chdir-long.m4
@@ -6,7 +6,7 @@
# never fails with ENAMETOOLONG.
# Arrange to compile chdir-long.c only on systems that define PATH_MAX.
-dnl Copyright (C) 2004-2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/chown.m4 b/gl/m4/chown.m4
index 3e05f85..0f5f760 100644
--- a/gl/m4/chown.m4
+++ b/gl/m4/chown.m4
@@ -1,7 +1,7 @@
-# serial 35
+# serial 36
# Determine whether we need the chown wrapper.
-dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2023 Free Software
+dnl Copyright (C) 1997-2001, 2003-2005, 2007, 2009-2024 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
@@ -46,14 +46,14 @@ AC_DEFUN([AC_FUNC_CHOWN],
[ac_cv_func_chown_works=yes],
[ac_cv_func_chown_works=no],
[case "$host_os" in # ((
- # Guess yes on Linux systems.
- linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu* | gnu*) ac_cv_func_chown_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) ac_cv_func_chown_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) ac_cv_func_chown_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) ac_cv_func_chown_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) ac_cv_func_chown_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) ac_cv_func_chown_works="$gl_cross_guess_normal" ;;
esac
])
rm -f conftest.chown
diff --git a/gl/m4/clock_time.m4 b/gl/m4/clock_time.m4
index d624a73..c016575 100644
--- a/gl/m4/clock_time.m4
+++ b/gl/m4/clock_time.m4
@@ -1,5 +1,5 @@
-# clock_time.m4 serial 12
-dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
+# clock_time.m4 serial 14
+dnl Copyright (C) 2002-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,9 +12,17 @@ dnl with or without modifications, as long as this notice is preserved.
AC_DEFUN([gl_CLOCK_TIME],
[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
dnl Persuade glibc and Solaris <time.h> to declare these functions.
AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ # On mingw, these functions are defined in the libwinpthread library,
+ # which is better avoided. In fact, the clock_gettime function is buggy
+ # in 32-bit mingw, when -D__MINGW_USE_VC2005_COMPAT is used (which Gnulib's
+ # year2038 module does): It leaves the upper 32 bits of the tv_sec field
+ # of the result uninitialized.
+
# Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
# Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
@@ -23,12 +31,22 @@ AC_DEFUN([gl_CLOCK_TIME],
# library, inducing unnecessary run-time overhead.
CLOCK_TIME_LIB=
AC_SUBST([CLOCK_TIME_LIB])
- gl_saved_libs=$LIBS
- AC_SEARCH_LIBS([clock_gettime], [rt posix4],
- [test "$ac_cv_search_clock_gettime" = "none required" ||
- CLOCK_TIME_LIB=$ac_cv_search_clock_gettime])
- AC_CHECK_FUNCS([clock_getres clock_gettime clock_settime])
- LIBS=$gl_saved_libs
+ case "$host_os" in
+ mingw* | windows*)
+ ac_cv_func_clock_getres=no
+ ac_cv_func_clock_gettime=no
+ ac_cv_func_clock_settime=no
+ ;;
+ *)
+ gl_saved_libs=$LIBS
+ AC_SEARCH_LIBS([clock_gettime], [rt posix4],
+ [test "$ac_cv_search_clock_gettime" = "none required" ||
+ CLOCK_TIME_LIB=$ac_cv_search_clock_gettime])
+ AC_CHECK_FUNCS([clock_getres clock_gettime clock_settime])
+ LIBS=$gl_saved_libs
+ ;;
+ esac
+
# For backward compatibility.
LIB_CLOCK_GETTIME="$CLOCK_TIME_LIB"
AC_SUBST([LIB_CLOCK_GETTIME])
diff --git a/gl/m4/close.m4 b/gl/m4/close.m4
index 0feabd6..6b6d382 100644
--- a/gl/m4/close.m4
+++ b/gl/m4/close.m4
@@ -1,5 +1,5 @@
# close.m4 serial 10
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/closedir.m4 b/gl/m4/closedir.m4
index 7e702de..3774806 100644
--- a/gl/m4/closedir.m4
+++ b/gl/m4/closedir.m4
@@ -1,5 +1,5 @@
-# closedir.m4 serial 7
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# closedir.m4 serial 8
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,15 +13,12 @@ AC_DEFUN([gl_FUNC_CLOSEDIR],
if test $ac_cv_func_closedir = no; then
HAVE_CLOSEDIR=0
else
- dnl Replace closedir() on native Windows, to support fdopendir().
+ dnl Replace closedir() on native Windows and OS/2 kLIBC,
+ dnl to support fdopendir().
AC_REQUIRE([gl_DIRENT_DIR])
if test $DIR_HAS_FD_MEMBER = 0; then
REPLACE_CLOSEDIR=1
fi
- dnl Replace closedir() for supporting the gnulib-defined dirfd() function.
- case $host_os in
- os2*) REPLACE_CLOSEDIR=1 ;;
- esac
dnl Replace closedir() for supporting the gnulib-defined fchdir() function,
dnl to keep fchdir's bookkeeping up-to-date.
m4_ifdef([gl_FUNC_FCHDIR], [
diff --git a/gl/m4/codeset.m4 b/gl/m4/codeset.m4
index 5804f47..94dccce 100644
--- a/gl/m4/codeset.m4
+++ b/gl/m4/codeset.m4
@@ -1,5 +1,5 @@
# codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2023 Free Software
+dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2024 Free Software
dnl Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/ctype_h.m4 b/gl/m4/ctype_h.m4
index 219f2ed..ef0ee7f 100644
--- a/gl/m4/ctype_h.m4
+++ b/gl/m4/ctype_h.m4
@@ -1,5 +1,5 @@
# ctype_h.m4 serial 9
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/d-ino.m4 b/gl/m4/d-ino.m4
index 58f3311..b127ab2 100644
--- a/gl/m4/d-ino.m4
+++ b/gl/m4/d-ino.m4
@@ -1,11 +1,11 @@
-# serial 21
+# serial 22
dnl From Jim Meyering.
dnl
dnl Check whether struct dirent has a member named d_ino.
dnl
-# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2023 Free Software
+# Copyright (C) 1997, 1999-2001, 2003-2004, 2006-2007, 2009-2024 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
@@ -40,16 +40,16 @@ AC_DEFUN([gl_CHECK_TYPE_STRUCT_DIRENT_D_INO],
[gl_cv_struct_dirent_d_ino=yes],
[gl_cv_struct_dirent_d_ino=no],
[case "$host_os" in
- # Guess yes on glibc systems with Linux kernel.
- linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
- # Guess yes on musl systems with Linux kernel.
- linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
- # Guess yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems with Linux kernel.
+ linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ # Guess yes on musl systems with Linux kernel.
+ linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_struct_dirent_d_ino="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_struct_dirent_d_ino" in
diff --git a/gl/m4/d-type.m4 b/gl/m4/d-type.m4
index 3f63bbe..b06bca5 100644
--- a/gl/m4/d-type.m4
+++ b/gl/m4/d-type.m4
@@ -5,7 +5,7 @@ dnl
dnl Check whether struct dirent has a member named d_type.
dnl
-# Copyright (C) 1997, 1999-2004, 2006, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 1997, 1999-2004, 2006, 2009-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/dirent_h.m4 b/gl/m4/dirent_h.m4
index b6c189c..3e3d967 100644
--- a/gl/m4/dirent_h.m4
+++ b/gl/m4/dirent_h.m4
@@ -1,5 +1,5 @@
-# dirent_h.m4 serial 20
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+# dirent_h.m4 serial 22
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -32,14 +32,13 @@ AC_DEFUN_ONCE([gl_DIRENT_H],
dnl Determine whether <dirent.h> needs to override the DIR type.
AC_DEFUN_ONCE([gl_DIRENT_DIR],
[
- dnl Set DIR_HAS_FD_MEMBER if dirfd() works, i.e. not always returns -1,
- dnl or has the __KLIBC__ workaround as in lib/dirfd.c.
+ dnl Set DIR_HAS_FD_MEMBER if dirfd() works, i.e. not always returns -1.
dnl We could use the findings from gl_FUNC_DIRFD and gl_PREREQ_DIRFD, but
dnl it's simpler since we know the affected platforms.
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
- mingw*) DIR_HAS_FD_MEMBER=0 ;;
- *) DIR_HAS_FD_MEMBER=1 ;;
+ mingw* | windows* | os2*) DIR_HAS_FD_MEMBER=0 ;;
+ *) DIR_HAS_FD_MEMBER=1 ;;
esac
AC_SUBST([DIR_HAS_FD_MEMBER])
])
diff --git a/gl/m4/dirfd.m4 b/gl/m4/dirfd.m4
index 7968b12..d4c4e6b 100644
--- a/gl/m4/dirfd.m4
+++ b/gl/m4/dirfd.m4
@@ -1,8 +1,8 @@
-# serial 28 -*- Autoconf -*-
+# serial 29 -*- Autoconf -*-
dnl Find out how to get the file descriptor associated with an open DIR*.
-# Copyright (C) 2001-2006, 2008-2023 Free Software Foundation, Inc.
+# Copyright (C) 2001-2006, 2008-2024 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.
@@ -40,15 +40,12 @@ AC_DEFUN([gl_FUNC_DIRFD],
HAVE_DIRFD=0
else
HAVE_DIRFD=1
- dnl Replace dirfd() on native Windows, to support fdopendir().
+ dnl Replace dirfd() on native Windows and OS/2 kLIBC,
+ dnl to support fdopendir().
AC_REQUIRE([gl_DIRENT_DIR])
if test $DIR_HAS_FD_MEMBER = 0; then
REPLACE_DIRFD=1
fi
- dnl OS/2 kLIBC dirfd() does not work.
- case "$host_os" in
- os2*) REPLACE_DIRFD=1 ;;
- esac
fi
])
diff --git a/gl/m4/double-slash-root.m4 b/gl/m4/double-slash-root.m4
index 1776e5e..00f23a7 100644
--- a/gl/m4/double-slash-root.m4
+++ b/gl/m4/double-slash-root.m4
@@ -1,5 +1,5 @@
# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/dup.m4 b/gl/m4/dup.m4
index fc41c99..eafef02 100644
--- a/gl/m4/dup.m4
+++ b/gl/m4/dup.m4
@@ -1,5 +1,5 @@
-# dup.m4 serial 7
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# dup.m4 serial 8
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -36,9 +36,9 @@ AC_DEFUN([gl_FUNC_DUP],
[gl_cv_func_dup_works=yes],
[gl_cv_func_dup_works=no],
[case "$host_os" in
- # Guess no on native Windows.
- mingw*) gl_cv_func_dup_works="guessing no" ;;
- *) gl_cv_func_dup_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_dup_works="guessing no" ;;
+ *) gl_cv_func_dup_works="guessing yes" ;;
esac
])
])
diff --git a/gl/m4/dup2.m4 b/gl/m4/dup2.m4
index e1cc73e..f6759b6 100644
--- a/gl/m4/dup2.m4
+++ b/gl/m4/dup2.m4
@@ -1,5 +1,5 @@
-#serial 27
-dnl Copyright (C) 2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
+#serial 28
+dnl Copyright (C) 2002, 2005, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -67,7 +67,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/gl/m4/eealloc.m4 b/gl/m4/eealloc.m4
index cb3e08f..d8862a1 100644
--- a/gl/m4/eealloc.m4
+++ b/gl/m4/eealloc.m4
@@ -1,5 +1,5 @@
# eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/environ.m4 b/gl/m4/environ.m4
index 741dfc5..5b9e06b 100644
--- a/gl/m4/environ.m4
+++ b/gl/m4/environ.m4
@@ -1,5 +1,5 @@
# environ.m4 serial 8
-dnl Copyright (C) 2001-2004, 2006-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/errno_h.m4 b/gl/m4/errno_h.m4
index 4c70d22..8900d6c 100644
--- a/gl/m4/errno_h.m4
+++ b/gl/m4/errno_h.m4
@@ -1,5 +1,5 @@
# errno_h.m4 serial 14
-dnl Copyright (C) 2004, 2006, 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/error.m4 b/gl/m4/error.m4
index 93a7558..5688afc 100644
--- a/gl/m4/error.m4
+++ b/gl/m4/error.m4
@@ -1,6 +1,6 @@
#serial 16
-# Copyright (C) 1996-1998, 2001-2004, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 1996-1998, 2001-2004, 2009-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/error_h.m4 b/gl/m4/error_h.m4
index e8a58f6..f8016ce 100644
--- a/gl/m4/error_h.m4
+++ b/gl/m4/error_h.m4
@@ -1,5 +1,5 @@
# error_h.m4 serial 4
-dnl Copyright (C) 1996-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 1996-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/exponentd.m4 b/gl/m4/exponentd.m4
index 163114b..0a4b1b6 100644
--- a/gl/m4/exponentd.m4
+++ b/gl/m4/exponentd.m4
@@ -1,5 +1,5 @@
# exponentd.m4 serial 4
-dnl Copyright (C) 2007-2008, 2010-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2008, 2010-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/extensions.m4 b/gl/m4/extensions.m4
index 5336b8d..6fc2e30 100644
--- a/gl/m4/extensions.m4
+++ b/gl/m4/extensions.m4
@@ -1,7 +1,7 @@
# serial 23 -*- Autoconf -*-
# Enable extensions on systems that normally disable them.
-# Copyright (C) 2003, 2006-2023 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2006-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/extern-inline.m4 b/gl/m4/extern-inline.m4
index f9894d7..680250e 100644
--- a/gl/m4/extern-inline.m4
+++ b/gl/m4/extern-inline.m4
@@ -1,6 +1,6 @@
dnl 'extern inline' a la ISO C99.
-dnl Copyright 2012-2023 Free Software Foundation, Inc.
+dnl Copyright 2012-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fchdir.m4 b/gl/m4/fchdir.m4
index b587e0e..fc0ed33 100644
--- a/gl/m4/fchdir.m4
+++ b/gl/m4/fchdir.m4
@@ -1,5 +1,5 @@
-# fchdir.m4 serial 28
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+# fchdir.m4 serial 32
+dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -16,7 +16,15 @@ AC_DEFUN([gl_FUNC_FCHDIR],
fi
AC_REQUIRE([gl_TEST_FCHDIR])
- if test $HAVE_FCHDIR = 0; then
+ if test $HAVE_FCHDIR = 1; then
+ AC_REQUIRE([gl_DIRENT_DIR])
+ if test $DIR_HAS_FD_MEMBER = 0; then
+ dnl fchdir() should be replaced if dirfd() does not work.
+ REPLACE_FCHDIR=1
+ fi
+ fi
+
+ if test $HAVE_FCHDIR = 0 || test $REPLACE_FCHDIR = 1; then
AC_DEFINE([REPLACE_FCHDIR], [1],
[Define to 1 if gnulib's fchdir() replacement is used.])
dnl We must also replace anything that can manipulate a directory fd,
@@ -32,16 +40,16 @@ AC_DEFUN([gl_FUNC_FCHDIR],
[gl_cv_func_open_directory_works=yes],
[gl_cv_func_open_directory_works=no],
[case "$host_os" in
- # Guess yes on Linux systems.
- linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
- # Guess yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_func_open_directory_works="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_open_directory_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_open_directory_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_open_directory_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;;
esac
])])
case "$gl_cv_func_open_directory_works" in
diff --git a/gl/m4/fcntl-o.m4 b/gl/m4/fcntl-o.m4
index 59d558b..49ab34d 100644
--- a/gl/m4/fcntl-o.m4
+++ b/gl/m4/fcntl-o.m4
@@ -1,5 +1,5 @@
-# fcntl-o.m4 serial 7
-dnl Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
+# fcntl-o.m4 serial 8
+dnl Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -117,9 +117,9 @@ AC_DEFUN([gl_FCNTL_O_FLAGS],
*) 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 ;;
+ # Guess 'no' on native Windows.
+ mingw* | windows*) gl_cv_header_working_fcntl_h='no' ;;
+ *) gl_cv_header_working_fcntl_h=cross-compiling ;;
esac
])
])
diff --git a/gl/m4/fcntl.m4 b/gl/m4/fcntl.m4
index 524a99a..02b93f8 100644
--- a/gl/m4/fcntl.m4
+++ b/gl/m4/fcntl.m4
@@ -1,5 +1,5 @@
# fcntl.m4 serial 11
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fcntl_h.m4 b/gl/m4/fcntl_h.m4
index 68f4e64..ba4eb44 100644
--- a/gl/m4/fcntl_h.m4
+++ b/gl/m4/fcntl_h.m4
@@ -1,6 +1,6 @@
# serial 20
# Configure fcntl.h.
-dnl Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fdopendir.m4 b/gl/m4/fdopendir.m4
index dfcc46c..bf361ff 100644
--- a/gl/m4/fdopendir.m4
+++ b/gl/m4/fdopendir.m4
@@ -1,7 +1,7 @@
# serial 15
# See if we need to provide fdopendir.
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/filenamecat.m4 b/gl/m4/filenamecat.m4
index 3dab236..7feb7f8 100644
--- a/gl/m4/filenamecat.m4
+++ b/gl/m4/filenamecat.m4
@@ -1,5 +1,5 @@
# filenamecat.m4 serial 12
-dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/flexmember.m4 b/gl/m4/flexmember.m4
index 13f7e87..9df6c03 100644
--- a/gl/m4/flexmember.m4
+++ b/gl/m4/flexmember.m4
@@ -1,7 +1,7 @@
# serial 5
# Check for flexible array member support.
-# Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/float_h.m4 b/gl/m4/float_h.m4
index 2f0c9c4..60e8144 100644
--- a/gl/m4/float_h.m4
+++ b/gl/m4/float_h.m4
@@ -1,5 +1,5 @@
-# float_h.m4 serial 13
-dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
+# float_h.m4 serial 14
+dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -84,9 +84,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/gl/m4/flock.m4 b/gl/m4/flock.m4
index e547876..72f52bb 100644
--- a/gl/m4/flock.m4
+++ b/gl/m4/flock.m4
@@ -1,5 +1,5 @@
# flock.m4 serial 4
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fnmatch.m4 b/gl/m4/fnmatch.m4
index eba70de..54d5c7b 100644
--- a/gl/m4/fnmatch.m4
+++ b/gl/m4/fnmatch.m4
@@ -1,6 +1,6 @@
-# Check for fnmatch - serial 17 -*- coding: utf-8 -*-
+# Check for fnmatch - serial 20 -*- coding: utf-8 -*-
-# Copyright (C) 2000-2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2000-2007, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -14,7 +14,7 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
m4_divert_text([DEFAULTS], [gl_fnmatch_required=POSIX])
AC_REQUIRE([gl_FNMATCH_H])
- AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([AC_CANONICAL_HOST])
gl_fnmatch_required_lowercase=`
echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]'
`
@@ -108,6 +108,17 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
exists in glibc 2.12, fixed in glibc 2.13. */
if (!y ("[/b", "[/b", 0)) /*"]]"*/
result |= 4;
+ /* glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=17062>
+ is fixed in glibc 2.20.
+ glibc bugs <https://sourceware.org/bugzilla/show_bug.cgi?id=18032>
+ <https://sourceware.org/bugzilla/show_bug.cgi?id=18036>
+ are fixed in glibc 2.22.
+ These bugs are not easy to test for reliably (without mmap),
+ therefore test the glibc version. */
+ #if defined __GLIBC__
+ if (__GLIBC__ == 2 && __GLIBC_MINOR__ < 22)
+ result |= 4;
+ #endif
/* This test fails on FreeBSD 13.2, NetBSD 9.3, Cygwin 3.4.6. */
if (!y ("[[:alnum:]]", "a", 0))
result |= 8;
@@ -158,6 +169,24 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
*yes) ;;
*) REPLACE_FNMATCH=1 ;;
esac
+ dnl On AIX 7.2 in 32-bit mode, fnmatch()'s only POSIX compliance problem is
+ dnl that is does not support characters outside the Unicode BMP correctly.
+ dnl Test case: fnmatch ("x?y", "x\360\237\230\213y", 0) == 0
+ dnl This is due to wchar_t being only 16 bits wide.
+ AC_REQUIRE([gl_UCHAR_H])
+ if test $SMALL_WCHAR_T = 1; then
+ case "$host_os" in
+ cygwin*)
+ dnl On Cygwin < 3.5.0, the above $gl_fnmatch_result came out as 'no',
+ dnl On Cygwin >= 3.5.0, fnmatch supports all Unicode characters,
+ dnl despite wchar_t being only 16 bits wide (because internally it
+ dnl works on wint_t values).
+ ;;
+ *)
+ REPLACE_FNMATCH=1
+ ;;
+ esac
+ fi
fi
if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then
gl_REPLACE_FNMATCH_H
diff --git a/gl/m4/fnmatch_h.m4 b/gl/m4/fnmatch_h.m4
index 40a62b6..58cd7dc 100644
--- a/gl/m4/fnmatch_h.m4
+++ b/gl/m4/fnmatch_h.m4
@@ -1,5 +1,5 @@
# fnmatch_h.m4 serial 8
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/free.m4 b/gl/m4/free.m4
index 0389dea..4f6dc2e 100644
--- a/gl/m4/free.m4
+++ b/gl/m4/free.m4
@@ -1,5 +1,5 @@
# free.m4 serial 6
-# Copyright (C) 2003-2005, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2003-2005, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/fstat.m4 b/gl/m4/fstat.m4
index 7cb2edb..5e73b4e 100644
--- a/gl/m4/fstat.m4
+++ b/gl/m4/fstat.m4
@@ -1,5 +1,5 @@
-# fstat.m4 serial 8
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# fstat.m4 serial 10
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,10 +10,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/gl/m4/fstatat.m4 b/gl/m4/fstatat.m4
index 0830769..c22569b 100644
--- a/gl/m4/fstatat.m4
+++ b/gl/m4/fstatat.m4
@@ -1,5 +1,5 @@
-# fstatat.m4 serial 4
-dnl Copyright (C) 2004-2023 Free Software Foundation, Inc.
+# fstatat.m4 serial 5
+dnl Copyright (C) 2004-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -50,7 +50,7 @@ AC_DEFUN([gl_FUNC_FSTATAT],
esac
case $host_os in
- solaris*)
+ darwin* | solaris*)
REPLACE_FSTATAT=1 ;;
esac
diff --git a/gl/m4/getcwd-abort-bug.m4 b/gl/m4/getcwd-abort-bug.m4
index cd1240c..11f6a8a 100644
--- a/gl/m4/getcwd-abort-bug.m4
+++ b/gl/m4/getcwd-abort-bug.m4
@@ -3,7 +3,7 @@
# name is unusually large. Any length between 4k and 16k trigger the bug
# when using glibc-2.4.90-9 or older.
-# Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/getcwd-path-max.m4 b/gl/m4/getcwd-path-max.m4
index 516c078..d30e75a 100644
--- a/gl/m4/getcwd-path-max.m4
+++ b/gl/m4/getcwd-path-max.m4
@@ -6,7 +6,7 @@
# I've heard that this is due to a Linux kernel bug, and that it has
# been fixed between 2.4.21-pre3 and 2.4.21-pre4.
-# Copyright (C) 2003-2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2003-2007, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/getcwd.m4 b/gl/m4/getcwd.m4
index e95db05..558a032 100644
--- a/gl/m4/getcwd.m4
+++ b/gl/m4/getcwd.m4
@@ -1,12 +1,12 @@
# getcwd.m4 - check for working getcwd that is compatible with glibc
-# Copyright (C) 2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# Written by Paul Eggert.
-# serial 20
+# serial 21
AC_DEFUN([gl_FUNC_GETCWD_NULL],
[
@@ -116,7 +116,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/gl/m4/getdelim.m4 b/gl/m4/getdelim.m4
index 60555b9..0dbd8bc 100644
--- a/gl/m4/getdelim.m4
+++ b/gl/m4/getdelim.m4
@@ -1,6 +1,6 @@
# getdelim.m4 serial 19
-dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc.
dnl
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/getdtablesize.m4 b/gl/m4/getdtablesize.m4
index 8bcda90..3b89456 100644
--- a/gl/m4/getdtablesize.m4
+++ b/gl/m4/getdtablesize.m4
@@ -1,5 +1,5 @@
# getdtablesize.m4 serial 8
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/getline.m4 b/gl/m4/getline.m4
index 83e7e93..1a7e890 100644
--- a/gl/m4/getline.m4
+++ b/gl/m4/getline.m4
@@ -1,6 +1,6 @@
# getline.m4 serial 33
-dnl Copyright (C) 1998-2003, 2005-2007, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 1998-2003, 2005-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl
dnl This file is free software; the Free Software Foundation
diff --git a/gl/m4/getlogin.m4 b/gl/m4/getlogin.m4
index 0686b5f..844e465 100644
--- a/gl/m4/getlogin.m4
+++ b/gl/m4/getlogin.m4
@@ -1,5 +1,5 @@
-# getlogin.m4 serial 6
-dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
+# getlogin.m4 serial 7
+dnl Copyright (C) 2010-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -23,7 +23,7 @@ AC_DEFUN([gl_LIB_GETLOGIN],
[
AC_REQUIRE([AC_CANONICAL_HOST])
case $host_os in
- mingw*)
+ mingw* | windows*)
GETLOGIN_LIB='-ladvapi32' ;;
*)
GETLOGIN_LIB= ;;
diff --git a/gl/m4/getlogin_r.m4 b/gl/m4/getlogin_r.m4
index 4383ea6..f56b99a 100644
--- a/gl/m4/getlogin_r.m4
+++ b/gl/m4/getlogin_r.m4
@@ -1,6 +1,6 @@
#serial 15
-# Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/getopt.m4 b/gl/m4/getopt.m4
index 7981a09..be812d8 100644
--- a/gl/m4/getopt.m4
+++ b/gl/m4/getopt.m4
@@ -1,5 +1,5 @@
-# getopt.m4 serial 48
-dnl Copyright (C) 2002-2006, 2008-2023 Free Software Foundation, Inc.
+# getopt.m4 serial 49
+dnl Copyright (C) 2002-2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -197,8 +197,8 @@ main ()
fi
else
case "$host_os" in
- darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
- *) gl_cv_func_getopt_posix="guessing yes";;
+ darwin* | aix* | mingw* | windows*) gl_cv_func_getopt_posix="guessing no";;
+ *) gl_cv_func_getopt_posix="guessing yes";;
esac
fi
])
diff --git a/gl/m4/getpagesize.m4 b/gl/m4/getpagesize.m4
index 79925a7..35dc257 100644
--- a/gl/m4/getpagesize.m4
+++ b/gl/m4/getpagesize.m4
@@ -1,5 +1,5 @@
-# getpagesize.m4 serial 10
-dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2023 Free Software Foundation,
+# getpagesize.m4 serial 11
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2024 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,
@@ -22,7 +22,7 @@ AC_DEFUN([gl_FUNC_GETPAGESIZE],
fi
fi
case "$host_os" in
- mingw*)
+ mingw* | windows*)
REPLACE_GETPAGESIZE=1
;;
esac
diff --git a/gl/m4/getprogname.m4 b/gl/m4/getprogname.m4
index 2b741f5..b8f9f23 100644
--- a/gl/m4/getprogname.m4
+++ b/gl/m4/getprogname.m4
@@ -1,6 +1,6 @@
# getprogname.m4 - check for getprogname or replacements for it
-# Copyright (C) 2016-2023 Free Software Foundation, Inc.
+# Copyright (C) 2016-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/getrandom.m4 b/gl/m4/getrandom.m4
index 7b7f9ce..55be445 100644
--- a/gl/m4/getrandom.m4
+++ b/gl/m4/getrandom.m4
@@ -1,5 +1,5 @@
-# getrandom.m4 serial 11
-dnl Copyright 2020-2023 Free Software Foundation, Inc.
+# getrandom.m4 serial 13
+dnl Copyright 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,6 +9,8 @@ dnl Written by Paul Eggert.
AC_DEFUN([gl_FUNC_GETRANDOM],
[
AC_REQUIRE([gl_SYS_RANDOM_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
gl_CHECK_FUNCS_ANDROID([getrandom],
[[/* Additional includes are needed before <sys/random.h> on uClibc
and Mac OS X. */
@@ -45,7 +47,7 @@ AC_DEFUN([gl_FUNC_GETRANDOM],
fi
case "$host_os" in
- mingw*)
+ mingw* | windows*)
AC_CHECK_HEADERS([bcrypt.h], [], [],
[[#include <windows.h>
]])
diff --git a/gl/m4/gettime.m4 b/gl/m4/gettime.m4
index ec1f97e..e450e6b 100644
--- a/gl/m4/gettime.m4
+++ b/gl/m4/gettime.m4
@@ -1,5 +1,5 @@
# gettime.m4 serial 14
-dnl Copyright (C) 2002, 2004-2006, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/gettimeofday.m4 b/gl/m4/gettimeofday.m4
index 5051d61..3526991 100644
--- a/gl/m4/gettimeofday.m4
+++ b/gl/m4/gettimeofday.m4
@@ -1,6 +1,6 @@
-# serial 29
+# serial 30
-# Copyright (C) 2001-2003, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2024 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.
@@ -57,7 +57,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/gl/m4/glob.m4 b/gl/m4/glob.m4
index 62be6a3..7fc9e38 100644
--- a/gl/m4/glob.m4
+++ b/gl/m4/glob.m4
@@ -1,5 +1,5 @@
# glob.m4 serial 30
-dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/glob_h.m4 b/gl/m4/glob_h.m4
index 3ab5031..f871df2 100644
--- a/gl/m4/glob_h.m4
+++ b/gl/m4/glob_h.m4
@@ -1,5 +1,5 @@
# glob_h.m4 serial 9
-dnl Copyright (C) 2018-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2018-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4
index 2426eb6..5dd755f 100644
--- a/gl/m4/gnulib-common.m4
+++ b/gl/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
-# gnulib-common.m4 serial 87
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# gnulib-common.m4 serial 89
+dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -114,10 +114,14 @@ AC_DEFUN([gl_COMMON_BODY], [
# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
#endif
-/* Disable GCC -Wpedantic if using __has_c_attribute and this is not C23+. */
-#if (defined __has_c_attribute && _GL_GNUC_PREREQ (4, 6) \
- && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) <= 201710)
-# pragma GCC diagnostic ignored "-Wpedantic"
+/* 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
/* Define if, in a function declaration, the attributes in bracket syntax
@@ -242,7 +246,7 @@ AC_DEFUN([gl_COMMON_BODY], [
in C++ also: namespace, class, template specialization. */
#ifndef _GL_ATTRIBUTE_DEPRECATED
# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
-# ifdef __has_c_attribute
+# if _GL_HAVE___HAS_C_ATTRIBUTE
# if __has_c_attribute (__deprecated__)
# define _GL_ATTRIBUTE_DEPRECATED [[__deprecated__]]
# endif
@@ -291,7 +295,7 @@ AC_DEFUN([gl_COMMON_BODY], [
/* Applies to: Empty statement (;), inside a 'switch' statement. */
/* Always expands to something. */
#ifndef _GL_ATTRIBUTE_FALLTHROUGH
-# ifdef __has_c_attribute
+# if _GL_HAVE___HAS_C_ATTRIBUTE
# if __has_c_attribute (__fallthrough__)
# define _GL_ATTRIBUTE_FALLTHROUGH [[__fallthrough__]]
# endif
@@ -380,7 +384,7 @@ AC_DEFUN([gl_COMMON_BODY], [
# if !defined __apple_build_version__ && __clang_major__ >= 10
# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
# endif
-# elif defined __has_c_attribute
+# elif _GL_HAVE___HAS_C_ATTRIBUTE
# if __has_c_attribute (__maybe_unused__)
# define _GL_ATTRIBUTE_MAYBE_UNUSED [[__maybe_unused__]]
# endif
@@ -411,7 +415,7 @@ AC_DEFUN([gl_COMMON_BODY], [
# if __clang_major__ >= 1000
# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
# endif
-# elif defined __has_c_attribute
+# elif _GL_HAVE___HAS_C_ATTRIBUTE
# if __has_c_attribute (__nodiscard__)
# define _GL_ATTRIBUTE_NODISCARD [[__nodiscard__]]
# endif
@@ -466,11 +470,25 @@ AC_DEFUN([gl_COMMON_BODY], [
/* _GL_ATTRIBUTE_NOTHROW declares that the function does not throw exceptions.
*/
/* Applies to: functions. */
+/* After a function's parameter list, this attribute must come first, before
+ other attributes. */
#ifndef _GL_ATTRIBUTE_NOTHROW
-# if _GL_HAS_ATTRIBUTE (nothrow) && !defined __cplusplus
-# define _GL_ATTRIBUTE_NOTHROW __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
-# define _GL_ATTRIBUTE_NOTHROW
+# if _GL_HAS_ATTRIBUTE (nothrow)
+# define _GL_ATTRIBUTE_NOTHROW __attribute__ ((__nothrow__))
+# else
+# define _GL_ATTRIBUTE_NOTHROW
+# endif
# endif
#endif
@@ -1056,6 +1074,7 @@ 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
@@ -1081,6 +1100,9 @@ AC_DEFUN([gl_CC_GNULIB_WARNINGS],
#if __GNUC__ + (__GNUC_MINOR__ >= 8) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
-Wno-pedantic
#endif
+ #if 3 < __clang_major__ + (9 <= __clang_minor__)
+ -Wno-tautological-constant-out-of-range-compare
+ #endif
#if __GNUC__ + (__GNUC_MINOR__ >= 3) > 4 || (__clang_major__ + (__clang_minor__ >= 9) > 3)
-Wno-sign-conversion
-Wno-type-limits
diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4
index 37a3a78..92bea6c 100644
--- a/gl/m4/gnulib-comp.m4
+++ b/gl/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-2023 Free Software Foundation, Inc.
+# Copyright (C) 2002-2024 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
@@ -54,8 +54,24 @@ AC_DEFUN([gl_EARLY],
# Code from module attribute:
# Code from module basename-lgpl:
# Code from module bitrotate:
+ # Code from module btoc32:
# Code from module btowc:
# Code from module builtin-expect:
+ # Code from module c32_apply_type_test:
+ # Code from module c32_get_type_test:
+ # Code from module c32isalnum:
+ # Code from module c32isalpha:
+ # Code from module c32isblank:
+ # Code from module c32iscntrl:
+ # Code from module c32isdigit:
+ # Code from module c32isgraph:
+ # Code from module c32islower:
+ # Code from module c32isprint:
+ # Code from module c32ispunct:
+ # Code from module c32isspace:
+ # Code from module c32isupper:
+ # Code from module c32isxdigit:
+ # Code from module c32tolower:
# Code from module c99:
# Code from module calloc-gnu:
# Code from module calloc-posix:
@@ -137,10 +153,16 @@ AC_DEFUN([gl_EARLY],
# Code from module idpriv-droptemp:
# Code from module idx:
# Code from module include_next:
+ # Code from module inline:
# Code from module intprops:
# Code from module inttypes-incomplete:
# Code from module ioctl:
# Code from module isblank:
+ # Code from module iswblank:
+ # Code from module iswctype:
+ # Code from module iswdigit:
+ # Code from module iswpunct:
+ # Code from module iswxdigit:
# Code from module langinfo:
# Code from module largefile:
AC_REQUIRE([AC_SYS_LARGEFILE])
@@ -160,9 +182,12 @@ AC_DEFUN([gl_EARLY],
# Code from module malloca:
# Code from module manywarnings:
# Code from module map:
+ # Code from module mbrtoc32:
# Code from module mbrtowc:
# Code from module mbsinit:
+ # Code from module mbsrtoc32s:
# Code from module mbsrtowcs:
+ # Code from module mbszero:
# Code from module mbtowc:
# Code from module memchr:
# Code from module memmem:
@@ -271,8 +296,32 @@ AC_DEFUN([gl_EARLY],
gl_THREADLIB_EARLY
# Code from module time-h:
# Code from module timespec:
+ # Code from module uchar:
+ # Code from module unicase/base:
+ # Code from module unicase/tolower:
+ # Code from module unictype/base:
+ # Code from module unictype/ctype-alnum:
+ # Code from module unictype/ctype-alpha:
+ # Code from module unictype/ctype-blank:
+ # Code from module unictype/ctype-cntrl:
+ # Code from module unictype/ctype-digit:
+ # Code from module unictype/ctype-graph:
+ # Code from module unictype/ctype-lower:
+ # Code from module unictype/ctype-print:
+ # Code from module unictype/ctype-punct:
+ # Code from module unictype/ctype-space:
+ # Code from module unictype/ctype-upper:
+ # Code from module unictype/ctype-xdigit:
+ # Code from module uninorm/base:
# Code from module unistd:
# Code from module unistd-safer:
+ # Code from module unistr/base:
+ # Code from module unistr/u32-chr:
+ # Code from module unistr/u32-cpy:
+ # Code from module unistr/u32-pcpy:
+ # Code from module unistr/u32-strcat:
+ # Code from module unistr/u32-strlen:
+ # Code from module unitypes:
# Code from module unlink:
# Code from module unlinkat:
# Code from module utime:
@@ -287,6 +336,7 @@ AC_DEFUN([gl_EARLY],
# Code from module warnings:
# Code from module wchar:
# Code from module wcrtomb:
+ # Code from module wctype:
# Code from module wctype-h:
# Code from module windows-mutex:
# Code from module windows-once:
@@ -343,6 +393,7 @@ AC_SUBST([LTALLOCA])
gl_CONDITIONAL_HEADER([assert.h])
AC_PROG_MKDIR_P
AC_REQUIRE([AC_CANONICAL_HOST])
+ gl_UCHAR_MODULE_INDICATOR([btoc32])
gl_FUNC_BTOWC
gl_CONDITIONAL([GL_COND_OBJ_BTOWC],
[test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1])
@@ -351,6 +402,86 @@ AC_SUBST([LTALLOCA])
])
gl_WCHAR_MODULE_INDICATOR([btowc])
gl___BUILTIN_EXPECT
+ gl_UCHAR_MODULE_INDICATOR([c32_apply_type_test])
+ gl_UCHAR_MODULE_INDICATOR([c32_get_type_test])
+ 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])
+ 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])
+ 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])
+ 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])
+ 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])
+ 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])
+ 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])
+ 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])
+ 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])
+ 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])
+ 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])
+ 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])
+ 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])
+ gl_UCHAR_MODULE_INDICATOR([c32tolower])
gl_FUNC_CALLOC_GNU
if test $REPLACE_CALLOC_FOR_CALLOC_GNU = 1; then
AC_LIBOBJ([calloc])
@@ -440,7 +571,8 @@ AC_SUBST([LTALLOCA])
AC_PROG_MKDIR_P
AC_REQUIRE([gl_EXTERN_INLINE])
gl_FUNC_FCHDIR
- gl_CONDITIONAL([GL_COND_OBJ_FCHDIR], [test $HAVE_FCHDIR = 0])
+ gl_CONDITIONAL([GL_COND_OBJ_FCHDIR],
+ [test $HAVE_FCHDIR = 0 || test $REPLACE_FCHDIR = 1])
AM_COND_IF([GL_COND_OBJ_FCHDIR], [
gl_PREREQ_FCHDIR
])
@@ -499,7 +631,7 @@ AC_SUBST([LTALLOCA])
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
@@ -611,6 +743,7 @@ AC_SUBST([LTALLOCA])
AC_DEFUN([gl_HAVE_MODULE_HAVELIB])
gl_IDPRIV
gl_IDPRIV
+ gl_INLINE
gl_INTTYPES_INCOMPLETE
gl_INTTYPES_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
@@ -622,6 +755,26 @@ AC_SUBST([LTALLOCA])
gl_CONDITIONAL([GL_COND_OBJ_ISBLANK], [test $HAVE_ISBLANK = 0])
gl_MODULE_INDICATOR([isblank])
gl_CTYPE_MODULE_INDICATOR([isblank])
+ gl_FUNC_ISWBLANK
+ gl_CONDITIONAL([GL_COND_OBJ_ISWBLANK],
+ [! { test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; } && { test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; }])
+ gl_WCTYPE_MODULE_INDICATOR([iswblank])
+ gl_FUNC_ISWCTYPE
+ gl_CONDITIONAL([GL_COND_OBJ_ISWCTYPE],
+ [test $HAVE_WCTYPE_T = 0 || test $GNULIBHEADERS_OVERRIDE_WINT_T = 1 || test $REPLACE_WCTYPE = 1])
+ gl_WCTYPE_MODULE_INDICATOR([iswctype])
+ gl_FUNC_ISWDIGIT
+ 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
@@ -667,6 +820,18 @@ AC_SUBST([LTALLOCA])
fi
gl_STDLIB_MODULE_INDICATOR([malloc-posix])
gl_MALLOCA
+ 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])
@@ -686,6 +851,9 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_MBSINIT
])
gl_WCHAR_MODULE_INDICATOR([mbsinit])
+ AC_REQUIRE([gl_UCHAR_H])
+ AC_LIBOBJ([mbsrtoc32s-state])
+ gl_UCHAR_MODULE_INDICATOR([mbsrtoc32s])
gl_FUNC_MBSRTOWCS
gl_CONDITIONAL([GL_COND_OBJ_MBSRTOWCS],
[test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1])
@@ -694,6 +862,10 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_MBSRTOWCS
])
gl_WCHAR_MODULE_INDICATOR([mbsrtowcs])
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ gl_MUSL_LIBC
+ gl_WCHAR_MODULE_INDICATOR([mbszero])
gl_FUNC_MBTOWC
gl_CONDITIONAL([GL_COND_OBJ_MBTOWC],
[test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1])
@@ -941,7 +1113,7 @@ AC_SUBST([LTALLOCA])
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
@@ -1116,10 +1288,74 @@ AC_SUBST([LTALLOCA])
gl_TIME_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
gl_TIMESPEC
+ 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
+ gl_LIBUNISTRING_MODULE([0.9.11], [unicase/tolower])
+ gl_LIBUNISTRING_LIBHEADER([1.2], [unictype.h])
+ gl_UNICTYPE_H
+ gl_UNICTYPE_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-alnum])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-alpha])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-blank])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-cntrl])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-digit])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-graph])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([0.9.11], [unictype/ctype-lower])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-print])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-punct])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-space])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([0.9.11], [unictype/ctype-upper])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-xdigit])
+ gl_LIBUNISTRING_LIBHEADER([1.2], [uninorm.h])
+ gl_UNINORM_H
+ gl_UNINORM_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
gl_UNISTD_H
gl_UNISTD_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
gl_UNISTD_SAFER
+ gl_LIBUNISTRING_LIBHEADER([1.2], [unistr.h])
+ AC_PROG_MKDIR_P
+ gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-chr])
+ gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-cpy])
+ gl_LIBUNISTRING_MODULE([1.2], [unistr/u32-pcpy])
+ gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-strcat])
+ gl_LIBUNISTRING_MODULE([0.9], [unistr/u32-strlen])
+ 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_FUNC_UNLINK
gl_CONDITIONAL([GL_COND_OBJ_UNLINK], [test $REPLACE_UNLINK = 1])
gl_UNISTD_MODULE_INDICATOR([unlink])
@@ -1161,21 +1397,24 @@ AC_SUBST([LTALLOCA])
gl_PREREQ_WCRTOMB
])
gl_WCHAR_MODULE_INDICATOR([wcrtomb])
+ gl_FUNC_WCTYPE
+ gl_CONDITIONAL([GL_COND_OBJ_WCTYPE], [test $HAVE_WCTYPE = 0 || test $REPLACE_WCTYPE = 1])
+ gl_WCTYPE_MODULE_INDICATOR([wctype])
gl_WCTYPE_H
gl_WCTYPE_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
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_FUNC_WMEMCHR
gl_CONDITIONAL([GL_COND_OBJ_WMEMCHR], [test $HAVE_WMEMCHR = 0])
gl_WCHAR_MODULE_INDICATOR([wmemchr])
@@ -1392,8 +1631,26 @@ AC_DEFUN([gl_FILE_LIST], [
lib/basename.c
lib/bitrotate.c
lib/bitrotate.h
+ lib/btoc32.c
lib/btowc.c
lib/c++defs.h
+ lib/c32_apply_type_test.c
+ lib/c32_get_type_test.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/calloc.c
lib/canonicalize-lgpl.c
lib/canonicalize.c
@@ -1531,6 +1788,12 @@ AC_DEFUN([gl_FILE_LIST], [
lib/inttypes.in.h
lib/ioctl.c
lib/isblank.c
+ lib/iswblank.c
+ lib/iswctype-impl.h
+ lib/iswctype.c
+ lib/iswdigit.c
+ lib/iswpunct.c
+ lib/iswxdigit.c
lib/itold.c
lib/langinfo.in.h
lib/lc-charset-dispatch.c
@@ -1557,13 +1820,17 @@ AC_DEFUN([gl_FILE_LIST], [
lib/malloc/scratch_buffer_set_array_size.c
lib/malloca.c
lib/malloca.h
+ lib/mbrtoc32.c
lib/mbrtowc-impl-utf8.h
lib/mbrtowc-impl.h
lib/mbrtowc.c
lib/mbsinit.c
+ lib/mbsrtoc32s-state.c
+ lib/mbsrtoc32s.c
lib/mbsrtowcs-impl.h
lib/mbsrtowcs-state.c
lib/mbsrtowcs.c
+ lib/mbszero.c
lib/mbtowc-impl.h
lib/mbtowc-lock.c
lib/mbtowc-lock.h
@@ -1624,6 +1891,7 @@ AC_DEFUN([gl_FILE_LIST], [
lib/renameatu.h
lib/rewinddir.c
lib/rmdir.c
+ lib/same-inode.c
lib/same-inode.h
lib/save-cwd.c
lib/save-cwd.h
@@ -1694,10 +1962,53 @@ AC_DEFUN([gl_FILE_LIST], [
lib/time.in.h
lib/timespec.c
lib/timespec.h
+ lib/uchar.in.h
+ lib/unicase.in.h
+ lib/unicase/simple-mapping.h
+ lib/unicase/tolower.c
+ lib/unicase/tolower.h
+ lib/unictype.in.h
+ lib/unictype/bitmap.h
+ lib/unictype/ctype_alnum.c
+ lib/unictype/ctype_alnum.h
+ lib/unictype/ctype_alpha.c
+ lib/unictype/ctype_alpha.h
+ lib/unictype/ctype_blank.c
+ lib/unictype/ctype_blank.h
+ lib/unictype/ctype_cntrl.c
+ lib/unictype/ctype_cntrl.h
+ lib/unictype/ctype_digit.c
+ lib/unictype/ctype_digit.h
+ lib/unictype/ctype_graph.c
+ lib/unictype/ctype_graph.h
+ lib/unictype/ctype_lower.c
+ lib/unictype/ctype_lower.h
+ lib/unictype/ctype_print.c
+ lib/unictype/ctype_print.h
+ lib/unictype/ctype_punct.c
+ lib/unictype/ctype_punct.h
+ lib/unictype/ctype_space.c
+ lib/unictype/ctype_space.h
+ lib/unictype/ctype_upper.c
+ lib/unictype/ctype_upper.h
+ lib/unictype/ctype_xdigit.c
+ lib/unictype/ctype_xdigit.h
+ lib/uninorm.in.h
lib/unistd--.h
lib/unistd-safer.h
lib/unistd.c
lib/unistd.in.h
+ lib/unistr.in.h
+ lib/unistr/u-cpy.h
+ lib/unistr/u-pcpy.h
+ lib/unistr/u-strcat.h
+ lib/unistr/u-strlen.h
+ lib/unistr/u32-chr.c
+ lib/unistr/u32-cpy.c
+ lib/unistr/u32-pcpy.c
+ lib/unistr/u32-strcat.c
+ lib/unistr/u32-strlen.c
+ lib/unitypes.in.h
lib/unlink.c
lib/unlinkat.c
lib/utime.c
@@ -1716,6 +2027,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/wchar.in.h
lib/wcrtomb.c
lib/wctype-h.c
+ lib/wctype-impl.h
+ lib/wctype.c
lib/wctype.in.h
lib/windows-initguard.h
lib/windows-mutex.c
@@ -1812,11 +2125,17 @@ AC_DEFUN([gl_FILE_LIST], [
m4/host-cpu-c-abi.m4
m4/idpriv.m4
m4/include_next.m4
+ m4/inline.m4
m4/intmax_t.m4
m4/inttypes.m4
m4/inttypes_h.m4
m4/ioctl.m4
m4/isblank.m4
+ m4/iswblank.m4
+ m4/iswctype.m4
+ m4/iswdigit.m4
+ m4/iswpunct.m4
+ m4/iswxdigit.m4
m4/langinfo_h.m4
m4/largefile.m4
m4/lchown.m4
@@ -1824,6 +2143,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/lib-ld.m4
m4/lib-link.m4
m4/lib-prefix.m4
+ m4/libunistring-base.m4
m4/limits-h.m4
m4/localcharset.m4
m4/locale-fr.m4
@@ -1838,6 +2158,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/manywarnings-c++.m4
m4/manywarnings.m4
m4/math_h.m4
+ m4/mbrtoc32.m4
m4/mbrtowc.m4
m4/mbsinit.m4
m4/mbsrtowcs.m4
@@ -1937,6 +2258,10 @@ AC_DEFUN([gl_FILE_LIST], [
m4/threadlib.m4
m4/time_h.m4
m4/timespec.m4
+ m4/uchar_h.m4
+ m4/unicase_h.m4
+ m4/unictype_h.m4
+ m4/uninorm_h.m4
m4/unistd-safer.m4
m4/unistd_h.m4
m4/unlink.m4
@@ -1955,6 +2280,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/wchar_h.m4
m4/wchar_t.m4
m4/wcrtomb.m4
+ m4/wctype.m4
m4/wctype_h.m4
m4/wint_t.m4
m4/wmemchr.m4
diff --git a/gl/m4/host-cpu-c-abi.m4 b/gl/m4/host-cpu-c-abi.m4
index 134f228..2aa413c 100644
--- a/gl/m4/host-cpu-c-abi.m4
+++ b/gl/m4/host-cpu-c-abi.m4
@@ -1,5 +1,5 @@
-# host-cpu-c-abi.m4 serial 15
-dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
+# host-cpu-c-abi.m4 serial 16
+dnl Copyright (C) 2002-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -468,10 +468,11 @@ 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
+ 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 | 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 )
+ x86_64 | alpha | arm64 | aarch64c | 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 ;;
@@ -535,7 +536,7 @@ changequote([,])dnl
[gl_cv_host_cpu_c_abi_32bit=yes])
;;
- arm* | aarch64 )
+ arm* | aarch64 | aarch64c )
# Assume arm with EABI.
# On arm64 systems, the C compiler may be generating code in one of
# these ABIs:
diff --git a/gl/m4/idpriv.m4 b/gl/m4/idpriv.m4
index fc3dd17..a894ec2 100644
--- a/gl/m4/idpriv.m4
+++ b/gl/m4/idpriv.m4
@@ -1,5 +1,5 @@
# idpriv.m4 serial 1
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/include_next.m4 b/gl/m4/include_next.m4
index 9f19215..8a1c52c 100644
--- a/gl/m4/include_next.m4
+++ b/gl/m4/include_next.m4
@@ -1,5 +1,5 @@
# include_next.m4 serial 26
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/inline.m4 b/gl/m4/inline.m4
new file mode 100644
index 0000000..208f742
--- /dev/null
+++ b/gl/m4/inline.m4
@@ -0,0 +1,40 @@
+# inline.m4 serial 4
+dnl Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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 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.
+AC_DEFUN([gl_INLINE],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_CACHE_CHECK([whether the compiler generally respects inline],
+ [gl_cv_c_inline_effective],
+ [if test $ac_cv_c_inline = no; then
+ gl_cv_c_inline_effective=no
+ else
+ dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is
+ dnl specified.
+ dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result
+ dnl depends on optimization flags, which can be in CFLAGS.
+ dnl (AC_EGREP_CPP looks only at the CPPFLAGS.)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[#ifdef __NO_INLINE__
+ #error "inline is not effective"
+ #endif]])],
+ [gl_cv_c_inline_effective=yes],
+ [gl_cv_c_inline_effective=no])
+ fi
+ ])
+ if test $gl_cv_c_inline_effective = yes; then
+ AC_DEFINE([HAVE_INLINE], [1],
+ [Define to 1 if the compiler supports one of the keywords
+ 'inline', '__inline__', '__inline' and effectively inlines
+ functions marked as such.])
+ fi
+])
diff --git a/gl/m4/intmax_t.m4 b/gl/m4/intmax_t.m4
index ef32e1b..d3d2120 100644
--- a/gl/m4/intmax_t.m4
+++ b/gl/m4/intmax_t.m4
@@ -1,5 +1,5 @@
# intmax_t.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/inttypes.m4 b/gl/m4/inttypes.m4
index e7efbe9..6abf9db 100644
--- a/gl/m4/inttypes.m4
+++ b/gl/m4/inttypes.m4
@@ -1,5 +1,5 @@
# inttypes.m4 serial 37
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/inttypes_h.m4 b/gl/m4/inttypes_h.m4
index 68c60e9..ae0a00f 100644
--- a/gl/m4/inttypes_h.m4
+++ b/gl/m4/inttypes_h.m4
@@ -1,5 +1,5 @@
# inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ioctl.m4 b/gl/m4/ioctl.m4
index 83036c3..4278883 100644
--- a/gl/m4/ioctl.m4
+++ b/gl/m4/ioctl.m4
@@ -1,5 +1,5 @@
# ioctl.m4 serial 6
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/isblank.m4 b/gl/m4/isblank.m4
index 809eab4..d07472c 100644
--- a/gl/m4/isblank.m4
+++ b/gl/m4/isblank.m4
@@ -1,5 +1,5 @@
# isblank.m4 serial 3
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/iswblank.m4 b/gl/m4/iswblank.m4
new file mode 100644
index 0000000..e450f0b
--- /dev/null
+++ b/gl/m4/iswblank.m4
@@ -0,0 +1,38 @@
+# iswblank.m4 serial 7
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_ISWBLANK],
+[
+ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+ AC_REQUIRE([gl_WCTYPE_H])
+ dnl Persuade glibc <wctype.h> to declare iswblank().
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ 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 \
+ || case "$gl_cv_onwards_func_iswblank" in \
+ future*) true ;; \
+ *) false ;; \
+ esac; then
+ REPLACE_ISWBLANK=1
+ fi
+ fi
+ if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+ dnl Redefine all of iswcntrl, ..., towupper in <wctype.h>.
+ :
+ else
+ if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
+ dnl Redefine only iswblank.
+ :
+ fi
+ fi
+
+])
diff --git a/gl/m4/iswctype.m4 b/gl/m4/iswctype.m4
new file mode 100644
index 0000000..775f222
--- /dev/null
+++ b/gl/m4/iswctype.m4
@@ -0,0 +1,13 @@
+# iswctype.m4 serial 3
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_ISWCTYPE],
+[
+ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+ AC_REQUIRE([gl_WCTYPE_H])
+ dnl Determine REPLACE_WCTYPE.
+ AC_REQUIRE([gl_FUNC_WCTYPE])
+])
diff --git a/gl/m4/iswdigit.m4 b/gl/m4/iswdigit.m4
new file mode 100644
index 0000000..d13c1ae
--- /dev/null
+++ b/gl/m4/iswdigit.m4
@@ -0,0 +1,120 @@
+# iswdigit.m4 serial 6
+dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ISWDIGIT],
+[
+ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+ AC_REQUIRE([gl_WCTYPE_H])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+ dnl <wctype.h> redefines iswdigit already.
+ REPLACE_ISWDIGIT="$REPLACE_ISWCNTRL"
+ else
+ AC_CACHE_CHECK([whether iswdigit is ISO C compliant],
+ [gl_cv_func_iswdigit_works],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
+ freebsd* | dragonfly* | netbsd* | solaris* | mingw* | windows*)
+ gl_cv_func_iswdigit_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_iswdigit_works="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
+
+/* Returns the value of iswdigit for the multibyte character s[0..n-1]. */
+static int
+for_character (const char *s, size_t n)
+{
+ mbstate_t state;
+ wchar_t wc;
+ size_t ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, s, n, &state);
+ if (ret != n)
+ abort ();
+
+ return iswdigit (wc);
+}
+
+int
+main (int argc, char *argv[])
+{
+ int is;
+ int result = 0;
+
+ if (strcmp ("$LOCALE_FR", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ /* This fails on mingw, MSVC 14. */
+ /* U+00B2 SUPERSCRIPT TWO */
+ is = for_character ("\262", 1);
+ if (!(is == 0))
+ result |= 1;
+ }
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ /* This fails on NetBSD 8.0. */
+ /* U+FF11 FULLWIDTH DIGIT ONE */
+ is = for_character ("\243\261", 2);
+ if (!(is == 0))
+ result |= 2;
+ }
+ if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
+ /* U+0663 ARABIC-INDIC DIGIT THREE */
+ is = for_character ("\331\243", 2);
+ if (!(is == 0))
+ result |= 4;
+ /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14. */
+ /* U+FF11 FULLWIDTH DIGIT ONE */
+ is = for_character ("\357\274\221", 3);
+ if (!(is == 0))
+ result |= 8;
+ }
+ if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4. */
+ /* U+FF11 FULLWIDTH DIGIT ONE */
+ is = for_character ("\243\261", 2);
+ if (!(is == 0))
+ result |= 16;
+ }
+ return result;
+}]])],
+ [gl_cv_func_iswdigit_works=yes],
+ [gl_cv_func_iswdigit_works=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_iswdigit_works" in
+ *yes) ;;
+ *) REPLACE_ISWDIGIT=1 ;;
+ esac
+ fi
+])
diff --git a/gl/m4/iswpunct.m4 b/gl/m4/iswpunct.m4
new file mode 100644
index 0000000..2be15ab
--- /dev/null
+++ b/gl/m4/iswpunct.m4
@@ -0,0 +1,48 @@
+# iswpunct.m4 serial 2
+dnl Copyright (C) 2023-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_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/gl/m4/iswxdigit.m4 b/gl/m4/iswxdigit.m4
new file mode 100644
index 0000000..d42f0d1
--- /dev/null
+++ b/gl/m4/iswxdigit.m4
@@ -0,0 +1,110 @@
+# iswxdigit.m4 serial 6
+dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_ISWXDIGIT],
+[
+ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+ AC_REQUIRE([gl_WCTYPE_H])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
+ dnl <wctype.h> redefines iswxdigit already.
+ REPLACE_ISWXDIGIT="$REPLACE_ISWCNTRL"
+ else
+ AC_CACHE_CHECK([whether iswxdigit is ISO C compliant],
+ [gl_cv_func_iswxdigit_works],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
+ freebsd* | dragonfly* | netbsd* | solaris* | mingw* | windows*)
+ gl_cv_func_iswxdigit_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_iswxdigit_works="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
+ AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
+
+/* Returns the value of iswxdigit for the multibyte character s[0..n-1]. */
+static int
+for_character (const char *s, size_t n)
+{
+ mbstate_t state;
+ wchar_t wc;
+ size_t ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, s, n, &state);
+ if (ret != n)
+ abort ();
+
+ return iswxdigit (wc);
+}
+
+int
+main (int argc, char *argv[])
+{
+ int is;
+ int result = 0;
+
+ if (strcmp ("$LOCALE_JA", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ /* This fails on NetBSD 8.0. */
+ /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
+ is = for_character ("\243\301", 2);
+ if (!(is == 0))
+ result |= 1;
+ }
+ if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+ && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ /* This fails on FreeBSD 13.0. */
+ /* U+0663 ARABIC-INDIC DIGIT THREE */
+ is = for_character ("\331\243", 2);
+ if (!(is == 0))
+ result |= 2;
+ /* This fails on MSVC 14. */
+ /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
+ is = for_character ("\357\274\241", 3);
+ if (!(is == 0))
+ result |= 4;
+ }
+ if (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 */
+ is = for_character ("\243\261", 2);
+ if (!(is == 0))
+ result |= 8;
+ }
+ return result;
+}]])],
+ [gl_cv_func_iswxdigit_works=yes],
+ [gl_cv_func_iswxdigit_works=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_iswxdigit_works" in
+ *yes) ;;
+ *) REPLACE_ISWXDIGIT=1 ;;
+ esac
+ fi
+])
diff --git a/gl/m4/langinfo_h.m4 b/gl/m4/langinfo_h.m4
index b17a526..888b161 100644
--- a/gl/m4/langinfo_h.m4
+++ b/gl/m4/langinfo_h.m4
@@ -1,5 +1,5 @@
# langinfo_h.m4 serial 12
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/largefile.m4 b/gl/m4/largefile.m4
index 8b051c0..cbe9bc1 100644
--- a/gl/m4/largefile.m4
+++ b/gl/m4/largefile.m4
@@ -1,7 +1,7 @@
# 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-2023 Free Software Foundation, Inc.
+# Copyright 1992-1996, 1998-2024 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.
@@ -247,7 +247,7 @@ AC_DEFUN([_AC_SYS_LARGEFILE_PROBE],
AC_REQUIRE([AC_CANONICAL_HOST])
if test $ac_opt_found != yes; then
AS_CASE([$host_os],
- [mingw*],
+ [mingw* | windows*],
[ac_cv_sys_largefile_opts="supported through gnulib"
ac_opt_found=yes]
)
@@ -305,7 +305,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.
diff --git a/gl/m4/lchown.m4 b/gl/m4/lchown.m4
index c3e6c11..91a8c54 100644
--- a/gl/m4/lchown.m4
+++ b/gl/m4/lchown.m4
@@ -1,7 +1,7 @@
# serial 17
# Determine whether we need the lchown wrapper.
-dnl Copyright (C) 1998, 2001, 2003-2007, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 1998, 2001, 2003-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
diff --git a/gl/m4/lib-ignore.m4 b/gl/m4/lib-ignore.m4
index c4d0217..431b7e7 100644
--- a/gl/m4/lib-ignore.m4
+++ b/gl/m4/lib-ignore.m4
@@ -1,6 +1,6 @@
# If possible, ignore libraries that are not depended on.
-dnl Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lib-ld.m4 b/gl/m4/lib-ld.m4
index acc6127..f079332 100644
--- a/gl/m4/lib-ld.m4
+++ b/gl/m4/lib-ld.m4
@@ -1,5 +1,5 @@
-# lib-ld.m4 serial 11
-dnl Copyright (C) 1996-2003, 2009-2023 Free Software Foundation, Inc.
+# lib-ld.m4 serial 12
+dnl Copyright (C) 1996-2003, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -67,7 +67,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'` ;;
*)
diff --git a/gl/m4/lib-link.m4 b/gl/m4/lib-link.m4
index 5f8afae..d91ecb3 100644
--- a/gl/m4/lib-link.m4
+++ b/gl/m4/lib-link.m4
@@ -1,5 +1,5 @@
# lib-link.m4 serial 33
-dnl Copyright (C) 2001-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lib-prefix.m4 b/gl/m4/lib-prefix.m4
index aefe7f7..d597553 100644
--- a/gl/m4/lib-prefix.m4
+++ b/gl/m4/lib-prefix.m4
@@ -1,5 +1,5 @@
# lib-prefix.m4 serial 20
-dnl Copyright (C) 2001-2005, 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2005, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/libunistring-base.m4 b/gl/m4/libunistring-base.m4
new file mode 100644
index 0000000..7c3f65e
--- /dev/null
+++ b/gl/m4/libunistring-base.m4
@@ -0,0 +1,196 @@
+# libunistring-base.m4 serial 8
+dnl Copyright (C) 2010-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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 Paolo Bonzini and Bruno Haible.
+
+dnl gl_LIBUNISTRING_MODULE([VERSION], [Module])
+dnl Declares that the source files of Module should be compiled, unless we
+dnl are linking with libunistring and its version is >= the given VERSION.
+dnl Defines an automake conditional LIBUNISTRING_COMPILE_$MODULE that is
+dnl true if the source files of Module should be compiled.
+dnl This macro is to be used for public libunistring API, not for
+dnl undocumented API.
+dnl
+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],
+[
+ AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE])
+ dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from
+ dnl gl_LIBUNISTRING_CORE if that macro has been run.
+ gl_CONDITIONAL(AS_TR_CPP([LIBUNISTRING_COMPILE_$2]),
+ [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 - empty if the automake conditional LIBUNISTRING_COMPILE_$MODULE
+dnl evaluates to true.
+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])=
+ 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.
+dnl HeaderFile should be relative to the lib directory and end in '.h'.
+dnl Prepares for substituting LIBUNISTRING_HEADERFILE (to HeaderFile or empty).
+dnl
+dnl When we are linking with the already installed libunistring and its version
+dnl is < VERSION, we create HeaderFile here, because we may compile functions
+dnl (via gl_LIBUNISTRING_MODULE above) that are not contained in the installed
+dnl version.
+dnl When we are linking with the already installed libunistring and its version
+dnl is > VERSION, we don't create HeaderFile here: it could cause compilation
+dnl errors in other libunistring header files if some types are missing.
+dnl
+dnl You have to bump the VERSION argument to the next projected version
+dnl number each time you make a non-comment change to the HeaderFile.
+
+AC_DEFUN([gl_LIBUNISTRING_LIBHEADER],
+[
+ AC_REQUIRE([gl_LIBUNISTRING_LIB_PREPARE])
+ dnl Use the variables HAVE_LIBUNISTRING, LIBUNISTRING_VERSION from
+ dnl gl_LIBUNISTRING_CORE if that macro has been run.
+ if gl_LIBUNISTRING_VERSION_CMP([$1]); then
+ dnl It is OK to use a .h file in lib/ from within tests/, but not vice
+ dnl versa.
+ if test -z "$LIBUNISTRING_[]AS_TR_CPP([$2])"; then
+ LIBUNISTRING_[]AS_TR_CPP([$2])="${gl_source_base_prefix}$2"
+ fi
+ else
+ LIBUNISTRING_[]AS_TR_CPP([$2])=
+ fi
+ AC_SUBST([LIBUNISTRING_]AS_TR_CPP([$2]))
+])
+
+dnl Miscellaneous preparations/initializations.
+
+AC_DEFUN([gl_LIBUNISTRING_LIB_PREPARE],
+[
+ dnl Ensure that HAVE_LIBUNISTRING is fully determined at this point.
+ m4_ifdef([gl_LIBUNISTRING], [AC_REQUIRE([gl_LIBUNISTRING])])
+
+ AC_REQUIRE([AC_PROG_AWK])
+
+dnl Sed expressions to extract the parts of a version number.
+changequote(,)
+gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;}
+i\
+0
+q
+'
+changequote([,])
+
+ if test "$HAVE_LIBUNISTRING" = yes; then
+ LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
+ LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
+ LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
+ fi
+
+ 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],
+[ { test "$HAVE_LIBUNISTRING" != yes \
+ || {
+ dnl AS_LITERAL_IF exists and works fine since autoconf-2.59 at least.
+ AS_LITERAL_IF([$1],
+ [dnl This is the optimized variant, that assumes the argument is a literal:
+ m4_pushdef([requested_version_major],
+ [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^\([0-9]*\).*], [\1]), [])])
+ m4_pushdef([requested_version_minor],
+ [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.]\([0-9]*\).*], [\1]), [$1])])
+ m4_pushdef([requested_version_subminor],
+ [gl_LIBUNISTRING_ARG_OR_ZERO(m4_bpatsubst([$1], [^[0-9]*[.][0-9]*[.]\([0-9]*\).*], [\1]), [$1])])
+ test $LIBUNISTRING_VERSION_MAJOR -lt requested_version_major \
+ || { test $LIBUNISTRING_VERSION_MAJOR -eq requested_version_major \
+ && { test $LIBUNISTRING_VERSION_MINOR -lt requested_version_minor \
+ || { test $LIBUNISTRING_VERSION_MINOR -eq requested_version_minor \
+ && test $LIBUNISTRING_VERSION_SUBMINOR -lt requested_version_subminor
+ }
+ }
+ }
+ m4_popdef([requested_version_subminor])
+ m4_popdef([requested_version_minor])
+ m4_popdef([requested_version_major])
+ ],
+ [dnl This is the unoptimized variant:
+ requested_version_major=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_major"`
+ requested_version_minor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_minor"`
+ requested_version_subminor=`echo '$1' | sed -n -e "$gl_libunistring_sed_extract_subminor"`
+ test $LIBUNISTRING_VERSION_MAJOR -lt $requested_version_major \
+ || { test $LIBUNISTRING_VERSION_MAJOR -eq $requested_version_major \
+ && { test $LIBUNISTRING_VERSION_MINOR -lt $requested_version_minor \
+ || { test $LIBUNISTRING_VERSION_MINOR -eq $requested_version_minor \
+ && test $LIBUNISTRING_VERSION_SUBMINOR -lt $requested_version_subminor
+ }
+ }
+ }
+ ])
+ }
+ }])
+
+dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the
+dnl same as ORIG, otherwise to 0.
+m4_define([gl_LIBUNISTRING_ARG_OR_ZERO], [m4_if([$1], [$2], [0], [$1])])
diff --git a/gl/m4/limits-h.m4 b/gl/m4/limits-h.m4
index 6a5983e..1825328 100644
--- a/gl/m4/limits-h.m4
+++ b/gl/m4/limits-h.m4
@@ -1,6 +1,6 @@
dnl Check whether limits.h has needed features.
-dnl Copyright 2016-2023 Free Software Foundation, Inc.
+dnl Copyright 2016-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/localcharset.m4 b/gl/m4/localcharset.m4
index 15b6b2a..abf07dc 100644
--- a/gl/m4/localcharset.m4
+++ b/gl/m4/localcharset.m4
@@ -1,5 +1,5 @@
# localcharset.m4 serial 8
-dnl Copyright (C) 2002, 2004, 2006, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2004, 2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/locale-fr.m4 b/gl/m4/locale-fr.m4
index 107ab93..c952856 100644
--- a/gl/m4/locale-fr.m4
+++ b/gl/m4/locale-fr.m4
@@ -1,5 +1,5 @@
-# locale-fr.m4 serial 21
-dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
+# locale-fr.m4 serial 23
+dnl Copyright (C) 2003, 2005-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -86,7 +86,7 @@ int main () {
# "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
# "ja" 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
@@ -133,6 +133,12 @@ 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])
])
@@ -222,7 +228,7 @@ int main () {
# "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
# "ja" as "Japanese" or "Japanese_Japan.932",
# and similar.
- mingw*)
+ 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
@@ -261,6 +267,12 @@ int main () {
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
diff --git a/gl/m4/locale-ja.m4 b/gl/m4/locale-ja.m4
index f6ca327..71a9863 100644
--- a/gl/m4/locale-ja.m4
+++ b/gl/m4/locale-ja.m4
@@ -1,5 +1,5 @@
-# locale-ja.m4 serial 16
-dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
+# locale-ja.m4 serial 18
+dnl Copyright (C) 2003, 2005-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -90,7 +90,7 @@ int main ()
# "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
# "ja" 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.
@@ -139,5 +139,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/gl/m4/locale-zh.m4 b/gl/m4/locale-zh.m4
index 94c5459..f1a58c6 100644
--- a/gl/m4/locale-zh.m4
+++ b/gl/m4/locale-zh.m4
@@ -1,5 +1,5 @@
-# locale-zh.m4 serial 16
-dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
+# locale-zh.m4 serial 18
+dnl Copyright (C) 2003, 2005-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -91,7 +91,7 @@ int main ()
# "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
# "ja" 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 +133,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/gl/m4/locale_h.m4 b/gl/m4/locale_h.m4
index a33a0a4..4e8e3ad 100644
--- a/gl/m4/locale_h.m4
+++ b/gl/m4/locale_h.m4
@@ -1,5 +1,5 @@
-# locale_h.m4 serial 28
-dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
+# locale_h.m4 serial 30
+dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -59,7 +59,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
diff --git a/gl/m4/localeconv.m4 b/gl/m4/localeconv.m4
index 374dcbf..351b4e1 100644
--- a/gl/m4/localeconv.m4
+++ b/gl/m4/localeconv.m4
@@ -1,5 +1,5 @@
-# localeconv.m4 serial 2
-dnl Copyright (C) 2012-2023 Free Software Foundation, Inc.
+# localeconv.m4 serial 3
+dnl Copyright (C) 2012-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -36,7 +36,7 @@ AC_DEFUN([gl_FUNC_LOCALECONV],
# Guess yes on musl systems.
*-musl* | midipix*) gl_cv_func_localeconv_works="guessing yes" ;;
# Guess no on native Windows.
- mingw*) gl_cv_func_localeconv_works="guessing no" ;;
+ 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
diff --git a/gl/m4/lock.m4 b/gl/m4/lock.m4
index 88cf557..2ca3bf2 100644
--- a/gl/m4/lock.m4
+++ b/gl/m4/lock.m4
@@ -1,5 +1,5 @@
# lock.m4 serial 14
-dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/lstat.m4 b/gl/m4/lstat.m4
index 2bc4669..48cc865 100644
--- a/gl/m4/lstat.m4
+++ b/gl/m4/lstat.m4
@@ -1,6 +1,6 @@
-# serial 34
+# serial 36
-# Copyright (C) 1997-2001, 2003-2023 Free Software Foundation, Inc.
+# Copyright (C) 1997-2001, 2003-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -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
@@ -62,7 +62,7 @@ AC_DEFUN([gl_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK],
*-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/gl/m4/malloc.m4 b/gl/m4/malloc.m4
index bc58017..635d672 100644
--- a/gl/m4/malloc.m4
+++ b/gl/m4/malloc.m4
@@ -1,5 +1,5 @@
-# malloc.m4 serial 29
-dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
+# malloc.m4 serial 31
+dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -16,7 +16,8 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
[[#include <stdlib.h>
]],
[[void *p = malloc (0);
- int result = !p;
+ void * volatile vp = p;
+ int result = !vp;
free (p);
return result;]])
],
@@ -26,7 +27,7 @@ AC_DEFUN([_AC_FUNC_MALLOC_IF],
# Guess yes on platforms where we know the result.
*-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
| gnu* | *-musl* | midipix* | midnightbsd* \
- | hpux* | solaris* | cygwin* | mingw* | msys* )
+ | hpux* | solaris* | cygwin* | mingw* | windows* | 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" ;;
@@ -128,7 +129,7 @@ AC_DEFUN([gl_CHECK_MALLOC_POSIX],
dnl except on those platforms where we have seen 'test-malloc-gnu',
dnl 'test-realloc-gnu', 'test-calloc-gnu' fail.
case "$host_os" in
- mingw*)
+ mingw* | windows*)
gl_cv_func_malloc_posix=no ;;
irix* | solaris*)
dnl On IRIX 6.5, the three functions return NULL with errno unset
diff --git a/gl/m4/malloca.m4 b/gl/m4/malloca.m4
index 1d777eb..77e1595 100644
--- a/gl/m4/malloca.m4
+++ b/gl/m4/malloca.m4
@@ -1,5 +1,5 @@
# malloca.m4 serial 2
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/manywarnings.m4 b/gl/m4/manywarnings.m4
index a06f26f..4d44f3a 100644
--- a/gl/m4/manywarnings.m4
+++ b/gl/m4/manywarnings.m4
@@ -1,5 +1,5 @@
# manywarnings.m4 serial 24
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/math_h.m4 b/gl/m4/math_h.m4
index d2e90ff..7ba3c04 100644
--- a/gl/m4/math_h.m4
+++ b/gl/m4/math_h.m4
@@ -1,5 +1,5 @@
-# math_h.m4 serial 125
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# math_h.m4 serial 126
+dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -50,7 +50,7 @@ AC_DEFUN_ONCE([gl_MATH_H],
modf modff modfl powf
remainder remainderf remainderl
rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
- tanf tanl tanhf trunc truncf truncl])
+ tanf tanl tanhf totalorder totalorderf totalorderl trunc truncf truncl])
])
# gl_MATH_MODULE_INDICATOR([modulename])
@@ -125,6 +125,7 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
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])
@@ -164,6 +165,9 @@ 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_TRUNC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCL])
@@ -242,6 +246,9 @@ 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_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])
@@ -319,6 +326,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])
@@ -354,6 +362,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
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_TRUNC=0; AC_SUBST([REPLACE_TRUNC])
REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF])
REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL])
@@ -364,7 +375,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/gl/m4/mbrtoc32.m4 b/gl/m4/mbrtoc32.m4
new file mode 100644
index 0000000..c1eb126
--- /dev/null
+++ b/gl/m4/mbrtoc32.m4
@@ -0,0 +1,266 @@
+# mbrtoc32.m4 serial 18
+dnl Copyright (C) 2014-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_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
+ 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
+ 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 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]) dnl for cross-compiles
+ 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], [
+ :
+])
diff --git a/gl/m4/mbrtowc.m4 b/gl/m4/mbrtowc.m4
index 430e9ad..6ff5182 100644
--- a/gl/m4/mbrtowc.m4
+++ b/gl/m4/mbrtowc.m4
@@ -1,5 +1,5 @@
-# mbrtowc.m4 serial 43 -*- coding: utf-8 -*-
-dnl Copyright (C) 2001-2002, 2004-2005, 2008-2023 Free Software Foundation,
+# mbrtowc.m4 serial 44 -*- coding: utf-8 -*-
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2024 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,
@@ -91,7 +91,9 @@ AC_DEFUN([gl_FUNC_MBRTOWC],
fi
if test $REPLACE_MBSTATE_T = 1; then
case "$host_os" in
- mingw*) MBRTOWC_LIB= ;;
+ mingw* | windows*)
+ MBRTOWC_LIB=
+ ;;
*)
gl_WEAK_SYMBOLS
case "$gl_cv_have_weak" in
@@ -129,7 +131,7 @@ AC_DEFUN_ONCE([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
@@ -411,14 +413,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
+ || { case "$host_os" in mingw* | windows*) true;; *) false;; esac; }; then
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
#include <locale.h>
@@ -582,13 +586,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>
@@ -700,7 +704,7 @@ AC_DEFUN([gl_MBRTOWC_EMPTY_INPUT],
# Guess no on Android.
linux*-android*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
# Guess no on native Windows.
- mingw*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
+ mingw* | windows*) gl_cv_func_mbrtowc_empty_input="guessing no" ;;
*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;;
esac
])
@@ -745,9 +749,9 @@ AC_DEFUN([gl_MBRTOWC_C_LOCALE],
[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" ;;
- *) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal" ;;
+ # 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/gl/m4/mbsinit.m4 b/gl/m4/mbsinit.m4
index c388a8b..10a5b61 100644
--- a/gl/m4/mbsinit.m4
+++ b/gl/m4/mbsinit.m4
@@ -1,5 +1,5 @@
-# mbsinit.m4 serial 9
-dnl Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc.
+# mbsinit.m4 serial 10
+dnl Copyright (C) 2008, 2010-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -32,7 +32,7 @@ AC_DEFUN([gl_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/gl/m4/mbsrtowcs.m4 b/gl/m4/mbsrtowcs.m4
index 720f727..84ac0b7 100644
--- a/gl/m4/mbsrtowcs.m4
+++ b/gl/m4/mbsrtowcs.m4
@@ -1,5 +1,5 @@
-# mbsrtowcs.m4 serial 16
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+# mbsrtowcs.m4 serial 17
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -61,10 +61,12 @@ AC_DEFUN([gl_MBSRTOWCS_WORKS],
dnl is present.
changequote(,)dnl
case "$host_os" in
- # Guess no on HP-UX, Solaris, mingw.
- hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
- # Guess yes otherwise.
- *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
+ # Guess no on HP-UX, Solaris, mingw.
+ hpux* | solaris* | mingw* | windows*)
+ gl_cv_func_mbsrtowcs_works="guessing no" ;;
+ # Guess yes otherwise.
+ *)
+ gl_cv_func_mbsrtowcs_works="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
diff --git a/gl/m4/mbstate_t.m4 b/gl/m4/mbstate_t.m4
index dcd66b9..b2bcba4 100644
--- a/gl/m4/mbstate_t.m4
+++ b/gl/m4/mbstate_t.m4
@@ -1,5 +1,5 @@
# mbstate_t.m4 serial 14
-dnl Copyright (C) 2000-2002, 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2000-2002, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mbtowc.m4 b/gl/m4/mbtowc.m4
index 02ed6eb..2bdc879 100644
--- a/gl/m4/mbtowc.m4
+++ b/gl/m4/mbtowc.m4
@@ -1,5 +1,5 @@
# mbtowc.m4 serial 5
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/memchr.m4 b/gl/m4/memchr.m4
index 4f1aed0..6184ddc 100644
--- a/gl/m4/memchr.m4
+++ b/gl/m4/memchr.m4
@@ -1,5 +1,5 @@
-# memchr.m4 serial 18
-dnl Copyright (C) 2002-2004, 2009-2023 Free Software Foundation, Inc.
+# memchr.m4 serial 19
+dnl Copyright (C) 2002-2004, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -85,12 +85,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/gl/m4/memmem.m4 b/gl/m4/memmem.m4
index 3cf46bc..7985266 100644
--- a/gl/m4/memmem.m4
+++ b/gl/m4/memmem.m4
@@ -1,5 +1,5 @@
# memmem.m4 serial 29
-dnl Copyright (C) 2002-2004, 2007-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mempcpy.m4 b/gl/m4/mempcpy.m4
index 612b77b..94ce05d 100644
--- a/gl/m4/mempcpy.m4
+++ b/gl/m4/mempcpy.m4
@@ -1,5 +1,5 @@
# mempcpy.m4 serial 14
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/memrchr.m4 b/gl/m4/memrchr.m4
index 7611ac7..b4ccdfa 100644
--- a/gl/m4/memrchr.m4
+++ b/gl/m4/memrchr.m4
@@ -1,5 +1,5 @@
# memrchr.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/minmax.m4 b/gl/m4/minmax.m4
index fd09846..5c0a927 100644
--- a/gl/m4/minmax.m4
+++ b/gl/m4/minmax.m4
@@ -1,5 +1,5 @@
# minmax.m4 serial 4
-dnl Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mkdir.m4 b/gl/m4/mkdir.m4
index c2bc4da..48297f9 100644
--- a/gl/m4/mkdir.m4
+++ b/gl/m4/mkdir.m4
@@ -1,6 +1,6 @@
-# serial 18
+# serial 20
-# Copyright (C) 2001, 2003-2004, 2006, 2008-2023 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2004, 2006, 2008-2024 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.
@@ -25,23 +25,24 @@ AC_DEFUN([gl_FUNC_MKDIR],
[gl_cv_func_mkdir_trailing_slash_works=yes],
[gl_cv_func_mkdir_trailing_slash_works=no],
[case "$host_os" in
- # Guess yes on Linux systems.
- linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
- # Guess yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
- # Guess yes on MSVC, no on mingw.
- mingw*) AC_EGREP_CPP([Known], [
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ # Guess yes on MSVC, no on mingw.
+ windows*-msvc*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
+ mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
Known
#endif
- ],
- [gl_cv_func_mkdir_trailing_slash_works="guessing yes"],
- [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
- ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
+ ],
+ [gl_cv_func_mkdir_trailing_slash_works="guessing yes"],
+ [gl_cv_func_mkdir_trailing_slash_works="guessing no"])
+ ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.dir
@@ -65,16 +66,16 @@ AC_DEFUN([gl_FUNC_MKDIR],
[gl_cv_func_mkdir_trailing_dot_works=yes],
[gl_cv_func_mkdir_trailing_dot_works=no],
[case "$host_os" in
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
- # Guess yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+ # Guess yes on musl systems.
+ *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.dir
diff --git a/gl/m4/mkdtemp.m4 b/gl/m4/mkdtemp.m4
index f5dd4a8..8408e72 100644
--- a/gl/m4/mkdtemp.m4
+++ b/gl/m4/mkdtemp.m4
@@ -1,5 +1,5 @@
# mkdtemp.m4 serial 8
-dnl Copyright (C) 2001-2003, 2006-2007, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 2001-2003, 2006-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/mkstemp.m4 b/gl/m4/mkstemp.m4
index d4a15ea..106a6b8 100644
--- a/gl/m4/mkstemp.m4
+++ b/gl/m4/mkstemp.m4
@@ -1,6 +1,6 @@
-#serial 29
+#serial 30
-# Copyright (C) 2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003-2007, 2009-2024 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.
@@ -63,7 +63,7 @@ AC_DEFUN([gl_FUNC_MKSTEMP],
# Guess yes on musl systems.
*-musl* | midipix*) gl_cv_func_working_mkstemp="guessing yes" ;;
# Guess no on native Windows.
- mingw*) gl_cv_func_working_mkstemp="guessing no" ;;
+ mingw* | windows*) gl_cv_func_working_mkstemp="guessing no" ;;
# If we don't know, obey --enable-cross-guesses.
*) gl_cv_func_working_mkstemp="$gl_cross_guess_normal" ;;
esac
diff --git a/gl/m4/mmap-anon.m4 b/gl/m4/mmap-anon.m4
index d07d26e..642f07d 100644
--- a/gl/m4/mmap-anon.m4
+++ b/gl/m4/mmap-anon.m4
@@ -1,5 +1,5 @@
# mmap-anon.m4 serial 12
-dnl Copyright (C) 2005, 2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/mode_t.m4 b/gl/m4/mode_t.m4
index 82197c0..af88da5 100644
--- a/gl/m4/mode_t.m4
+++ b/gl/m4/mode_t.m4
@@ -1,5 +1,5 @@
# mode_t.m4 serial 2
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/msvc-inval.m4 b/gl/m4/msvc-inval.m4
index 8d9d21b..b8ba598 100644
--- a/gl/m4/msvc-inval.m4
+++ b/gl/m4/msvc-inval.m4
@@ -1,5 +1,5 @@
# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/msvc-nothrow.m4 b/gl/m4/msvc-nothrow.m4
index 0263e49..3e332a0 100644
--- a/gl/m4/msvc-nothrow.m4
+++ b/gl/m4/msvc-nothrow.m4
@@ -1,5 +1,5 @@
# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/multiarch.m4 b/gl/m4/multiarch.m4
index 3ba5b0f..5f8339f 100644
--- a/gl/m4/multiarch.m4
+++ b/gl/m4/multiarch.m4
@@ -1,5 +1,5 @@
# multiarch.m4 serial 9
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/musl.m4 b/gl/m4/musl.m4
index e28a3fe..34d2c1f 100644
--- a/gl/m4/musl.m4
+++ b/gl/m4/musl.m4
@@ -1,5 +1,5 @@
# musl.m4 serial 4
-dnl Copyright (C) 2019-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/nanosleep.m4 b/gl/m4/nanosleep.m4
index e21a3e3..2302d2d 100644
--- a/gl/m4/nanosleep.m4
+++ b/gl/m4/nanosleep.m4
@@ -1,11 +1,11 @@
-# serial 43
+# serial 45
dnl From Jim Meyering.
dnl Check for the nanosleep function.
dnl If not found, use the supplied replacement.
dnl
-# Copyright (C) 1999-2001, 2003-2023 Free Software Foundation, Inc.
+# Copyright (C) 1999-2001, 2003-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -116,19 +116,20 @@ 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.
+ # 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
diff --git a/gl/m4/nl_langinfo.m4 b/gl/m4/nl_langinfo.m4
index 7648d52..3ffefe3 100644
--- a/gl/m4/nl_langinfo.m4
+++ b/gl/m4/nl_langinfo.m4
@@ -1,5 +1,5 @@
# nl_langinfo.m4 serial 11
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/nocrash.m4 b/gl/m4/nocrash.m4
index 6a76638..9730fc0 100644
--- a/gl/m4/nocrash.m4
+++ b/gl/m4/nocrash.m4
@@ -1,5 +1,5 @@
# nocrash.m4 serial 5
-dnl Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/nonblocking.m4 b/gl/m4/nonblocking.m4
index f63d2ae..e22eb58 100644
--- a/gl/m4/nonblocking.m4
+++ b/gl/m4/nonblocking.m4
@@ -1,5 +1,5 @@
-# nonblocking.m4 serial 3
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# nonblocking.m4 serial 4
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -19,11 +19,11 @@ AC_DEFUN([gl_NONBLOCKING_IO_BODY],
[
AC_REQUIRE([AC_CANONICAL_HOST])
case "$host_os" in
- mingw*) gl_cv_have_nonblocking=no ;;
- *) gl_cv_have_nonblocking=yes ;;
+ mingw* | windows*) gl_cv_have_nonblocking=no ;;
+ *) gl_cv_have_nonblocking=yes ;;
esac
case "$host_os" in
- mingw*) gl_cv_have_open_O_NONBLOCK=no ;;
- *) gl_cv_have_open_O_NONBLOCK=yes ;;
+ mingw* | windows*) gl_cv_have_open_O_NONBLOCK=no ;;
+ *) gl_cv_have_open_O_NONBLOCK=yes ;;
esac
])
diff --git a/gl/m4/off_t.m4 b/gl/m4/off_t.m4
index 880f347..f3259f9 100644
--- a/gl/m4/off_t.m4
+++ b/gl/m4/off_t.m4
@@ -1,5 +1,5 @@
# off_t.m4 serial 1
-dnl Copyright (C) 2012-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2012-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/open-cloexec.m4 b/gl/m4/open-cloexec.m4
index fd572fc..a2d5032 100644
--- a/gl/m4/open-cloexec.m4
+++ b/gl/m4/open-cloexec.m4
@@ -1,6 +1,6 @@
# Test whether O_CLOEXEC is defined.
-dnl Copyright 2017-2023 Free Software Foundation, Inc.
+dnl Copyright 2017-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/open-slash.m4 b/gl/m4/open-slash.m4
index 1f731f8..45310c0 100644
--- a/gl/m4/open-slash.m4
+++ b/gl/m4/open-slash.m4
@@ -1,5 +1,5 @@
# open-slash.m4 serial 2
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/open.m4 b/gl/m4/open.m4
index 94fa2bb..91e5c31 100644
--- a/gl/m4/open.m4
+++ b/gl/m4/open.m4
@@ -1,5 +1,5 @@
-# open.m4 serial 15
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# open.m4 serial 16
+dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -9,7 +9,7 @@ AC_DEFUN([gl_FUNC_OPEN],
AC_REQUIRE([AC_CANONICAL_HOST])
AC_REQUIRE([gl_PREPROC_O_CLOEXEC])
case "$host_os" in
- mingw* | pw*)
+ mingw* | windows* | pw*)
REPLACE_OPEN=1
;;
*)
diff --git a/gl/m4/openat.m4 b/gl/m4/openat.m4
index bbbcad8..47cd93c 100644
--- a/gl/m4/openat.m4
+++ b/gl/m4/openat.m4
@@ -1,7 +1,7 @@
# serial 46
# See if we need to use our replacement for Solaris' openat et al functions.
-dnl Copyright (C) 2004-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/opendir.m4 b/gl/m4/opendir.m4
index 2e9be76..7cc8632 100644
--- a/gl/m4/opendir.m4
+++ b/gl/m4/opendir.m4
@@ -1,5 +1,5 @@
-# opendir.m4 serial 6
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# opendir.m4 serial 7
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -13,16 +13,12 @@ AC_DEFUN([gl_FUNC_OPENDIR],
if test $ac_cv_func_opendir = no; then
HAVE_OPENDIR=0
else
- dnl Replace opendir() on native Windows, to support fdopendir().
+ dnl Replace opendir() on native Windows and OS/2 kLIBC,
+ dnl to support fdopendir().
AC_REQUIRE([gl_DIRENT_DIR])
if test $DIR_HAS_FD_MEMBER = 0; then
REPLACE_OPENDIR=1
fi
- dnl Replace opendir() on OS/2 kLIBC to support dirfd() function replaced
- dnl by gnulib.
- case $host_os in
- os2*) REPLACE_OPENDIR=1 ;;
- esac
dnl Replace opendir() for supporting the gnulib-defined fchdir() function,
dnl to keep fchdir's bookkeeping up-to-date.
m4_ifdef([gl_FUNC_FCHDIR], [
diff --git a/gl/m4/pathmax.m4 b/gl/m4/pathmax.m4
index 6d47d2c..a0fc296 100644
--- a/gl/m4/pathmax.m4
+++ b/gl/m4/pathmax.m4
@@ -1,5 +1,5 @@
# pathmax.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/pipe.m4 b/gl/m4/pipe.m4
index 1ad6688..1d3742e 100644
--- a/gl/m4/pipe.m4
+++ b/gl/m4/pipe.m4
@@ -1,5 +1,5 @@
# pipe.m4 serial 2
-dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/printf.m4 b/gl/m4/printf.m4
index 8b8f010..bb67d59 100644
--- a/gl/m4/printf.m4
+++ b/gl/m4/printf.m4
@@ -1,5 +1,5 @@
-# printf.m4 serial 84
-dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
+# printf.m4 serial 89
+dnl Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -86,7 +86,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
@@ -179,7 +180,7 @@ int main ()
# Guess no on Android.
linux*-android*) gl_cv_func_printf_sizes_c23="guessing no";;
# Guess no on native Windows.
- mingw*) gl_cv_func_printf_sizes_c23="guessing no";;
+ 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
@@ -223,20 +224,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
])
])
@@ -354,7 +356,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
@@ -568,7 +571,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
@@ -681,7 +685,7 @@ int main ()
# 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
@@ -736,7 +740,7 @@ int main ()
# Guess no on Android.
linux*-android*) gl_cv_func_printf_directive_b="guessing no";;
# Guess no on native Windows.
- mingw*) gl_cv_func_printf_directive_b="guessing no";;
+ 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
@@ -791,7 +795,7 @@ int main ()
# Guess no on Android.
linux*-android*) gl_cv_func_printf_directive_uppercase_b="guessing no";;
# Guess no on native Windows.
- mingw*) gl_cv_func_printf_directive_uppercase_b="guessing no";;
+ 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
@@ -857,7 +861,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
@@ -923,21 +928,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
])
])
@@ -1007,18 +1012,18 @@ 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";;
+ 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* | windows*) gl_cv_func_printf_directive_ls="guessing yes";;
+ *) gl_cv_func_printf_directive_ls="guessing yes";;
esac
changequote([,])dnl
])
@@ -1027,7 +1032,8 @@ 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 don't produce a NUL byte.
+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],
@@ -1046,13 +1052,11 @@ int main ()
{
int result = 0;
char buf[100];
- /* This test fails on glibc 2.35, FreeBSD 13.1, NetBSD 9.0, OpenBSD 7.2,
- macOS 12.5, AIX 7.2, Solaris 11.4.
- glibc 2.35 bug: <https://sourceware.org/bugzilla/show_bug.cgi?id=30257> */
+ /* 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
- || strcmp (buf, "az") != 0)
+ || memcmp (buf, "a\0z", 4) != 0)
result |= 1;
}
return result;
@@ -1062,10 +1066,10 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- # Guess yes on musl libc.
- *-musl* | midipix*) gl_cv_func_printf_directive_lc="guessing yes";;
- # Guess no otherwise.
- *) gl_cv_func_printf_directive_lc="guessing no";;
+ # 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
])
@@ -1102,13 +1106,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
])
@@ -1143,13 +1151,13 @@ int main ()
[
changequote(,)dnl
case "$host_os" in
- cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
- netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
- # Guess no on 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
])
@@ -1186,16 +1194,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
])
@@ -1242,7 +1250,7 @@ changequote(,)dnl
# 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";;
+ 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
@@ -1251,6 +1259,50 @@ 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
+ ])
+ ])
+])
+
dnl Test whether the *printf family of functions supports large precisions.
dnl On mingw, precisions larger than 512 are treated like 512, in integer,
dnl floating-point or pointer output. On Solaris 10/x86, precisions larger
@@ -1297,12 +1349,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
])
@@ -1518,7 +1570,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
@@ -1615,7 +1667,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
@@ -1719,7 +1772,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
@@ -1767,11 +1820,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
])
])
@@ -1844,40 +1897,40 @@ 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* | 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.
+ # 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 IRIX >= 6.5.
+ irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
- gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
- 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
])
@@ -1934,17 +1987,17 @@ int main()
[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.
+ # 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* | 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";;
+ 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
])
])
@@ -1983,7 +2036,7 @@ int main ()
[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.
+ # Guess yes on glibc >= 2.17 systems.
*-gnu* | gnu*)
AC_EGREP_CPP([Unlucky], [
#include <features.h>
@@ -1996,14 +2049,14 @@ int main ()
[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 native Windows.
- mingw*) 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";;
+ # 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 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
])
])
@@ -2040,16 +2093,16 @@ int main ()
[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*) 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";;
+ # 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
])
])
@@ -2073,17 +2126,18 @@ dnl 13 = gl_PRINTF_POSITIONS
dnl 14 = gl_PRINTF_FLAG_GROUPING
dnl 15 = gl_PRINTF_FLAG_LEFTADJUST
dnl 16 = gl_PRINTF_FLAG_ZERO
-dnl 17 = gl_PRINTF_PRECISION
-dnl 18 = gl_PRINTF_ENOMEM
-dnl 19 = gl_SNPRINTF_PRESENCE
-dnl 20 = gl_SNPRINTF_TRUNCATION_C99
-dnl 21 = gl_SNPRINTF_RETVAL_C99
-dnl 22 = gl_SNPRINTF_DIRECTIVE_N
-dnl 23 = gl_SNPRINTF_SIZE1
-dnl 24 = gl_VSNPRINTF_ZEROSIZE_C99
-dnl 25 = gl_SWPRINTF_WORKS
-dnl 26 = gl_SWPRINTF_DIRECTIVE_LA
-dnl 27 = gl_SWPRINTF_DIRECTIVE_LC
+dnl 17 = gl_PRINTF_FLAG_ALT_PRECISION_ZERO
+dnl 18 = gl_PRINTF_PRECISION
+dnl 19 = gl_PRINTF_ENOMEM
+dnl 20 = gl_SNPRINTF_PRESENCE
+dnl 21 = gl_SNPRINTF_TRUNCATION_C99
+dnl 22 = gl_SNPRINTF_RETVAL_C99
+dnl 23 = gl_SNPRINTF_DIRECTIVE_N
+dnl 24 = gl_SNPRINTF_SIZE1
+dnl 25 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl 26 = gl_SWPRINTF_WORKS
+dnl 27 = gl_SWPRINTF_DIRECTIVE_LA
+dnl 28 = gl_SWPRINTF_DIRECTIVE_LC
dnl
dnl 1 = checking whether printf supports size specifiers as in C99...
dnl 2 = checking whether printf supports size specifiers as in C23...
@@ -2101,58 +2155,60 @@ dnl 13 = checking whether printf supports POSIX/XSI format strings with position
dnl 14 = checking whether printf supports the grouping flag...
dnl 15 = checking whether printf supports the left-adjust flag correctly...
dnl 16 = checking whether printf supports the zero flag correctly...
-dnl 17 = checking whether printf supports large precisions...
-dnl 18 = checking whether printf survives out-of-memory conditions...
-dnl 19 = checking for snprintf...
-dnl 20 = checking whether snprintf truncates the result as in C99...
-dnl 21 = checking whether snprintf returns a byte count as in C99...
-dnl 22 = checking whether snprintf fully supports the 'n' directive...
-dnl 23 = checking whether snprintf respects a size of 1...
-dnl 24 = checking whether vsnprintf respects a zero size as in C99...
-dnl 25 = checking whether swprintf works...
-dnl 26 = checking whether swprintf supports the 'La' and 'LA' directives...
-dnl 27 = checking whether swprintf supports the 'lc' directive...
+dnl 17 = checking whether printf supports the alternative flag with a zero precision...
+dnl 18 = checking whether printf supports large precisions...
+dnl 19 = checking whether printf survives out-of-memory conditions...
+dnl 20 = checking for snprintf...
+dnl 21 = checking whether snprintf truncates the result as in C99...
+dnl 22 = checking whether snprintf returns a byte count as in C99...
+dnl 23 = checking whether snprintf fully supports the 'n' directive...
+dnl 24 = checking whether snprintf respects a size of 1...
+dnl 25 = checking whether vsnprintf respects a zero size as in C99...
+dnl 26 = checking whether swprintf works...
+dnl 27 = checking whether swprintf supports the 'La' and 'LA' directives...
+dnl 28 = 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 21 22 23 24 25 26 27
-dnl musl libc 1.2.3 . # . . . . # # . . . . . . . . . . . . . . . . # . #
-dnl glibc 2.35 . # . . . . . . . . . # . . . . . . . . . . . . . . .
-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
+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/gl/m4/pselect.m4 b/gl/m4/pselect.m4
index 6c3d1b8..005b722 100644
--- a/gl/m4/pselect.m4
+++ b/gl/m4/pselect.m4
@@ -1,5 +1,5 @@
# pselect.m4 serial 11
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/pthread_rwlock_rdlock.m4 b/gl/m4/pthread_rwlock_rdlock.m4
index 66b29f8..98e5f0e 100644
--- a/gl/m4/pthread_rwlock_rdlock.m4
+++ b/gl/m4/pthread_rwlock_rdlock.m4
@@ -1,5 +1,5 @@
-# pthread_rwlock_rdlock.m4 serial 5
-dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
+# pthread_rwlock_rdlock.m4 serial 7
+dnl Copyright (C) 2017-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -34,7 +34,7 @@ dnl https://sourceware.org/bugzilla/show_bug.cgi?id=13701
dnl https://bugzilla.redhat.com/show_bug.cgi?id=1410052
AC_DEFUN([gl_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER],
[
- AC_REQUIRE([gl_THREADLIB_EARLY])
+ AC_REQUIRE([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],
@@ -164,7 +164,7 @@ main ()
*-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
+ 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"
diff --git a/gl/m4/pthread_sigmask.m4 b/gl/m4/pthread_sigmask.m4
index 2779528..81be961 100644
--- a/gl/m4/pthread_sigmask.m4
+++ b/gl/m4/pthread_sigmask.m4
@@ -1,5 +1,5 @@
# pthread_sigmask.m4 serial 22
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/raise.m4 b/gl/m4/raise.m4
index f20c439..08b9545 100644
--- a/gl/m4/raise.m4
+++ b/gl/m4/raise.m4
@@ -1,5 +1,5 @@
# raise.m4 serial 4
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/rawmemchr.m4 b/gl/m4/rawmemchr.m4
index a48d829..57d1c29 100644
--- a/gl/m4/rawmemchr.m4
+++ b/gl/m4/rawmemchr.m4
@@ -1,5 +1,5 @@
# rawmemchr.m4 serial 3
-dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/readdir.m4 b/gl/m4/readdir.m4
index 81337e2..2205f13 100644
--- a/gl/m4/readdir.m4
+++ b/gl/m4/readdir.m4
@@ -1,5 +1,5 @@
-# readdir.m4 serial 2
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# readdir.m4 serial 3
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,7 +12,8 @@ AC_DEFUN([gl_FUNC_READDIR],
if test $ac_cv_func_readdir = no; then
HAVE_READDIR=0
else
- dnl Replace readdir() on native Windows, to support fdopendir().
+ dnl Replace readdir() on native Windows and OS/2 kLIBC,
+ dnl to support fdopendir().
AC_REQUIRE([gl_DIRENT_DIR])
if test $DIR_HAS_FD_MEMBER = 0; then
REPLACE_READDIR=1
diff --git a/gl/m4/readlink.m4 b/gl/m4/readlink.m4
index f1d41d2..6d78ec8 100644
--- a/gl/m4/readlink.m4
+++ b/gl/m4/readlink.m4
@@ -1,5 +1,5 @@
# readlink.m4 serial 17
-dnl Copyright (C) 2003, 2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/readlinkat.m4 b/gl/m4/readlinkat.m4
index 5c51356..9982210 100644
--- a/gl/m4/readlinkat.m4
+++ b/gl/m4/readlinkat.m4
@@ -1,7 +1,7 @@
# serial 8
# See if we need to provide readlinkat replacement.
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/realloc.m4 b/gl/m4/realloc.m4
index 2605391..a59af28 100644
--- a/gl/m4/realloc.m4
+++ b/gl/m4/realloc.m4
@@ -1,5 +1,5 @@
-# realloc.m4 serial 27
-dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
+# realloc.m4 serial 29
+dnl Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -16,7 +16,8 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF],
[[#include <stdlib.h>
]],
[[void *p = realloc (0, 0);
- int result = !p;
+ void * volatile vp = p;
+ int result = !vp;
free (p);
return result;]])
],
@@ -26,7 +27,7 @@ AC_DEFUN([_AC_FUNC_REALLOC_IF],
# Guess yes on platforms where we know the result.
*-gnu* | freebsd* | netbsd* | openbsd* | bitrig* \
| gnu* | *-musl* | midipix* | midnightbsd* \
- | hpux* | solaris* | cygwin* | mingw* | msys* )
+ | hpux* | solaris* | cygwin* | mingw* | windows* | 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" ;;
diff --git a/gl/m4/reallocarray.m4 b/gl/m4/reallocarray.m4
index 6a5b5ab..20c4601 100644
--- a/gl/m4/reallocarray.m4
+++ b/gl/m4/reallocarray.m4
@@ -1,5 +1,5 @@
# reallocarray.m4 serial 5
-dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/regex.m4 b/gl/m4/regex.m4
index 7acadc4..3dfeabe 100644
--- a/gl/m4/regex.m4
+++ b/gl/m4/regex.m4
@@ -1,6 +1,6 @@
-# serial 74
+# serial 75
-# Copyright (C) 1996-2001, 2003-2023 Free Software Foundation, Inc.
+# Copyright (C) 1996-2001, 2003-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -327,10 +327,10 @@ AC_DEFUN([gl_REGEX],
[gl_cv_func_re_compile_pattern_working=yes],
[gl_cv_func_re_compile_pattern_working=no],
[case "$host_os" in
- # Guess no on native Windows.
- mingw*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
- # Otherwise obey --enable-cross-guesses.
- *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_re_compile_pattern_working="guessing no" ;;
+ # Otherwise obey --enable-cross-guesses.
+ *) gl_cv_func_re_compile_pattern_working="$gl_cross_guess_normal" ;;
esac
])
])
diff --git a/gl/m4/rename.m4 b/gl/m4/rename.m4
index efabf1a..5383b3e 100644
--- a/gl/m4/rename.m4
+++ b/gl/m4/rename.m4
@@ -1,6 +1,6 @@
-# serial 34
+# serial 36
-# Copyright (C) 2001, 2003, 2005-2006, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005-2006, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -9,8 +9,8 @@ dnl From Volker Borchert.
dnl Determine whether rename works for source file names with a trailing slash.
dnl The rename from SunOS 4.1.1_U1 doesn't.
dnl
-dnl If it doesn't, then define RENAME_TRAILING_SLASH_BUG and arrange
-dnl to compile the wrapper function.
+dnl If it doesn't, arrange to compile the wrapper function and define
+dnl macros for use by that function.
dnl
AC_DEFUN([gl_FUNC_RENAME],
@@ -55,16 +55,16 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_slash_dst_works=no],
dnl When crosscompiling, assume rename is broken.
[case "$host_os" in
- # Guess yes on Linux systems.
- linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
- # Guess yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_rename_slash_dst_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
@@ -113,16 +113,16 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_slash_src_works=no],
dnl When crosscompiling, assume rename is broken.
[case "$host_os" in
- # Guess yes on Linux systems.
- linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
- # Guess yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
@@ -186,16 +186,16 @@ AC_DEFUN([gl_FUNC_RENAME],
else
dnl When crosscompiling, assume rename is broken.
case "$host_os" in
- # Guess yes on Linux systems.
- linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
- # Guess yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_func_rename_link_works="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
- # Guess yes on native Windows.
- mingw*) gl_cv_func_rename_link_works="guessing yes" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # Guess yes on native Windows.
+ mingw* | windows*) gl_cv_func_rename_link_works="guessing yes" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;;
esac
fi
else
@@ -237,14 +237,14 @@ AC_DEFUN([gl_FUNC_RENAME],
[gl_cv_func_rename_dest_works=no],
dnl When crosscompiling, assume rename is broken.
[case "$host_os" in
- # Guess yes on Linux systems.
- linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_rename_dest_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_rename_dest_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.f conftest.d1 conftest.d2
diff --git a/gl/m4/renameat.m4 b/gl/m4/renameat.m4
index 3780578..41bfc6e 100644
--- a/gl/m4/renameat.m4
+++ b/gl/m4/renameat.m4
@@ -1,7 +1,7 @@
# serial 4
# See if we need to provide renameat replacement.
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/rewinddir.m4 b/gl/m4/rewinddir.m4
index d0d24de..a5ee4e1 100644
--- a/gl/m4/rewinddir.m4
+++ b/gl/m4/rewinddir.m4
@@ -1,5 +1,5 @@
-# rewinddir.m4 serial 2
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# rewinddir.m4 serial 3
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -12,7 +12,8 @@ AC_DEFUN([gl_FUNC_REWINDDIR],
if test $ac_cv_func_rewinddir = no; then
HAVE_REWINDDIR=0
else
- dnl Replace rewinddir() on native Windows, to support fdopendir().
+ dnl Replace rewinddir() on native Windows and OS/2 kLIBC,
+ dnl to support fdopendir().
AC_REQUIRE([gl_DIRENT_DIR])
if test $DIR_HAS_FD_MEMBER = 0; then
REPLACE_REWINDDIR=1
diff --git a/gl/m4/rmdir.m4 b/gl/m4/rmdir.m4
index b19c890..50156e0 100644
--- a/gl/m4/rmdir.m4
+++ b/gl/m4/rmdir.m4
@@ -1,5 +1,5 @@
-# rmdir.m4 serial 18
-dnl Copyright (C) 2002, 2005, 2009-2023 Free Software Foundation, Inc.
+# rmdir.m4 serial 19
+dnl Copyright (C) 2002, 2005, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -34,16 +34,16 @@ AC_DEFUN([gl_FUNC_RMDIR],
]])],
[gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
[case "$host_os" in
- # Guess yes on Linux systems.
- linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
- # Guess yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_func_rmdir_works="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_rmdir_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_rmdir_works="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;;
esac
])
rm -rf conftest.dir conftest.file])
diff --git a/gl/m4/save-cwd.m4 b/gl/m4/save-cwd.m4
index 2e6cf58..f1ac345 100644
--- a/gl/m4/save-cwd.m4
+++ b/gl/m4/save-cwd.m4
@@ -1,5 +1,5 @@
# serial 10
-dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/select.m4 b/gl/m4/select.m4
index 88861af..f3f9dcc 100644
--- a/gl/m4/select.m4
+++ b/gl/m4/select.m4
@@ -1,5 +1,5 @@
-# select.m4 serial 15
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+# select.m4 serial 16
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -96,7 +96,7 @@ changequote([,])dnl
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.
diff --git a/gl/m4/setenv.m4 b/gl/m4/setenv.m4
index a30523d..21253e6 100644
--- a/gl/m4/setenv.m4
+++ b/gl/m4/setenv.m4
@@ -1,5 +1,5 @@
# setenv.m4 serial 33
-dnl Copyright (C) 2001-2004, 2006-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2004, 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/setlocale_null.m4 b/gl/m4/setlocale_null.m4
index 1105d69..54d3d46 100644
--- a/gl/m4/setlocale_null.m4
+++ b/gl/m4/setlocale_null.m4
@@ -1,5 +1,5 @@
-# setlocale_null.m4 serial 8
-dnl Copyright (C) 2019-2023 Free Software Foundation, Inc.
+# setlocale_null.m4 serial 9
+dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -31,7 +31,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
[gl_cv_func_setlocale_null_all_mtsafe=no])
;;
# Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
- *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*)
+ *-gnu* | gnu* | hpux* | irix* | solaris* | mingw* | windows*)
gl_cv_func_setlocale_null_all_mtsafe=yes ;;
# If we don't know, obey --enable-cross-guesses.
*)
@@ -40,7 +40,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"
@@ -62,7 +62,7 @@ AC_DEFUN([gl_FUNC_SETLOCALE_NULL],
openbsd* | aix*)
gl_cv_func_setlocale_null_one_mtsafe=no ;;
# Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
- *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*)
+ *-gnu* | gnu* | *-musl* | midipix* | darwin* | freebsd* | midnightbsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw* | windows*)
gl_cv_func_setlocale_null_one_mtsafe=yes ;;
# If we don't know, obey --enable-cross-guesses.
*)
@@ -71,7 +71,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"
@@ -88,7 +88,9 @@ 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*) SETLOCALE_NULL_LIB= ;;
+ mingw* | windows*)
+ SETLOCALE_NULL_LIB=
+ ;;
*)
gl_WEAK_SYMBOLS
case "$gl_cv_have_weak" in
diff --git a/gl/m4/sigaction.m4 b/gl/m4/sigaction.m4
index e981a74..926bb9c 100644
--- a/gl/m4/sigaction.m4
+++ b/gl/m4/sigaction.m4
@@ -1,5 +1,5 @@
# sigaction.m4 serial 7
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/signal_h.m4 b/gl/m4/signal_h.m4
index cdd6812..6f7dcc7 100644
--- a/gl/m4/signal_h.m4
+++ b/gl/m4/signal_h.m4
@@ -1,5 +1,5 @@
# signal_h.m4 serial 22
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/signalblocking.m4 b/gl/m4/signalblocking.m4
index 81cc91a..f818d5d 100644
--- a/gl/m4/signalblocking.m4
+++ b/gl/m4/signalblocking.m4
@@ -1,5 +1,5 @@
# signalblocking.m4 serial 17
-dnl Copyright (C) 2001-2002, 2006-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2002, 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sigpipe.m4 b/gl/m4/sigpipe.m4
index 1b6ec42..da8f03b 100644
--- a/gl/m4/sigpipe.m4
+++ b/gl/m4/sigpipe.m4
@@ -1,5 +1,5 @@
# sigpipe.m4 serial 3
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/size_max.m4 b/gl/m4/size_max.m4
index 0763366..b3f7624 100644
--- a/gl/m4/size_max.m4
+++ b/gl/m4/size_max.m4
@@ -1,5 +1,5 @@
# size_max.m4 serial 12
-dnl Copyright (C) 2003, 2005-2006, 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005-2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sleep.m4 b/gl/m4/sleep.m4
index 269b73b..2003698 100644
--- a/gl/m4/sleep.m4
+++ b/gl/m4/sleep.m4
@@ -1,5 +1,5 @@
-# sleep.m4 serial 12
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# sleep.m4 serial 13
+dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -46,16 +46,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 yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_func_sleep_works="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_sleep_works="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) 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/gl/m4/socketlib.m4 b/gl/m4/socketlib.m4
index a556af1..5ecb34d 100644
--- a/gl/m4/socketlib.m4
+++ b/gl/m4/socketlib.m4
@@ -1,5 +1,5 @@
# socketlib.m4 serial 3
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sockets.m4 b/gl/m4/sockets.m4
index ed9cb87..7be4dc9 100644
--- a/gl/m4/sockets.m4
+++ b/gl/m4/sockets.m4
@@ -1,5 +1,5 @@
# sockets.m4 serial 7
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/socklen.m4 b/gl/m4/socklen.m4
index 1c63a85..9c46db1 100644
--- a/gl/m4/socklen.m4
+++ b/gl/m4/socklen.m4
@@ -1,5 +1,5 @@
# socklen.m4 serial 11
-dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sockpfaf.m4 b/gl/m4/sockpfaf.m4
index 6c6dc2f..390abfe 100644
--- a/gl/m4/sockpfaf.m4
+++ b/gl/m4/sockpfaf.m4
@@ -1,5 +1,5 @@
# sockpfaf.m4 serial 10
-dnl Copyright (C) 2004, 2006, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2004, 2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/ssize_t.m4 b/gl/m4/ssize_t.m4
index 52bd77d..25b28d7 100644
--- a/gl/m4/ssize_t.m4
+++ b/gl/m4/ssize_t.m4
@@ -1,5 +1,5 @@
# ssize_t.m4 serial 6
-dnl Copyright (C) 2001-2003, 2006, 2010-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2003, 2006, 2010-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stat-time.m4 b/gl/m4/stat-time.m4
index 40993d5..8bec2f5 100644
--- a/gl/m4/stat-time.m4
+++ b/gl/m4/stat-time.m4
@@ -1,6 +1,6 @@
# Checks for stat-related time functions.
-# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2023 Free Software
+# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2024 Free Software
# Foundation, Inc.
# This file is free software; the Free Software Foundation
diff --git a/gl/m4/stat.m4 b/gl/m4/stat.m4
index 6d1628c..1d2a9e2 100644
--- a/gl/m4/stat.m4
+++ b/gl/m4/stat.m4
@@ -1,6 +1,6 @@
-# serial 19
+# serial 21
-# Copyright (C) 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2009-2024 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -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
@@ -61,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
;;
@@ -80,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/gl/m4/stdalign.m4 b/gl/m4/stdalign.m4
index 1a236d6..2efd5f9 100644
--- a/gl/m4/stdalign.m4
+++ b/gl/m4/stdalign.m4
@@ -1,6 +1,6 @@
# Check for alignas and alignof that conform to C23.
-dnl Copyright 2011-2023 Free Software Foundation, Inc.
+dnl Copyright 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -68,8 +68,10 @@ AC_DEFUN([gl_ALIGNASOF],
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>
# endif
@@ -110,7 +112,11 @@ AC_DEFUN([gl_ALIGNASOF],
# define _Alignof(type) alignof (type)
# else
template <class __t> struct __alignof_helper { char __a; __t __b; };
-# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
+# if (defined __GNUC__ && 4 <= __GNUC__) || defined __clang__
+# define _Alignof(type) __builtin_offsetof (__alignof_helper<type>, __b)
+# else
+# define _Alignof(type) offsetof (__alignof_helper<type>, __b)
+# endif
# define _GL_STDALIGN_NEEDS_STDDEF 1
# endif
# else
@@ -166,7 +172,7 @@ AC_DEFUN([gl_ALIGNASOF],
# define _Alignas(a) __declspec (align (a))
# endif
# endif
-# if !HAVE_STDALIGN_H
+# if !defined HAVE_STDALIGN_H
# if ((defined _Alignas \
&& !(defined __cplusplus \
&& (201103 <= __cplusplus || defined _MSC_VER))) \
@@ -175,7 +181,7 @@ AC_DEFUN([gl_ALIGNASOF],
# endif
# endif
-# if _GL_STDALIGN_NEEDS_STDDEF
+# if defined _GL_STDALIGN_NEEDS_STDDEF
# include <stddef.h>
# endif
#endif])
diff --git a/gl/m4/stdarg.m4 b/gl/m4/stdarg.m4
index 94787cc..989383c 100644
--- a/gl/m4/stdarg.m4
+++ b/gl/m4/stdarg.m4
@@ -1,5 +1,5 @@
# stdarg.m4 serial 8
-dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stddef_h.m4 b/gl/m4/stddef_h.m4
index aa01221..1bf9eb3 100644
--- a/gl/m4/stddef_h.m4
+++ b/gl/m4/stddef_h.m4
@@ -1,5 +1,5 @@
# stddef_h.m4 serial 14
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
index d6961b0..4aa2508 100644
--- a/gl/m4/stdint.m4
+++ b/gl/m4/stdint.m4
@@ -1,5 +1,5 @@
-# stdint.m4 serial 61
-dnl Copyright (C) 2001-2023 Free Software Foundation, Inc.
+# stdint.m4 serial 63
+dnl Copyright (C) 2001-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -150,7 +150,10 @@ 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__))
@@ -283,10 +286,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
])
])
diff --git a/gl/m4/stdint_h.m4 b/gl/m4/stdint_h.m4
index 70349f6..ee9773a 100644
--- a/gl/m4/stdint_h.m4
+++ b/gl/m4/stdint_h.m4
@@ -1,5 +1,5 @@
# stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 1997-2004, 2006, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdio_h.m4 b/gl/m4/stdio_h.m4
index dbfa0d5..c19feef 100644
--- a/gl/m4/stdio_h.m4
+++ b/gl/m4/stdio_h.m4
@@ -1,5 +1,5 @@
# stdio_h.m4 serial 63
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/stdlib_h.m4 b/gl/m4/stdlib_h.m4
index f47c1eb..92e67a7 100644
--- a/gl/m4/stdlib_h.m4
+++ b/gl/m4/stdlib_h.m4
@@ -1,5 +1,5 @@
-# stdlib_h.m4 serial 75
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# stdlib_h.m4 serial 76
+dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -134,6 +134,7 @@ 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])
@@ -237,6 +238,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
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])
diff --git a/gl/m4/stpcpy.m4 b/gl/m4/stpcpy.m4
index f3acbee..04c8bbe 100644
--- a/gl/m4/stpcpy.m4
+++ b/gl/m4/stpcpy.m4
@@ -1,5 +1,5 @@
# stpcpy.m4 serial 11
-dnl Copyright (C) 2002, 2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strcase.m4 b/gl/m4/strcase.m4
index 3cf740d..3252a62 100644
--- a/gl/m4/strcase.m4
+++ b/gl/m4/strcase.m4
@@ -1,5 +1,5 @@
# strcase.m4 serial 12
-dnl Copyright (C) 2002, 2005-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strcasestr.m4 b/gl/m4/strcasestr.m4
index 971e0b2..eebd00c 100644
--- a/gl/m4/strcasestr.m4
+++ b/gl/m4/strcasestr.m4
@@ -1,5 +1,5 @@
# strcasestr.m4 serial 28
-dnl Copyright (C) 2005, 2007-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strchrnul.m4 b/gl/m4/strchrnul.m4
index 9b9ab11..7840d2e 100644
--- a/gl/m4/strchrnul.m4
+++ b/gl/m4/strchrnul.m4
@@ -1,5 +1,5 @@
# strchrnul.m4 serial 12
-dnl Copyright (C) 2003, 2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strdup.m4 b/gl/m4/strdup.m4
index ecfcdd0..491f760 100644
--- a/gl/m4/strdup.m4
+++ b/gl/m4/strdup.m4
@@ -1,6 +1,6 @@
# strdup.m4 serial 15
-dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/strerror.m4 b/gl/m4/strerror.m4
index 9f1dddd..a1d1261 100644
--- a/gl/m4/strerror.m4
+++ b/gl/m4/strerror.m4
@@ -1,5 +1,5 @@
-# strerror.m4 serial 24
-dnl Copyright (C) 2002, 2007-2023 Free Software Foundation, Inc.
+# strerror.m4 serial 25
+dnl Copyright (C) 2002, 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -85,7 +85,7 @@ AC_DEFUN([gl_FUNC_STRERROR_0],
# Guess yes on musl systems.
*-musl* | midipix*) gl_cv_func_strerror_0_works="guessing yes" ;;
# Guess yes on native Windows.
- mingw*) gl_cv_func_strerror_0_works="guessing yes" ;;
+ 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/gl/m4/string_h.m4 b/gl/m4/string_h.m4
index 7f51391..8b12101 100644
--- a/gl/m4/string_h.m4
+++ b/gl/m4/string_h.m4
@@ -1,11 +1,11 @@
# Configure a GNU-like replacement for <string.h>.
-# Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# Copyright (C) 2007-2024 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 37
+# serial 38
# Written by Paul Eggert.
@@ -146,5 +146,6 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
REPLACE_STRERROR_R=0; AC_SUBST([REPLACE_STRERROR_R])
REPLACE_STRERRORNAME_NP=0; AC_SUBST([REPLACE_STRERRORNAME_NP])
REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
+ REPLACE_STRVERSCMP=0; AC_SUBST([REPLACE_STRVERSCMP])
UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
])
diff --git a/gl/m4/strings_h.m4 b/gl/m4/strings_h.m4
index 4c41221..37b6ca9 100644
--- a/gl/m4/strings_h.m4
+++ b/gl/m4/strings_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <strings.h>.
# serial 9
-# Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strndup.m4 b/gl/m4/strndup.m4
index 9ec9715..2218919 100644
--- a/gl/m4/strndup.m4
+++ b/gl/m4/strndup.m4
@@ -1,5 +1,5 @@
# strndup.m4 serial 23
-dnl Copyright (C) 2002-2003, 2005-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2005-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/strnlen.m4 b/gl/m4/strnlen.m4
index d2cac59..3eac8e6 100644
--- a/gl/m4/strnlen.m4
+++ b/gl/m4/strnlen.m4
@@ -1,5 +1,5 @@
# strnlen.m4 serial 14
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/strsep.m4 b/gl/m4/strsep.m4
index e0da09a..70006a5 100644
--- a/gl/m4/strsep.m4
+++ b/gl/m4/strsep.m4
@@ -1,5 +1,5 @@
# strsep.m4 serial 11
-dnl Copyright (C) 2002-2004, 2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_file_h.m4 b/gl/m4/sys_file_h.m4
index 60d4e30..f56a133 100644
--- a/gl/m4/sys_file_h.m4
+++ b/gl/m4/sys_file_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <sys/file.h>.
# serial 9
-# Copyright (C) 2008-2023 Free Software Foundation, Inc.
+# Copyright (C) 2008-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_ioctl_h.m4 b/gl/m4/sys_ioctl_h.m4
index 80f0510..3e789f3 100644
--- a/gl/m4/sys_ioctl_h.m4
+++ b/gl/m4/sys_ioctl_h.m4
@@ -1,5 +1,5 @@
# sys_ioctl_h.m4 serial 15
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_random_h.m4 b/gl/m4/sys_random_h.m4
index 01d5fee..b050d07 100644
--- a/gl/m4/sys_random_h.m4
+++ b/gl/m4/sys_random_h.m4
@@ -1,5 +1,5 @@
# sys_random_h.m4 serial 8
-dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_select_h.m4 b/gl/m4/sys_select_h.m4
index 4ec5ed7..9e279fb 100644
--- a/gl/m4/sys_select_h.m4
+++ b/gl/m4/sys_select_h.m4
@@ -1,5 +1,5 @@
# sys_select_h.m4 serial 23
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_socket_h.m4 b/gl/m4/sys_socket_h.m4
index 98a1041..af52484 100644
--- a/gl/m4/sys_socket_h.m4
+++ b/gl/m4/sys_socket_h.m4
@@ -1,5 +1,5 @@
# sys_socket_h.m4 serial 29
-dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2005-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_stat_h.m4 b/gl/m4/sys_stat_h.m4
index ca57398..7501853 100644
--- a/gl/m4/sys_stat_h.m4
+++ b/gl/m4/sys_stat_h.m4
@@ -1,5 +1,5 @@
# sys_stat_h.m4 serial 42 -*- Autoconf -*-
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_time_h.m4 b/gl/m4/sys_time_h.m4
index 45a1f8b..dc5353f 100644
--- a/gl/m4/sys_time_h.m4
+++ b/gl/m4/sys_time_h.m4
@@ -1,7 +1,7 @@
# Configure a replacement for <sys/time.h>.
# serial 12
-# Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_types_h.m4 b/gl/m4/sys_types_h.m4
index 627671f..37d0cca 100644
--- a/gl/m4/sys_types_h.m4
+++ b/gl/m4/sys_types_h.m4
@@ -1,5 +1,5 @@
# sys_types_h.m4 serial 13
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sys_uio_h.m4 b/gl/m4/sys_uio_h.m4
index 93a65d2..ce252ed 100644
--- a/gl/m4/sys_uio_h.m4
+++ b/gl/m4/sys_uio_h.m4
@@ -1,5 +1,5 @@
# sys_uio_h.m4 serial 3
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/sysexits.m4 b/gl/m4/sysexits.m4
index 5dfc193..7eb1fa2 100644
--- a/gl/m4/sysexits.m4
+++ b/gl/m4/sysexits.m4
@@ -1,5 +1,5 @@
# sysexits.m4 serial 7
-dnl Copyright (C) 2003, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2005, 2007, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/tempname.m4 b/gl/m4/tempname.m4
index abed799..31d35c8 100644
--- a/gl/m4/tempname.m4
+++ b/gl/m4/tempname.m4
@@ -1,6 +1,6 @@
#serial 5
-# Copyright (C) 2006-2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2006-2007, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/termios_h.m4 b/gl/m4/termios_h.m4
index 4a69003..5eadbb9 100644
--- a/gl/m4/termios_h.m4
+++ b/gl/m4/termios_h.m4
@@ -1,5 +1,5 @@
# termios_h.m4 serial 7
-dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/threadlib.m4 b/gl/m4/threadlib.m4
index 1fc5777..0be2c98 100644
--- a/gl/m4/threadlib.m4
+++ b/gl/m4/threadlib.m4
@@ -1,5 +1,5 @@
-# threadlib.m4 serial 38
-dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
+# threadlib.m4 serial 41
+dnl Copyright (C) 2005-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -85,7 +85,7 @@ AC_DEFUN([gl_WEAK_SYMBOLS],
AC_CACHE_CHECK([whether imported symbols can be declared weak],
[gl_cv_have_weak],
[case "$host_os" in
- cygwin* | mingw*)
+ 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
@@ -269,6 +269,15 @@ changequote([,])dnl
[Define if the pthread_in_use() detection is hard.])
esac
fi
+ ],
+ [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
# Some library is needed. Try libpthread and libc_r.
@@ -344,7 +353,7 @@ AC_DEFUN([gl_STDTHREADLIB_BODY],
AC_CHECK_HEADERS_ONCE([threads.h])
case "$host_os" in
- mingw*)
+ mingw* | windows*)
LIBSTDTHREAD=
;;
*)
@@ -465,7 +474,7 @@ changequote(,)dnl
esac
;;
dnl Obey gl_AVOID_WINPTHREAD on mingw.
- mingw*)
+ mingw* | windows*)
case "$gl_use_winpthreads_default" in
yes) gl_use_threads=posix ;;
no) gl_use_threads=windows ;;
@@ -564,7 +573,7 @@ AC_DEFUN([gl_THREADLIB_BODY],
case "$gl_use_threads" in
yes | windows | win32) # The 'win32' is for backward compatibility.
if { case "$host_os" in
- mingw*) true;;
+ mingw* | windows*) true;;
*) false;;
esac
}; then
@@ -575,6 +584,10 @@ AC_DEFUN([gl_THREADLIB_BODY],
;;
esac
fi
+ else
+ dnl "$gl_use_threads" is "no".
+ AC_DEFINE([AVOID_ANY_THREADS], [1],
+ [Define if no multithread safety and no multithreading is desired.])
fi
AC_MSG_CHECKING([for multithread API to use])
AC_MSG_RESULT([$gl_threads_api])
diff --git a/gl/m4/time_h.m4 b/gl/m4/time_h.m4
index 51d553a..367f69e 100644
--- a/gl/m4/time_h.m4
+++ b/gl/m4/time_h.m4
@@ -1,8 +1,8 @@
# Configure a more-standard replacement for <time.h>.
-# Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2024 Free Software Foundation, Inc.
-# serial 22
+# serial 24
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -23,7 +23,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])
@@ -162,25 +165,15 @@ AC_DEFUN([gl_TIME_H_DEFAULTS],
HAVE_TIMESPEC_GETRES=1; AC_SUBST([HAVE_TIMESPEC_GETRES])
dnl Even GNU libc does not have timezone_t yet.
HAVE_TIMEZONE_T=0; AC_SUBST([HAVE_TIMEZONE_T])
- dnl If another module says to replace or to not replace, do that.
- 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_TIME=0; AC_SUBST([REPLACE_TIME])
- REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
- REPLACE_TIMESPEC_GET=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMESPEC_GET])
- 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.
+ 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_MKTIME=0; AC_SUBST([REPLACE_MKTIME])
+ 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_TZSET=0; AC_SUBST([REPLACE_TZSET])
])
diff --git a/gl/m4/timespec.m4 b/gl/m4/timespec.m4
index 95f475f..59a0db9 100644
--- a/gl/m4/timespec.m4
+++ b/gl/m4/timespec.m4
@@ -1,6 +1,6 @@
#serial 15
-# Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2000-2001, 2003-2007, 2009-2024 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/uchar_h.m4 b/gl/m4/uchar_h.m4
new file mode 100644
index 0000000..abd4f51
--- /dev/null
+++ b/gl/m4/uchar_h.m4
@@ -0,0 +1,249 @@
+# uchar_h.m4 serial 31
+dnl Copyright (C) 2019-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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 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])
+
+ 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 types],
+ [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/gl/m4/unicase_h.m4 b/gl/m4/unicase_h.m4
new file mode 100644
index 0000000..ad2f621
--- /dev/null
+++ b/gl/m4/unicase_h.m4
@@ -0,0 +1,43 @@
+# unicase_h.m4 serial 1
+dnl Copyright (C) 2023-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_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/gl/m4/unictype_h.m4 b/gl/m4/unictype_h.m4
new file mode 100644
index 0000000..c4bc5c2
--- /dev/null
+++ b/gl/m4/unictype_h.m4
@@ -0,0 +1,172 @@
+# unictype_h.m4 serial 1
+dnl Copyright (C) 2023-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_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_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_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_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_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/gl/m4/uninorm_h.m4 b/gl/m4/uninorm_h.m4
new file mode 100644
index 0000000..aadf559
--- /dev/null
+++ b/gl/m4/uninorm_h.m4
@@ -0,0 +1,45 @@
+# uninorm_h.m4 serial 1
+dnl Copyright (C) 2023-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_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/gl/m4/unistd-safer.m4 b/gl/m4/unistd-safer.m4
index ced03b0..9d50964 100644
--- a/gl/m4/unistd-safer.m4
+++ b/gl/m4/unistd-safer.m4
@@ -1,5 +1,5 @@
#serial 9
-dnl Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002, 2005-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/unistd_h.m4 b/gl/m4/unistd_h.m4
index 1c96158..e078bd6 100644
--- a/gl/m4/unistd_h.m4
+++ b/gl/m4/unistd_h.m4
@@ -1,5 +1,5 @@
-# unistd_h.m4 serial 94
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+# unistd_h.m4 serial 95
+dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -234,6 +234,7 @@ 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])
diff --git a/gl/m4/unlink.m4 b/gl/m4/unlink.m4
index 1fecaac..19982a0 100644
--- a/gl/m4/unlink.m4
+++ b/gl/m4/unlink.m4
@@ -1,5 +1,5 @@
-# unlink.m4 serial 16
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+# unlink.m4 serial 17
+dnl Copyright (C) 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -43,16 +43,16 @@ AC_DEFUN([gl_FUNC_UNLINK],
[gl_cv_func_unlink_honors_slashes=yes],
[gl_cv_func_unlink_honors_slashes=no],
[case "$host_os" in
- # Guess yes on Linux systems.
- linux-* | linux) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
- # Guess yes on systems that emulate the Linux system calls.
- midipix*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
- # Guess yes on glibc systems.
- *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_unlink_honors_slashes="guessing no" ;;
- # If we don't know, obey --enable-cross-guesses.
- *) gl_cv_func_unlink_honors_slashes="$gl_cross_guess_normal" ;;
+ # Guess yes on Linux systems.
+ linux-* | linux) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
+ # Guess yes on systems that emulate the Linux system calls.
+ midipix*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_unlink_honors_slashes="guessing no" ;;
+ # If we don't know, obey --enable-cross-guesses.
+ *) gl_cv_func_unlink_honors_slashes="$gl_cross_guess_normal" ;;
esac
])
rm -f conftest.file conftest.lnk])
diff --git a/gl/m4/unlinkat.m4 b/gl/m4/unlinkat.m4
index 55cdb2a..d5615df 100644
--- a/gl/m4/unlinkat.m4
+++ b/gl/m4/unlinkat.m4
@@ -1,5 +1,5 @@
# unlinkat.m4 serial 2
-dnl Copyright (C) 2004-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2004-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/utime.m4 b/gl/m4/utime.m4
index 4c0443a..0009e4f 100644
--- a/gl/m4/utime.m4
+++ b/gl/m4/utime.m4
@@ -1,5 +1,5 @@
-# utime.m4 serial 4
-dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
+# utime.m4 serial 5
+dnl Copyright (C) 2017-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -10,7 +10,7 @@ AC_DEFUN([gl_FUNC_UTIME],
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CHECK_FUNCS_ONCE([lstat])
case "$host_os" in
- mingw*)
+ mingw* | windows*)
dnl On this platform, the original utime() or _utime() produces
dnl timestamps that are affected by the time zone.
dnl Use the function name 'rpl_utime' always, in order to avoid a
diff --git a/gl/m4/utime_h.m4 b/gl/m4/utime_h.m4
index 6b6403e..7b224ee 100644
--- a/gl/m4/utime_h.m4
+++ b/gl/m4/utime_h.m4
@@ -1,5 +1,5 @@
# utime_h.m4 serial 8
-dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2017-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/utimens.m4 b/gl/m4/utimens.m4
index 5f86061..af03e6b 100644
--- a/gl/m4/utimens.m4
+++ b/gl/m4/utimens.m4
@@ -1,4 +1,4 @@
-dnl Copyright (C) 2003-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/utimes.m4 b/gl/m4/utimes.m4
index 73b9a2d..05b23cb 100644
--- a/gl/m4/utimes.m4
+++ b/gl/m4/utimes.m4
@@ -1,7 +1,7 @@
# Detect some bugs in glibc's implementation of utimes.
-# serial 8
+# serial 9
-dnl Copyright (C) 2003-2005, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2005, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -144,11 +144,11 @@ main ()
[gl_cv_func_working_utimes=yes],
[gl_cv_func_working_utimes=no],
[case "$host_os" in
- # Guess yes on musl systems.
- *-musl*) gl_cv_func_working_utimes="guessing yes" ;;
- # Guess no on native Windows.
- mingw*) gl_cv_func_working_utimes="guessing no" ;;
- *) gl_cv_func_working_utimes="$gl_cross_guess_normal" ;;
+ # Guess yes on musl systems.
+ *-musl*) gl_cv_func_working_utimes="guessing yes" ;;
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_working_utimes="guessing no" ;;
+ *) gl_cv_func_working_utimes="$gl_cross_guess_normal" ;;
esac
])
])
diff --git a/gl/m4/vasnprintf.m4 b/gl/m4/vasnprintf.m4
index df87b9e..21a85bb 100644
--- a/gl/m4/vasnprintf.m4
+++ b/gl/m4/vasnprintf.m4
@@ -1,5 +1,5 @@
-# vasnprintf.m4 serial 50
-dnl Copyright (C) 2002-2004, 2006-2023 Free Software Foundation, Inc.
+# vasnprintf.m4 serial 52
+dnl Copyright (C) 2002-2004, 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -94,6 +94,7 @@ AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
# 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>]])
@@ -367,6 +368,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],
[
@@ -425,6 +442,7 @@ AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS],
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
])
diff --git a/gl/m4/vasprintf.m4 b/gl/m4/vasprintf.m4
index 6e6156a..ea0a8dc 100644
--- a/gl/m4/vasprintf.m4
+++ b/gl/m4/vasprintf.m4
@@ -1,5 +1,5 @@
# vasprintf.m4 serial 6
-dnl Copyright (C) 2002-2003, 2006-2007, 2009-2023 Free Software Foundation,
+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2024 Free Software Foundation,
dnl Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
diff --git a/gl/m4/visibility.m4 b/gl/m4/visibility.m4
index f0468e8..b9b36a8 100644
--- a/gl/m4/visibility.m4
+++ b/gl/m4/visibility.m4
@@ -1,5 +1,5 @@
# visibility.m4 serial 8
-dnl Copyright (C) 2005, 2008, 2010-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2005, 2008, 2010-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/vsnprintf.m4 b/gl/m4/vsnprintf.m4
index 7fbb11c..19524cf 100644
--- a/gl/m4/vsnprintf.m4
+++ b/gl/m4/vsnprintf.m4
@@ -1,5 +1,5 @@
# vsnprintf.m4 serial 7
-dnl Copyright (C) 2002-2004, 2007-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2004, 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/warn-on-use.m4 b/gl/m4/warn-on-use.m4
index 10649c5..6e251fb 100644
--- a/gl/m4/warn-on-use.m4
+++ b/gl/m4/warn-on-use.m4
@@ -1,5 +1,5 @@
# warn-on-use.m4 serial 10
-dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2010-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/warnings.m4 b/gl/m4/warnings.m4
index 9433cb5..6c97ef1 100644
--- a/gl/m4/warnings.m4
+++ b/gl/m4/warnings.m4
@@ -1,5 +1,5 @@
# warnings.m4 serial 19
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wchar_h.m4 b/gl/m4/wchar_h.m4
index 442932b..3582fa7 100644
--- a/gl/m4/wchar_h.m4
+++ b/gl/m4/wchar_h.m4
@@ -1,13 +1,13 @@
dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl Written by Eric Blake.
-# wchar_h.m4 serial 60
+# wchar_h.m4 serial 62
AC_DEFUN_ONCE([gl_WCHAR_H],
[
@@ -147,6 +147,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 +186,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])
])
diff --git a/gl/m4/wchar_t.m4 b/gl/m4/wchar_t.m4
index 50bde08..9435357 100644
--- a/gl/m4/wchar_t.m4
+++ b/gl/m4/wchar_t.m4
@@ -1,5 +1,5 @@
# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2003, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wcrtomb.m4 b/gl/m4/wcrtomb.m4
index fa503b5..f00f645 100644
--- a/gl/m4/wcrtomb.m4
+++ b/gl/m4/wcrtomb.m4
@@ -1,5 +1,5 @@
-# wcrtomb.m4 serial 18
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+# wcrtomb.m4 serial 19
+dnl Copyright (C) 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -82,9 +82,11 @@ int main ()
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" ;;
+ aix4* | osf* | 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
diff --git a/gl/m4/wctype.m4 b/gl/m4/wctype.m4
new file mode 100644
index 0000000..3660d7d
--- /dev/null
+++ b/gl/m4/wctype.m4
@@ -0,0 +1,51 @@
+# wctype.m4 serial 6
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
+dnl This file is free software; the Free 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_FUNC_WCTYPE],
+[
+ AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
+ AC_REQUIRE([gl_WCTYPE_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ HAVE_WCTYPE=$HAVE_WCTYPE_T
+ if test $HAVE_WCTYPE = 1; then
+ AC_CACHE_CHECK([whether wctype supports the "blank" and "punct" character classes],
+ [gl_cv_func_wctype_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_SOURCE([[
+ #include <ctype.h>
+ #include <wchar.h>
+ #include <wctype.h>
+ int main ()
+ {
+ /* This test fails on mingw. */
+ if (wctype ("blank") == (wctype_t)0)
+ return 1;
+ /* This test fails on MSVC 14. */
+ if ((! iswctype ('\t', wctype ("blank"))) != (! iswblank ('\t')))
+ return 2;
+ /* This test fails on Android 11. */
+ if ((! iswctype ('\`', wctype ("punct"))) != (! ispunct ('\`')))
+ return 4;
+ return 0;
+ }
+ ]])],
+ [gl_cv_func_wctype_works=yes], [gl_cv_func_wctype_works=no],
+ [case "$host_os" in
+ # Guess no on native Windows.
+ mingw* | windows*) gl_cv_func_wctype_works="guessing no" ;;
+ # Guess no on Android.
+ android*) gl_cv_func_wctype_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wctype_works="guessing yes" ;;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_wctype_works" in
+ *yes) ;;
+ *) REPLACE_WCTYPE=1 ;;
+ esac
+ fi
+])
diff --git a/gl/m4/wctype_h.m4 b/gl/m4/wctype_h.m4
index 6856a73..c899394 100644
--- a/gl/m4/wctype_h.m4
+++ b/gl/m4/wctype_h.m4
@@ -1,8 +1,8 @@
-# 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-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2006-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
@@ -178,6 +178,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 +197,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/gl/m4/wint_t.m4 b/gl/m4/wint_t.m4
index dfd743b..21350f5 100644
--- a/gl/m4/wint_t.m4
+++ b/gl/m4/wint_t.m4
@@ -1,5 +1,5 @@
# wint_t.m4 serial 11
-dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2007-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wmemchr.m4 b/gl/m4/wmemchr.m4
index ac414fb..54f1c83 100644
--- a/gl/m4/wmemchr.m4
+++ b/gl/m4/wmemchr.m4
@@ -1,5 +1,5 @@
# wmemchr.m4 serial 5
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2011-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/wmempcpy.m4 b/gl/m4/wmempcpy.m4
index abf1df3..6c08d55 100644
--- a/gl/m4/wmempcpy.m4
+++ b/gl/m4/wmempcpy.m4
@@ -1,5 +1,5 @@
# wmempcpy.m4 serial 3
-dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xalloc.m4 b/gl/m4/xalloc.m4
index fc56f59..f60ea3d 100644
--- a/gl/m4/xalloc.m4
+++ b/gl/m4/xalloc.m4
@@ -1,5 +1,5 @@
# xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xgetcwd.m4 b/gl/m4/xgetcwd.m4
index 9695d99..909bbe8 100644
--- a/gl/m4/xgetcwd.m4
+++ b/gl/m4/xgetcwd.m4
@@ -1,5 +1,5 @@
#serial 8
-dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2002-2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xsize.m4 b/gl/m4/xsize.m4
index 649db9c..6125f9c 100644
--- a/gl/m4/xsize.m4
+++ b/gl/m4/xsize.m4
@@ -1,5 +1,5 @@
# xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003-2004, 2008-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xstrndup.m4 b/gl/m4/xstrndup.m4
index 1fb6a7d..d544650 100644
--- a/gl/m4/xstrndup.m4
+++ b/gl/m4/xstrndup.m4
@@ -1,5 +1,5 @@
# xstrndup.m4 serial 2
-dnl Copyright (C) 2003, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2003, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/xvasprintf.m4 b/gl/m4/xvasprintf.m4
index b7e0701..2ed9ad5 100644
--- a/gl/m4/xvasprintf.m4
+++ b/gl/m4/xvasprintf.m4
@@ -1,5 +1,5 @@
# xvasprintf.m4 serial 2
-dnl Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
diff --git a/gl/m4/zzgnulib.m4 b/gl/m4/zzgnulib.m4
index 362102b..eed5ecb 100644
--- a/gl/m4/zzgnulib.m4
+++ b/gl/m4/zzgnulib.m4
@@ -1,5 +1,5 @@
# zzgnulib.m4 serial 1
-dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
+dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.