[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
branch master updated: Run gnulib-tool --add-import at top level
From: |
Gavin D. Smith |
Subject: |
branch master updated: Run gnulib-tool --add-import at top level |
Date: |
Tue, 04 Jun 2024 11:40:13 -0400 |
This is an automated email from the git hooks/post-receive script.
gavin pushed a commit to branch master
in repository texinfo.
The following commit(s) were added to refs/heads/master by this push:
new 9bc6921cbf Run gnulib-tool --add-import at top level
9bc6921cbf is described below
commit 9bc6921cbf83b2ceb99487a8ceaba5ec83841d7d
Author: Gavin Smith <gavinsmith0123@gmail.com>
AuthorDate: Tue Jun 4 16:39:57 2024 +0100
Run gnulib-tool --add-import at top level
---
.gitignore | 2 +
ChangeLog | 4 +
build-aux/config.rpath | 2 +-
gnulib/lib/Makefile.am | 230 ++-
gnulib/lib/_Noreturn.h | 2 +-
gnulib/lib/alloca.in.h | 2 +-
gnulib/lib/arg-nonnull.h | 2 +-
gnulib/lib/argz.c | 2 +-
gnulib/lib/argz.in.h | 11 +-
gnulib/lib/asnprintf.c | 2 +-
gnulib/lib/asprintf.c | 2 +-
gnulib/lib/assert.in.h | 2 +-
gnulib/lib/attribute.h | 70 +-
gnulib/lib/basename-lgpl.c | 2 +-
gnulib/lib/basename-lgpl.h | 2 +-
gnulib/lib/btowc.c | 2 +-
gnulib/lib/c++defs.h | 2 +-
gnulib/lib/c32is-impl.h | 2 +-
gnulib/lib/c32isalnum.c | 2 +-
gnulib/lib/c32isalpha.c | 2 +-
gnulib/lib/c32isblank.c | 2 +-
gnulib/lib/c32iscntrl.c | 2 +-
gnulib/lib/c32isdigit.c | 2 +-
gnulib/lib/c32isgraph.c | 2 +-
gnulib/lib/c32islower.c | 2 +-
gnulib/lib/c32isprint.c | 2 +-
gnulib/lib/c32ispunct.c | 2 +-
gnulib/lib/c32isspace.c | 2 +-
gnulib/lib/c32isupper.c | 2 +-
gnulib/lib/c32isxdigit.c | 2 +-
gnulib/lib/c32to-impl.h | 2 +-
gnulib/lib/c32tolower.c | 2 +-
gnulib/lib/c32width.c | 2 +-
gnulib/lib/calloc.c | 2 +-
gnulib/lib/cdefs.h | 6 +-
gnulib/lib/cloexec.c | 2 +-
gnulib/lib/cloexec.h | 12 +-
gnulib/lib/close.c | 2 +-
gnulib/lib/dirname-lgpl.c | 2 +-
gnulib/lib/dirname.h | 2 +-
gnulib/lib/dup2.c | 2 +-
gnulib/lib/dynarray.h | 2 +-
gnulib/lib/errno.in.h | 2 +-
gnulib/lib/error.c | 4 +-
gnulib/lib/error.in.h | 4 +-
gnulib/lib/exitfail.c | 2 +-
gnulib/lib/exitfail.h | 12 +-
gnulib/lib/fcntl.c | 2 +-
gnulib/lib/fcntl.in.h | 5 +-
gnulib/lib/fd-hook.c | 2 +-
gnulib/lib/fd-hook.h | 2 +-
gnulib/lib/filename.h | 2 +-
gnulib/lib/float+.h | 2 +-
gnulib/lib/float.c | 2 +-
gnulib/lib/float.in.h | 2 +-
gnulib/lib/free.c | 2 +-
gnulib/lib/fstat.c | 2 +-
gnulib/lib/getdtablesize.c | 2 +-
gnulib/lib/getopt-cdefs.in.h | 2 +-
gnulib/lib/getopt-core.h | 2 +-
gnulib/lib/getopt-ext.h | 2 +-
gnulib/lib/getopt-pfx-core.h | 2 +-
gnulib/lib/getopt-pfx-ext.h | 2 +-
gnulib/lib/getopt.c | 37 +-
gnulib/lib/getopt.in.h | 2 +-
gnulib/lib/getopt1.c | 4 +-
gnulib/lib/getopt_int.h | 2 +-
gnulib/lib/getprogname.c | 2 +-
gnulib/lib/getprogname.h | 2 +-
gnulib/lib/getrandom.c | 2 +-
gnulib/lib/gettext.h | 2 +-
gnulib/lib/glthread/lock.c | 2 +-
gnulib/lib/glthread/lock.h | 2 +-
gnulib/lib/glthread/threadlib.c | 2 +-
gnulib/lib/hard-locale.c | 2 +-
gnulib/lib/hard-locale.h | 14 +-
gnulib/lib/ialloc.c | 2 +-
gnulib/lib/ialloc.h | 45 +-
gnulib/lib/idx.h | 12 +-
gnulib/lib/intprops-internal.h | 10 +-
gnulib/lib/intprops.h | 2 +-
gnulib/lib/inttypes.in.h | 2 +-
gnulib/lib/iswblank.c | 2 +-
gnulib/lib/iswctype-impl.h | 2 +-
gnulib/lib/iswctype.c | 2 +-
gnulib/lib/iswdigit.c | 2 +-
gnulib/lib/iswpunct.c | 2 +-
gnulib/lib/iswxdigit.c | 2 +-
gnulib/lib/itold.c | 2 +-
gnulib/lib/langinfo.in.h | 2 +-
gnulib/lib/lc-charset-dispatch.c | 2 +-
gnulib/lib/lc-charset-dispatch.h | 2 +-
gnulib/lib/libc-config.h | 2 +-
gnulib/lib/limits.in.h | 4 +-
gnulib/lib/localcharset.c | 4 +-
gnulib/lib/localcharset.h | 2 +-
gnulib/lib/locale.in.h | 8 +-
gnulib/lib/localeconv.c | 2 +-
gnulib/lib/lstat.c | 2 +-
gnulib/lib/malloc.c | 2 +-
gnulib/lib/malloc/dynarray-skeleton.c | 2 +-
gnulib/lib/malloc/dynarray.h | 2 +-
gnulib/lib/malloc/dynarray_at_failure.c | 2 +-
gnulib/lib/malloc/dynarray_emplace_enlarge.c | 2 +-
gnulib/lib/malloc/dynarray_finalize.c | 2 +-
gnulib/lib/malloc/dynarray_resize.c | 2 +-
gnulib/lib/malloc/dynarray_resize_clear.c | 2 +-
gnulib/lib/malloca.c | 41 +-
gnulib/lib/malloca.h | 29 +-
gnulib/lib/mbchar.c | 2 +-
gnulib/lib/mbchar.h | 12 +-
gnulib/lib/mbiter.c | 2 +-
gnulib/lib/mbiter.h | 12 +-
gnulib/lib/mbrtoc32.c | 10 +-
gnulib/lib/mbrtowc-impl-utf8.h | 2 +-
gnulib/lib/mbrtowc-impl.h | 2 +-
gnulib/lib/mbrtowc.c | 8 +-
gnulib/lib/mbscasecmp.c | 2 +-
gnulib/lib/mbschr.c | 20 +-
gnulib/lib/mbsinit.c | 2 +-
gnulib/lib/mbslen.c | 2 +-
gnulib/lib/mbsncasecmp.c | 21 +-
gnulib/lib/mbsstr.c | 10 +-
gnulib/lib/mbswidth.c | 2 +-
gnulib/lib/mbswidth.h | 2 +-
gnulib/lib/mbszero.c | 2 +-
gnulib/lib/mbtowc-impl.h | 2 +-
gnulib/lib/mbtowc-lock.c | 5 +-
gnulib/lib/mbtowc-lock.h | 4 +-
gnulib/lib/mbtowc.c | 2 +-
gnulib/lib/mbuiter.c | 2 +-
gnulib/lib/mbuiter.h | 12 +-
gnulib/lib/mbuiterf.c | 2 +-
gnulib/lib/mbuiterf.h | 12 +-
gnulib/lib/memchr.c | 2 +-
gnulib/lib/memchr.valgrind | 2 +-
gnulib/lib/mempcpy.c | 2 +-
gnulib/lib/memrchr.c | 2 +-
gnulib/lib/minmax.h | 2 +-
gnulib/lib/mkdir.c | 2 +-
gnulib/lib/mkstemp.c | 2 +-
gnulib/lib/msvc-inval.c | 2 +-
gnulib/lib/msvc-inval.h | 2 +-
gnulib/lib/msvc-nothrow.c | 2 +-
gnulib/lib/msvc-nothrow.h | 10 +-
gnulib/lib/nl_langinfo-lock.c | 5 +-
gnulib/lib/nl_langinfo.c | 21 +-
gnulib/lib/open.c | 8 +-
gnulib/lib/pathmax.h | 2 +-
gnulib/lib/printf-args.c | 2 +-
gnulib/lib/printf-args.h | 2 +-
gnulib/lib/printf-parse.c | 7 +-
gnulib/lib/printf-parse.h | 2 +-
gnulib/lib/pthread-once.c | 148 ++
gnulib/lib/pthread.in.h | 2027 ++++++++++++++++++++++++++
gnulib/lib/realloc.c | 2 +-
gnulib/lib/reallocarray.c | 2 +-
gnulib/lib/regcomp.c | 2 +-
gnulib/lib/regex.c | 6 +-
gnulib/lib/regex.h | 2 +-
gnulib/lib/regex_internal.c | 2 +-
gnulib/lib/regex_internal.h | 2 +-
gnulib/lib/regexec.c | 2 +-
gnulib/lib/sched.in.h | 111 ++
gnulib/lib/setlocale-lock.c | 5 +-
gnulib/lib/setlocale_null-unlocked.c | 149 ++
gnulib/lib/setlocale_null.c | 172 +--
gnulib/lib/setlocale_null.h | 30 +-
gnulib/lib/size_max.h | 2 +-
gnulib/lib/stat-time.c | 2 +-
gnulib/lib/stat-time.h | 15 +-
gnulib/lib/stat-w32.c | 2 +-
gnulib/lib/stat-w32.h | 2 +-
gnulib/lib/stat.c | 2 +-
gnulib/lib/stdarg.in.h | 2 +-
gnulib/lib/stdckdint.in.h | 2 +-
gnulib/lib/stddef.in.h | 35 +-
gnulib/lib/stdint.in.h | 15 +-
gnulib/lib/stdio-read.c | 2 +-
gnulib/lib/stdio-write.c | 2 +-
gnulib/lib/stdio.in.h | 31 +-
gnulib/lib/stdlib.in.h | 96 +-
gnulib/lib/stpcpy.c | 2 +-
gnulib/lib/str-kmp.h | 2 +-
gnulib/lib/str-two-way.h | 2 +-
gnulib/lib/strcasecmp.c | 2 +-
gnulib/lib/strcasestr.c | 2 +-
gnulib/lib/strdup.c | 2 +-
gnulib/lib/streq.h | 12 +-
gnulib/lib/strerror-override.c | 2 +-
gnulib/lib/strerror-override.h | 74 +-
gnulib/lib/strerror.c | 2 +-
gnulib/lib/string.in.h | 30 +-
gnulib/lib/strings.in.h | 2 +-
gnulib/lib/stripslash.c | 2 +-
gnulib/lib/strncasecmp.c | 2 +-
gnulib/lib/strndup.c | 2 +-
gnulib/lib/strnlen.c | 2 +-
gnulib/lib/strnlen1.c | 2 +-
gnulib/lib/strnlen1.h | 2 +-
gnulib/lib/strstr.c | 2 +-
gnulib/lib/sys_random.in.h | 2 +-
gnulib/lib/sys_stat.in.h | 2 +-
gnulib/lib/sys_types.in.h | 11 +-
gnulib/lib/tempname.c | 6 +-
gnulib/lib/tempname.h | 2 +-
gnulib/lib/time.in.h | 22 +-
gnulib/lib/uchar.in.h | 2 +-
gnulib/lib/unicase.in.h | 2 +-
gnulib/lib/unicase/simple-mapping.h | 2 +-
gnulib/lib/unicase/tolower.c | 2 +-
gnulib/lib/unicase/tolower.h | 4 +-
gnulib/lib/unictype.in.h | 48 +-
gnulib/lib/unictype/bitmap.h | 2 +-
gnulib/lib/unictype/ctype_alnum.c | 2 +-
gnulib/lib/unictype/ctype_alnum.h | 22 +-
gnulib/lib/unictype/ctype_alpha.c | 2 +-
gnulib/lib/unictype/ctype_alpha.h | 22 +-
gnulib/lib/unictype/ctype_blank.c | 2 +-
gnulib/lib/unictype/ctype_blank.h | 4 +-
gnulib/lib/unictype/ctype_cntrl.c | 2 +-
gnulib/lib/unictype/ctype_cntrl.h | 4 +-
gnulib/lib/unictype/ctype_digit.c | 2 +-
gnulib/lib/unictype/ctype_digit.h | 4 +-
gnulib/lib/unictype/ctype_graph.c | 2 +-
gnulib/lib/unictype/ctype_graph.h | 30 +-
gnulib/lib/unictype/ctype_lower.c | 2 +-
gnulib/lib/unictype/ctype_lower.h | 4 +-
gnulib/lib/unictype/ctype_print.c | 2 +-
gnulib/lib/unictype/ctype_print.h | 30 +-
gnulib/lib/unictype/ctype_punct.c | 2 +-
gnulib/lib/unictype/ctype_punct.h | 8 +-
gnulib/lib/unictype/ctype_space.c | 2 +-
gnulib/lib/unictype/ctype_space.h | 4 +-
gnulib/lib/unictype/ctype_upper.c | 2 +-
gnulib/lib/unictype/ctype_upper.h | 4 +-
gnulib/lib/unictype/ctype_xdigit.c | 2 +-
gnulib/lib/unictype/ctype_xdigit.h | 4 +-
gnulib/lib/uninorm.in.h | 2 +-
gnulib/lib/unistd.c | 4 +-
gnulib/lib/unistd.in.h | 89 +-
gnulib/lib/unitypes.in.h | 12 +-
gnulib/lib/uniwidth.in.h | 2 +-
gnulib/lib/uniwidth/cjk.h | 2 +-
gnulib/lib/uniwidth/width.c | 2 +-
gnulib/lib/uniwidth/width0.h | 18 +-
gnulib/lib/uniwidth/width2.h | 4 +-
gnulib/lib/vasnprintf.c | 171 ++-
gnulib/lib/vasnprintf.h | 2 +-
gnulib/lib/vasprintf.c | 2 +-
gnulib/lib/verify.h | 17 +-
gnulib/lib/warn-on-use.h | 6 +-
gnulib/lib/wchar.in.h | 20 +-
gnulib/lib/wcrtomb.c | 2 +-
gnulib/lib/wctype-h.c | 4 +-
gnulib/lib/wctype-impl.h | 2 +-
gnulib/lib/wctype.c | 2 +-
gnulib/lib/wctype.in.h | 2 +-
gnulib/lib/wcwidth.c | 2 +-
gnulib/lib/windows-initguard.h | 2 +-
gnulib/lib/windows-mutex.c | 2 +-
gnulib/lib/windows-mutex.h | 2 +-
gnulib/lib/windows-once.c | 51 +-
gnulib/lib/windows-once.h | 7 +-
gnulib/lib/windows-recmutex.c | 2 +-
gnulib/lib/windows-recmutex.h | 2 +-
gnulib/lib/windows-rwlock.c | 2 +-
gnulib/lib/windows-rwlock.h | 2 +-
gnulib/lib/xalloc-die.c | 4 +-
gnulib/lib/xalloc-oversized.h | 5 +-
gnulib/lib/xalloc.h | 2 +-
gnulib/lib/xmalloc.c | 16 +-
gnulib/lib/xsize.c | 2 +-
gnulib/lib/xsize.h | 12 +-
gnulib/m4/00gnulib.m4 | 13 +-
gnulib/m4/__inline.m4 | 7 +-
gnulib/m4/absolute-header.m4 | 5 +-
gnulib/m4/alloca.m4 | 5 +-
gnulib/m4/argz.m4 | 20 +-
gnulib/m4/assert_h.m4 | 11 +-
gnulib/m4/btowc.m4 | 5 +-
gnulib/m4/builtin-expect.m4 | 8 +-
gnulib/m4/c-bool.m4 | 8 +-
gnulib/m4/calloc.m4 | 12 +-
gnulib/m4/clock_time.m4 | 5 +-
gnulib/m4/close.m4 | 5 +-
gnulib/m4/codeset.m4 | 5 +-
gnulib/m4/double-slash-root.m4 | 5 +-
gnulib/m4/dup2.m4 | 5 +-
gnulib/m4/eealloc.m4 | 5 +-
gnulib/m4/errno_h.m4 | 5 +-
gnulib/m4/error.m4 | 13 +-
gnulib/m4/error_h.m4 | 7 +-
gnulib/m4/exponentd.m4 | 5 +-
gnulib/m4/extensions.m4 | 24 +-
gnulib/m4/extern-inline.m4 | 8 +-
gnulib/m4/fcntl-o.m4 | 5 +-
gnulib/m4/fcntl.m4 | 7 +-
gnulib/m4/fcntl_h.m4 | 6 +-
gnulib/m4/float_h.m4 | 5 +-
gnulib/m4/free.m4 | 11 +-
gnulib/m4/fstat.m4 | 9 +-
gnulib/m4/getdtablesize.m4 | 5 +-
gnulib/m4/getopt.m4 | 14 +-
gnulib/m4/getprogname.m4 | 14 +-
gnulib/m4/getrandom.m4 | 7 +-
gnulib/m4/gnulib-cache.m4 | 2 +-
gnulib/m4/gnulib-common.m4 | 218 ++-
gnulib/m4/gnulib-comp.m4 | 83 +-
gnulib/m4/gnulib-tool.m4 | 5 +-
gnulib/m4/host-cpu-c-abi.m4 | 246 +---
gnulib/m4/iconv.m4 | 56 +-
gnulib/m4/include_next.m4 | 13 +-
gnulib/m4/intmax_t.m4 | 5 +-
gnulib/m4/inttypes.m4 | 5 +-
gnulib/m4/inttypes_h.m4 | 5 +-
gnulib/m4/iswblank.m4 | 5 +-
gnulib/m4/iswctype.m4 | 5 +-
gnulib/m4/iswdigit.m4 | 14 +-
gnulib/m4/iswpunct.m4 | 6 +-
gnulib/m4/iswxdigit.m4 | 10 +-
gnulib/m4/langinfo_h.m4 | 5 +-
gnulib/m4/largefile.m4 | 45 +-
gnulib/m4/lib-ld.m4 | 11 +-
gnulib/m4/lib-link.m4 | 33 +-
gnulib/m4/lib-prefix.m4 | 32 +-
gnulib/m4/libunistring-base.m4 | 11 +-
gnulib/m4/limits-h.m4 | 8 +-
gnulib/m4/localcharset.m4 | 5 +-
gnulib/m4/locale-fr.m4 | 9 +-
gnulib/m4/locale-ja.m4 | 7 +-
gnulib/m4/locale-zh.m4 | 19 +-
gnulib/m4/locale_h.m4 | 10 +-
gnulib/m4/localeconv.m4 | 5 +-
gnulib/m4/lock.m4 | 5 +-
gnulib/m4/lstat.m4 | 15 +-
gnulib/m4/malloc.m4 | 8 +-
gnulib/m4/malloca.m4 | 5 +-
gnulib/m4/math_h.m4 | 58 +-
gnulib/m4/mbchar.m4 | 5 +-
gnulib/m4/mbiter.m4 | 5 +-
gnulib/m4/mbrtoc32.m4 | 62 +-
gnulib/m4/mbrtowc.m4 | 5 +-
gnulib/m4/mbsinit.m4 | 5 +-
gnulib/m4/mbslen.m4 | 5 +-
gnulib/m4/mbstate_t.m4 | 5 +-
gnulib/m4/mbswidth.m4 | 5 +-
gnulib/m4/mbtowc.m4 | 5 +-
gnulib/m4/memchr.m4 | 5 +-
gnulib/m4/mempcpy.m4 | 5 +-
gnulib/m4/memrchr.m4 | 5 +-
gnulib/m4/minmax.m4 | 5 +-
gnulib/m4/mkdir.m4 | 13 +-
gnulib/m4/mkstemp.m4 | 12 +-
gnulib/m4/mmap-anon.m4 | 5 +-
gnulib/m4/mode_t.m4 | 5 +-
gnulib/m4/msvc-inval.m4 | 5 +-
gnulib/m4/msvc-nothrow.m4 | 5 +-
gnulib/m4/multiarch.m4 | 5 +-
gnulib/m4/musl.m4 | 5 +-
gnulib/m4/nl_langinfo.m4 | 5 +-
gnulib/m4/nocrash.m4 | 5 +-
gnulib/m4/off64_t.m4 | 31 +
gnulib/m4/off_t.m4 | 5 +-
gnulib/m4/open-cloexec.m4 | 8 +-
gnulib/m4/open-slash.m4 | 5 +-
gnulib/m4/open.m4 | 5 +-
gnulib/m4/pathmax.m4 | 5 +-
gnulib/m4/pid_t.m4 | 5 +-
gnulib/m4/printf.m4 | 225 ++-
gnulib/m4/pthread-once.m4 | 36 +
gnulib/m4/pthread-spin.m4 | 71 +
gnulib/m4/pthread_h.m4 | 292 ++++
gnulib/m4/pthread_rwlock_rdlock.m4 | 11 +-
gnulib/m4/realloc.m4 | 8 +-
gnulib/m4/reallocarray.m4 | 5 +-
gnulib/m4/regex.m4 | 11 +-
gnulib/m4/sched_h.m4 | 101 ++
gnulib/m4/setlocale_null.m4 | 5 +-
gnulib/m4/size_max.m4 | 5 +-
gnulib/m4/ssize_t.m4 | 5 +-
gnulib/m4/stat-time.m4 | 14 +-
gnulib/m4/stat.m4 | 17 +-
gnulib/m4/std-gnu11.m4 | 5 +-
gnulib/m4/stdalign.m4 | 16 +-
gnulib/m4/stdarg.m4 | 5 +-
gnulib/m4/stddef_h.m4 | 37 +-
gnulib/m4/stdint.m4 | 5 +-
gnulib/m4/stdint_h.m4 | 5 +-
gnulib/m4/stdio_h.m4 | 5 +-
gnulib/m4/stdlib_h.m4 | 12 +-
gnulib/m4/stpcpy.m4 | 5 +-
gnulib/m4/strcase.m4 | 5 +-
gnulib/m4/strcasestr.m4 | 5 +-
gnulib/m4/strdup.m4 | 5 +-
gnulib/m4/strerror.m4 | 5 +-
gnulib/m4/string_h.m4 | 16 +-
gnulib/m4/strings_h.m4 | 11 +-
gnulib/m4/strndup.m4 | 5 +-
gnulib/m4/strnlen.m4 | 5 +-
gnulib/m4/strstr.m4 | 5 +-
gnulib/m4/sys_cdefs_h.m4 | 25 +
gnulib/m4/sys_random_h.m4 | 5 +-
gnulib/m4/sys_socket_h.m4 | 5 +-
gnulib/m4/sys_stat_h.m4 | 5 +-
gnulib/m4/sys_types_h.m4 | 8 +-
gnulib/m4/tempname.m4 | 12 +-
gnulib/m4/threadlib.m4 | 22 +-
gnulib/m4/time_h.m4 | 16 +-
gnulib/m4/uchar_h.m4 | 5 +-
gnulib/m4/unicase_h.m4 | 5 +-
gnulib/m4/unictype_h.m4 | 9 +-
gnulib/m4/uninorm_h.m4 | 5 +-
gnulib/m4/unistd_h.m4 | 7 +-
gnulib/m4/vararrays.m4 | 14 +-
gnulib/m4/vasnprintf.m4 | 23 +-
gnulib/m4/vasprintf.m4 | 5 +-
gnulib/m4/visibility.m4 | 13 +-
gnulib/m4/warn-on-use.m4 | 9 +-
gnulib/m4/wchar_h.m4 | 19 +-
gnulib/m4/wchar_t.m4 | 5 +-
gnulib/m4/wcrtomb.m4 | 5 +-
gnulib/m4/wctype.m4 | 5 +-
gnulib/m4/wctype_h.m4 | 5 +-
gnulib/m4/wcwidth.m4 | 9 +-
gnulib/m4/wint_t.m4 | 5 +-
gnulib/m4/xalloc.m4 | 5 +-
gnulib/m4/xsize.m4 | 5 +-
gnulib/m4/zzgnulib.m4 | 5 +-
429 files changed, 5868 insertions(+), 1591 deletions(-)
diff --git a/.gitignore b/.gitignore
index 4876b19070..34783b3222 100644
--- a/.gitignore
+++ b/.gitignore
@@ -54,6 +54,8 @@ gnulib/lib/getopt.h
gnulib/lib/inttypes.h
gnulib/lib/langinfo.h
gnulib/lib/locale.h
+gnulib/lib/pthread.h
+gnulib/lib/sched.h
gnulib/lib/stdarg.h
gnulib/lib/stdbool.h
gnulib/lib/stdint.h
diff --git a/ChangeLog b/ChangeLog
index 16c5db0ebc..dcd9c9172f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2024-06-04 Gavin Smith <gavinsmith0123@gmail.com>
+
+ Run gnulib-tool --add-import at top level
+
2024-06-03 Gavin Smith <gavinsmith0123@gmail.com>
* tp/Texinfo/ParserNonXS.pm (_handle_other_command)
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
index 1e2595ff59..3893ddd861 100755
--- a/build-aux/config.rpath
+++ b/build-aux/config.rpath
@@ -2,7 +2,7 @@
# Output a system dependent set of variables, describing how to set the
# run time search path of shared libraries in an executable.
#
-# Copyright 1996-2023 Free Software Foundation, Inc.
+# Copyright 1996-2024 Free Software Foundation, Inc.
# Taken from GNU libtool, 2001
# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
#
diff --git a/gnulib/lib/Makefile.am b/gnulib/lib/Makefile.am
index 8984cd3f30..1b756d417d 100644
--- a/gnulib/lib/Makefile.am
+++ b/gnulib/lib/Makefile.am
@@ -1,6 +1,6 @@
## DO NOT EDIT! GENERATED AUTOMATICALLY!
## Process this file with automake to produce Makefile.in.
-# 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
@@ -61,6 +61,7 @@ SUBDIRS =
noinst_HEADERS =
noinst_LIBRARIES =
noinst_LTLIBRARIES =
+pkgdata_DATA =
EXTRA_DIST =
BUILT_SOURCES =
SUFFIXES =
@@ -582,6 +583,7 @@ SED_HEADER_STDOUT = sed -e 1h -e '1$(SED_HEADER_NOEDIT)' -e
1G
SED_HEADER_TO_AT_t = $(SED_HEADER_STDOUT) -n -e 'w $@-t'
# Use $(gl_V_at) instead of $(AM_V_GEN) or $(AM_V_at) on a line that
+# is its recipe's first line if and only if @NMD@ lines are absent.
gl_V_at = $(AM_V_GEN)
## end gnulib module gen-header
@@ -925,7 +927,7 @@ locale.h: locale.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e 's/@''GNULIB_SETLOCALE''@/$(GL_GNULIB_SETLOCALE)/g' \
-e 's/@''GNULIB_SETLOCALE_NULL''@/$(GL_GNULIB_SETLOCALE_NULL)/g' \
-e 's/@''GNULIB_DUPLOCALE''@/$(GL_GNULIB_DUPLOCALE)/g' \
- -e 's/@''GNULIB_LOCALENAME''@/$(GL_GNULIB_LOCALENAME)/g' \
+ -e
's/@''GNULIB_LOCALENAME_UNSAFE''@/$(GL_GNULIB_LOCALENAME_UNSAFE)/g' \
-e 's|@''HAVE_NEWLOCALE''@|$(HAVE_NEWLOCALE)|g' \
-e 's|@''HAVE_DUPLOCALE''@|$(HAVE_DUPLOCALE)|g' \
-e 's|@''HAVE_FREELOCALE''@|$(HAVE_FREELOCALE)|g' \
@@ -1229,6 +1231,167 @@ EXTRA_DIST += pathmax.h
## end gnulib module pathmax
+## begin gnulib module pthread-h
+
+if gl_GNULIB_ENABLED_94ea50e7ff7c2508f8a5894b17b1211c
+BUILT_SOURCES += pthread.h
+
+# We need the following in order to create <pthread.h> when the system
+# doesn't have one that works with the given compiler.
+pthread.h: pthread.in.h $(top_builddir)/config.status $(CXXDEFS_H)
$(_NORETURN_H) $(ARG_NONNULL_H) $(WARN_ON_USE_H)
+ $(gl_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''HAVE_PTHREAD_H''@|$(HAVE_PTHREAD_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_PTHREAD_H''@|$(NEXT_PTHREAD_H)|g' \
+ -e 's/@''GNULIB_PTHREAD_THREAD''@/$(GL_GNULIB_PTHREAD_THREAD)/g' \
+ -e 's/@''GNULIB_PTHREAD_ONCE''@/$(GL_GNULIB_PTHREAD_ONCE)/g' \
+ -e 's/@''GNULIB_PTHREAD_MUTEX''@/$(GL_GNULIB_PTHREAD_MUTEX)/g' \
+ -e 's/@''GNULIB_PTHREAD_RWLOCK''@/$(GL_GNULIB_PTHREAD_RWLOCK)/g' \
+ -e 's/@''GNULIB_PTHREAD_COND''@/$(GL_GNULIB_PTHREAD_COND)/g' \
+ -e 's/@''GNULIB_PTHREAD_TSS''@/$(GL_GNULIB_PTHREAD_TSS)/g' \
+ -e 's/@''GNULIB_PTHREAD_SPIN''@/$(GL_GNULIB_PTHREAD_SPIN)/g' \
+ -e
's/@''GNULIB_PTHREAD_MUTEX_TIMEDLOCK''@/$(GL_GNULIB_PTHREAD_MUTEX_TIMEDLOCK)/g'
\
+ -e 's|@''HAVE_PTHREAD_T''@|$(HAVE_PTHREAD_T)|g' \
+ -e 's|@''HAVE_PTHREAD_SPINLOCK_T''@|$(HAVE_PTHREAD_SPINLOCK_T)|g'
\
+ -e
's|@''HAVE_PTHREAD_CREATE_DETACHED''@|$(HAVE_PTHREAD_CREATE_DETACHED)|g' \
+ -e
's|@''HAVE_PTHREAD_MUTEX_RECURSIVE''@|$(HAVE_PTHREAD_MUTEX_RECURSIVE)|g' \
+ -e
's|@''HAVE_PTHREAD_MUTEX_ROBUST''@|$(HAVE_PTHREAD_MUTEX_ROBUST)|g' \
+ -e
's|@''HAVE_PTHREAD_PROCESS_SHARED''@|$(HAVE_PTHREAD_PROCESS_SHARED)|g' \
+ -e 's|@''HAVE_PTHREAD_CREATE''@|$(HAVE_PTHREAD_CREATE)|g' \
+ -e 's|@''HAVE_PTHREAD_ATTR_INIT''@|$(HAVE_PTHREAD_ATTR_INIT)|g' \
+ -e
's|@''HAVE_PTHREAD_ATTR_GETDETACHSTATE''@|$(HAVE_PTHREAD_ATTR_GETDETACHSTATE)|g'
\
+ -e
's|@''HAVE_PTHREAD_ATTR_SETDETACHSTATE''@|$(HAVE_PTHREAD_ATTR_SETDETACHSTATE)|g'
\
+ -e
's|@''HAVE_PTHREAD_ATTR_DESTROY''@|$(HAVE_PTHREAD_ATTR_DESTROY)|g' \
+ -e 's|@''HAVE_PTHREAD_SELF''@|$(HAVE_PTHREAD_SELF)|g' \
+ -e 's|@''HAVE_PTHREAD_EQUAL''@|$(HAVE_PTHREAD_EQUAL)|g' \
+ -e 's|@''HAVE_PTHREAD_DETACH''@|$(HAVE_PTHREAD_DETACH)|g' \
+ -e 's|@''HAVE_PTHREAD_JOIN''@|$(HAVE_PTHREAD_JOIN)|g' \
+ -e 's|@''HAVE_PTHREAD_EXIT''@|$(HAVE_PTHREAD_EXIT)|g' \
+ < $(srcdir)/pthread.in.h > $@-t1
+ $(AM_V_at)sed \
+ -e 's|@''HAVE_PTHREAD_ONCE''@|$(HAVE_PTHREAD_ONCE)|g' \
+ -e 's|@''HAVE_PTHREAD_MUTEX_INIT''@|$(HAVE_PTHREAD_MUTEX_INIT)|g'
\
+ -e
's|@''HAVE_PTHREAD_MUTEXATTR_INIT''@|$(HAVE_PTHREAD_MUTEXATTR_INIT)|g' \
+ -e
's|@''HAVE_PTHREAD_MUTEXATTR_GETTYPE''@|$(HAVE_PTHREAD_MUTEXATTR_GETTYPE)|g' \
+ -e
's|@''HAVE_PTHREAD_MUTEXATTR_SETTYPE''@|$(HAVE_PTHREAD_MUTEXATTR_SETTYPE)|g' \
+ -e
's|@''HAVE_PTHREAD_MUTEXATTR_GETROBUST''@|$(HAVE_PTHREAD_MUTEXATTR_GETROBUST)|g'
\
+ -e
's|@''HAVE_PTHREAD_MUTEXATTR_SETROBUST''@|$(HAVE_PTHREAD_MUTEXATTR_SETROBUST)|g'
\
+ -e
's|@''HAVE_PTHREAD_MUTEXATTR_DESTROY''@|$(HAVE_PTHREAD_MUTEXATTR_DESTROY)|g' \
+ -e 's|@''HAVE_PTHREAD_MUTEX_LOCK''@|$(HAVE_PTHREAD_MUTEX_LOCK)|g'
\
+ -e
's|@''HAVE_PTHREAD_MUTEX_TRYLOCK''@|$(HAVE_PTHREAD_MUTEX_TRYLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_MUTEX_TIMEDLOCK''@|$(HAVE_PTHREAD_MUTEX_TIMEDLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_MUTEX_UNLOCK''@|$(HAVE_PTHREAD_MUTEX_UNLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_MUTEX_DESTROY''@|$(HAVE_PTHREAD_MUTEX_DESTROY)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCK_INIT''@|$(HAVE_PTHREAD_RWLOCK_INIT)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCKATTR_INIT''@|$(HAVE_PTHREAD_RWLOCKATTR_INIT)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCKATTR_DESTROY''@|$(HAVE_PTHREAD_RWLOCKATTR_DESTROY)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCK_RDLOCK''@|$(HAVE_PTHREAD_RWLOCK_RDLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCK_WRLOCK''@|$(HAVE_PTHREAD_RWLOCK_WRLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCK_TRYRDLOCK''@|$(HAVE_PTHREAD_RWLOCK_TRYRDLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCK_TRYWRLOCK''@|$(HAVE_PTHREAD_RWLOCK_TRYWRLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK''@|$(HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK''@|$(HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCK_UNLOCK''@|$(HAVE_PTHREAD_RWLOCK_UNLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_RWLOCK_DESTROY''@|$(HAVE_PTHREAD_RWLOCK_DESTROY)|g' \
+ -e 's|@''HAVE_PTHREAD_COND_INIT''@|$(HAVE_PTHREAD_COND_INIT)|g' \
+ -e
's|@''HAVE_PTHREAD_CONDATTR_INIT''@|$(HAVE_PTHREAD_CONDATTR_INIT)|g' \
+ -e
's|@''HAVE_PTHREAD_CONDATTR_DESTROY''@|$(HAVE_PTHREAD_CONDATTR_DESTROY)|g' \
+ -e 's|@''HAVE_PTHREAD_COND_WAIT''@|$(HAVE_PTHREAD_COND_WAIT)|g' \
+ -e
's|@''HAVE_PTHREAD_COND_TIMEDWAIT''@|$(HAVE_PTHREAD_COND_TIMEDWAIT)|g' \
+ -e
's|@''HAVE_PTHREAD_COND_SIGNAL''@|$(HAVE_PTHREAD_COND_SIGNAL)|g' \
+ -e
's|@''HAVE_PTHREAD_COND_BROADCAST''@|$(HAVE_PTHREAD_COND_BROADCAST)|g' \
+ -e
's|@''HAVE_PTHREAD_COND_DESTROY''@|$(HAVE_PTHREAD_COND_DESTROY)|g' \
+ -e 's|@''HAVE_PTHREAD_KEY_CREATE''@|$(HAVE_PTHREAD_KEY_CREATE)|g'
\
+ -e
's|@''HAVE_PTHREAD_SETSPECIFIC''@|$(HAVE_PTHREAD_SETSPECIFIC)|g' \
+ -e
's|@''HAVE_PTHREAD_GETSPECIFIC''@|$(HAVE_PTHREAD_GETSPECIFIC)|g' \
+ -e 's|@''HAVE_PTHREAD_KEY_DELETE''@|$(HAVE_PTHREAD_KEY_DELETE)|g'
\
+ -e 's|@''HAVE_PTHREAD_SPIN_INIT''@|$(HAVE_PTHREAD_SPIN_INIT)|g' \
+ -e 's|@''HAVE_PTHREAD_SPIN_LOCK''@|$(HAVE_PTHREAD_SPIN_LOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_SPIN_TRYLOCK''@|$(HAVE_PTHREAD_SPIN_TRYLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_SPIN_UNLOCK''@|$(HAVE_PTHREAD_SPIN_UNLOCK)|g' \
+ -e
's|@''HAVE_PTHREAD_SPIN_DESTROY''@|$(HAVE_PTHREAD_SPIN_DESTROY)|g' \
+ < $@-t1 > $@-t2
+ $(AM_V_at)sed \
+ -e 's|@''REPLACE_PTHREAD_CREATE''@|$(REPLACE_PTHREAD_CREATE)|g' \
+ -e
's|@''REPLACE_PTHREAD_ATTR_INIT''@|$(REPLACE_PTHREAD_ATTR_INIT)|g' \
+ -e
's|@''REPLACE_PTHREAD_ATTR_GETDETACHSTATE''@|$(REPLACE_PTHREAD_ATTR_GETDETACHSTATE)|g'
\
+ -e
's|@''REPLACE_PTHREAD_ATTR_SETDETACHSTATE''@|$(REPLACE_PTHREAD_ATTR_SETDETACHSTATE)|g'
\
+ -e
's|@''REPLACE_PTHREAD_ATTR_DESTROY''@|$(REPLACE_PTHREAD_ATTR_DESTROY)|g' \
+ -e 's|@''REPLACE_PTHREAD_SELF''@|$(REPLACE_PTHREAD_SELF)|g' \
+ -e 's|@''REPLACE_PTHREAD_EQUAL''@|$(REPLACE_PTHREAD_EQUAL)|g' \
+ -e 's|@''REPLACE_PTHREAD_DETACH''@|$(REPLACE_PTHREAD_DETACH)|g' \
+ -e 's|@''REPLACE_PTHREAD_JOIN''@|$(REPLACE_PTHREAD_JOIN)|g' \
+ -e 's|@''REPLACE_PTHREAD_EXIT''@|$(REPLACE_PTHREAD_EXIT)|g' \
+ -e 's|@''REPLACE_PTHREAD_ONCE''@|$(REPLACE_PTHREAD_ONCE)|g' \
+ -e
's|@''REPLACE_PTHREAD_MUTEX_INIT''@|$(REPLACE_PTHREAD_MUTEX_INIT)|g' \
+ -e
's|@''REPLACE_PTHREAD_MUTEXATTR_INIT''@|$(REPLACE_PTHREAD_MUTEXATTR_INIT)|g' \
+ -e
's|@''REPLACE_PTHREAD_MUTEXATTR_GETTYPE''@|$(REPLACE_PTHREAD_MUTEXATTR_GETTYPE)|g'
\
+ -e
's|@''REPLACE_PTHREAD_MUTEXATTR_SETTYPE''@|$(REPLACE_PTHREAD_MUTEXATTR_SETTYPE)|g'
\
+ -e
's|@''REPLACE_PTHREAD_MUTEXATTR_GETROBUST''@|$(REPLACE_PTHREAD_MUTEXATTR_GETROBUST)|g'
\
+ -e
's|@''REPLACE_PTHREAD_MUTEXATTR_SETROBUST''@|$(REPLACE_PTHREAD_MUTEXATTR_SETROBUST)|g'
\
+ -e
's|@''REPLACE_PTHREAD_MUTEXATTR_DESTROY''@|$(REPLACE_PTHREAD_MUTEXATTR_DESTROY)|g'
\
+ -e
's|@''REPLACE_PTHREAD_MUTEX_LOCK''@|$(REPLACE_PTHREAD_MUTEX_LOCK)|g' \
+ -e
's|@''REPLACE_PTHREAD_MUTEX_TRYLOCK''@|$(REPLACE_PTHREAD_MUTEX_TRYLOCK)|g' \
+ -e
's|@''REPLACE_PTHREAD_MUTEX_TIMEDLOCK''@|$(REPLACE_PTHREAD_MUTEX_TIMEDLOCK)|g' \
+ -e
's|@''REPLACE_PTHREAD_MUTEX_UNLOCK''@|$(REPLACE_PTHREAD_MUTEX_UNLOCK)|g' \
+ -e
's|@''REPLACE_PTHREAD_MUTEX_DESTROY''@|$(REPLACE_PTHREAD_MUTEX_DESTROY)|g' \
+ -e
's|@''REPLACE_PTHREAD_RWLOCK_INIT''@|$(REPLACE_PTHREAD_RWLOCK_INIT)|g' \
+ -e
's|@''REPLACE_PTHREAD_RWLOCKATTR_INIT''@|$(REPLACE_PTHREAD_RWLOCKATTR_INIT)|g' \
+ -e
's|@''REPLACE_PTHREAD_RWLOCKATTR_DESTROY''@|$(REPLACE_PTHREAD_RWLOCKATTR_DESTROY)|g'
\
+ -e
's|@''REPLACE_PTHREAD_RWLOCK_RDLOCK''@|$(REPLACE_PTHREAD_RWLOCK_RDLOCK)|g' \
+ -e
's|@''REPLACE_PTHREAD_RWLOCK_WRLOCK''@|$(REPLACE_PTHREAD_RWLOCK_WRLOCK)|g' \
+ -e
's|@''REPLACE_PTHREAD_RWLOCK_TRYRDLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TRYRDLOCK)|g'
\
+ -e
's|@''REPLACE_PTHREAD_RWLOCK_TRYWRLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TRYWRLOCK)|g'
\
+ -e
's|@''REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK)|g'
\
+ -e
's|@''REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK''@|$(REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK)|g'
\
+ -e
's|@''REPLACE_PTHREAD_RWLOCK_UNLOCK''@|$(REPLACE_PTHREAD_RWLOCK_UNLOCK)|g' \
+ -e
's|@''REPLACE_PTHREAD_RWLOCK_DESTROY''@|$(REPLACE_PTHREAD_RWLOCK_DESTROY)|g' \
+ < $@-t2 > $@-t3
+ $(AM_V_at)sed \
+ -e
's|@''REPLACE_PTHREAD_COND_INIT''@|$(REPLACE_PTHREAD_COND_INIT)|g' \
+ -e
's|@''REPLACE_PTHREAD_CONDATTR_INIT''@|$(REPLACE_PTHREAD_CONDATTR_INIT)|g' \
+ -e
's|@''REPLACE_PTHREAD_CONDATTR_DESTROY''@|$(REPLACE_PTHREAD_CONDATTR_DESTROY)|g'
\
+ -e
's|@''REPLACE_PTHREAD_COND_WAIT''@|$(REPLACE_PTHREAD_COND_WAIT)|g' \
+ -e
's|@''REPLACE_PTHREAD_COND_TIMEDWAIT''@|$(REPLACE_PTHREAD_COND_TIMEDWAIT)|g' \
+ -e
's|@''REPLACE_PTHREAD_COND_SIGNAL''@|$(REPLACE_PTHREAD_COND_SIGNAL)|g' \
+ -e
's|@''REPLACE_PTHREAD_COND_BROADCAST''@|$(REPLACE_PTHREAD_COND_BROADCAST)|g' \
+ -e
's|@''REPLACE_PTHREAD_COND_DESTROY''@|$(REPLACE_PTHREAD_COND_DESTROY)|g' \
+ -e
's|@''REPLACE_PTHREAD_KEY_CREATE''@|$(REPLACE_PTHREAD_KEY_CREATE)|g' \
+ -e
's|@''REPLACE_PTHREAD_SETSPECIFIC''@|$(REPLACE_PTHREAD_SETSPECIFIC)|g' \
+ -e
's|@''REPLACE_PTHREAD_GETSPECIFIC''@|$(REPLACE_PTHREAD_GETSPECIFIC)|g' \
+ -e
's|@''REPLACE_PTHREAD_KEY_DELETE''@|$(REPLACE_PTHREAD_KEY_DELETE)|g' \
+ -e
's|@''REPLACE_PTHREAD_SPIN_INIT''@|$(REPLACE_PTHREAD_SPIN_INIT)|g' \
+ -e
's|@''REPLACE_PTHREAD_SPIN_LOCK''@|$(REPLACE_PTHREAD_SPIN_LOCK)|g' \
+ -e
's|@''REPLACE_PTHREAD_SPIN_TRYLOCK''@|$(REPLACE_PTHREAD_SPIN_TRYLOCK)|g' \
+ -e
's|@''REPLACE_PTHREAD_SPIN_UNLOCK''@|$(REPLACE_PTHREAD_SPIN_UNLOCK)|g' \
+ -e
's|@''REPLACE_PTHREAD_SPIN_DESTROY''@|$(REPLACE_PTHREAD_SPIN_DESTROY)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _Noreturn/r $(_NORETURN_H)' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $@-t3 > $@-t4
+ $(AM_V_at)rm -f $@-t1 $@-t2 $@-t3
+ $(AM_V_at)mv $@-t4 $@
+MOSTLYCLEANFILES += pthread.h pthread.h-t1 pthread.h-t2 pthread.h-t3
pthread.h-t4
+
+endif
+EXTRA_DIST += pthread.in.h
+
+## end gnulib module pthread-h
+
+## begin gnulib module pthread-once
+
+if gl_GNULIB_ENABLED_e0dc424e76447be3f4b8566d84038f5a
+if GL_COND_OBJ_PTHREAD_ONCE
+libgnu_a_SOURCES += pthread-once.c
+endif
+
+endif
+## end gnulib module pthread-once
+
## begin gnulib module realloc-gnu
@@ -1267,6 +1430,37 @@ EXTRA_libgnu_a_SOURCES += regcomp.c regex_internal.c
regexec.c
## end gnulib module regex
+## begin gnulib module sched
+
+if gl_GNULIB_ENABLED_sched
+BUILT_SOURCES += sched.h
+
+# We need the following in order to create a replacement for <sched.h> when
+# the system doesn't have one.
+sched.h: sched.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H)
+ $(gl_V_at)$(SED_HEADER_STDOUT) \
+ -e 's|@''GUARD_PREFIX''@|GL|g' \
+ -e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_H)|g' \
+ -e 's|@''HAVE_SYS_CDEFS_H''@|$(HAVE_SYS_CDEFS_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
+ -e 's|@''NEXT_SCHED_H''@|$(NEXT_SCHED_H)|g' \
+ -e 's|@''HAVE_STRUCT_SCHED_PARAM''@|$(HAVE_STRUCT_SCHED_PARAM)|g'
\
+ -e 's/@''GNULIB_SCHED_YIELD''@/$(GL_GNULIB_SCHED_YIELD)/g' \
+ -e 's|@''HAVE_SCHED_YIELD''@|$(HAVE_SCHED_YIELD)|g' \
+ -e 's|@''REPLACE_SCHED_YIELD''@|$(REPLACE_SCHED_YIELD)|g' \
+ -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ $(srcdir)/sched.in.h > $@-t
+ $(AM_V_at)mv $@-t $@
+MOSTLYCLEANFILES += sched.h sched.h-t
+
+endif
+EXTRA_DIST += sched.in.h
+
+## end gnulib module sched
+
## begin gnulib module setlocale-null
if gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd
@@ -1280,6 +1474,16 @@ EXTRA_DIST += setlocale_null.h windows-initguard.h
## end gnulib module setlocale-null
+## begin gnulib module setlocale-null-unlocked
+
+if gl_GNULIB_ENABLED_e7ab648fbf42deb155fb024e2402e26d
+libgnu_a_SOURCES += setlocale_null-unlocked.c
+
+endif
+EXTRA_DIST += setlocale_null.h
+
+## end gnulib module setlocale-null-unlocked
+
## begin gnulib module size_max
if gl_GNULIB_ENABLED_size_max
@@ -1421,9 +1625,11 @@ stddef.h: stddef.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+ -e 's|@''NULLPTR_T_NEEDS_STDDEF''@|$(NULLPTR_T_NEEDS_STDDEF)|g' \
+ -e 's|@''STDDEF_NOT_IDEMPOTENT''@|$(STDDEF_NOT_IDEMPOTENT)|g' \
+ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
-e 's|@''HAVE_MAX_ALIGN_T''@|$(HAVE_MAX_ALIGN_T)|g' \
-e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
- -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
$(srcdir)/stddef.in.h > $@-t
$(AM_V_at)mv $@-t $@
else
@@ -1648,6 +1854,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
-e 's/@''GNULIB__EXIT''@/$(GL_GNULIB__EXIT)/g' \
+ -e 's/@''GNULIB_ABORT_DEBUG''@/$(GL_GNULIB_ABORT_DEBUG)/g' \
-e 's/@''GNULIB_ALIGNED_ALLOC''@/$(GL_GNULIB_ALIGNED_ALLOC)/g' \
-e 's/@''GNULIB_ATOLL''@/$(GL_GNULIB_ATOLL)/g' \
-e 's/@''GNULIB_CALLOC_GNU''@/$(GL_GNULIB_CALLOC_GNU)/g' \
@@ -1673,6 +1880,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's/@''GNULIB_PTSNAME_R''@/$(GL_GNULIB_PTSNAME_R)/g' \
-e 's/@''GNULIB_PUTENV''@/$(GL_GNULIB_PUTENV)/g' \
-e 's/@''GNULIB_QSORT_R''@/$(GL_GNULIB_QSORT_R)/g' \
+ -e 's/@''GNULIB_RAND''@/$(GL_GNULIB_RAND)/g' \
-e 's/@''GNULIB_RANDOM''@/$(GL_GNULIB_RANDOM)/g' \
-e 's/@''GNULIB_RANDOM_R''@/$(GL_GNULIB_RANDOM_R)/g' \
-e 's/@''GNULIB_REALLOC_GNU''@/$(GL_GNULIB_REALLOC_GNU)/g' \
@@ -1683,6 +1891,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's/@''GNULIB_SECURE_GETENV''@/$(GL_GNULIB_SECURE_GETENV)/g' \
-e 's/@''GNULIB_SETENV''@/$(GL_GNULIB_SETENV)/g' \
-e 's/@''GNULIB_STRTOD''@/$(GL_GNULIB_STRTOD)/g' \
+ -e 's/@''GNULIB_STRTOF''@/$(GL_GNULIB_STRTOF)/g' \
-e 's/@''GNULIB_STRTOL''@/$(GL_GNULIB_STRTOL)/g' \
-e 's/@''GNULIB_STRTOLD''@/$(GL_GNULIB_STRTOLD)/g' \
-e 's/@''GNULIB_STRTOLL''@/$(GL_GNULIB_STRTOLL)/g' \
@@ -1735,6 +1944,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's|@''HAVE_SETSTATE''@|$(HAVE_SETSTATE)|g' \
-e 's|@''HAVE_DECL_SETSTATE''@|$(HAVE_DECL_SETSTATE)|g' \
-e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+ -e 's|@''HAVE_STRTOF''@|$(HAVE_STRTOF)|g' \
-e 's|@''HAVE_STRTOL''@|$(HAVE_STRTOL)|g' \
-e 's|@''HAVE_STRTOLD''@|$(HAVE_STRTOLD)|g' \
-e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
@@ -1747,6 +1957,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
< $@-t1 > $@-t2
$(AM_V_at)sed \
-e 's|@''REPLACE__EXIT''@|$(REPLACE__EXIT)|g' \
+ -e 's|@''REPLACE_ABORT''@|$(REPLACE_ABORT)|g' \
-e 's|@''REPLACE_ALIGNED_ALLOC''@|$(REPLACE_ALIGNED_ALLOC)|g' \
-e
's|@''REPLACE_CALLOC_FOR_CALLOC_GNU''@|$(REPLACE_CALLOC_FOR_CALLOC_GNU)|g' \
-e
's|@''REPLACE_CALLOC_FOR_CALLOC_POSIX''@|$(REPLACE_CALLOC_FOR_CALLOC_POSIX)|g' \
@@ -1770,6 +1981,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's|@''REPLACE_PTSNAME_R''@|$(REPLACE_PTSNAME_R)|g' \
-e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
-e 's|@''REPLACE_QSORT_R''@|$(REPLACE_QSORT_R)|g' \
+ -e 's|@''REPLACE_RAND''@|$(REPLACE_RAND)|g' \
-e 's|@''REPLACE_RANDOM''@|$(REPLACE_RANDOM)|g' \
-e 's|@''REPLACE_RANDOM_R''@|$(REPLACE_RANDOM_R)|g' \
-e
's|@''REPLACE_REALLOC_FOR_REALLOC_GNU''@|$(REPLACE_REALLOC_FOR_REALLOC_GNU)|g' \
@@ -1779,6 +1991,7 @@ stdlib.h: stdlib.in.h $(top_builddir)/config.status
$(CXXDEFS_H) \
-e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
-e 's|@''REPLACE_SETSTATE''@|$(REPLACE_SETSTATE)|g' \
-e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+ -e 's|@''REPLACE_STRTOF''@|$(REPLACE_STRTOF)|g' \
-e 's|@''REPLACE_STRTOL''@|$(REPLACE_STRTOL)|g' \
-e 's|@''REPLACE_STRTOLD''@|$(REPLACE_STRTOLD)|g' \
-e 's|@''REPLACE_STRTOLL''@|$(REPLACE_STRTOLL)|g' \
@@ -1962,6 +2175,7 @@ string.h: string.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
-e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
-e 's|@''REPLACE_MEMPCPY''@|$(REPLACE_MEMPCPY)|g' \
+ -e 's|@''REPLACE_MEMSET_EXPLICIT''@|$(REPLACE_MEMSET_EXPLICIT)|g'
\
-e 's|@''REPLACE_FREE''@|$(REPLACE_FREE)|g' \
-e 's|@''REPLACE_STPCPY''@|$(REPLACE_STPCPY)|g' \
-e 's|@''REPLACE_STPNCPY''@|$(REPLACE_STPNCPY)|g' \
@@ -1977,6 +2191,7 @@ string.h: string.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_STRERROR_R''@|$(REPLACE_STRERROR_R)|g' \
-e 's|@''REPLACE_STRERRORNAME_NP''@|$(REPLACE_STRERRORNAME_NP)|g'
\
-e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+ -e 's|@''REPLACE_STRVERSCMP''@|$(REPLACE_STRVERSCMP)|g' \
-e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
-e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
-e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
@@ -2187,6 +2402,7 @@ sys/types.h: sys_types.in.h $(top_builddir)/config.status
-e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \
-e 's|@''NEXT_SYS_TYPES_H''@|$(NEXT_SYS_TYPES_H)|g' \
-e 's|@''WINDOWS_64_BIT_OFF_T''@|$(WINDOWS_64_BIT_OFF_T)|g' \
+ -e 's|@''HAVE_OFF64_T''@|$(HAVE_OFF64_T)|g' \
-e 's|@''WINDOWS_STAT_INODES''@|$(WINDOWS_STAT_INODES)|g' \
$(srcdir)/sys_types.in.h > $@-t
$(AM_V_at)mv $@-t $@
@@ -2259,6 +2475,7 @@ time.h: time.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H) $(
-e 's|@''REPLACE_TIME''@|$(REPLACE_TIME)|g' \
-e 's|@''REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
-e 's|@''REPLACE_TIMESPEC_GET''@|$(REPLACE_TIMESPEC_GET)|g' \
+ -e 's|@''REPLACE_TIMESPEC_GETRES''@|$(REPLACE_TIMESPEC_GETRES)|g'
\
-e 's|@''REPLACE_TZSET''@|$(REPLACE_TZSET)|g' \
-e
's|@''PTHREAD_H_DEFINES_STRUCT_TIMESPEC''@|$(PTHREAD_H_DEFINES_STRUCT_TIMESPEC)|g'
\
-e
's|@''SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g'
\
@@ -2463,6 +2680,8 @@ unictype.h: unictype.in.h
-e
's/@''GNULIB_UNICTYPE_PROPERTY_OTHER_ID_CONTINUE_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_OTHER_ID_CONTINUE_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_XID_START_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_XID_START_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_XID_CONTINUE_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_XID_CONTINUE_DLL_VARIABLE)/g'
\
+ -e
's/@''GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE)/g'
\
+ -e
's/@''GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_PATTERN_WHITE_SPACE_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_PATTERN_WHITE_SPACE_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_PATTERN_SYNTAX_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_PATTERN_SYNTAX_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_JOIN_CONTROL_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_JOIN_CONTROL_DLL_VARIABLE)/g'
\
@@ -2494,6 +2713,7 @@ unictype.h: unictype.in.h
-e
's/@''GNULIB_UNICTYPE_PROPERTY_IDEOGRAPHIC_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_IDEOGRAPHIC_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_UNIFIED_IDEOGRAPH_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_UNIFIED_IDEOGRAPH_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_RADICAL_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_RADICAL_DLL_VARIABLE)/g'
\
+ -e
's/@''GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_IDS_BINARY_OPERATOR_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_IDS_BINARY_OPERATOR_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_IDS_TRINARY_OPERATOR_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_IDS_TRINARY_OPERATOR_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_EMOJI_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_EMOJI_DLL_VARIABLE)/g'
\
@@ -2507,6 +2727,7 @@ unictype.h: unictype.in.h
-e
's/@''GNULIB_UNICTYPE_PROPERTY_NON_BREAK_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_NON_BREAK_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_ISO_CONTROL_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_ISO_CONTROL_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_FORMAT_CONTROL_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_FORMAT_CONTROL_DLL_VARIABLE)/g'
\
+ -e
's/@''GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_DASH_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_DASH_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_HYPHEN_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_HYPHEN_DLL_VARIABLE)/g'
\
-e
's/@''GNULIB_UNICTYPE_PROPERTY_PUNCTUATION_DLL_VARIABLE''@/$(GL_GNULIB_UNICTYPE_PROPERTY_PUNCTUATION_DLL_VARIABLE)/g'
\
@@ -2844,6 +3065,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_EXECVP''@|$(REPLACE_EXECVP)|g' \
-e 's|@''REPLACE_EXECVPE''@|$(REPLACE_EXECVPE)|g' \
-e 's|@''REPLACE_FACCESSAT''@|$(REPLACE_FACCESSAT)|g' \
+ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
-e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
-e 's|@''REPLACE_FDATASYNC''@|$(REPLACE_FDATASYNC)|g' \
-e 's|@''REPLACE_FTRUNCATE''@|$(REPLACE_FTRUNCATE)|g' \
@@ -2856,6 +3078,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H
-e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
-e 's|@''REPLACE_GETPASS''@|$(REPLACE_GETPASS)|g' \
-e
's|@''REPLACE_GETPASS_FOR_GETPASS_GNU''@|$(REPLACE_GETPASS_FOR_GETPASS_GNU)|g' \
+ -e 's|@''REPLACE_GETUSERSHELL''@|$(REPLACE_GETUSERSHELL)|g' \
-e 's|@''REPLACE_ISATTY''@|$(REPLACE_ISATTY)|g' \
-e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
-e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
@@ -3017,6 +3240,7 @@ wchar.h: wchar.in.h $(top_builddir)/config.status
$(CXXDEFS_H) $(ARG_NONNULL_H)
-e 's/@''GNULIB_WCSTOK''@/$(GL_GNULIB_WCSTOK)/g' \
-e 's/@''GNULIB_WCSWIDTH''@/$(GL_GNULIB_WCSWIDTH)/g' \
-e 's/@''GNULIB_WCSFTIME''@/$(GL_GNULIB_WCSFTIME)/g' \
+ -e 's/@''GNULIB_WGETCWD''@/$(GL_GNULIB_WGETCWD)/g' \
-e 's/@''GNULIB_MDA_WCSDUP''@/$(GL_GNULIB_MDA_WCSDUP)/g' \
-e 's/@''GNULIB_FREE_POSIX''@/$(GL_GNULIB_FREE_POSIX)/g' \
< $(srcdir)/wchar.in.h > $@-t1
diff --git a/gnulib/lib/_Noreturn.h b/gnulib/lib/_Noreturn.h
index 6ecea98b54..7326bd4773 100644
--- a/gnulib/lib/_Noreturn.h
+++ b/gnulib/lib/_Noreturn.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that a function does not return.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/gnulib/lib/alloca.in.h b/gnulib/lib/alloca.in.h
index a1bb3d758d..6aa47df8ec 100644
--- a/gnulib/lib/alloca.in.h
+++ b/gnulib/lib/alloca.in.h
@@ -1,6 +1,6 @@
/* Memory allocation on the stack.
- Copyright (C) 1995, 1999, 2001-2004, 2006-2023 Free Software Foundation,
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2024 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/arg-nonnull.h b/gnulib/lib/arg-nonnull.h
index 9498ae1f7d..46c711ca1a 100644
--- a/gnulib/lib/arg-nonnull.h
+++ b/gnulib/lib/arg-nonnull.h
@@ -1,5 +1,5 @@
/* A C macro for declaring that specific arguments must not be NULL.
- Copyright (C) 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2009-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/gnulib/lib/argz.c b/gnulib/lib/argz.c
index c2b6307276..2f27fca2a5 100644
--- a/gnulib/lib/argz.c
+++ b/gnulib/lib/argz.c
@@ -1,5 +1,5 @@
/* Functions for dealing with '\0' separated arg vectors.
- Copyright (C) 1995-1998, 2000-2002, 2006, 2008-2023 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2006, 2008-2024 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/lib/argz.in.h b/gnulib/lib/argz.in.h
index 3ba80a69ec..e37a1fd306 100644
--- a/gnulib/lib/argz.in.h
+++ b/gnulib/lib/argz.in.h
@@ -1,5 +1,5 @@
/* Routines for dealing with '\0' separated arg vectors.
- Copyright (C) 1995-2000, 2004, 2007, 2009-2023 Free Software Foundation,
+ Copyright (C) 1995-2000, 2004, 2007, 2009-2024 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
@@ -24,6 +24,11 @@
#include <errno.h>
#include <string.h> /* Need size_t. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
#ifndef __error_t_defined
typedef int error_t;
#endif
@@ -127,4 +132,8 @@ extern char *argz_next (const char *restrict /*argz*/,
size_t /*argz_len*/,
const char *restrict /*entry*/);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* argz.h */
diff --git a/gnulib/lib/asnprintf.c b/gnulib/lib/asnprintf.c
index f4861bf845..a6c09bc205 100644
--- a/gnulib/lib/asnprintf.c
+++ b/gnulib/lib/asnprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/asprintf.c b/gnulib/lib/asprintf.c
index ba58e06481..b0c334788a 100644
--- a/gnulib/lib/asprintf.c
+++ b/gnulib/lib/asprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2007, 2009-2023 Free Software Foundation,
+ Copyright (C) 1999, 2002, 2006-2007, 2009-2024 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/assert.in.h b/gnulib/lib/assert.in.h
index b0ab99c776..6e4995e145 100644
--- a/gnulib/lib/assert.in.h
+++ b/gnulib/lib/assert.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <assert.h>
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/attribute.h b/gnulib/lib/attribute.h
index e4e36092b0..604965a6d1 100644
--- a/gnulib/lib/attribute.h
+++ b/gnulib/lib/attribute.h
@@ -1,6 +1,6 @@
/* ATTRIBUTE_* macros for using attributes in GCC and similar compilers
- Copyright 2020-2023 Free Software Foundation, Inc.
+ Copyright 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -49,8 +49,9 @@
_GL_ATTRIBUTE_MALLOC, _GL_ATTRIBUTE_MAY_ALIAS, _GL_ATTRIBUTE_MAYBE_UNUSED,
_GL_ATTRIBUTE_NODISCARD, _GL_ATTRIBUTE_NOINLINE, _GL_ATTRIBUTE_NONNULL,
_GL_ATTRIBUTE_NONSTRING, _GL_ATTRIBUTE_NOTHROW, _GL_ATTRIBUTE_PACKED,
- _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_RETURNS_NONNULL,
- _GL_ATTRIBUTE_SENTINEL. */
+ _GL_ATTRIBUTE_PURE, _GL_ATTRIBUTE_REPRODUCIBLE,
+ _GL_ATTRIBUTE_RETURNS_NONNULL, _GL_ATTRIBUTE_SENTINEL,
+ _GL_ATTRIBUTE_UNSEQUENCED. */
#if !_GL_CONFIG_H_INCLUDED
#error "Please include config.h first."
#endif
@@ -88,7 +89,7 @@
is the size of the returned memory block.
ATTRIBUTE_ALLOC_SIZE ((M, N)) - Multiply the Mth and Nth arguments
to determine the size of the returned memory block. */
-/* Applies to: function, pointer to function, function types. */
+/* Applies to: functions, pointer to functions, function types. */
#define ATTRIBUTE_ALLOC_SIZE(args) _GL_ATTRIBUTE_ALLOC_SIZE (args)
/* ATTRIBUTE_DEALLOC (F, I) declares that the function returns pointers
@@ -170,7 +171,7 @@
/* Attributes regarding debugging information emitted by the compiler. */
/* Omit the function from stack traces when debugging. */
-/* Applies to: function. */
+/* Applies to: functions. */
#define ATTRIBUTE_ARTIFICIAL _GL_ATTRIBUTE_ARTIFICIAL
/* Make the entity visible to debuggers etc., even with '-fwhole-program'. */
@@ -192,25 +193,64 @@
/* Always inline the function, and report an error if the compiler
cannot inline. */
-/* Applies to: function. */
+/* Applies to: functions. */
#define ATTRIBUTE_ALWAYS_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE
-/* It is OK for a compiler to omit duplicate calls with the same arguments.
+/* It is OK for a compiler to move calls to the function and to omit
+ calls to the function if another call has the same arguments or the
+ result is not used.
This attribute is safe for a function that neither depends on
- nor affects observable state, and always returns exactly once -
- e.g., does not loop forever, and does not call longjmp.
- (This attribute is stricter than ATTRIBUTE_PURE.) */
+ nor affects state, and always returns exactly once -
+ e.g., does not raise an exception, call longjmp, or loop forever.
+ (This attribute is stricter than ATTRIBUTE_PURE because the
+ function cannot observe state. It is stricter than UNSEQUENCED
+ because the function must return exactly once and cannot depend on
+ state addressed by its arguments.) */
/* Applies to: functions. */
#define ATTRIBUTE_CONST _GL_ATTRIBUTE_CONST
-/* It is OK for a compiler to omit duplicate calls with the same
- arguments if observable state is not changed between calls.
- This attribute is safe for a function that does not affect
- observable state, and always returns exactly once.
- (This attribute is looser than ATTRIBUTE_CONST.) */
+/* It is OK for a compiler to move calls to the function and to omit duplicate
+ calls to the function with the same arguments, so long as the state
+ addressed by its arguments is the same.
+ This attribute is safe for a function that is effectless, idempotent,
+ stateless, and independent; see ISO C 23 ยง 6.7.12.7 for a definition of
+ these terms.
+ (This attribute is stricter than REPRODUCIBLE because the function
+ must be stateless and independent. It is looser than ATTRIBUTE_CONST
+ because the function need not return exactly once and can depend
+ on state addressed by its arguments.)
+ See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
+ <https://stackoverflow.com/questions/76847905/>. */
+/* Applies to: functions, pointer to functions, function type. */
+#define UNSEQUENCED _GL_ATTRIBUTE_UNSEQUENCED
+
+/* It is OK for a compiler to move calls to the function and to omit
+ calls to the function if another call has the same arguments or the
+ result is not used, and if observable state is the same.
+ This attribute is safe for a function that does not affect observable state
+ and always returns exactly once.
+ (This attribute is looser than ATTRIBUTE_CONST because the function
+ can depend on observable state. It is stricter than REPRODUCIBLE
+ because the function must return exactly once and cannot affect
+ state addressed by its arguments.) */
/* Applies to: functions. */
#define ATTRIBUTE_PURE _GL_ATTRIBUTE_PURE
+/* It is OK for a compiler to move calls to the function and to omit duplicate
+ calls to the function with the same arguments, so long as the state
+ addressed by its arguments is the same and is updated in time for
+ the rest of the program.
+ This attribute is safe for a function that is effectless and idempotent; see
+ ISO C 23 ยง 6.7.12.7 for a definition of these terms.
+ (This attribute is looser than UNSEQUENCED because the function need
+ not be stateless and idempotent. It is looser than ATTRIBUTE_PURE
+ because the function need not return exactly once and can affect
+ state addressed by its arguments.)
+ See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
+ <https://stackoverflow.com/questions/76847905/>. */
+/* Applies to: functions, pointer to functions, function type. */
+#define REPRODUCIBLE _GL_ATTRIBUTE_REPRODUCIBLE
+
/* The function is rarely executed. */
/* Applies to: functions. */
#define ATTRIBUTE_COLD _GL_ATTRIBUTE_COLD
diff --git a/gnulib/lib/basename-lgpl.c b/gnulib/lib/basename-lgpl.c
index 6de60aa678..256f84609c 100644
--- a/gnulib/lib/basename-lgpl.c
+++ b/gnulib/lib/basename-lgpl.c
@@ -1,6 +1,6 @@
/* basename.c -- return the last element in a file name
- Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2023 Free Software
+ Copyright (C) 1990, 1998-2001, 2003-2006, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/basename-lgpl.h b/gnulib/lib/basename-lgpl.h
index c1982fa8eb..2a56be98e2 100644
--- a/gnulib/lib/basename-lgpl.h
+++ b/gnulib/lib/basename-lgpl.h
@@ -1,6 +1,6 @@
/* Extract the last component (base name) of a file name.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2023 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2024 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/btowc.c b/gnulib/lib/btowc.c
index 13ceab2e90..8bf21aa674 100644
--- a/gnulib/lib/btowc.c
+++ b/gnulib/lib/btowc.c
@@ -1,5 +1,5 @@
/* Convert unibyte character to wide character.
- Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008, 2010-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/c++defs.h b/gnulib/lib/c++defs.h
index 458c014de5..eb66967b09 100644
--- a/gnulib/lib/c++defs.h
+++ b/gnulib/lib/c++defs.h
@@ -1,5 +1,5 @@
/* C++ compatible function declaration macros.
- Copyright (C) 2010-2023 Free Software Foundation, Inc.
+ Copyright (C) 2010-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/gnulib/lib/c32is-impl.h b/gnulib/lib/c32is-impl.h
index fd916341ee..084b3a02cf 100644
--- a/gnulib/lib/c32is-impl.h
+++ b/gnulib/lib/c32is-impl.h
@@ -1,5 +1,5 @@
/* Test whether a 32-bit wide character belongs to a specific character class.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32isalnum.c b/gnulib/lib/c32isalnum.c
index 21ae6ceb63..6335af6de4 100644
--- a/gnulib/lib/c32isalnum.c
+++ b/gnulib/lib/c32isalnum.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being alphanumeric.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32isalpha.c b/gnulib/lib/c32isalpha.c
index 3bc13d8302..ea43be56b5 100644
--- a/gnulib/lib/c32isalpha.c
+++ b/gnulib/lib/c32isalpha.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being alphabetic.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32isblank.c b/gnulib/lib/c32isblank.c
index bb5ca5d38a..ee06d3d05b 100644
--- a/gnulib/lib/c32isblank.c
+++ b/gnulib/lib/c32isblank.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being blank.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32iscntrl.c b/gnulib/lib/c32iscntrl.c
index 17897abb2a..1f50527bd7 100644
--- a/gnulib/lib/c32iscntrl.c
+++ b/gnulib/lib/c32iscntrl.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being a control character.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32isdigit.c b/gnulib/lib/c32isdigit.c
index 71b6402861..4cb99c2a0e 100644
--- a/gnulib/lib/c32isdigit.c
+++ b/gnulib/lib/c32isdigit.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being a digit.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32isgraph.c b/gnulib/lib/c32isgraph.c
index 0c90be5fc3..407d6d1a24 100644
--- a/gnulib/lib/c32isgraph.c
+++ b/gnulib/lib/c32isgraph.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being graphic.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32islower.c b/gnulib/lib/c32islower.c
index 88b45a3261..f2bfda7c02 100644
--- a/gnulib/lib/c32islower.c
+++ b/gnulib/lib/c32islower.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being lowercase.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32isprint.c b/gnulib/lib/c32isprint.c
index dd7c0d369f..fd8d7a630a 100644
--- a/gnulib/lib/c32isprint.c
+++ b/gnulib/lib/c32isprint.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being printable.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32ispunct.c b/gnulib/lib/c32ispunct.c
index b14849530e..03d64699f5 100644
--- a/gnulib/lib/c32ispunct.c
+++ b/gnulib/lib/c32ispunct.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being a punctuation or symbol character.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32isspace.c b/gnulib/lib/c32isspace.c
index 1e8a7cce22..1449fc4e71 100644
--- a/gnulib/lib/c32isspace.c
+++ b/gnulib/lib/c32isspace.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being white-space.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32isupper.c b/gnulib/lib/c32isupper.c
index bfd7e541a3..4b21860314 100644
--- a/gnulib/lib/c32isupper.c
+++ b/gnulib/lib/c32isupper.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being uppercase.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32isxdigit.c b/gnulib/lib/c32isxdigit.c
index 1ede8ab178..133d010360 100644
--- a/gnulib/lib/c32isxdigit.c
+++ b/gnulib/lib/c32isxdigit.c
@@ -1,5 +1,5 @@
/* Test 32-bit wide character for being a hexadecimal digit.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32to-impl.h b/gnulib/lib/c32to-impl.h
index 94ca7bdfb5..e94fa7dc9c 100644
--- a/gnulib/lib/c32to-impl.h
+++ b/gnulib/lib/c32to-impl.h
@@ -1,5 +1,5 @@
/* Case mapping of a 32-bit wide character.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32tolower.c b/gnulib/lib/c32tolower.c
index 8934f6fe68..52b149b19d 100644
--- a/gnulib/lib/c32tolower.c
+++ b/gnulib/lib/c32tolower.c
@@ -1,5 +1,5 @@
/* Map a 32-bit wide character to lowercase.
- Copyright (C) 2023 Free Software Foundation, Inc.
+ Copyright (C) 2023-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/c32width.c b/gnulib/lib/c32width.c
index 1bea29dfba..7edf0088f9 100644
--- a/gnulib/lib/c32width.c
+++ b/gnulib/lib/c32width.c
@@ -1,5 +1,5 @@
/* Determine the number of screen columns needed for a 32-bit wide character.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/calloc.c b/gnulib/lib/calloc.c
index 08843acd28..81dfd3efb5 100644
--- a/gnulib/lib/calloc.c
+++ b/gnulib/lib/calloc.c
@@ -1,6 +1,6 @@
/* calloc() function that is glibc compatible.
This wrapper function is required at least on Tru64 UNIX 5.1 and mingw.
- Copyright (C) 2004-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2004-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/cdefs.h b/gnulib/lib/cdefs.h
index 412f036ce3..d38382ad9d 100644
--- a/gnulib/lib/cdefs.h
+++ b/gnulib/lib/cdefs.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1992-2023 Free Software Foundation, Inc.
+/* Copyright (C) 1992-2024 Free Software Foundation, Inc.
Copyright The GNU Toolchain Authors.
This file is part of the GNU C Library.
@@ -42,8 +42,8 @@
#if (defined __has_attribute \
&& (!defined __clang_minor__ \
|| (defined __apple_build_version__ \
- ? 6000000 <= __apple_build_version__ \
- : 3 < __clang_major__ + (5 <= __clang_minor__))))
+ ? 7000000 <= __apple_build_version__ \
+ : 5 <= __clang_major__)))
# define __glibc_has_attribute(attr) __has_attribute (attr)
#else
# define __glibc_has_attribute(attr) 0
diff --git a/gnulib/lib/cloexec.c b/gnulib/lib/cloexec.c
index e4cecbd2e8..cdb0d740eb 100644
--- a/gnulib/lib/cloexec.c
+++ b/gnulib/lib/cloexec.c
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 1991, 2004-2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 1991, 2004-2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/cloexec.h b/gnulib/lib/cloexec.h
index 057fd668c9..a7944d6dd5 100644
--- a/gnulib/lib/cloexec.h
+++ b/gnulib/lib/cloexec.h
@@ -1,6 +1,6 @@
/* cloexec.c - set or clear the close-on-exec descriptor flag
- Copyright (C) 2004, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -15,6 +15,11 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Set the 'FD_CLOEXEC' flag of DESC if VALUE is true,
or clear the flag if VALUE is false.
Return 0 on success, or -1 on error with 'errno' set.
@@ -32,3 +37,8 @@ int set_cloexec_flag (int desc, bool value);
be duplicated. */
int dup_cloexec (int fd);
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gnulib/lib/close.c b/gnulib/lib/close.c
index 3c1b09ea52..830fd82081 100644
--- a/gnulib/lib/close.c
+++ b/gnulib/lib/close.c
@@ -1,5 +1,5 @@
/* close replacement.
- Copyright (C) 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/dirname-lgpl.c b/gnulib/lib/dirname-lgpl.c
index e9454af397..8333c0ebad 100644
--- a/gnulib/lib/dirname-lgpl.c
+++ b/gnulib/lib/dirname-lgpl.c
@@ -1,6 +1,6 @@
/* dirname.c -- return all but the last element in a file name
- Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2023 Free Software
+ Copyright (C) 1990, 1998, 2000-2001, 2003-2006, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/dirname.h b/gnulib/lib/dirname.h
index 0344f1c44c..33935ba937 100644
--- a/gnulib/lib/dirname.h
+++ b/gnulib/lib/dirname.h
@@ -1,6 +1,6 @@
/* Take file names apart into directory and base names.
- Copyright (C) 1998, 2001, 2003-2006, 2009-2023 Free Software Foundation,
+ Copyright (C) 1998, 2001, 2003-2006, 2009-2024 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/dup2.c b/gnulib/lib/dup2.c
index 7d197ca312..916e113dd8 100644
--- a/gnulib/lib/dup2.c
+++ b/gnulib/lib/dup2.c
@@ -1,6 +1,6 @@
/* Duplicate an open file descriptor to a specified file descriptor.
- Copyright (C) 1999, 2004-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2004-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/dynarray.h b/gnulib/lib/dynarray.h
index 9155910934..8940e81b25 100644
--- a/gnulib/lib/dynarray.h
+++ b/gnulib/lib/dynarray.h
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically.
- Copyright 2021-2023 Free Software Foundation, Inc.
+ Copyright 2021-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/errno.in.h b/gnulib/lib/errno.in.h
index 3dda9c260e..aa658e6270 100644
--- a/gnulib/lib/errno.in.h
+++ b/gnulib/lib/errno.in.h
@@ -1,6 +1,6 @@
/* A POSIX-like <errno.h>.
- Copyright (C) 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/error.c b/gnulib/lib/error.c
index 9e26391e98..c53dfeb60d 100644
--- a/gnulib/lib/error.c
+++ b/gnulib/lib/error.c
@@ -1,5 +1,5 @@
/* Error handler for noninteractive utilities
- Copyright (C) 1990-1998, 2000-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 1990-1998, 2000-2007, 2009-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
This file is free software: you can redistribute it and/or modify
@@ -22,7 +22,7 @@
# define _GL_NO_INLINE_ERROR
#endif
-#include "error.h"
+#include <error.h>
#include <stdarg.h>
#include <stdio.h>
diff --git a/gnulib/lib/error.in.h b/gnulib/lib/error.in.h
index 61f98c5216..1ba066a863 100644
--- a/gnulib/lib/error.in.h
+++ b/gnulib/lib/error.in.h
@@ -1,5 +1,5 @@
/* Declarations for error-reporting functions.
- Copyright (C) 1995-1997, 2003, 2006, 2008-2023 Free Software Foundation,
+ Copyright (C) 1995-1997, 2003, 2006, 2008-2024 Free Software Foundation,
Inc.
This file is part of the GNU C Library.
@@ -23,7 +23,7 @@
or error_at_line(...) invocations. */
/* The include_next requires a split double-inclusion guard. */
-#if @HAVE_ERROR_H@
+#if @HAVE_ERROR_H@ && !defined __MINGW32__
# @INCLUDE_NEXT@ @NEXT_ERROR_H@
#endif
diff --git a/gnulib/lib/exitfail.c b/gnulib/lib/exitfail.c
index d67a130c05..8a5962e82f 100644
--- a/gnulib/lib/exitfail.c
+++ b/gnulib/lib/exitfail.c
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002-2003, 2005-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/exitfail.h b/gnulib/lib/exitfail.h
index 85a6af64ad..fa264b5c8c 100644
--- a/gnulib/lib/exitfail.h
+++ b/gnulib/lib/exitfail.h
@@ -1,6 +1,6 @@
/* Failure exit status
- Copyright (C) 2002, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -15,4 +15,14 @@
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
extern int volatile exit_failure;
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gnulib/lib/fcntl.c b/gnulib/lib/fcntl.c
index e220800845..7cd3a0f976 100644
--- a/gnulib/lib/fcntl.c
+++ b/gnulib/lib/fcntl.c
@@ -1,6 +1,6 @@
/* Provide file descriptor control.
- Copyright (C) 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/fcntl.in.h b/gnulib/lib/fcntl.in.h
index d0bb85f30b..1465ce594d 100644
--- a/gnulib/lib/fcntl.in.h
+++ b/gnulib/lib/fcntl.in.h
@@ -1,6 +1,6 @@
/* Like <fcntl.h>, but with non-working flags defined to 0.
- Copyright (C) 2006-2023 Free Software Foundation, Inc.
+ Copyright (C) 2006-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -51,7 +51,8 @@
#ifndef _@GUARD_PREFIX@_FCNTL_H
/* Needed before <sys/stat.h>.
- May also define off_t to a 64-bit type on native Windows. */
+ May also define off_t to a 64-bit type on native Windows.
+ Also defines off64_t on macOS, NetBSD, OpenBSD, MSVC, Cygwin, Haiku. */
#include <sys/types.h>
/* On some systems other than glibc, <sys/stat.h> is a prerequisite of
<fcntl.h>. On glibc systems, we would like to avoid namespace pollution.
diff --git a/gnulib/lib/fd-hook.c b/gnulib/lib/fd-hook.c
index 362611507e..75bbe49c92 100644
--- a/gnulib/lib/fd-hook.c
+++ b/gnulib/lib/fd-hook.c
@@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/fd-hook.h b/gnulib/lib/fd-hook.h
index 6bf3c24da1..2150460bc1 100644
--- a/gnulib/lib/fd-hook.h
+++ b/gnulib/lib/fd-hook.h
@@ -1,5 +1,5 @@
/* Hook for making file descriptor functions close(), ioctl() extensible.
- Copyright (C) 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/filename.h b/gnulib/lib/filename.h
index a2400a9dfe..4f0f0fbc3c 100644
--- a/gnulib/lib/filename.h
+++ b/gnulib/lib/filename.h
@@ -1,5 +1,5 @@
/* Basic filename support macros.
- Copyright (C) 2001-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gnulib/lib/float+.h b/gnulib/lib/float+.h
index e7531e46a3..104f477faa 100644
--- a/gnulib/lib/float+.h
+++ b/gnulib/lib/float+.h
@@ -1,5 +1,5 @@
/* Supplemental information about the floating-point formats.
- Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/float.c b/gnulib/lib/float.c
index f81ff33d3b..a9ea40b063 100644
--- a/gnulib/lib/float.c
+++ b/gnulib/lib/float.c
@@ -1,5 +1,5 @@
/* Auxiliary definitions for <float.h>.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/float.in.h b/gnulib/lib/float.in.h
index bf2c502c7f..73e8d40621 100644
--- a/gnulib/lib/float.in.h
+++ b/gnulib/lib/float.in.h
@@ -1,6 +1,6 @@
/* A correct <float.h>.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/free.c b/gnulib/lib/free.c
index 372a6b0fec..2f0c40ba89 100644
--- a/gnulib/lib/free.c
+++ b/gnulib/lib/free.c
@@ -1,6 +1,6 @@
/* Make free() preserve errno.
- Copyright (C) 2003, 2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/fstat.c b/gnulib/lib/fstat.c
index 6a235002e1..205d5aab80 100644
--- a/gnulib/lib/fstat.c
+++ b/gnulib/lib/fstat.c
@@ -1,5 +1,5 @@
/* fstat() replacement.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/getdtablesize.c b/gnulib/lib/getdtablesize.c
index ac2d1753a6..762c100b38 100644
--- a/gnulib/lib/getdtablesize.c
+++ b/gnulib/lib/getdtablesize.c
@@ -1,5 +1,5 @@
/* getdtablesize() function: Return maximum possible file descriptor value + 1.
- Copyright (C) 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/getopt-cdefs.in.h b/gnulib/lib/getopt-cdefs.in.h
index 1a666ebb7b..a1d304d49e 100644
--- a/gnulib/lib/getopt-cdefs.in.h
+++ b/gnulib/lib/getopt-cdefs.in.h
@@ -1,5 +1,5 @@
/* getopt-on-non-glibc compatibility macros.
- Copyright (C) 1989-2023 Free Software Foundation, Inc.
+ Copyright (C) 1989-2024 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gnulib/lib/getopt-core.h b/gnulib/lib/getopt-core.h
index c5dd49363f..12d09a25c0 100644
--- a/gnulib/lib/getopt-core.h
+++ b/gnulib/lib/getopt-core.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (basic, portable features only).
- Copyright (C) 1989-2023 Free Software Foundation, Inc.
+ Copyright (C) 1989-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gnulib/lib/getopt-ext.h b/gnulib/lib/getopt-ext.h
index d37c29328b..e4b499d4e8 100644
--- a/gnulib/lib/getopt-ext.h
+++ b/gnulib/lib/getopt-ext.h
@@ -1,5 +1,5 @@
/* Declarations for getopt (GNU extensions).
- Copyright (C) 1989-2023 Free Software Foundation, Inc.
+ Copyright (C) 1989-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gnulib/lib/getopt-pfx-core.h b/gnulib/lib/getopt-pfx-core.h
index 095e3930fe..78b7816aa4 100644
--- a/gnulib/lib/getopt-pfx-core.h
+++ b/gnulib/lib/getopt-pfx-core.h
@@ -1,5 +1,5 @@
/* getopt (basic, portable features) gnulib wrapper header.
- Copyright (C) 1989-2023 Free Software Foundation, Inc.
+ Copyright (C) 1989-2024 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gnulib/lib/getopt-pfx-ext.h b/gnulib/lib/getopt-pfx-ext.h
index 8578d72530..f001c11e05 100644
--- a/gnulib/lib/getopt-pfx-ext.h
+++ b/gnulib/lib/getopt-pfx-ext.h
@@ -1,5 +1,5 @@
/* getopt (GNU extensions) gnulib wrapper header.
- Copyright (C) 1989-2023 Free Software Foundation, Inc.
+ Copyright (C) 1989-2024 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library.
diff --git a/gnulib/lib/getopt.c b/gnulib/lib/getopt.c
index 1e2441c4af..ea2d1a529c 100644
--- a/gnulib/lib/getopt.c
+++ b/gnulib/lib/getopt.c
@@ -1,5 +1,5 @@
/* Getopt for GNU.
- Copyright (C) 1987-2023 Free Software Foundation, Inc.
+ Copyright (C) 1987-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
@@ -21,7 +21,7 @@
# include <config.h>
#endif
-#include "getopt.h"
+#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
@@ -223,8 +223,9 @@ process_long_option (int argc, char **argv, const char
*optstring,
{
/* Didn't find an exact match, so look for abbreviations. */
unsigned char *ambig_set = NULL;
- int ambig_malloced = 0;
- int ambig_fallback = 0;
+ /* Use simpler fallback diagnostic if ambig_set == &ambig_fallback. */
+ unsigned char ambig_fallback;
+ void *ambig_malloced = NULL;
int indfound = -1;
for (p = longopts, option_index = 0; p->name; p++, option_index++)
@@ -242,39 +243,42 @@ process_long_option (int argc, char **argv, const char
*optstring,
|| pfound->val != p->val)
{
/* Second or later nonexact match found. */
- if (!ambig_fallback)
+ if (ambig_set != &ambig_fallback)
{
if (!print_errors)
/* Don't waste effort tracking the ambig set if
we're not going to print it anyway. */
- ambig_fallback = 1;
+ ambig_set = &ambig_fallback;
else if (!ambig_set)
{
if (__libc_use_alloca (n_options))
ambig_set = alloca (n_options);
- else if ((ambig_set = malloc (n_options)) == NULL)
- /* Fall back to simpler error message. */
- ambig_fallback = 1;
else
- ambig_malloced = 1;
+ {
+ ambig_malloced = malloc (n_options);
+ /* Fall back to simpler diagnostic if
+ memory allocation fails. */
+ ambig_set = (ambig_malloced ? ambig_malloced
+ : &ambig_fallback);
+ }
- if (ambig_set)
+ if (ambig_set != &ambig_fallback)
{
memset (ambig_set, 0, n_options);
ambig_set[indfound] = 1;
}
}
- if (ambig_set)
+ if (ambig_set && ambig_set != &ambig_fallback)
ambig_set[option_index] = 1;
}
}
}
- if (ambig_set || ambig_fallback)
+ if (ambig_set)
{
if (print_errors)
{
- if (ambig_fallback)
+ if (ambig_set == &ambig_fallback)
fprintf (stderr, _("%s: option '%s%s' is ambiguous\n"),
argv[0], prefix, d->__nextchar);
else
@@ -296,8 +300,7 @@ process_long_option (int argc, char **argv, const char
*optstring,
funlockfile (stderr);
}
}
- if (ambig_malloced)
- free (ambig_set);
+ free (ambig_malloced);
d->__nextchar += strlen (d->__nextchar);
d->optind++;
d->optopt = 0;
@@ -720,7 +723,7 @@ _getopt_internal (int argc, char **argv, const char
*optstring,
return result;
}
-/* glibc gets a LSB-compliant getopt and a POSIX-complaint __posix_getopt.
+/* glibc gets a LSB-compliant getopt and a POSIX-compliant __posix_getopt.
Standalone applications just get a POSIX-compliant getopt.
POSIX and LSB both require these functions to take 'char *const *argv'
even though this is incorrect (because of the permutation). */
diff --git a/gnulib/lib/getopt.in.h b/gnulib/lib/getopt.in.h
index 0867d365f4..c2411a754f 100644
--- a/gnulib/lib/getopt.in.h
+++ b/gnulib/lib/getopt.in.h
@@ -1,5 +1,5 @@
/* Declarations for getopt.
- Copyright (C) 1989-2023 Free Software Foundation, Inc.
+ Copyright (C) 1989-2024 Free Software Foundation, Inc.
This file is part of gnulib.
Unlike most of the getopt implementation, it is NOT shared
with the GNU C Library, which supplies a different version of
diff --git a/gnulib/lib/getopt1.c b/gnulib/lib/getopt1.c
index 49323aa8ed..c42d29f8b5 100644
--- a/gnulib/lib/getopt1.c
+++ b/gnulib/lib/getopt1.c
@@ -1,5 +1,5 @@
/* getopt_long and getopt_long_only entry points for GNU getopt.
- Copyright (C) 1987-2023 Free Software Foundation, Inc.
+ Copyright (C) 1987-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
@@ -21,7 +21,7 @@
# include <config.h>
#endif
-#include "getopt.h"
+#include <getopt.h>
#include "getopt_int.h"
int
diff --git a/gnulib/lib/getopt_int.h b/gnulib/lib/getopt_int.h
index 4d9e24beeb..c00c0b6940 100644
--- a/gnulib/lib/getopt_int.h
+++ b/gnulib/lib/getopt_int.h
@@ -1,5 +1,5 @@
/* Internal declarations for getopt.
- Copyright (C) 1989-2023 Free Software Foundation, Inc.
+ Copyright (C) 1989-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library and is also part of gnulib.
Patches to this file should be submitted to both projects.
diff --git a/gnulib/lib/getprogname.c b/gnulib/lib/getprogname.c
index 204855a4a8..392a9a2f98 100644
--- a/gnulib/lib/getprogname.c
+++ b/gnulib/lib/getprogname.c
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2023 Free Software Foundation, Inc.
+ Copyright (C) 2016-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
diff --git a/gnulib/lib/getprogname.h b/gnulib/lib/getprogname.h
index 13314f21e2..bee1c1a21a 100644
--- a/gnulib/lib/getprogname.h
+++ b/gnulib/lib/getprogname.h
@@ -1,5 +1,5 @@
/* Program name management.
- Copyright (C) 2016-2023 Free Software Foundation, Inc.
+ Copyright (C) 2016-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
diff --git a/gnulib/lib/getrandom.c b/gnulib/lib/getrandom.c
index 19bb3429ba..44283cf181 100644
--- a/gnulib/lib/getrandom.c
+++ b/gnulib/lib/getrandom.c
@@ -1,6 +1,6 @@
/* Obtain a series of random bytes.
- Copyright 2020-2023 Free Software Foundation, Inc.
+ Copyright 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/gettext.h b/gnulib/lib/gettext.h
index d0462c47e1..39d5ae4daa 100644
--- a/gnulib/lib/gettext.h
+++ b/gnulib/lib/gettext.h
@@ -1,5 +1,5 @@
/* Convenience header for conditional use of GNU <libintl.h>.
- Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2023 Free Software
+ Copyright (C) 1995-1998, 2000-2002, 2004-2006, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/glthread/lock.c b/gnulib/lib/glthread/lock.c
index 82fb7553f6..6661ad6a82 100644
--- a/gnulib/lib/glthread/lock.c
+++ b/gnulib/lib/glthread/lock.c
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/glthread/lock.h b/gnulib/lib/glthread/lock.h
index 805cd1cf61..2d5cb3209c 100644
--- a/gnulib/lib/glthread/lock.h
+++ b/gnulib/lib/glthread/lock.h
@@ -1,5 +1,5 @@
/* Locking in multithreaded situations.
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/glthread/threadlib.c b/gnulib/lib/glthread/threadlib.c
index 5ecf827ff3..7a77676841 100644
--- a/gnulib/lib/glthread/threadlib.c
+++ b/gnulib/lib/glthread/threadlib.c
@@ -1,5 +1,5 @@
/* Multithreading primitives.
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/hard-locale.c b/gnulib/lib/hard-locale.c
index c01fce5344..653c580925 100644
--- a/gnulib/lib/hard-locale.c
+++ b/gnulib/lib/hard-locale.c
@@ -1,6 +1,6 @@
/* hard-locale.c -- Determine whether a locale is hard.
- Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2023 Free Software
+ Copyright (C) 1997-1999, 2002-2004, 2006-2007, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/hard-locale.h b/gnulib/lib/hard-locale.h
index 5123d71d95..5d40e522a4 100644
--- a/gnulib/lib/hard-locale.h
+++ b/gnulib/lib/hard-locale.h
@@ -1,6 +1,6 @@
/* Determine whether a locale is hard.
- Copyright (C) 1999, 2003-2004, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2003-2004, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -16,7 +16,12 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef HARD_LOCALE_H_
-# define HARD_LOCALE_H_ 1
+#define HARD_LOCALE_H_ 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Return true if the specified CATEGORY of the current locale is hard, i.e.
different from the C or POSIX locale that has a fixed behavior.
@@ -25,4 +30,9 @@
per-thread locale. */
extern bool hard_locale (int category);
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* HARD_LOCALE_H_ */
diff --git a/gnulib/lib/ialloc.c b/gnulib/lib/ialloc.c
index cd44d8caf7..8564a15b6a 100644
--- a/gnulib/lib/ialloc.c
+++ b/gnulib/lib/ialloc.c
@@ -1,6 +1,6 @@
/* malloc with idx_t rather than size_t
- Copyright 2021-2023 Free Software Foundation, Inc.
+ Copyright 2021-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/ialloc.h b/gnulib/lib/ialloc.h
index 22f57a47d8..2aa94ae7ca 100644
--- a/gnulib/lib/ialloc.h
+++ b/gnulib/lib/ialloc.h
@@ -1,6 +1,6 @@
/* ialloc.h -- malloc with idx_t rather than size_t
- Copyright 2021-2023 Free Software Foundation, Inc.
+ Copyright 2021-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -29,6 +29,9 @@
#include <errno.h>
#include <stdint.h>
#include <stdlib.h>
+#if defined __CHERI_PURE_CAPABILITY__
+# include <cheri.h>
+#endif
_GL_INLINE_HEADER_BEGIN
#ifndef IALLOC_INLINE
@@ -65,9 +68,19 @@ IALLOC_INLINE
void *
irealloc (void *p, idx_t s)
{
- /* Work around GNU realloc glitch by treating a zero size as if it
- were 1, so that returning NULL is equivalent to failing. */
- return s <= SIZE_MAX ? realloc (p, s | !s) : _gl_alloc_nomem ();
+ if (s <= SIZE_MAX)
+ {
+ /* Work around GNU realloc glitch by treating a zero size as if it
+ were 1, so that returning NULL is equivalent to failing. */
+ p = realloc (p, s | !s);
+#if defined __CHERI_PURE_CAPABILITY__
+ if (p != NULL)
+ p = cheri_bounds_set (p, s);
+#endif
+ return p;
+ }
+ else
+ return _gl_alloc_nomem ();
}
/* icalloc (num, size) is like calloc (num, size).
@@ -99,13 +112,23 @@ icalloc (idx_t n, idx_t s)
IALLOC_INLINE void *
ireallocarray (void *p, idx_t n, idx_t s)
{
- /* Work around GNU reallocarray glitch by treating a zero size as if
- it were 1, so that returning NULL is equivalent to failing. */
- if (n == 0 || s == 0)
- n = s = 1;
- return (n <= SIZE_MAX && s <= SIZE_MAX
- ? reallocarray (p, n, s)
- : _gl_alloc_nomem ());
+ if (n <= SIZE_MAX && s <= SIZE_MAX)
+ {
+ /* Work around GNU reallocarray glitch by treating a zero size as if
+ it were 1, so that returning NULL is equivalent to failing. */
+ size_t nx = n;
+ size_t sx = s;
+ if (n == 0 || s == 0)
+ nx = sx = 1;
+ p = reallocarray (p, nx, sx);
+#if defined __CHERI_PURE_CAPABILITY__
+ if (p != NULL && (n == 0 || s == 0))
+ p = cheri_bounds_set (p, 0);
+#endif
+ return p;
+ }
+ else
+ return _gl_alloc_nomem ();
}
#ifdef __cplusplus
diff --git a/gnulib/lib/idx.h b/gnulib/lib/idx.h
index 23020b7ec0..43793f2d62 100644
--- a/gnulib/lib/idx.h
+++ b/gnulib/lib/idx.h
@@ -1,5 +1,5 @@
/* A type for indices and sizes.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -111,6 +111,11 @@
help producing good code and good warnings. The type 'idx_t' could
then be typedef'ed to a range type that is signed after promotion. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* In the future, idx_t could be typedef'ed to a signed range type.
The clang "extended integer types", supported in Clang 11 or newer
<https://clang.llvm.org/docs/LanguageExtensions.html#extended-integer-types>,
@@ -131,4 +136,9 @@ typedef ptrdiff_t idx_t;
Perhaps there should be another macro IDX_VALUE_BITS that does not
count the sign bit and is therefore one less than PTRDIFF_WIDTH. */
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _IDX_H */
diff --git a/gnulib/lib/intprops-internal.h b/gnulib/lib/intprops-internal.h
index 41039a093b..443024c665 100644
--- a/gnulib/lib/intprops-internal.h
+++ b/gnulib/lib/intprops-internal.h
@@ -1,6 +1,6 @@
/* intprops-internal.h -- properties of integer types not visible to users
- Copyright (C) 2001-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
@@ -169,7 +169,9 @@
/* Work around GCC bug 91450. */
# define _GL_INT_MULTIPLY_WRAPV(a, b, r) \
((!_GL_SIGNED_TYPE_OR_EXPR (*(r)) && _GL_EXPR_SIGNED (a) &&
_GL_EXPR_SIGNED (b) \
- && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, 0, (__typeof__ (*(r))) -1)) \
+ && _GL_INT_MULTIPLY_RANGE_OVERFLOW (a, b, \
+ (__typeof__ (*(r))) 0, \
+ (__typeof__ (*(r))) -1)) \
? ((void) __builtin_mul_overflow (a, b, r), 1) \
: __builtin_mul_overflow (a, b, r))
# endif
@@ -183,10 +185,10 @@
/* Nonzero if this compiler has GCC bug 68193 or Clang bug 25390. See:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68193
https://llvm.org/bugs/show_bug.cgi?id=25390
- For now, assume all versions of GCC-like compilers generate bogus
+ For now, assume GCC < 14 and all Clang versions generate bogus
warnings for _Generic. This matters only for compilers that
lack relevant builtins. */
-#if __GNUC__ || defined __clang__
+#if (__GNUC__ && __GNUC__ < 14) || defined __clang__
# define _GL__GENERIC_BOGUS 1
#else
# define _GL__GENERIC_BOGUS 0
diff --git a/gnulib/lib/intprops.h b/gnulib/lib/intprops.h
index 44b5e60fb9..43734f3440 100644
--- a/gnulib/lib/intprops.h
+++ b/gnulib/lib/intprops.h
@@ -1,6 +1,6 @@
/* intprops.h -- properties of integer types
- Copyright (C) 2001-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/gnulib/lib/inttypes.in.h b/gnulib/lib/inttypes.in.h
index 22643876ab..b9ab8a4b42 100644
--- a/gnulib/lib/inttypes.in.h
+++ b/gnulib/lib/inttypes.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2024 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Derek Price.
This file is part of gnulib.
diff --git a/gnulib/lib/iswblank.c b/gnulib/lib/iswblank.c
index 5540f1fe03..f699850a1b 100644
--- a/gnulib/lib/iswblank.c
+++ b/gnulib/lib/iswblank.c
@@ -1,5 +1,5 @@
/* Test wide character for being blank.
- Copyright (C) 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/iswctype-impl.h b/gnulib/lib/iswctype-impl.h
index 13dc6664c6..999f220cc1 100644
--- a/gnulib/lib/iswctype-impl.h
+++ b/gnulib/lib/iswctype-impl.h
@@ -1,5 +1,5 @@
/* Test whether a wide character has a given property.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/iswctype.c b/gnulib/lib/iswctype.c
index e70446aef9..f4e6f015d9 100644
--- a/gnulib/lib/iswctype.c
+++ b/gnulib/lib/iswctype.c
@@ -1,5 +1,5 @@
/* Test whether a wide character has a given property.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/iswdigit.c b/gnulib/lib/iswdigit.c
index 94db27402b..57363ab8e4 100644
--- a/gnulib/lib/iswdigit.c
+++ b/gnulib/lib/iswdigit.c
@@ -1,5 +1,5 @@
/* Test wide character for being a digit.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/iswpunct.c b/gnulib/lib/iswpunct.c
index 0d60cb71eb..c7cb28b5fa 100644
--- a/gnulib/lib/iswpunct.c
+++ b/gnulib/lib/iswpunct.c
@@ -1,5 +1,5 @@
/* Test wide character for being a punctuation or symbol character.
- Copyright (C) 2023 Free Software Foundation, Inc.
+ Copyright (C) 2023-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/iswxdigit.c b/gnulib/lib/iswxdigit.c
index 7ec4566d0e..d32e3b0f7c 100644
--- a/gnulib/lib/iswxdigit.c
+++ b/gnulib/lib/iswxdigit.c
@@ -1,5 +1,5 @@
/* Test wide character for being a hexadecimal digit.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/itold.c b/gnulib/lib/itold.c
index 0ef4464eea..e6fbcff408 100644
--- a/gnulib/lib/itold.c
+++ b/gnulib/lib/itold.c
@@ -1,5 +1,5 @@
/* Replacement for 'int' to 'long double' conversion routine.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/langinfo.in.h b/gnulib/lib/langinfo.in.h
index 4cf712eb3e..febbd25f24 100644
--- a/gnulib/lib/langinfo.in.h
+++ b/gnulib/lib/langinfo.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <langinfo.h>.
- Copyright (C) 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/lc-charset-dispatch.c b/gnulib/lib/lc-charset-dispatch.c
index cd74466b4c..e2f8b2f5de 100644
--- a/gnulib/lib/lc-charset-dispatch.c
+++ b/gnulib/lib/lc-charset-dispatch.c
@@ -1,5 +1,5 @@
/* Dispatching based on the current locale's character encoding.
- Copyright (C) 2018-2023 Free Software Foundation, Inc.
+ Copyright (C) 2018-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/lc-charset-dispatch.h b/gnulib/lib/lc-charset-dispatch.h
index c82b6a609d..4c1cf5f1ac 100644
--- a/gnulib/lib/lc-charset-dispatch.h
+++ b/gnulib/lib/lc-charset-dispatch.h
@@ -1,5 +1,5 @@
/* Dispatching based on the current locale's character encoding.
- Copyright (C) 2018-2023 Free Software Foundation, Inc.
+ Copyright (C) 2018-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/libc-config.h b/gnulib/lib/libc-config.h
index 5f5ad01037..70114608fb 100644
--- a/gnulib/lib/libc-config.h
+++ b/gnulib/lib/libc-config.h
@@ -1,6 +1,6 @@
/* System definitions for code taken from the GNU C Library
- Copyright 2017-2023 Free Software Foundation, Inc.
+ Copyright 2017-2024 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
diff --git a/gnulib/lib/limits.in.h b/gnulib/lib/limits.in.h
index e2e173eb2d..c65eb4c1cf 100644
--- a/gnulib/lib/limits.in.h
+++ b/gnulib/lib/limits.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <limits.h>.
- Copyright 2016-2023 Free Software Foundation, Inc.
+ Copyright 2016-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -130,7 +130,7 @@
# define BOOL_WIDTH 1
# define BOOL_MAX 1
# elif ! defined BOOL_MAX
-# define BOOL_MAX ((((1U << (BOOL_WIDTH - 1)) - 1) << 1) + 1)
+# define BOOL_MAX 1
# endif
#endif
diff --git a/gnulib/lib/localcharset.c b/gnulib/lib/localcharset.c
index 7ed9c957db..93c4baa471 100644
--- a/gnulib/lib/localcharset.c
+++ b/gnulib/lib/localcharset.c
@@ -1,6 +1,6 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2006, 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2000-2006, 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -1054,7 +1054,7 @@ locale_charset (void)
}
}
if (0)
- done_table_lookup: ;
+ done_table_lookup: {}
else
# endif
{
diff --git a/gnulib/lib/localcharset.h b/gnulib/lib/localcharset.h
index 25c9bb9c6e..472140248c 100644
--- a/gnulib/lib/localcharset.h
+++ b/gnulib/lib/localcharset.h
@@ -1,5 +1,5 @@
/* Determine a canonical name for the current locale's character encoding.
- Copyright (C) 2000-2003, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2000-2003, 2009-2024 Free Software Foundation, Inc.
This file is part of the GNU CHARSET Library.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/locale.in.h b/gnulib/lib/locale.in.h
index 41a93c1dad..1b11a41c4d 100644
--- a/gnulib/lib/locale.in.h
+++ b/gnulib/lib/locale.in.h
@@ -1,5 +1,5 @@
/* A POSIX <locale.h>.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -216,7 +216,7 @@ _GL_WARN_ON_USE (setlocale, "setlocale works differently on
native Windows - "
# include "setlocale_null.h"
#endif
-#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME@ &&
@LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_NEWLOCALE@)
+#if /*@GNULIB_NEWLOCALE@ ||*/ (@GNULIB_LOCALENAME_UNSAFE@ &&
@LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_NEWLOCALE@)
# if @REPLACE_NEWLOCALE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef newlocale
@@ -249,7 +249,7 @@ _GL_WARN_ON_USE (newlocale, "newlocale is not portable");
# endif
#endif
-#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME@ &&
@LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_DUPLOCALE@)
+#if @GNULIB_DUPLOCALE@ || (@GNULIB_LOCALENAME_UNSAFE@ &&
@LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_DUPLOCALE@)
# if @HAVE_DUPLOCALE@ /* locale_t may be undefined if !@HAVE_DUPLOCALE@. */
# if @REPLACE_DUPLOCALE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -279,7 +279,7 @@ _GL_WARN_ON_USE (duplocale, "duplocale is buggy on some
glibc systems - "
# endif
#endif
-#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME@ &&
@LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_FREELOCALE@)
+#if /*@GNULIB_FREELOCALE@ ||*/ (@GNULIB_LOCALENAME_UNSAFE@ &&
@LOCALENAME_ENHANCE_LOCALE_FUNCS@ && @HAVE_FREELOCALE@)
# if @REPLACE_FREELOCALE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# undef freelocale
diff --git a/gnulib/lib/localeconv.c b/gnulib/lib/localeconv.c
index c1a34baa05..10fc7b748b 100644
--- a/gnulib/lib/localeconv.c
+++ b/gnulib/lib/localeconv.c
@@ -1,5 +1,5 @@
/* Query locale dependent information for formatting numbers.
- Copyright (C) 2012-2023 Free Software Foundation, Inc.
+ Copyright (C) 2012-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/lstat.c b/gnulib/lib/lstat.c
index 00a4ce2ab8..7c09957e20 100644
--- a/gnulib/lib/lstat.c
+++ b/gnulib/lib/lstat.c
@@ -1,6 +1,6 @@
/* Work around a bug of lstat on some systems
- Copyright (C) 1997-2006, 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 1997-2006, 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/malloc.c b/gnulib/lib/malloc.c
index 3ade35cb63..2a7867a1d1 100644
--- a/gnulib/lib/malloc.c
+++ b/gnulib/lib/malloc.c
@@ -1,6 +1,6 @@
/* malloc() function that is glibc compatible.
- Copyright (C) 1997-1998, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 1997-1998, 2006-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/malloc/dynarray-skeleton.c
b/gnulib/lib/malloc/dynarray-skeleton.c
index 580c278b7c..a95241abd2 100644
--- a/gnulib/lib/malloc/dynarray-skeleton.c
+++ b/gnulib/lib/malloc/dynarray-skeleton.c
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically.
- Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gnulib/lib/malloc/dynarray.h b/gnulib/lib/malloc/dynarray.h
index a9a3b0859c..3163e2782b 100644
--- a/gnulib/lib/malloc/dynarray.h
+++ b/gnulib/lib/malloc/dynarray.h
@@ -1,5 +1,5 @@
/* Type-safe arrays which grow dynamically. Shared definitions.
- Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gnulib/lib/malloc/dynarray_at_failure.c
b/gnulib/lib/malloc/dynarray_at_failure.c
index ebc9310982..95e34e7aac 100644
--- a/gnulib/lib/malloc/dynarray_at_failure.c
+++ b/gnulib/lib/malloc/dynarray_at_failure.c
@@ -1,5 +1,5 @@
/* Report an dynamic array index out of bounds condition.
- Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gnulib/lib/malloc/dynarray_emplace_enlarge.c
b/gnulib/lib/malloc/dynarray_emplace_enlarge.c
index 65aabb1e4a..7bdba1597e 100644
--- a/gnulib/lib/malloc/dynarray_emplace_enlarge.c
+++ b/gnulib/lib/malloc/dynarray_emplace_enlarge.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array in preparation of an emplace operation.
- Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gnulib/lib/malloc/dynarray_finalize.c
b/gnulib/lib/malloc/dynarray_finalize.c
index 673595a5fa..52764f7328 100644
--- a/gnulib/lib/malloc/dynarray_finalize.c
+++ b/gnulib/lib/malloc/dynarray_finalize.c
@@ -1,5 +1,5 @@
/* Copy the dynamically-allocated area to an explicitly-sized heap allocation.
- Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gnulib/lib/malloc/dynarray_resize.c
b/gnulib/lib/malloc/dynarray_resize.c
index 014f98c330..7323f8eeb0 100644
--- a/gnulib/lib/malloc/dynarray_resize.c
+++ b/gnulib/lib/malloc/dynarray_resize.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array.
- Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gnulib/lib/malloc/dynarray_resize_clear.c
b/gnulib/lib/malloc/dynarray_resize_clear.c
index bb23c522a1..aa17f740e5 100644
--- a/gnulib/lib/malloc/dynarray_resize_clear.c
+++ b/gnulib/lib/malloc/dynarray_resize_clear.c
@@ -1,5 +1,5 @@
/* Increase the size of a dynamic array and clear the new part.
- Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gnulib/lib/malloca.c b/gnulib/lib/malloca.c
index f055b1e5ca..e75c72df84 100644
--- a/gnulib/lib/malloca.c
+++ b/gnulib/lib/malloca.c
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003, 2018.
This file is free software: you can redistribute it and/or modify
@@ -22,6 +22,9 @@
#include "malloca.h"
#include <stdckdint.h>
+#if defined __CHERI_PURE_CAPABILITY__
+# include <cheri.h>
+#endif
#include "idx.h"
@@ -36,10 +39,15 @@
allocation.
- NULL comes from a failed heap allocation. */
+#if defined __CHERI_PURE_CAPABILITY__
+/* Type for holding the original malloc() result. */
+typedef uintptr_t small_t;
+#else
/* Type for holding very small pointer differences. */
typedef unsigned char small_t;
/* Verify that it is wide enough. */
static_assert (2 * sa_alignment_max - 1 <= (small_t) -1);
+#endif
void *
mmalloca (size_t n)
@@ -56,20 +64,28 @@ mmalloca (size_t n)
if (mem != NULL)
{
- uintptr_t umem = (uintptr_t)mem, umemplus;
+ uintptr_t umem = (uintptr_t) mem;
/* The ckd_add avoids signed integer overflow on
theoretical platforms where UINTPTR_MAX <= INT_MAX. */
+ uintptr_t umemplus;
ckd_add (&umemplus, umem, sizeof (small_t) + sa_alignment_max - 1);
- idx_t offset = ((umemplus & ~alignment2_mask)
+ idx_t offset = (umemplus - umemplus % (2 * sa_alignment_max)
+ sa_alignment_max - umem);
- void *vp = mem + offset;
- small_t *p = vp;
+ void *p = mem + offset;
/* Here p >= mem + sizeof (small_t),
and p <= mem + sizeof (small_t) + 2 * sa_alignment_max - 1
hence p + n <= mem + nplus.
So, the memory range [p, p+n) lies in the allocated memory range
[mem, mem + nplus). */
- p[-1] = offset;
+ small_t *sp = p;
+# if defined __CHERI_PURE_CAPABILITY__
+ sp[-1] = umem;
+ p = (char *) cheri_bounds_set ((char *) p - sizeof (small_t),
+ sizeof (small_t) + n)
+ + sizeof (small_t);
+# else
+ sp[-1] = offset;
+# endif
/* p โก sa_alignment_max mod 2*sa_alignment_max. */
return p;
}
@@ -90,15 +106,22 @@ void
freea (void *p)
{
/* Check argument. */
- if ((uintptr_t) p & (sa_alignment_max - 1))
+ uintptr_t u = (uintptr_t) p;
+ if (u & (sa_alignment_max - 1))
{
/* p was not the result of a malloca() call. Invalid argument. */
abort ();
}
/* Determine whether p was a non-NULL pointer returned by mmalloca(). */
- if ((uintptr_t) p & sa_alignment_max)
+ if (u & sa_alignment_max)
{
- void *mem = (char *) p - ((small_t *) p)[-1];
+ char *cp = p;
+ small_t *sp = p;
+# if defined __CHERI_PURE_CAPABILITY__
+ void *mem = sp[-1];
+# else
+ void *mem = cp - sp[-1];
+# endif
free (mem);
}
}
diff --git a/gnulib/lib/malloca.h b/gnulib/lib/malloca.h
index f68ddfe010..c520842171 100644
--- a/gnulib/lib/malloca.h
+++ b/gnulib/lib/malloca.h
@@ -1,5 +1,5 @@
/* Safe automatic memory allocation.
- Copyright (C) 2003-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2003-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2003.
This file is free software: you can redistribute it and/or modify
@@ -28,6 +28,9 @@
#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
+#if defined __CHERI_PURE_CAPABILITY__
+# include <cheri.h>
+#endif
#include "xalloc-oversized.h"
@@ -68,12 +71,24 @@ extern void freea (void *p);
memory allocated on the stack, that must be freed using freea() before
the function returns. Upon failure, it returns NULL. */
#if HAVE_ALLOCA
-# define malloca(N) \
- ((N) < 4032 - (2 * sa_alignment_max - 1) \
- ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max - 1) \
- + (2 * sa_alignment_max - 1)) \
- & ~(uintptr_t)(2 * sa_alignment_max - 1)) \
- : mmalloca (N))
+# if defined __CHERI_PURE_CAPABILITY__
+# define malloca(N) \
+ ((N) < 4032 - (2 * sa_alignment_max - 1) \
+ ? cheri_bounds_set ((void *) (((uintptr_t) \
+ (char *) \
+ alloca ((N) + 2 * sa_alignment_max - 1) \
+ + (2 * sa_alignment_max - 1)) \
+ & ~(uintptr_t)(2 * sa_alignment_max - 1)), \
+ (N)) \
+ : mmalloca (N))
+# else
+# define malloca(N) \
+ ((N) < 4032 - (2 * sa_alignment_max - 1)
\
+ ? (void *) (((uintptr_t) (char *) alloca ((N) + 2 * sa_alignment_max - 1)
\
+ + (2 * sa_alignment_max - 1))
\
+ & ~(uintptr_t)(2 * sa_alignment_max - 1))
\
+ : mmalloca (N))
+# endif
#else
# define malloca(N) \
mmalloca (N)
diff --git a/gnulib/lib/mbchar.c b/gnulib/lib/mbchar.c
index af3c7934dc..d94b7c339c 100644
--- a/gnulib/lib/mbchar.c
+++ b/gnulib/lib/mbchar.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2006, 2009-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2001, 2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/mbchar.h b/gnulib/lib/mbchar.h
index fd5b2ed4ec..5a1529ddcb 100644
--- a/gnulib/lib/mbchar.h
+++ b/gnulib/lib/mbchar.h
@@ -1,5 +1,5 @@
/* Multibyte character data type.
- Copyright (C) 2001, 2005-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -157,6 +157,11 @@ _GL_INLINE_HEADER_BEGIN
# define MBCHAR_INLINE _GL_INLINE
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* The longest multibyte characters, nowadays, are 4 bytes long.
Regardless of the values of MB_CUR_MAX and MB_LEN_MAX. */
#define MBCHAR_BUF_SIZE 4
@@ -368,6 +373,11 @@ is_basic (char c)
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
_GL_INLINE_HEADER_END
#endif /* _MBCHAR_H */
diff --git a/gnulib/lib/mbiter.c b/gnulib/lib/mbiter.c
index 530181aa50..bf525b1bdd 100644
--- a/gnulib/lib/mbiter.c
+++ b/gnulib/lib/mbiter.c
@@ -1,6 +1,6 @@
/* Iterating through multibyte strings: macros for multi-byte encodings.
- Copyright (C) 2012-2023 Free Software Foundation, Inc.
+ Copyright (C) 2012-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/mbiter.h b/gnulib/lib/mbiter.h
index b9222fcc3a..bee76d2f81 100644
--- a/gnulib/lib/mbiter.h
+++ b/gnulib/lib/mbiter.h
@@ -1,5 +1,5 @@
/* Iterating through multibyte strings: macros for multi-byte encodings.
- Copyright (C) 2001, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005, 2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -101,6 +101,11 @@ _GL_INLINE_HEADER_BEGIN
# define MBITER_INLINE _GL_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct mbiter_multi
{
const char *limit; /* pointer to end of string */
@@ -263,6 +268,11 @@ typedef struct mbiter_multi mbi_iterator_t;
/* Copying an iterator. */
#define mbi_copy mbiter_multi_copy
+
+#ifdef __cplusplus
+}
+#endif
+
_GL_INLINE_HEADER_END
#endif /* _MBITER_H */
diff --git a/gnulib/lib/mbrtoc32.c b/gnulib/lib/mbrtoc32.c
index 0933437a4b..d97912876c 100644
--- a/gnulib/lib/mbrtoc32.c
+++ b/gnulib/lib/mbrtoc32.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to 32-bit wide character.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -41,7 +41,11 @@
branch below.
They are equivalent. */
-# if defined _WIN32 && !defined __CYGWIN__
+# if AVOID_ANY_THREADS
+
+/* The option '--disable-threads' explicitly requests no locking. */
+
+# elif defined _WIN32 && !defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
@@ -113,7 +117,7 @@ mbrtoc32 (char32_t *pwc, const char *s, size_t n, mbstate_t
*ps)
if (ps == NULL)
ps = &internal_state;
-# if HAVE_WORKING_MBRTOC32
+# if HAVE_WORKING_MBRTOC32 && !MBRTOC32_MULTIBYTE_LOCALE_BUG
/* mbrtoc32() may produce different values for wc than mbrtowc(). Therefore
use mbrtoc32(). */
diff --git a/gnulib/lib/mbrtowc-impl-utf8.h b/gnulib/lib/mbrtowc-impl-utf8.h
index 4fdd65d847..3a3ba13c0b 100644
--- a/gnulib/lib/mbrtowc-impl-utf8.h
+++ b/gnulib/lib/mbrtowc-impl-utf8.h
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/mbrtowc-impl.h b/gnulib/lib/mbrtowc-impl.h
index e9c04ed776..963631cae5 100644
--- a/gnulib/lib/mbrtowc-impl.h
+++ b/gnulib/lib/mbrtowc-impl.h
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/mbrtowc.c b/gnulib/lib/mbrtowc.c
index c1a689a270..8a1646d2f7 100644
--- a/gnulib/lib/mbrtowc.c
+++ b/gnulib/lib/mbrtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 1999-2002, 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 1999-2002, 2005-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
@@ -28,7 +28,11 @@
# include <stdint.h>
# include <stdlib.h>
-# if defined _WIN32 && !defined __CYGWIN__
+# if AVOID_ANY_THREADS
+
+/* The option '--disable-threads' explicitly requests no locking. */
+
+# elif defined _WIN32 && !defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
diff --git a/gnulib/lib/mbscasecmp.c b/gnulib/lib/mbscasecmp.c
index 5e0bc67dc0..1abeb129d6 100644
--- a/gnulib/lib/mbscasecmp.c
+++ b/gnulib/lib/mbscasecmp.c
@@ -1,5 +1,5 @@
/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005,
based on earlier glibc code.
diff --git a/gnulib/lib/mbschr.c b/gnulib/lib/mbschr.c
index 330e3f1c75..a5f6e38623 100644
--- a/gnulib/lib/mbschr.c
+++ b/gnulib/lib/mbschr.c
@@ -1,5 +1,5 @@
/* Searching a string for a character.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This file is free software: you can redistribute it and/or modify
@@ -20,7 +20,13 @@
/* Specification. */
#include <string.h>
-#include "mbuiterf.h"
+#include <stdlib.h>
+
+#if GNULIB_MCEL_PREFER
+# include "mcel.h"
+#else
+# include "mbuiterf.h"
+#endif
/* Locate the first single-byte character C in the character string STRING,
and return a pointer to it. Return NULL if C is not found in STRING. */
@@ -33,6 +39,15 @@ mbschr (const char *string, int c)
the faster unibyte loop can be used. */
&& (unsigned char) c >= 0x30)
{
+#if GNULIB_MCEL_PREFER
+ while (*string)
+ {
+ mcel_t g = mcel_scanz (string);
+ if (g.len == 1 && (unsigned char) *string == (unsigned char) c)
+ return (char *) string;
+ string += g.len;
+ }
+#else
mbuif_state_t state;
const char *iter;
for (mbuif_init (state), iter = string;; )
@@ -46,6 +61,7 @@ mbschr (const char *string, int c)
}
return (char *) iter;
notfound:
+#endif
return NULL;
}
else
diff --git a/gnulib/lib/mbsinit.c b/gnulib/lib/mbsinit.c
index 85b6087cf4..d1b8475c78 100644
--- a/gnulib/lib/mbsinit.c
+++ b/gnulib/lib/mbsinit.c
@@ -1,5 +1,5 @@
/* Test for initial conversion state.
- Copyright (C) 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/mbslen.c b/gnulib/lib/mbslen.c
index db9fa70d63..171d395475 100644
--- a/gnulib/lib/mbslen.c
+++ b/gnulib/lib/mbslen.c
@@ -1,5 +1,5 @@
/* Counting the multibyte characters in a string.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2007.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/mbsncasecmp.c b/gnulib/lib/mbsncasecmp.c
index 8ee1df7d4d..2a6f62364c 100644
--- a/gnulib/lib/mbsncasecmp.c
+++ b/gnulib/lib/mbsncasecmp.c
@@ -1,5 +1,5 @@
/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005,
based on earlier glibc code.
@@ -23,8 +23,13 @@
#include <ctype.h>
#include <limits.h>
+#include <stdlib.h>
-#include "mbuiterf.h"
+#if GNULIB_MCEL_PREFER
+# include "mcel.h"
+#else
+# include "mbuiterf.h"
+#endif
/* Compare the initial segment of the character string S1 consisting of at most
N characters with the initial segment of the character string S2 consisting
@@ -47,6 +52,17 @@ mbsncasecmp (const char *s1, const char *s2, size_t n)
most often already in the very few first characters. */
if (MB_CUR_MAX > 1)
{
+#if GNULIB_MCEL_PREFER
+ while (true)
+ {
+ mcel_t g1 = mcel_scanz (iter1); iter1 += g1.len;
+ mcel_t g2 = mcel_scanz (iter2); iter2 += g2.len;
+ int cmp = mcel_tocmp (c32tolower, g1, g2);
+ n--;
+ if (cmp | !n | !g1.ch)
+ return cmp;
+ }
+#else
mbuif_state_t state1;
mbuif_init (state1);
@@ -75,6 +91,7 @@ mbsncasecmp (const char *s1, const char *s2, size_t n)
/* s1 terminated before s2 and n. */
return -1;
return 0;
+#endif
}
else
for (;;)
diff --git a/gnulib/lib/mbsstr.c b/gnulib/lib/mbsstr.c
index b8d15f9521..8469702474 100644
--- a/gnulib/lib/mbsstr.c
+++ b/gnulib/lib/mbsstr.c
@@ -1,5 +1,5 @@
/* Searching in a string. -*- coding: utf-8 -*-
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This file is free software: you can redistribute it and/or modify
@@ -67,19 +67,19 @@ knuth_morris_pratt_multibyte (const char *haystack, const
char *needle,
size_t *table = table_memory = aligned;
/* Fill needle_mbchars. */
- {
#if GNULIB_MCEL_PREFER
- for (size_t j = 0; *needle; needle += needle_mbchars[j++].len)
- needle_mbchars[j] = mcel_scanz (needle);
+ for (size_t j = 0; *needle; needle += needle_mbchars[j++].len)
+ needle_mbchars[j] = mcel_scanz (needle);
#else
+ {
mbui_iterator_t iter;
size_t j;
j = 0;
for (mbui_init (iter, needle); mbui_avail (iter); mbui_advance (iter), j++)
mb_copy (&needle_mbchars[j], &mbui_cur (iter));
-#endif
}
+#endif
/* Fill the table.
For 0 < i < m:
diff --git a/gnulib/lib/mbswidth.c b/gnulib/lib/mbswidth.c
index 9ce94ae80d..87eee40223 100644
--- a/gnulib/lib/mbswidth.c
+++ b/gnulib/lib/mbswidth.c
@@ -1,5 +1,5 @@
/* Determine the number of screen columns needed for a string.
- Copyright (C) 2000-2023 Free Software Foundation, Inc.
+ Copyright (C) 2000-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/lib/mbswidth.h b/gnulib/lib/mbswidth.h
index f385b64999..ccd176d6b8 100644
--- a/gnulib/lib/mbswidth.h
+++ b/gnulib/lib/mbswidth.h
@@ -1,5 +1,5 @@
/* Determine the number of screen columns needed for a string.
- Copyright (C) 2000-2004, 2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2000-2004, 2007, 2009-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/lib/mbszero.c b/gnulib/lib/mbszero.c
index 6da91c6b20..25af2848ea 100644
--- a/gnulib/lib/mbszero.c
+++ b/gnulib/lib/mbszero.c
@@ -1,5 +1,5 @@
/* Put an mbstate_t into an initial conversion state.
- Copyright (C) 2023 Free Software Foundation, Inc.
+ Copyright (C) 2023-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/mbtowc-impl.h b/gnulib/lib/mbtowc-impl.h
index 01fef1823d..92efb4a708 100644
--- a/gnulib/lib/mbtowc-impl.h
+++ b/gnulib/lib/mbtowc-impl.h
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/mbtowc-lock.c b/gnulib/lib/mbtowc-lock.c
index c4d0b088f6..9001c5af1f 100644
--- a/gnulib/lib/mbtowc-lock.c
+++ b/gnulib/lib/mbtowc-lock.c
@@ -1,5 +1,5 @@
/* Return the internal lock used by mbrtowc and mbrtoc32.
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
+ Copyright (C) 2019-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,9 +18,10 @@
#include <config.h>
+/* The option '--disable-threads' explicitly requests no locking. */
/* When it is known that the gl_get_mbtowc_lock function is defined
by a dependency library, it should not be defined here. */
-#if OMIT_MBTOWC_LOCK
+#if AVOID_ANY_THREADS || OMIT_MBTOWC_LOCK
/* This declaration is solely to ensure that after preprocessing
this file is never empty. */
diff --git a/gnulib/lib/mbtowc-lock.h b/gnulib/lib/mbtowc-lock.h
index beb37722f5..10f7dc7c85 100644
--- a/gnulib/lib/mbtowc-lock.h
+++ b/gnulib/lib/mbtowc-lock.h
@@ -1,5 +1,5 @@
/* Use the internal lock used by mbrtowc and mbrtoc32.
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
+ Copyright (C) 2019-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -32,7 +32,7 @@ mbtowc_unlocked (wchar_t *pwc, const char *p, size_t m)
/* Prohibit renaming this symbol. */
#undef gl_get_mbtowc_lock
-#if GNULIB_MBRTOWC_SINGLE_THREAD
+#if AVOID_ANY_THREADS || GNULIB_MBRTOWC_SINGLE_THREAD
/* All uses of this function are in a single thread. No locking needed. */
diff --git a/gnulib/lib/mbtowc.c b/gnulib/lib/mbtowc.c
index 8d9b06d247..31a2d63538 100644
--- a/gnulib/lib/mbtowc.c
+++ b/gnulib/lib/mbtowc.c
@@ -1,5 +1,5 @@
/* Convert multibyte character to wide character.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/mbuiter.c b/gnulib/lib/mbuiter.c
index 58dea24b2e..505654c9cc 100644
--- a/gnulib/lib/mbuiter.c
+++ b/gnulib/lib/mbuiter.c
@@ -1,5 +1,5 @@
/* Iterating through multibyte strings: macros for multi-byte encodings.
- Copyright (C) 2012-2023 Free Software Foundation, Inc.
+ Copyright (C) 2012-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/mbuiter.h b/gnulib/lib/mbuiter.h
index 862efa3dbe..1860311d4c 100644
--- a/gnulib/lib/mbuiter.h
+++ b/gnulib/lib/mbuiter.h
@@ -1,5 +1,5 @@
/* Iterating through multibyte strings: macros for multi-byte encodings.
- Copyright (C) 2001, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005, 2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -110,6 +110,11 @@ _GL_INLINE_HEADER_BEGIN
# define MBUITER_INLINE _GL_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct mbuiter_multi
{
#if !GNULIB_MBRTOC32_REGULAR
@@ -262,6 +267,11 @@ typedef struct mbuiter_multi mbui_iterator_t;
/* Copying an iterator. */
#define mbui_copy mbuiter_multi_copy
+
+#ifdef __cplusplus
+}
+#endif
+
_GL_INLINE_HEADER_END
#endif /* _MBUITER_H */
diff --git a/gnulib/lib/mbuiterf.c b/gnulib/lib/mbuiterf.c
index c87772a051..b345c0d6c7 100644
--- a/gnulib/lib/mbuiterf.c
+++ b/gnulib/lib/mbuiterf.c
@@ -1,5 +1,5 @@
/* Iterating through multibyte strings: macros for multi-byte encodings.
- Copyright (C) 2023 Free Software Foundation, Inc.
+ Copyright (C) 2023-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/mbuiterf.h b/gnulib/lib/mbuiterf.h
index 85c53e73ac..1814e35b9d 100644
--- a/gnulib/lib/mbuiterf.h
+++ b/gnulib/lib/mbuiterf.h
@@ -1,5 +1,5 @@
/* Iterating through multibyte strings, faster: macros for multi-byte
encodings.
- Copyright (C) 2001, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2005, 2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -101,6 +101,11 @@ _GL_INLINE_HEADER_BEGIN
# define MBUITERF_INLINE _GL_INLINE _GL_ATTRIBUTE_ALWAYS_INLINE
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
struct mbuif_state
{
#if !GNULIB_MBRTOC32_REGULAR
@@ -208,6 +213,11 @@ typedef struct mbuif_state mbuif_state_t;
#define mbuif_next(st, iter) \
mbuiterf_next (&(st), (iter))
+
+#ifdef __cplusplus
+}
+#endif
+
_GL_INLINE_HEADER_END
#endif /* _MBUITERF_H */
diff --git a/gnulib/lib/memchr.c b/gnulib/lib/memchr.c
index 8e9557937e..67687a8f17 100644
--- a/gnulib/lib/memchr.c
+++ b/gnulib/lib/memchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2023
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2024
Free Software Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/gnulib/lib/memchr.valgrind b/gnulib/lib/memchr.valgrind
index 97690f2c50..0295d7e62f 100644
--- a/gnulib/lib/memchr.valgrind
+++ b/gnulib/lib/memchr.valgrind
@@ -1,6 +1,6 @@
# Suppress a valgrind message about use of uninitialized memory in memchr().
-# Copyright (C) 2009-2023 Free Software Foundation, Inc.
+# Copyright (C) 2009-2024 Free Software Foundation, Inc.
#
# This file is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/mempcpy.c b/gnulib/lib/mempcpy.c
index 24a3135988..638867782d 100644
--- a/gnulib/lib/mempcpy.c
+++ b/gnulib/lib/mempcpy.c
@@ -1,5 +1,5 @@
/* Copy memory area and return pointer after last written byte.
- 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: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/memrchr.c b/gnulib/lib/memrchr.c
index c5b1fe8b2e..3df1f479c7 100644
--- a/gnulib/lib/memrchr.c
+++ b/gnulib/lib/memrchr.c
@@ -1,6 +1,6 @@
/* memrchr -- find the last occurrence of a byte in a memory block
- Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2023 Free Software
+ Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2024 Free Software
Foundation, Inc.
Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
diff --git a/gnulib/lib/minmax.h b/gnulib/lib/minmax.h
index 0ac40198e2..f3df58b0d7 100644
--- a/gnulib/lib/minmax.h
+++ b/gnulib/lib/minmax.h
@@ -1,5 +1,5 @@
/* MIN, MAX macros.
- Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2023 Free Software
+ Copyright (C) 1995, 1998, 2001, 2003, 2005, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/mkdir.c b/gnulib/lib/mkdir.c
index f94aba173b..21d77677ee 100644
--- a/gnulib/lib/mkdir.c
+++ b/gnulib/lib/mkdir.c
@@ -1,7 +1,7 @@
/* On some systems, mkdir ("foo/", 0700) fails because of the trailing
slash. On those systems, this wrapper removes the trailing slash.
- Copyright (C) 2001, 2003, 2006, 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001, 2003, 2006, 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/mkstemp.c b/gnulib/lib/mkstemp.c
index 77aadbbdc2..724638dfaf 100644
--- a/gnulib/lib/mkstemp.c
+++ b/gnulib/lib/mkstemp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2023 Free Software
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2024 Free Software
Foundation, Inc.
This file is derived from the one in the GNU C Library.
diff --git a/gnulib/lib/msvc-inval.c b/gnulib/lib/msvc-inval.c
index c5149a8fd6..da3fc86ad6 100644
--- a/gnulib/lib/msvc-inval.c
+++ b/gnulib/lib/msvc-inval.c
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/msvc-inval.h b/gnulib/lib/msvc-inval.h
index c16d880178..7aee6e5d6a 100644
--- a/gnulib/lib/msvc-inval.h
+++ b/gnulib/lib/msvc-inval.h
@@ -1,5 +1,5 @@
/* Invalid parameter handler for MSVC runtime libraries.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/msvc-nothrow.c b/gnulib/lib/msvc-nothrow.c
index f729fe66f7..06b35a61dc 100644
--- a/gnulib/lib/msvc-nothrow.c
+++ b/gnulib/lib/msvc-nothrow.c
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/msvc-nothrow.h b/gnulib/lib/msvc-nothrow.h
index 0dd229fd66..121773d1a7 100644
--- a/gnulib/lib/msvc-nothrow.h
+++ b/gnulib/lib/msvc-nothrow.h
@@ -1,6 +1,6 @@
/* Wrappers that don't throw invalid parameter notifications
with MSVC runtime libraries.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -35,6 +35,10 @@
/* Get original declaration of _get_osfhandle. */
# include <io.h>
+# ifdef __cplusplus
+extern "C" {
+# endif
+
# if HAVE_MSVC_INVALID_PARAMETER_HANDLER
/* Override _get_osfhandle. */
@@ -43,6 +47,10 @@ extern intptr_t _gl_nothrow_get_osfhandle (int fd);
# endif
+# ifdef __cplusplus
+}
+# endif
+
#endif
#endif /* _MSVC_NOTHROW_H */
diff --git a/gnulib/lib/nl_langinfo-lock.c b/gnulib/lib/nl_langinfo-lock.c
index fb12299959..5a248ed8d1 100644
--- a/gnulib/lib/nl_langinfo-lock.c
+++ b/gnulib/lib/nl_langinfo-lock.c
@@ -1,5 +1,5 @@
/* Return the internal lock used by nl_langinfo.
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
+ Copyright (C) 2019-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,9 +18,10 @@
#include <config.h>
+/* The option '--disable-threads' explicitly requests no locking. */
/* When it is known that the gl_get_nl_langinfo_lock function is defined
by a dependency library, it should not be defined here. */
-#if OMIT_NL_LANGINFO_LOCK
+#if AVOID_ANY_THREADS || OMIT_NL_LANGINFO_LOCK
/* This declaration is solely to ensure that after preprocessing
this file is never empty. */
diff --git a/gnulib/lib/nl_langinfo.c b/gnulib/lib/nl_langinfo.c
index f872c6d5e2..64ff93b0cb 100644
--- a/gnulib/lib/nl_langinfo.c
+++ b/gnulib/lib/nl_langinfo.c
@@ -1,6 +1,6 @@
/* nl_langinfo() replacement: query locale dependent information.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -30,7 +30,12 @@
#endif
#if REPLACE_NL_LANGINFO && !NL_LANGINFO_MTSAFE
-# if defined _WIN32 && !defined __CYGWIN__
+
+# if AVOID_ANY_THREADS
+
+/* The option '--disable-threads' explicitly requests no locking. */
+
+# elif defined _WIN32 && !defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
@@ -51,6 +56,7 @@
# include <threads.h>
# endif
+
#endif
/* nl_langinfo() must be multithread-safe. To achieve this without using
@@ -186,7 +192,12 @@ nl_langinfo_unlocked (nl_item item)
/* Prohibit renaming this symbol. */
# undef gl_get_nl_langinfo_lock
-# if defined _WIN32 && !defined __CYGWIN__
+# if AVOID_ANY_THREADS
+
+/* The option '--disable-threads' explicitly requests no locking. */
+# define nl_langinfo_with_lock nl_langinfo_unlocked
+
+# elif defined _WIN32 && !defined __CYGWIN__
extern __declspec(dllimport) CRITICAL_SECTION *gl_get_nl_langinfo_lock (void);
@@ -451,7 +462,7 @@ nl_langinfo (nl_item item)
{
static char const months[][sizeof "September"] = {
"January", "February", "March", "April", "May", "June", "July",
- "September", "October", "November", "December"
+ "August", "September", "October", "November", "December"
};
case MON_1:
case MON_2:
@@ -515,7 +526,7 @@ nl_langinfo (nl_item item)
static char result[12][30];
static char const abmonths[][sizeof "Jan"] = {
"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul",
- "Sep", "Oct", "Nov", "Dec"
+ "Aug", "Sep", "Oct", "Nov", "Dec"
};
tmm.tm_mon = item - ABMON_1;
if (!strftime (buf, sizeof result[0], "%b", &tmm))
diff --git a/gnulib/lib/open.c b/gnulib/lib/open.c
index 7ec8fdc35d..e690c9ea77 100644
--- a/gnulib/lib/open.c
+++ b/gnulib/lib/open.c
@@ -1,5 +1,5 @@
/* Open a descriptor to a file.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -38,9 +38,13 @@ orig_open (const char *filename, int flags, mode_t mode)
}
/* Specification. */
+#ifdef __osf__
/* Write "fcntl.h" here, not <fcntl.h>, otherwise OSF/1 5.1 DTK cc eliminates
this include because of the preliminary #include <fcntl.h> above. */
-#include "fcntl.h"
+# include "fcntl.h"
+#else
+# include <fcntl.h>
+#endif
#include "cloexec.h"
diff --git a/gnulib/lib/pathmax.h b/gnulib/lib/pathmax.h
index 6930283b82..d6512c6f57 100644
--- a/gnulib/lib/pathmax.h
+++ b/gnulib/lib/pathmax.h
@@ -1,5 +1,5 @@
/* Define PATH_MAX somehow. Requires sys/types.h.
- Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2023 Free Software
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/printf-args.c b/gnulib/lib/printf-args.c
index b2b21aeec1..eb0d2cdc0f 100644
--- a/gnulib/lib/printf-args.c
+++ b/gnulib/lib/printf-args.c
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2023 Free Software
+ Copyright (C) 1999, 2002-2003, 2005-2007, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/printf-args.h b/gnulib/lib/printf-args.h
index 1101610282..9b80bb3929 100644
--- a/gnulib/lib/printf-args.h
+++ b/gnulib/lib/printf-args.h
@@ -1,5 +1,5 @@
/* Decomposed printf argument list.
- Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2023 Free Software
+ Copyright (C) 1999, 2002-2003, 2006-2007, 2011-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/printf-parse.c b/gnulib/lib/printf-parse.c
index d3f2c3cb5d..a33e27a0b8 100644
--- a/gnulib/lib/printf-parse.c
+++ b/gnulib/lib/printf-parse.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999-2000, 2002-2003, 2006-2023 Free Software Foundation, Inc.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -555,9 +555,10 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d,
arguments *a)
unsigned_type = TYPE_ULONGINT;
pointer_type = TYPE_COUNT_LONGINT_POINTER;
}
- cp++;
+ cp += 3;
}
#endif
+ (void) pointer_type;
/* Read the conversion character. */
c = *cp++;
@@ -616,9 +617,11 @@ PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d,
arguments *a)
case 'p':
type = TYPE_POINTER;
break;
+#if NEED_PRINTF_WITH_N_DIRECTIVE
case 'n':
type = pointer_type;
break;
+#endif
#if ENABLE_UNISTDIO
/* The unistdio extensions. */
case 'U':
diff --git a/gnulib/lib/printf-parse.h b/gnulib/lib/printf-parse.h
index 45febac1f0..949b8754cc 100644
--- a/gnulib/lib/printf-parse.h
+++ b/gnulib/lib/printf-parse.h
@@ -1,5 +1,5 @@
/* Parse printf format string.
- Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2023 Free Software
+ Copyright (C) 1999, 2002-2003, 2005, 2007, 2010-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/pthread-once.c b/gnulib/lib/pthread-once.c
new file mode 100644
index 0000000000..4b4a18d2af
--- /dev/null
+++ b/gnulib/lib/pthread-once.c
@@ -0,0 +1,148 @@
+/* POSIX once-only control.
+ Copyright (C) 2019-2024 Free Software Foundation, Inc.
+
+ This file is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019. */
+
+#include <config.h>
+
+/* Specification. */
+#include <pthread.h>
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# include "windows-once.h"
+#endif
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+/* Use Windows threads. */
+
+int
+pthread_once (pthread_once_t *once_control, void (*initfunction) (void))
+{
+ glwthread_once (once_control, initfunction);
+ return 0;
+}
+
+#elif HAVE_PTHREAD_H
+/* Provide workarounds for POSIX threads. */
+
+# if defined __CYGWIN__
+
+# include <stdlib.h>
+
+int
+pthread_once (pthread_once_t *once_control, void (*initfunction) (void))
+{
+ /* In this implementation, we reuse the type
+ typedef struct { pthread_mutex_t mutex; int state; } pthread_once_t;
+ #define PTHREAD_ONCE_INIT { PTHREAD_MUTEX_INITIALIZER, 0 }
+ while assigning the following meaning to the state:
+ state = (<number of waiting threads> << 16) + <1 if done>
+ In other words:
+ state = { unsigned int num_threads : 16; unsigned int done : 16; }
+ */
+ struct actual_state
+ {
+ _Atomic unsigned short num_threads;
+ /* done == 0: initial state
+ done == 1: initfunction executed, lock still active
+ done == 2: initfunction executed, lock no longer usable */
+ _Atomic unsigned short done;
+ };
+ struct actual_state *state_p = (struct actual_state *) &once_control->state;
+ /* This test is not necessary. It's only an optimization, to establish
+ a fast path for the common case that the 'done' word is already > 0. */
+ if (state_p->done == 0)
+ {
+ /* Increment num_threads (atomically), to indicate that this thread will
+ possibly take the lock. */
+ state_p->num_threads += 1;
+ /* Test the 'done' word. */
+ if (state_p->done == 0)
+ {
+ /* The 'done' word is still zero. Now take the lock. */
+ pthread_mutex_lock (&once_control->mutex);
+ /* Test the 'done' word again. */
+ if (state_p->done == 0)
+ {
+ /* Execute the initfunction. */
+ (*initfunction) ();
+ /* Set the 'done' word to 1 (atomically). */
+ state_p->done = 1;
+ }
+ /* Now the 'done' word is 1. Release the lock. */
+ pthread_mutex_unlock (&once_control->mutex);
+ }
+ /* Here, done is > 0. */
+ /* Decrement num_threads (atomically). */
+ if ((state_p->num_threads -= 1) == 0)
+ {
+ /* num_threads is now zero, and done is > 0.
+ No other thread will need to use the lock.
+ We can therefore destroy the lock, to free resources. */
+ if (__sync_bool_compare_and_swap (&state_p->done, 1, 2))
+ pthread_mutex_destroy (&once_control->mutex);
+ }
+ }
+ /* Proof of correctness:
+ * num_threads is incremented and then decremented by some threads.
+ Therefore, num_threads always stays >= 0, and is == 0 at the end.
+ * The 'done' word, once > 0, stays > 0 (since it is never assigned 0).
+ * The 'done' word is changed from == 0 to > 0 only while the lock
+ is taken. Therefore, only the first thread that succeeds in taking
+ the lock executes the initfunction and sets the 'done' word to a
+ value > 0; the other threads that take the lock do no side effects
+ between taking and releasing the lock.
+ * The 'done' word does not change any more once it is 2.
+ Therefore, it can be changed from 1 to 2 only once.
+ * pthread_mutex_destroy gets invoked right after 'done' has been changed
+ from 1 to 2. Therefore, pthread_mutex_destroy gets invoked only once.
+ * After a moment where num_threads was 0 and done was > 0, no thread can
+ reach the pthread_mutex_lock invocation. Proof:
+ - At such a moment, no thread is in the code range between
+ state_p->num_threads += 1
+ and
+ state_p->num_threads -= 1
+ - After such a moment, some thread can increment num_threads, but from
+ there they cannot reach the pthread_mutex_lock invocation, because the
+ if (state_p->done == 0)
+ test prevents that.
+ * From this it follows that:
+ - pthread_mutex_destroy cannot be executed while the lock is taken
+ (because pthread_mutex_destroy is only executed after a moment where
+ num_threads was 0 and done was > 0).
+ - Once pthread_mutex_destroy has been executed, the lock is not used any
+ more.
+ */
+ return 0;
+}
+
+# endif
+
+#else
+/* Provide a dummy implementation for single-threaded applications. */
+
+int
+pthread_once (pthread_once_t *once_control, void (*initfunction) (void))
+{
+ if (*once_control == 0)
+ {
+ *once_control = ~ 0;
+ initfunction ();
+ }
+ return 0;
+}
+
+#endif
diff --git a/gnulib/lib/pthread.in.h b/gnulib/lib/pthread.in.h
new file mode 100644
index 0000000000..81598616df
--- /dev/null
+++ b/gnulib/lib/pthread.in.h
@@ -0,0 +1,2027 @@
+/* Implement the most essential subset of POSIX 1003.1-2008 pthread.h.
+
+ Copyright (C) 2009-2024 Free Software Foundation, Inc.
+
+ This file is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert, Glen Lenker, and Bruno Haible. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+#if defined _GL_ALREADY_INCLUDING_PTHREAD_H
+/* Special invocation convention:
+ On Android, we have a sequence of nested includes
+ <pthread.h> -> <time.h> -> <sys/time.h> -> <sys/select.h> ->
+ <signal.h> -> <pthread.h>.
+ In this situation, PTHREAD_COND_INITIALIZER is not yet defined,
+ therefore we should not attempt to define PTHREAD_MUTEX_NORMAL etc. */
+
+#@INCLUDE_NEXT@ @NEXT_PTHREAD_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _@GUARD_PREFIX@_PTHREAD_H_
+
+#if @HAVE_PTHREAD_H@
+
+# define _GL_ALREADY_INCLUDING_PTHREAD_H
+
+/* The include_next requires a split double-inclusion guard. */
+# @INCLUDE_NEXT@ @NEXT_PTHREAD_H@
+
+# undef _GL_ALREADY_INCLUDING_PTHREAD_H
+
+#endif
+
+#ifndef _@GUARD_PREFIX@_PTHREAD_H_
+#define _@GUARD_PREFIX@_PTHREAD_H_
+
+/* This file uses _Noreturn, _GL_ATTRIBUTE_PURE, GNULIB_POSIXCHECK,
+ HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
+#define __need_system_stdlib_h
+#include <stdlib.h>
+#undef __need_system_stdlib_h
+
+
+/* The pthreads-win32 <pthread.h> defines a couple of broken macros. */
+#undef asctime_r
+#undef ctime_r
+#undef gmtime_r
+#undef localtime_r
+#undef rand_r
+#undef strtok_r
+
+#include <errno.h>
+#include <sched.h>
+#include <sys/types.h>
+#include <time.h>
+
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The attribute __pure__ was added in gcc 2.96. */
+#ifndef _GL_ATTRIBUTE_PURE
+# if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 96) || defined
__clang__
+# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
+# else
+# define _GL_ATTRIBUTE_PURE /* empty */
+# endif
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _Noreturn is copied here. */
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* =========== Thread types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_THREAD@
+# include "windows-thread.h"
+# if @HAVE_PTHREAD_T@
+# define pthread_t rpl_pthread_t
+# define pthread_attr_t rpl_pthread_attr_t
+# endif
+# if !GNULIB_defined_pthread_thread_types
+typedef glwthread_thread_t pthread_t;
+typedef unsigned int pthread_attr_t;
+# define GNULIB_defined_pthread_thread_types 1
+# endif
+# else
+# if @HAVE_PTHREAD_T@
+# define pthread_t rpl_pthread_t
+# define pthread_attr_t rpl_pthread_attr_t
+# endif
+# if !GNULIB_defined_pthread_thread_types
+typedef int pthread_t;
+typedef unsigned int pthread_attr_t;
+# define GNULIB_defined_pthread_thread_types 1
+# endif
+# endif
+# undef PTHREAD_CREATE_JOINABLE
+# undef PTHREAD_CREATE_DETACHED
+# define PTHREAD_CREATE_JOINABLE 0
+# define PTHREAD_CREATE_DETACHED 1
+#else
+# if !@HAVE_PTHREAD_T@
+# if !GNULIB_defined_pthread_thread_types
+typedef int pthread_t;
+typedef unsigned int pthread_attr_t;
+# define GNULIB_defined_pthread_thread_types 1
+# endif
+# endif
+# if !@HAVE_PTHREAD_CREATE_DETACHED@
+# define PTHREAD_CREATE_JOINABLE 0
+# define PTHREAD_CREATE_DETACHED 1
+# endif
+#endif
+
+/* =========== Once-only control (initialization) types and macros ==========
*/
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_ONCE@
+# include "windows-once.h"
+# if @HAVE_PTHREAD_T@
+# define pthread_once_t rpl_pthread_once_t
+# endif
+# if !GNULIB_defined_pthread_once_types
+typedef glwthread_once_t pthread_once_t;
+# define GNULIB_defined_pthread_once_types 1
+# endif
+# undef PTHREAD_ONCE_INIT
+# define PTHREAD_ONCE_INIT GLWTHREAD_ONCE_INIT
+# else
+# if @HAVE_PTHREAD_T@
+# define pthread_once_t rpl_pthread_once_t
+# endif
+# if !GNULIB_defined_pthread_once_types
+typedef int pthread_once_t;
+# define GNULIB_defined_pthread_once_types 1
+# endif
+# undef PTHREAD_ONCE_INIT
+# define PTHREAD_ONCE_INIT { 0 }
+# endif
+#else
+# if !@HAVE_PTHREAD_T@
+# if !GNULIB_defined_pthread_once_types
+typedef int pthread_once_t;
+# define GNULIB_defined_pthread_once_types 1
+# endif
+# undef PTHREAD_ONCE_INIT
+# define PTHREAD_ONCE_INIT { 0 }
+# endif
+#endif
+
+/* =========== Mutex types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_MUTEX@
+# include "windows-timedmutex.h"
+# include "windows-timedrecmutex.h"
+# if @HAVE_PTHREAD_T@
+# define pthread_mutex_t rpl_pthread_mutex_t
+# define pthread_mutexattr_t rpl_pthread_mutexattr_t
+# endif
+# if !GNULIB_defined_pthread_mutex_types
+typedef struct
+ {
+ int type;
+ union
+ {
+ glwthread_timedmutex_t u_timedmutex;
+ glwthread_timedrecmutex_t u_timedrecmutex;
+ }
+ u;
+ }
+ pthread_mutex_t;
+typedef unsigned int pthread_mutexattr_t;
+# define GNULIB_defined_pthread_mutex_types 1
+# endif
+# undef PTHREAD_MUTEX_INITIALIZER
+# define PTHREAD_MUTEX_INITIALIZER { 1, { GLWTHREAD_TIMEDMUTEX_INIT } }
+# else
+# if @HAVE_PTHREAD_T@
+# define pthread_mutex_t rpl_pthread_mutex_t
+# define pthread_mutexattr_t rpl_pthread_mutexattr_t
+# endif
+# if !GNULIB_defined_pthread_mutex_types
+typedef int pthread_mutex_t;
+typedef unsigned int pthread_mutexattr_t;
+# define GNULIB_defined_pthread_mutex_types 1
+# endif
+# undef PTHREAD_MUTEX_INITIALIZER
+# define PTHREAD_MUTEX_INITIALIZER { 0 }
+# endif
+# undef PTHREAD_MUTEX_DEFAULT
+# undef PTHREAD_MUTEX_NORMAL
+# undef PTHREAD_MUTEX_ERRORCHECK
+# undef PTHREAD_MUTEX_RECURSIVE
+# define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
+# define PTHREAD_MUTEX_NORMAL 0
+# define PTHREAD_MUTEX_ERRORCHECK 1
+# define PTHREAD_MUTEX_RECURSIVE 2
+# undef PTHREAD_MUTEX_STALLED
+# undef PTHREAD_MUTEX_ROBUST
+# define PTHREAD_MUTEX_STALLED 0
+# define PTHREAD_MUTEX_ROBUST 1
+#else
+# if !@HAVE_PTHREAD_T@
+# if !GNULIB_defined_pthread_mutex_types
+typedef int pthread_mutex_t;
+typedef unsigned int pthread_mutexattr_t;
+# define GNULIB_defined_pthread_mutex_types 1
+# endif
+# undef PTHREAD_MUTEX_INITIALIZER
+# define PTHREAD_MUTEX_INITIALIZER { 0 }
+# endif
+# if !@HAVE_PTHREAD_MUTEX_RECURSIVE@
+# define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
+# define PTHREAD_MUTEX_NORMAL 0
+# define PTHREAD_MUTEX_ERRORCHECK 1
+# define PTHREAD_MUTEX_RECURSIVE 2
+# endif
+# if !@HAVE_PTHREAD_MUTEX_ROBUST@
+# define PTHREAD_MUTEX_STALLED 0
+# define PTHREAD_MUTEX_ROBUST 1
+# endif
+#endif
+
+/* =========== Read-write lock types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_RWLOCK@
+# include "windows-timedrwlock.h"
+# if @HAVE_PTHREAD_T@
+# define pthread_rwlock_t rpl_pthread_rwlock_t
+# define pthread_rwlockattr_t rpl_pthread_rwlockattr_t
+# endif
+# if !GNULIB_defined_pthread_rwlock_types
+typedef glwthread_timedrwlock_t pthread_rwlock_t;
+typedef unsigned int pthread_rwlockattr_t;
+# define GNULIB_defined_pthread_rwlock_types 1
+# endif
+# undef PTHREAD_RWLOCK_INITIALIZER
+# define PTHREAD_RWLOCK_INITIALIZER GLWTHREAD_TIMEDRWLOCK_INIT
+# else
+# if @HAVE_PTHREAD_T@
+# define pthread_rwlock_t rpl_pthread_rwlock_t
+# define pthread_rwlockattr_t rpl_pthread_rwlockattr_t
+# endif
+# if !GNULIB_defined_pthread_rwlock_types
+typedef int pthread_rwlock_t;
+typedef unsigned int pthread_rwlockattr_t;
+# define GNULIB_defined_pthread_rwlock_types 1
+# endif
+# undef PTHREAD_RWLOCK_INITIALIZER
+# define PTHREAD_RWLOCK_INITIALIZER { 0 }
+# endif
+#elif @GNULIB_PTHREAD_RWLOCK@ && @REPLACE_PTHREAD_RWLOCK_INIT@ /* i.e.
PTHREAD_RWLOCK_UNIMPLEMENTED */
+# if @HAVE_PTHREAD_T@
+# define pthread_rwlock_t rpl_pthread_rwlock_t
+# define pthread_rwlockattr_t rpl_pthread_rwlockattr_t
+# endif
+# if !GNULIB_defined_pthread_rwlock_types
+typedef struct
+ {
+ pthread_mutex_t lock; /* protects the remaining fields */
+ pthread_cond_t waiting_readers; /* waiting readers */
+ pthread_cond_t waiting_writers; /* waiting writers */
+ unsigned int waiting_writers_count; /* number of waiting writers */
+ int runcount; /* number of readers running, or -1 when a writer runs
*/
+ }
+ pthread_rwlock_t;
+typedef unsigned int pthread_rwlockattr_t;
+# define GNULIB_defined_pthread_rwlock_types 1
+# endif
+# undef PTHREAD_RWLOCK_INITIALIZER
+# define PTHREAD_RWLOCK_INITIALIZER \
+ { PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER,
PTHREAD_COND_INITIALIZER, 0, 0 }
+#else
+# if @HAVE_PTHREAD_T@
+# if !defined PTHREAD_RWLOCK_INITIALIZER && defined
PTHREAD_RWLOCK_INITIALIZER_NP /* z/OS */
+# define PTHREAD_RWLOCK_INITIALIZER PTHREAD_RWLOCK_INITIALIZER_NP
+# endif
+# else
+# if !GNULIB_defined_pthread_rwlock_types
+typedef int pthread_rwlock_t;
+typedef unsigned int pthread_rwlockattr_t;
+# define GNULIB_defined_pthread_rwlock_types 1
+# endif
+# undef PTHREAD_RWLOCK_INITIALIZER
+# define PTHREAD_RWLOCK_INITIALIZER { 0 }
+# endif
+#endif
+
+/* =========== Condition variable types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_COND@
+# include "windows-cond.h"
+# if @HAVE_PTHREAD_T@
+# define pthread_cond_t rpl_pthread_cond_t
+# define pthread_condattr_t rpl_pthread_condattr_t
+# endif
+# if !GNULIB_defined_pthread_cond_types
+typedef glwthread_cond_t pthread_cond_t;
+typedef unsigned int pthread_condattr_t;
+# define GNULIB_defined_pthread_cond_types 1
+# endif
+# undef PTHREAD_COND_INITIALIZER
+# define PTHREAD_COND_INITIALIZER GLWTHREAD_COND_INIT
+# else
+# if @HAVE_PTHREAD_T@
+# define pthread_cond_t rpl_pthread_cond_t
+# define pthread_condattr_t rpl_pthread_condattr_t
+# endif
+# if !GNULIB_defined_pthread_cond_types
+typedef int pthread_cond_t;
+typedef unsigned int pthread_condattr_t;
+# define GNULIB_defined_pthread_cond_types 1
+# endif
+# undef PTHREAD_COND_INITIALIZER
+# define PTHREAD_COND_INITIALIZER { 0 }
+# endif
+#else
+# if !@HAVE_PTHREAD_T@
+# if !GNULIB_defined_pthread_cond_types
+typedef int pthread_cond_t;
+typedef unsigned int pthread_condattr_t;
+# define GNULIB_defined_pthread_cond_types 1
+# endif
+# undef PTHREAD_COND_INITIALIZER
+# define PTHREAD_COND_INITIALIZER { 0 }
+# endif
+#endif
+
+/* =========== Thread-specific storage types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_TSS@
+# include "windows-tls.h"
+# if @HAVE_PTHREAD_T@
+# define pthread_key_t rpl_pthread_key_t
+# endif
+# if !GNULIB_defined_pthread_tss_types
+typedef glwthread_tls_key_t pthread_key_t;
+# define GNULIB_defined_pthread_tss_types 1
+# endif
+# undef PTHREAD_DESTRUCTOR_ITERATIONS
+# define PTHREAD_DESTRUCTOR_ITERATIONS GLWTHREAD_DESTRUCTOR_ITERATIONS
+# else
+# if @HAVE_PTHREAD_T@
+# define pthread_key_t rpl_pthread_key_t
+# endif
+# if !GNULIB_defined_pthread_tss_types
+typedef void ** pthread_key_t;
+# define GNULIB_defined_pthread_tss_types 1
+# endif
+# undef PTHREAD_DESTRUCTOR_ITERATIONS
+# define PTHREAD_DESTRUCTOR_ITERATIONS 0
+# endif
+#else
+# if !@HAVE_PTHREAD_T@
+# if !GNULIB_defined_pthread_tss_types
+typedef void ** pthread_key_t;
+# define GNULIB_defined_pthread_tss_types 1
+# endif
+# undef PTHREAD_DESTRUCTOR_ITERATIONS
+# define PTHREAD_DESTRUCTOR_ITERATIONS 0
+# endif
+#endif
+
+/* =========== Spinlock types and macros =========== */
+
+#if (defined _WIN32 && ! defined __CYGWIN__) && USE_WINDOWS_THREADS
+# if @GNULIB_PTHREAD_SPIN@
+# include "windows-spin.h"
+# if @HAVE_PTHREAD_T@
+# define pthread_spinlock_t rpl_pthread_spinlock_t
+# endif
+# if !GNULIB_defined_pthread_spin_types
+typedef glwthread_spinlock_t pthread_spinlock_t;
+# define GNULIB_defined_pthread_spin_types 1
+# endif
+# else
+# if @HAVE_PTHREAD_T@
+# define pthread_spinlock_t rpl_pthread_spinlock_t
+# endif
+# if !GNULIB_defined_pthread_spin_types
+typedef pthread_mutex_t pthread_spinlock_t;
+# define GNULIB_defined_pthread_spin_types 1
+# endif
+# endif
+# undef PTHREAD_PROCESS_PRIVATE
+# undef PTHREAD_PROCESS_SHARED
+# define PTHREAD_PROCESS_PRIVATE 0
+# define PTHREAD_PROCESS_SHARED 1
+#else
+# if @HAVE_PTHREAD_SPINLOCK_T@
+/* <pthread.h> exists and defines pthread_spinlock_t. */
+# if !@HAVE_PTHREAD_SPIN_INIT@ || @REPLACE_PTHREAD_SPIN_INIT@
+/* If the 'pthread-spin' module is in use, it defines all the pthread_spin*
+ functions. Prepare for it by overriding pthread_spinlock_t if that might
+ be needed. */
+# if !(((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 7) \
+ || __clang_major__ > 3 || (__clang_major__ == 3 && __clang_minor__
>= 1)) \
+ || (((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1)) \
+ && !defined __ANDROID__) \
+ || __clang_major__ >= 3)) \
+ && !defined __ibmxl__)
+/* We can't use GCC built-ins. Approximate spinlocks with mutexes. */
+# if !GNULIB_defined_pthread_spin_types
+# define pthread_spinlock_t pthread_mutex_t
+# define GNULIB_defined_pthread_spin_types 1
+# endif
+# endif
+# endif
+# else
+/* Approximate spinlocks with mutexes. */
+# if !GNULIB_defined_pthread_spin_types
+typedef pthread_mutex_t pthread_spinlock_t;
+# define GNULIB_defined_pthread_spin_types 1
+# endif
+# endif
+# if !@HAVE_PTHREAD_PROCESS_SHARED@
+# define PTHREAD_PROCESS_PRIVATE 0
+# define PTHREAD_PROCESS_SHARED 1
+# endif
+#endif
+
+/* =========== Other types and macros =========== */
+
+#if !@HAVE_PTHREAD_T@
+# if !GNULIB_defined_other_pthread_types
+typedef int pthread_barrier_t;
+typedef unsigned int pthread_barrierattr_t;
+# define GNULIB_defined_other_pthread_types 1
+# endif
+#endif
+
+#if !defined PTHREAD_CANCELED
+
+# define PTHREAD_BARRIER_SERIAL_THREAD (-1)
+
+# define PTHREAD_CANCEL_DEFERRED 0
+# define PTHREAD_CANCEL_ASYNCHRONOUS 1
+
+# define PTHREAD_CANCEL_ENABLE 0
+# define PTHREAD_CANCEL_DISABLE 1
+
+# define PTHREAD_CANCELED ((void *) -1)
+
+# define PTHREAD_INHERIT_SCHED 0
+# define PTHREAD_EXPLICIT_SCHED 1
+
+# define PTHREAD_PRIO_NONE 0
+# define PTHREAD_PRIO_INHERIT 1
+# define PTHREAD_PRIO_PROTECT 2
+
+# define PTHREAD_SCOPE_SYSTEM 0
+# define PTHREAD_SCOPE_PROCESS 1
+
+#endif
+
+/* =========== Thread functions =========== */
+
+#if @GNULIB_PTHREAD_THREAD@
+/* The 'restrict' qualifier on ARG is nonsense, but POSIX specifies it this
way.
+ Sigh. */
+# if @REPLACE_PTHREAD_CREATE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_create
+# define pthread_create rpl_pthread_create
+# endif
+_GL_FUNCDECL_RPL (pthread_create, int,
+ (pthread_t *restrict threadp,
+ const pthread_attr_t *restrict attr,
+ void * (*mainfunc) (void *), void *restrict arg)
+ _GL_ARG_NONNULL ((1, 3)));
+_GL_CXXALIAS_RPL (pthread_create, int,
+ (pthread_t *restrict threadp,
+ const pthread_attr_t *restrict attr,
+ void * (*mainfunc) (void *), void *restrict arg));
+# else
+# if !@HAVE_PTHREAD_CREATE@
+_GL_FUNCDECL_SYS (pthread_create, int,
+ (pthread_t *restrict threadp,
+ const pthread_attr_t *restrict attr,
+ void * (*mainfunc) (void *), void *restrict arg)
+ _GL_ARG_NONNULL ((1, 3)));
+# endif
+_GL_CXXALIAS_SYS_CAST (pthread_create, int,
+ (pthread_t *restrict threadp,
+ const pthread_attr_t *restrict attr,
+ void * (*mainfunc) (void *), void *restrict arg));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_create);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_create
+# if HAVE_RAW_DECL_PTHREAD_CREATE
+_GL_WARN_ON_USE (pthread_create, "pthread_create is not portable - "
+ "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_ATTR_INIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_attr_init
+# define pthread_attr_init rpl_pthread_attr_init
+# endif
+_GL_FUNCDECL_RPL (pthread_attr_init, int, (pthread_attr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_attr_init, int, (pthread_attr_t *attr));
+# else
+# if !@HAVE_PTHREAD_ATTR_INIT@
+_GL_FUNCDECL_SYS (pthread_attr_init, int, (pthread_attr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_attr_init, int, (pthread_attr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_attr_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_attr_init
+# if HAVE_RAW_DECL_PTHREAD_ATTR_INIT
+_GL_WARN_ON_USE (pthread_attr_init, "pthread_attr_init is not portable - "
+ "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_ATTR_GETDETACHSTATE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_attr_getdetachstate
+# define pthread_attr_getdetachstate rpl_pthread_attr_getdetachstate
+# endif
+_GL_FUNCDECL_RPL (pthread_attr_getdetachstate, int,
+ (const pthread_attr_t *attr, int *detachstatep)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_attr_getdetachstate, int,
+ (const pthread_attr_t *attr, int *detachstatep));
+# else
+# if !@HAVE_PTHREAD_ATTR_GETDETACHSTATE@
+_GL_FUNCDECL_SYS (pthread_attr_getdetachstate, int,
+ (const pthread_attr_t *attr, int *detachstatep)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (pthread_attr_getdetachstate, int,
+ (const pthread_attr_t *attr, int *detachstatep));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_attr_getdetachstate);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_attr_getdetachstate
+# if HAVE_RAW_DECL_PTHREAD_ATTR_GETDETACHSTATE
+_GL_WARN_ON_USE (pthread_attr_getdetachstate, "pthread_attr_getdetachstate is
not portable - "
+ "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_ATTR_SETDETACHSTATE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_attr_setdetachstate
+# define pthread_attr_setdetachstate rpl_pthread_attr_setdetachstate
+# endif
+_GL_FUNCDECL_RPL (pthread_attr_setdetachstate, int,
+ (pthread_attr_t *attr, int detachstate)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_attr_setdetachstate, int,
+ (pthread_attr_t *attr, int detachstate));
+# else
+# if !@HAVE_PTHREAD_ATTR_SETDETACHSTATE@
+_GL_FUNCDECL_SYS (pthread_attr_setdetachstate, int,
+ (pthread_attr_t *attr, int detachstate)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_attr_setdetachstate, int,
+ (pthread_attr_t *attr, int detachstate));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_attr_setdetachstate);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_attr_setdetachstate
+# if HAVE_RAW_DECL_PTHREAD_ATTR_SETDETACHSTATE
+_GL_WARN_ON_USE (pthread_attr_setdetachstate, "pthread_attr_setdetachstate is
not portable - "
+ "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_ATTR_DESTROY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_attr_destroy
+# define pthread_attr_destroy rpl_pthread_attr_destroy
+# endif
+_GL_FUNCDECL_RPL (pthread_attr_destroy, int, (pthread_attr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_attr_destroy, int, (pthread_attr_t *attr));
+# else
+# if !@HAVE_PTHREAD_ATTR_DESTROY@
+_GL_FUNCDECL_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_attr_destroy, int, (pthread_attr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_attr_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_attr_destroy
+# if HAVE_RAW_DECL_PTHREAD_ATTR_DESTROY
+_GL_WARN_ON_USE (pthread_attr_destroy, "pthread_attr_destroy is not portable -
"
+ "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_SELF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_self
+# define pthread_self rpl_pthread_self
+# endif
+_GL_FUNCDECL_RPL (pthread_self, pthread_t, (void) _GL_ATTRIBUTE_PURE);
+_GL_CXXALIAS_RPL (pthread_self, pthread_t, (void));
+# else
+# if !@HAVE_PTHREAD_SELF@
+_GL_FUNCDECL_SYS (pthread_self, pthread_t, (void) _GL_ATTRIBUTE_PURE);
+# endif
+_GL_CXXALIAS_SYS (pthread_self, pthread_t, (void));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_self);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_self
+# if HAVE_RAW_DECL_PTHREAD_SELF
+_GL_WARN_ON_USE (pthread_self, "pthread_self is not portable - "
+ "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_EQUAL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_equal
+# define pthread_equal rpl_pthread_equal
+# endif
+_GL_FUNCDECL_RPL (pthread_equal, int, (pthread_t thread1, pthread_t thread2));
+_GL_CXXALIAS_RPL (pthread_equal, int, (pthread_t thread1, pthread_t thread2));
+# else
+# if !@HAVE_PTHREAD_EQUAL@
+_GL_FUNCDECL_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2));
+# endif
+_GL_CXXALIAS_SYS (pthread_equal, int, (pthread_t thread1, pthread_t thread2));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_equal);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_equal
+# if HAVE_RAW_DECL_PTHREAD_EQUAL
+_GL_WARN_ON_USE (pthread_equal, "pthread_equal is not portable - "
+ "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_DETACH@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_detach
+# define pthread_detach rpl_pthread_detach
+# endif
+_GL_FUNCDECL_RPL (pthread_detach, int, (pthread_t thread));
+_GL_CXXALIAS_RPL (pthread_detach, int, (pthread_t thread));
+# else
+# if !@HAVE_PTHREAD_DETACH@
+_GL_FUNCDECL_SYS (pthread_detach, int, (pthread_t thread));
+# endif
+_GL_CXXALIAS_SYS (pthread_detach, int, (pthread_t thread));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_detach);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_detach
+# if HAVE_RAW_DECL_PTHREAD_DETACH
+_GL_WARN_ON_USE (pthread_detach, "pthread_detach is not portable - "
+ "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_JOIN@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_join
+# define pthread_join rpl_pthread_join
+# endif
+_GL_FUNCDECL_RPL (pthread_join, int, (pthread_t thread, void **valuep));
+_GL_CXXALIAS_RPL (pthread_join, int, (pthread_t thread, void **valuep));
+# else
+# if !@HAVE_PTHREAD_JOIN@
+_GL_FUNCDECL_SYS (pthread_join, int, (pthread_t thread, void **valuep));
+# endif
+_GL_CXXALIAS_SYS (pthread_join, int, (pthread_t thread, void **valuep));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_join);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_join
+# if HAVE_RAW_DECL_PTHREAD_JOIN
+_GL_WARN_ON_USE (pthread_join, "pthread_join is not portable - "
+ "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_THREAD@
+# if @REPLACE_PTHREAD_EXIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_exit
+# define pthread_exit rpl_pthread_exit
+# endif
+_GL_FUNCDECL_RPL (pthread_exit, _Noreturn void, (void *value));
+_GL_CXXALIAS_RPL (pthread_exit, void, (void *value));
+# else
+# if !@HAVE_PTHREAD_EXIT@
+_GL_FUNCDECL_SYS (pthread_exit, _Noreturn void, (void *value));
+# endif
+/* Need to cast because of AIX with xlclang++. */
+_GL_CXXALIAS_SYS_CAST (pthread_exit, void, (void *value));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_exit);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_exit
+# if HAVE_RAW_DECL_PTHREAD_EXIT
+_GL_WARN_ON_USE (pthread_exit, "pthread_exit is not portable - "
+ "use gnulib module pthread-thread for portability");
+# endif
+#endif
+
+/* =========== Once-only control (initialization) functions =========== */
+
+#if @GNULIB_PTHREAD_ONCE@
+# if @REPLACE_PTHREAD_ONCE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_once
+# define pthread_once rpl_pthread_once
+# endif
+_GL_FUNCDECL_RPL (pthread_once, int,
+ (pthread_once_t *once_control, void (*initfunction) (void))
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_once, int,
+ (pthread_once_t *once_control, void (*initfunction) (void)));
+# else
+# if !@HAVE_PTHREAD_ONCE@
+_GL_FUNCDECL_SYS (pthread_once, int,
+ (pthread_once_t *once_control, void (*initfunction) (void))
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS_CAST (pthread_once, int,
+ (pthread_once_t *once_control,
+ void (*initfunction) (void)));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_once);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_once
+# if HAVE_RAW_DECL_PTHREAD_ONCE
+_GL_WARN_ON_USE (pthread_once, "pthread_once is not portable - "
+ "use gnulib module pthread-once for portability");
+# endif
+#endif
+
+/* =========== Mutex functions =========== */
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEX_INIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutex_init
+# define pthread_mutex_init rpl_pthread_mutex_init
+# endif
+_GL_FUNCDECL_RPL (pthread_mutex_init, int,
+ (pthread_mutex_t *restrict mutex,
+ const pthread_mutexattr_t *restrict attr)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutex_init, int,
+ (pthread_mutex_t *restrict mutex,
+ const pthread_mutexattr_t *restrict attr));
+# else
+# if !@HAVE_PTHREAD_MUTEX_INIT@
+_GL_FUNCDECL_SYS (pthread_mutex_init, int,
+ (pthread_mutex_t *restrict mutex,
+ const pthread_mutexattr_t *restrict attr)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_mutex_init, int,
+ (pthread_mutex_t *restrict mutex,
+ const pthread_mutexattr_t *restrict attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_init
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_INIT
+_GL_WARN_ON_USE (pthread_mutex_init, "pthread_mutex_init is not portable - "
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_INIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutexattr_init
+# define pthread_mutexattr_init rpl_pthread_mutexattr_init
+# endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr));
+# else
+# if !@HAVE_PTHREAD_MUTEXATTR_INIT@
+_GL_FUNCDECL_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_mutexattr_init, int, (pthread_mutexattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_init
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_INIT
+_GL_WARN_ON_USE (pthread_mutexattr_init, "pthread_mutexattr_init is not
portable - "
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_GETTYPE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutexattr_gettype
+# define pthread_mutexattr_gettype rpl_pthread_mutexattr_gettype
+# endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_gettype, int,
+ (const pthread_mutexattr_t *restrict attr,
+ int *restrict typep)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_gettype, int,
+ (const pthread_mutexattr_t *restrict attr,
+ int *restrict typep));
+# else
+# if !@HAVE_PTHREAD_MUTEXATTR_GETTYPE@
+_GL_FUNCDECL_SYS (pthread_mutexattr_gettype, int,
+ (const pthread_mutexattr_t *restrict attr,
+ int *restrict typep)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+/* Need to cast, because on FreeBSD the first parameter is
+ pthread_mutexattr_t *attr. */
+_GL_CXXALIAS_SYS_CAST (pthread_mutexattr_gettype, int,
+ (const pthread_mutexattr_t *restrict attr,
+ int *restrict typep));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_gettype);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_gettype
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETTYPE
+_GL_WARN_ON_USE (pthread_mutexattr_gettype, "pthread_mutexattr_gettype is not
portable - "
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_SETTYPE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutexattr_settype
+# define pthread_mutexattr_settype rpl_pthread_mutexattr_settype
+# endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_settype, int,
+ (pthread_mutexattr_t *attr, int type) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_settype, int,
+ (pthread_mutexattr_t *attr, int type));
+# else
+# if !@HAVE_PTHREAD_MUTEXATTR_SETTYPE@
+_GL_FUNCDECL_SYS (pthread_mutexattr_settype, int,
+ (pthread_mutexattr_t *attr, int type) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_mutexattr_settype, int,
+ (pthread_mutexattr_t *attr, int type));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_settype);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_settype
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETTYPE
+_GL_WARN_ON_USE (pthread_mutexattr_settype, "pthread_mutexattr_settype is not
portable - "
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_GETROBUST@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutexattr_getrobust
+# define pthread_mutexattr_getrobust rpl_pthread_mutexattr_getrobust
+# endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_getrobust, int,
+ (const pthread_mutexattr_t *restrict attr,
+ int *restrict robustp)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_getrobust, int,
+ (const pthread_mutexattr_t *restrict attr,
+ int *restrict robustp));
+# else
+# if !@HAVE_PTHREAD_MUTEXATTR_GETROBUST@
+_GL_FUNCDECL_SYS (pthread_mutexattr_getrobust, int,
+ (const pthread_mutexattr_t *restrict attr,
+ int *restrict robustp)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+/* Need to cast, because on FreeBSD the first parameter is
+ pthread_mutexattr_t *attr. */
+_GL_CXXALIAS_SYS_CAST (pthread_mutexattr_getrobust, int,
+ (const pthread_mutexattr_t *restrict attr,
+ int *restrict robustp));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_getrobust);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_getrobust
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_GETROBUST
+_GL_WARN_ON_USE (pthread_mutexattr_getrobust, "pthread_mutexattr_getrobust is
not portable - "
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_SETROBUST@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutexattr_setrobust
+# define pthread_mutexattr_setrobust rpl_pthread_mutexattr_setrobust
+# endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_setrobust, int,
+ (pthread_mutexattr_t *attr, int robust)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_setrobust, int,
+ (pthread_mutexattr_t *attr, int robust));
+# else
+# if !@HAVE_PTHREAD_MUTEXATTR_SETROBUST@
+_GL_FUNCDECL_SYS (pthread_mutexattr_setrobust, int,
+ (pthread_mutexattr_t *attr, int robust)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_mutexattr_setrobust, int,
+ (pthread_mutexattr_t *attr, int robust));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_setrobust);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_setrobust
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_SETROBUST
+_GL_WARN_ON_USE (pthread_mutexattr_setrobust, "pthread_mutexattr_setrobust is
not portable - "
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEXATTR_DESTROY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutexattr_destroy
+# define pthread_mutexattr_destroy rpl_pthread_mutexattr_destroy
+# endif
+_GL_FUNCDECL_RPL (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr));
+# else
+# if !@HAVE_PTHREAD_MUTEXATTR_DESTROY@
+_GL_FUNCDECL_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_mutexattr_destroy, int, (pthread_mutexattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutexattr_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutexattr_destroy
+# if HAVE_RAW_DECL_PTHREAD_MUTEXATTR_DESTROY
+_GL_WARN_ON_USE (pthread_mutexattr_destroy, "pthread_mutexattr_destroy is not
portable - "
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEX_LOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutex_lock
+# define pthread_mutex_lock rpl_pthread_mutex_lock
+# endif
+_GL_FUNCDECL_RPL (pthread_mutex_lock, int, (pthread_mutex_t *mutex)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutex_lock, int, (pthread_mutex_t *mutex));
+# else
+# if !@HAVE_PTHREAD_MUTEX_LOCK@
+_GL_FUNCDECL_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_mutex_lock, int, (pthread_mutex_t *mutex));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_lock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_lock
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_LOCK
+_GL_WARN_ON_USE (pthread_mutex_lock, "pthread_mutex_lock is not portable - "
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEX_TRYLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutex_trylock
+# define pthread_mutex_trylock rpl_pthread_mutex_trylock
+# endif
+_GL_FUNCDECL_RPL (pthread_mutex_trylock, int, (pthread_mutex_t *mutex)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutex_trylock, int, (pthread_mutex_t *mutex));
+# else
+# if !@HAVE_PTHREAD_MUTEX_TRYLOCK@
+_GL_FUNCDECL_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_mutex_trylock, int, (pthread_mutex_t *mutex));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_trylock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_trylock
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_TRYLOCK
+_GL_WARN_ON_USE (pthread_mutex_trylock, "pthread_mutex_trylock is not portable
- "
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX_TIMEDLOCK@
+# if @REPLACE_PTHREAD_MUTEX_TIMEDLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutex_timedlock
+# define pthread_mutex_timedlock rpl_pthread_mutex_timedlock
+# endif
+_GL_FUNCDECL_RPL (pthread_mutex_timedlock, int,
+ (pthread_mutex_t *restrict mutex,
+ const struct timespec *restrict abstime)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_mutex_timedlock, int,
+ (pthread_mutex_t *restrict mutex,
+ const struct timespec *restrict abstime));
+# else
+# if !@HAVE_PTHREAD_MUTEX_TIMEDLOCK@
+_GL_FUNCDECL_SYS (pthread_mutex_timedlock, int,
+ (pthread_mutex_t *restrict mutex,
+ const struct timespec *restrict abstime)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (pthread_mutex_timedlock, int,
+ (pthread_mutex_t *restrict mutex,
+ const struct timespec *restrict abstime));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_timedlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_timedlock
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_TIMEDLOCK
+_GL_WARN_ON_USE (pthread_mutex_timedlock, "pthread_mutex_timedlock is not
portable - "
+ "use gnulib module pthread_mutex_timedlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEX_UNLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutex_unlock
+# define pthread_mutex_unlock rpl_pthread_mutex_unlock
+# endif
+_GL_FUNCDECL_RPL (pthread_mutex_unlock, int, (pthread_mutex_t *mutex)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutex_unlock, int, (pthread_mutex_t *mutex));
+# else
+# if !@HAVE_PTHREAD_MUTEX_UNLOCK@
+_GL_FUNCDECL_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_mutex_unlock, int, (pthread_mutex_t *mutex));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_unlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_unlock
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_UNLOCK
+_GL_WARN_ON_USE (pthread_mutex_unlock, "pthread_mutex_unlock is not portable -
"
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_MUTEX@
+# if @REPLACE_PTHREAD_MUTEX_DESTROY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_mutex_destroy
+# define pthread_mutex_destroy rpl_pthread_mutex_destroy
+# endif
+_GL_FUNCDECL_RPL (pthread_mutex_destroy, int, (pthread_mutex_t *mutex)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_mutex_destroy, int, (pthread_mutex_t *mutex));
+# else
+# if !@HAVE_PTHREAD_MUTEX_DESTROY@
+_GL_FUNCDECL_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_mutex_destroy, int, (pthread_mutex_t *mutex));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_mutex_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_mutex_destroy
+# if HAVE_RAW_DECL_PTHREAD_MUTEX_DESTROY
+_GL_WARN_ON_USE (pthread_mutex_destroy, "pthread_mutex_destroy is not portable
- "
+ "use gnulib module pthread-mutex for portability");
+# endif
+#endif
+
+/* =========== Read-write lock functions =========== */
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_INIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlock_init
+# define pthread_rwlock_init rpl_pthread_rwlock_init
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlock_init, int,
+ (pthread_rwlock_t *restrict lock,
+ const pthread_rwlockattr_t *restrict attr)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_init, int,
+ (pthread_rwlock_t *restrict lock,
+ const pthread_rwlockattr_t *restrict attr));
+# else
+# if !@HAVE_PTHREAD_RWLOCK_INIT@
+_GL_FUNCDECL_SYS (pthread_rwlock_init, int,
+ (pthread_rwlock_t *restrict lock,
+ const pthread_rwlockattr_t *restrict attr)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlock_init, int,
+ (pthread_rwlock_t *restrict lock,
+ const pthread_rwlockattr_t *restrict attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_init
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_INIT
+_GL_WARN_ON_USE (pthread_rwlock_init, "pthread_rwlock_init is not portable - "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCKATTR_INIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlockattr_init
+# define pthread_rwlockattr_init rpl_pthread_rwlockattr_init
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr));
+# else
+# if !@HAVE_PTHREAD_RWLOCKATTR_INIT@
+_GL_FUNCDECL_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlockattr_init, int, (pthread_rwlockattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlockattr_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlockattr_init
+# if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_INIT
+_GL_WARN_ON_USE (pthread_rwlockattr_init, "pthread_rwlockattr_init is not
portable - "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCKATTR_DESTROY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlockattr_destroy
+# define pthread_rwlockattr_destroy rpl_pthread_rwlockattr_destroy
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlockattr_destroy, int,
+ (pthread_rwlockattr_t *attr) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlockattr_destroy, int,
+ (pthread_rwlockattr_t *attr));
+# else
+# if !@HAVE_PTHREAD_RWLOCKATTR_DESTROY@
+_GL_FUNCDECL_SYS (pthread_rwlockattr_destroy, int,
+ (pthread_rwlockattr_t *attr) _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlockattr_destroy, int,
+ (pthread_rwlockattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlockattr_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlockattr_destroy
+# if HAVE_RAW_DECL_PTHREAD_RWLOCKATTR_DESTROY
+_GL_WARN_ON_USE (pthread_rwlockattr_destroy, "pthread_rwlockattr_destroy is
not portable - "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_RDLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlock_rdlock
+# define pthread_rwlock_rdlock rpl_pthread_rwlock_rdlock
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock));
+# else
+# if !@HAVE_PTHREAD_RWLOCK_RDLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlock_rdlock, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_rdlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_rdlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_RDLOCK
+_GL_WARN_ON_USE (pthread_rwlock_rdlock, "pthread_rwlock_rdlock is not portable
- "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_WRLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlock_wrlock
+# define pthread_rwlock_wrlock rpl_pthread_rwlock_wrlock
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock));
+# else
+# if !@HAVE_PTHREAD_RWLOCK_WRLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlock_wrlock, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_wrlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_wrlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_WRLOCK
+_GL_WARN_ON_USE (pthread_rwlock_wrlock, "pthread_rwlock_wrlock is not portable
- "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_TRYRDLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlock_tryrdlock
+# define pthread_rwlock_tryrdlock rpl_pthread_rwlock_tryrdlock
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock));
+# else
+# if !@HAVE_PTHREAD_RWLOCK_TRYRDLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlock_tryrdlock, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_tryrdlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_tryrdlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYRDLOCK
+_GL_WARN_ON_USE (pthread_rwlock_tryrdlock, "pthread_rwlock_tryrdlock is not
portable - "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_TRYWRLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlock_trywrlock
+# define pthread_rwlock_trywrlock rpl_pthread_rwlock_trywrlock
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock));
+# else
+# if !@HAVE_PTHREAD_RWLOCK_TRYWRLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlock_trywrlock, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_trywrlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_trywrlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TRYWRLOCK
+_GL_WARN_ON_USE (pthread_rwlock_trywrlock, "pthread_rwlock_trywrlock is not
portable - "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlock_timedrdlock
+# define pthread_rwlock_timedrdlock rpl_pthread_rwlock_timedrdlock
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlock_timedrdlock, int,
+ (pthread_rwlock_t *restrict lock,
+ const struct timespec *restrict abstime)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_rwlock_timedrdlock, int,
+ (pthread_rwlock_t *restrict lock,
+ const struct timespec *restrict abstime));
+# else
+# if !@HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_timedrdlock, int,
+ (pthread_rwlock_t *restrict lock,
+ const struct timespec *restrict abstime)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlock_timedrdlock, int,
+ (pthread_rwlock_t *restrict lock,
+ const struct timespec *restrict abstime));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_timedrdlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_timedrdlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDRDLOCK
+_GL_WARN_ON_USE (pthread_rwlock_timedrdlock, "pthread_rwlock_timedrdlock is
not portable - "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlock_timedwrlock
+# define pthread_rwlock_timedwrlock rpl_pthread_rwlock_timedwrlock
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlock_timedwrlock, int,
+ (pthread_rwlock_t *restrict lock,
+ const struct timespec *restrict abstime)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_rwlock_timedwrlock, int,
+ (pthread_rwlock_t *restrict lock,
+ const struct timespec *restrict abstime));
+# else
+# if !@HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_timedwrlock, int,
+ (pthread_rwlock_t *restrict lock,
+ const struct timespec *restrict abstime)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlock_timedwrlock, int,
+ (pthread_rwlock_t *restrict lock,
+ const struct timespec *restrict abstime));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_timedwrlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_timedwrlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_TIMEDWRLOCK
+_GL_WARN_ON_USE (pthread_rwlock_timedwrlock, "pthread_rwlock_timedwrlock is
not portable - "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_UNLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlock_unlock
+# define pthread_rwlock_unlock rpl_pthread_rwlock_unlock
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock));
+# else
+# if !@HAVE_PTHREAD_RWLOCK_UNLOCK@
+_GL_FUNCDECL_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlock_unlock, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_unlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_unlock
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_UNLOCK
+_GL_WARN_ON_USE (pthread_rwlock_unlock, "pthread_rwlock_unlock is not portable
- "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_RWLOCK@
+# if @REPLACE_PTHREAD_RWLOCK_DESTROY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_rwlock_destroy
+# define pthread_rwlock_destroy rpl_pthread_rwlock_destroy
+# endif
+_GL_FUNCDECL_RPL (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock));
+# else
+# if !@HAVE_PTHREAD_RWLOCK_DESTROY@
+_GL_FUNCDECL_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_rwlock_destroy, int, (pthread_rwlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_rwlock_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_rwlock_destroy
+# if HAVE_RAW_DECL_PTHREAD_RWLOCK_DESTROY
+_GL_WARN_ON_USE (pthread_rwlock_destroy, "pthread_rwlock_destroy is not
portable - "
+ "use gnulib module pthread-rwlock for portability");
+# endif
+#endif
+
+/* =========== Condition variable functions =========== */
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_INIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_cond_init
+# define pthread_cond_init rpl_pthread_cond_init
+# endif
+_GL_FUNCDECL_RPL (pthread_cond_init, int,
+ (pthread_cond_t *restrict cond,
+ const pthread_condattr_t *restrict attr)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_cond_init, int,
+ (pthread_cond_t *restrict cond,
+ const pthread_condattr_t *restrict attr));
+# else
+# if !@HAVE_PTHREAD_COND_INIT@
+_GL_FUNCDECL_SYS (pthread_cond_init, int,
+ (pthread_cond_t *restrict cond,
+ const pthread_condattr_t *restrict attr)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_cond_init, int,
+ (pthread_cond_t *restrict cond,
+ const pthread_condattr_t *restrict attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_init
+# if HAVE_RAW_DECL_PTHREAD_COND_INIT
+_GL_WARN_ON_USE (pthread_cond_init, "pthread_cond_init is not portable - "
+ "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_CONDATTR_INIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_condattr_init
+# define pthread_condattr_init rpl_pthread_condattr_init
+# endif
+_GL_FUNCDECL_RPL (pthread_condattr_init, int, (pthread_condattr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_condattr_init, int, (pthread_condattr_t *attr));
+# else
+# if !@HAVE_PTHREAD_CONDATTR_INIT@
+_GL_FUNCDECL_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_condattr_init, int, (pthread_condattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_condattr_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_condattr_init
+# if HAVE_RAW_DECL_PTHREAD_CONDATTR_INIT
+_GL_WARN_ON_USE (pthread_condattr_init, "pthread_condattr_init is not portable
- "
+ "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_CONDATTR_DESTROY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_condattr_destroy
+# define pthread_condattr_destroy rpl_pthread_condattr_destroy
+# endif
+_GL_FUNCDECL_RPL (pthread_condattr_destroy, int, (pthread_condattr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_condattr_destroy, int, (pthread_condattr_t *attr));
+# else
+# if !@HAVE_PTHREAD_CONDATTR_DESTROY@
+_GL_FUNCDECL_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_condattr_destroy, int, (pthread_condattr_t *attr));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_condattr_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_condattr_destroy
+# if HAVE_RAW_DECL_PTHREAD_CONDATTR_DESTROY
+_GL_WARN_ON_USE (pthread_condattr_destroy, "pthread_condattr_destroy is not
portable - "
+ "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_WAIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_cond_wait
+# define pthread_cond_wait rpl_pthread_cond_wait
+# endif
+_GL_FUNCDECL_RPL (pthread_cond_wait, int,
+ (pthread_cond_t *restrict cond,
+ pthread_mutex_t *restrict mutex)
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (pthread_cond_wait, int,
+ (pthread_cond_t *restrict cond,
+ pthread_mutex_t *restrict mutex));
+# else
+# if !@HAVE_PTHREAD_COND_WAIT@
+_GL_FUNCDECL_SYS (pthread_cond_wait, int,
+ (pthread_cond_t *restrict cond,
+ pthread_mutex_t *restrict mutex)
+ _GL_ARG_NONNULL ((1, 2)));
+# endif
+_GL_CXXALIAS_SYS (pthread_cond_wait, int,
+ (pthread_cond_t *restrict cond,
+ pthread_mutex_t *restrict mutex));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_wait);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_wait
+# if HAVE_RAW_DECL_PTHREAD_COND_WAIT
+_GL_WARN_ON_USE (pthread_cond_wait, "pthread_cond_wait is not portable - "
+ "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_TIMEDWAIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_cond_timedwait
+# define pthread_cond_timedwait rpl_pthread_cond_timedwait
+# endif
+_GL_FUNCDECL_RPL (pthread_cond_timedwait, int,
+ (pthread_cond_t *restrict cond,
+ pthread_mutex_t *restrict mutex,
+ const struct timespec *restrict abstime)
+ _GL_ARG_NONNULL ((1, 2, 3)));
+_GL_CXXALIAS_RPL (pthread_cond_timedwait, int,
+ (pthread_cond_t *restrict cond,
+ pthread_mutex_t *restrict mutex,
+ const struct timespec *restrict abstime));
+# else
+# if !@HAVE_PTHREAD_COND_TIMEDWAIT@
+_GL_FUNCDECL_SYS (pthread_cond_timedwait, int,
+ (pthread_cond_t *restrict cond,
+ pthread_mutex_t *restrict mutex,
+ const struct timespec *restrict abstime)
+ _GL_ARG_NONNULL ((1, 2, 3)));
+# endif
+_GL_CXXALIAS_SYS (pthread_cond_timedwait, int,
+ (pthread_cond_t *restrict cond,
+ pthread_mutex_t *restrict mutex,
+ const struct timespec *restrict abstime));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_timedwait);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_timedwait
+# if HAVE_RAW_DECL_PTHREAD_COND_TIMEDWAIT
+_GL_WARN_ON_USE (pthread_cond_timedwait, "pthread_cond_timedwait is not
portable - "
+ "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_SIGNAL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_cond_signal
+# define pthread_cond_signal rpl_pthread_cond_signal
+# endif
+_GL_FUNCDECL_RPL (pthread_cond_signal, int, (pthread_cond_t *cond)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_cond_signal, int, (pthread_cond_t *cond));
+# else
+# if !@HAVE_PTHREAD_COND_SIGNAL@
+_GL_FUNCDECL_SYS (pthread_cond_signal, int, (pthread_cond_t *cond)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_cond_signal, int, (pthread_cond_t *cond));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_signal);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_signal
+# if HAVE_RAW_DECL_PTHREAD_COND_SIGNAL
+_GL_WARN_ON_USE (pthread_cond_signal, "pthread_cond_signal is not portable - "
+ "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_BROADCAST@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_cond_broadcast
+# define pthread_cond_broadcast rpl_pthread_cond_broadcast
+# endif
+_GL_FUNCDECL_RPL (pthread_cond_broadcast, int, (pthread_cond_t *cond)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_cond_broadcast, int, (pthread_cond_t *cond));
+# else
+# if !@HAVE_PTHREAD_COND_BROADCAST@
+_GL_FUNCDECL_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_cond_broadcast, int, (pthread_cond_t *cond));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_broadcast);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_broadcast
+# if HAVE_RAW_DECL_PTHREAD_COND_BROADCAST
+_GL_WARN_ON_USE (pthread_cond_broadcast, "pthread_cond_broadcast is not
portable - "
+ "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_COND@
+# if @REPLACE_PTHREAD_COND_DESTROY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_cond_destroy
+# define pthread_cond_destroy rpl_pthread_cond_destroy
+# endif
+_GL_FUNCDECL_RPL (pthread_cond_destroy, int, (pthread_cond_t *cond)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_cond_destroy, int, (pthread_cond_t *cond));
+# else
+# if !@HAVE_PTHREAD_COND_DESTROY@
+_GL_FUNCDECL_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_cond_destroy, int, (pthread_cond_t *cond));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_cond_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_cond_destroy
+# if HAVE_RAW_DECL_PTHREAD_COND_DESTROY
+_GL_WARN_ON_USE (pthread_cond_destroy, "pthread_cond_destroy is not portable -
"
+ "use gnulib module pthread-cond for portability");
+# endif
+#endif
+
+/* =========== Thread-specific storage functions =========== */
+
+#if @GNULIB_PTHREAD_TSS@
+# if @REPLACE_PTHREAD_KEY_CREATE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_key_create
+# define pthread_key_create rpl_pthread_key_create
+# endif
+_GL_FUNCDECL_RPL (pthread_key_create, int,
+ (pthread_key_t *keyp, void (*destructor) (void *))
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_key_create, int,
+ (pthread_key_t *keyp, void (*destructor) (void *)));
+# else
+# if !@HAVE_PTHREAD_KEY_CREATE@
+_GL_FUNCDECL_SYS (pthread_key_create, int,
+ (pthread_key_t *keyp, void (*destructor) (void *))
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS_CAST (pthread_key_create, int,
+ (pthread_key_t *keyp, void (*destructor) (void *)));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_key_create);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_key_create
+# if HAVE_RAW_DECL_PTHREAD_KEY_CREATE
+_GL_WARN_ON_USE (pthread_key_create, "pthread_key_create is not portable - "
+ "use gnulib module pthread-tss for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_TSS@
+# if @REPLACE_PTHREAD_SETSPECIFIC@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_setspecific
+# define pthread_setspecific rpl_pthread_setspecific
+# endif
+_GL_FUNCDECL_RPL (pthread_setspecific, int,
+ (pthread_key_t key, const void *value));
+_GL_CXXALIAS_RPL (pthread_setspecific, int,
+ (pthread_key_t key, const void *value));
+# else
+# if !@HAVE_PTHREAD_SETSPECIFIC@
+_GL_FUNCDECL_SYS (pthread_setspecific, int,
+ (pthread_key_t key, const void *value));
+# endif
+_GL_CXXALIAS_SYS (pthread_setspecific, int,
+ (pthread_key_t key, const void *value));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_setspecific);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_setspecific
+# if HAVE_RAW_DECL_PTHREAD_SETSPECIFIC
+_GL_WARN_ON_USE (pthread_setspecific, "pthread_setspecific is not portable - "
+ "use gnulib module pthread-tss for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_TSS@
+# if @REPLACE_PTHREAD_GETSPECIFIC@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_getspecific
+# define pthread_getspecific rpl_pthread_getspecific
+# endif
+_GL_FUNCDECL_RPL (pthread_getspecific, void *, (pthread_key_t key));
+_GL_CXXALIAS_RPL (pthread_getspecific, void *, (pthread_key_t key));
+# else
+# if !@HAVE_PTHREAD_GETSPECIFIC@
+_GL_FUNCDECL_SYS (pthread_getspecific, void *, (pthread_key_t key));
+# endif
+_GL_CXXALIAS_SYS (pthread_getspecific, void *, (pthread_key_t key));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_getspecific);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_getspecific
+# if HAVE_RAW_DECL_PTHREAD_GETSPECIFIC
+_GL_WARN_ON_USE (pthread_getspecific, "pthread_getspecific is not portable - "
+ "use gnulib module pthread-tss for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_TSS@
+# if @REPLACE_PTHREAD_KEY_DELETE@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_key_delete
+# define pthread_key_delete rpl_pthread_key_delete
+# endif
+_GL_FUNCDECL_RPL (pthread_key_delete, int, (pthread_key_t key));
+_GL_CXXALIAS_RPL (pthread_key_delete, int, (pthread_key_t key));
+# else
+# if !@HAVE_PTHREAD_KEY_DELETE@
+_GL_FUNCDECL_SYS (pthread_key_delete, int, (pthread_key_t key));
+# endif
+_GL_CXXALIAS_SYS (pthread_key_delete, int, (pthread_key_t key));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_key_delete);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_key_delete
+# if HAVE_RAW_DECL_PTHREAD_KEY_DELETE
+_GL_WARN_ON_USE (pthread_key_delete, "pthread_key_delete is not portable - "
+ "use gnulib module pthread-tss for portability");
+# endif
+#endif
+
+/* =========== Spinlock functions =========== */
+
+#if @GNULIB_PTHREAD_SPIN@
+# if @REPLACE_PTHREAD_SPIN_INIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_spin_init
+# define pthread_spin_init rpl_pthread_spin_init
+# endif
+_GL_FUNCDECL_RPL (pthread_spin_init, int,
+ (pthread_spinlock_t *lock, int shared_across_processes)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_spin_init, int,
+ (pthread_spinlock_t *lock, int shared_across_processes));
+# else
+# if !@HAVE_PTHREAD_SPIN_INIT@
+_GL_FUNCDECL_SYS (pthread_spin_init, int,
+ (pthread_spinlock_t *lock, int shared_across_processes)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_spin_init, int,
+ (pthread_spinlock_t *lock, int shared_across_processes));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_spin_init);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_spin_init
+# if HAVE_RAW_DECL_PTHREAD_SPIN_INIT
+_GL_WARN_ON_USE (pthread_spin_init, "pthread_spin_init is not portable - "
+ "use gnulib module pthread-spin for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_SPIN@
+# if @REPLACE_PTHREAD_SPIN_LOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_spin_lock
+# define pthread_spin_lock rpl_pthread_spin_lock
+# endif
+_GL_FUNCDECL_RPL (pthread_spin_lock, int, (pthread_spinlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_spin_lock, int, (pthread_spinlock_t *lock));
+# else
+# if !@HAVE_PTHREAD_SPIN_LOCK@
+_GL_FUNCDECL_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_spin_lock, int, (pthread_spinlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_spin_lock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_spin_lock
+# if HAVE_RAW_DECL_PTHREAD_SPIN_LOCK
+_GL_WARN_ON_USE (pthread_spin_lock, "pthread_spin_lock is not portable - "
+ "use gnulib module pthread-spin for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_SPIN@
+# if @REPLACE_PTHREAD_SPIN_TRYLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_spin_trylock
+# define pthread_spin_trylock rpl_pthread_spin_trylock
+# endif
+_GL_FUNCDECL_RPL (pthread_spin_trylock, int, (pthread_spinlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_spin_trylock, int, (pthread_spinlock_t *lock));
+# else
+# if !@HAVE_PTHREAD_SPIN_TRYLOCK@
+_GL_FUNCDECL_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_spin_trylock, int, (pthread_spinlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_spin_trylock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_spin_trylock
+# if HAVE_RAW_DECL_PTHREAD_SPIN_TRYLOCK
+_GL_WARN_ON_USE (pthread_spin_trylock, "pthread_spin_trylock is not portable -
"
+ "use gnulib module pthread-spin for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_SPIN@
+# if @REPLACE_PTHREAD_SPIN_UNLOCK@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_spin_unlock
+# define pthread_spin_unlock rpl_pthread_spin_unlock
+# endif
+_GL_FUNCDECL_RPL (pthread_spin_unlock, int, (pthread_spinlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_spin_unlock, int, (pthread_spinlock_t *lock));
+# else
+# if !@HAVE_PTHREAD_SPIN_UNLOCK@
+_GL_FUNCDECL_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_spin_unlock, int, (pthread_spinlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_spin_unlock);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_spin_unlock
+# if HAVE_RAW_DECL_PTHREAD_SPIN_UNLOCK
+_GL_WARN_ON_USE (pthread_spin_unlock, "pthread_spin_unlock is not portable - "
+ "use gnulib module pthread-spin for portability");
+# endif
+#endif
+
+#if @GNULIB_PTHREAD_SPIN@
+# if @REPLACE_PTHREAD_SPIN_DESTROY@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef pthread_spin_destroy
+# define pthread_spin_destroy rpl_pthread_spin_destroy
+# endif
+_GL_FUNCDECL_RPL (pthread_spin_destroy, int, (pthread_spinlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (pthread_spin_destroy, int, (pthread_spinlock_t *lock));
+# else
+# if !@HAVE_PTHREAD_SPIN_DESTROY@
+_GL_FUNCDECL_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (pthread_spin_destroy, int, (pthread_spinlock_t *lock));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (pthread_spin_destroy);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pthread_spin_destroy
+# if HAVE_RAW_DECL_PTHREAD_SPIN_DESTROY
+_GL_WARN_ON_USE (pthread_spin_destroy, "pthread_spin_destroy is not portable -
"
+ "use gnulib module pthread-spin for portability");
+# endif
+#endif
+
+
+#if defined __cplusplus && defined GNULIB_NAMESPACE && !@HAVE_PTHREAD_H@ &&
defined __MINGW32__
+/* Provide the symbols required by mingw's <bits/gthr-default.h>. */
+using GNULIB_NAMESPACE::pthread_create;
+using GNULIB_NAMESPACE::pthread_self;
+using GNULIB_NAMESPACE::pthread_equal;
+using GNULIB_NAMESPACE::pthread_detach;
+using GNULIB_NAMESPACE::pthread_join;
+using GNULIB_NAMESPACE::pthread_once;
+using GNULIB_NAMESPACE::pthread_mutex_init;
+using GNULIB_NAMESPACE::pthread_mutexattr_init;
+using GNULIB_NAMESPACE::pthread_mutexattr_settype;
+using GNULIB_NAMESPACE::pthread_mutexattr_destroy;
+using GNULIB_NAMESPACE::pthread_mutex_lock;
+using GNULIB_NAMESPACE::pthread_mutex_trylock;
+using GNULIB_NAMESPACE::pthread_mutex_timedlock;
+using GNULIB_NAMESPACE::pthread_mutex_unlock;
+using GNULIB_NAMESPACE::pthread_mutex_destroy;
+using GNULIB_NAMESPACE::pthread_cond_wait;
+using GNULIB_NAMESPACE::pthread_cond_timedwait;
+using GNULIB_NAMESPACE::pthread_cond_signal;
+using GNULIB_NAMESPACE::pthread_cond_broadcast;
+using GNULIB_NAMESPACE::pthread_cond_destroy;
+using GNULIB_NAMESPACE::pthread_key_create;
+using GNULIB_NAMESPACE::pthread_setspecific;
+using GNULIB_NAMESPACE::pthread_getspecific;
+using GNULIB_NAMESPACE::pthread_key_delete;
+#endif
+
+
+#endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
+#endif /* _@GUARD_PREFIX@_PTHREAD_H_ */
+#endif
diff --git a/gnulib/lib/realloc.c b/gnulib/lib/realloc.c
index 1063eb0987..0573139625 100644
--- a/gnulib/lib/realloc.c
+++ b/gnulib/lib/realloc.c
@@ -1,6 +1,6 @@
/* realloc() function that is glibc compatible.
- Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2023 Free Software
+ Copyright (C) 1997, 2003-2004, 2006-2007, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/reallocarray.c b/gnulib/lib/reallocarray.c
index 8c99250f7f..09711a0ede 100644
--- a/gnulib/lib/reallocarray.c
+++ b/gnulib/lib/reallocarray.c
@@ -1,6 +1,6 @@
/* reallocarray function that is glibc compatible.
- Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/regcomp.c b/gnulib/lib/regcomp.c
index 1f6a131107..696cf813f3 100644
--- a/gnulib/lib/regcomp.c
+++ b/gnulib/lib/regcomp.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/gnulib/lib/regex.c b/gnulib/lib/regex.c
index 3beb0deb98..4b1a6ed68e 100644
--- a/gnulib/lib/regex.c
+++ b/gnulib/lib/regex.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
@@ -26,10 +26,6 @@
# pragma GCC diagnostic ignored "-Wsuggest-attribute=pure"
# pragma GCC diagnostic ignored "-Wvla"
# endif
-# if __GNUC_PREREQ (4, 3)
-# pragma GCC diagnostic ignored "-Wold-style-definition"
-# pragma GCC diagnostic ignored "-Wtype-limits"
-# endif
#endif
/* Make sure no one compiles this code with a C++ compiler. */
diff --git a/gnulib/lib/regex.h b/gnulib/lib/regex.h
index 9ef0252fff..ccf40cebc0 100644
--- a/gnulib/lib/regex.h
+++ b/gnulib/lib/regex.h
@@ -1,6 +1,6 @@
/* Definitions for data structures and routines for the regular
expression library.
- Copyright (C) 1985, 1989-2023 Free Software Foundation, Inc.
+ Copyright (C) 1985, 1989-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/gnulib/lib/regex_internal.c b/gnulib/lib/regex_internal.c
index 998a19b724..8cd096ebcf 100644
--- a/gnulib/lib/regex_internal.c
+++ b/gnulib/lib/regex_internal.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/gnulib/lib/regex_internal.h b/gnulib/lib/regex_internal.h
index 7e35a112ec..6165cb17c7 100644
--- a/gnulib/lib/regex_internal.h
+++ b/gnulib/lib/regex_internal.h
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/gnulib/lib/regexec.c b/gnulib/lib/regexec.c
index f05f38ae0e..9f065dfa02 100644
--- a/gnulib/lib/regexec.c
+++ b/gnulib/lib/regexec.c
@@ -1,5 +1,5 @@
/* Extended regular expression matching and search library.
- Copyright (C) 2002-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
diff --git a/gnulib/lib/sched.in.h b/gnulib/lib/sched.in.h
new file mode 100644
index 0000000000..838fb12bdc
--- /dev/null
+++ b/gnulib/lib/sched.in.h
@@ -0,0 +1,111 @@
+/* A GNU-like <sched.h>.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
+
+ This file is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+#ifndef _@GUARD_PREFIX@_SCHED_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+@PRAGMA_COLUMNS@
+
+/* This file uses #include_next of a system file that defines time_t.
+ For the 'year2038' module to work right, <config.h> needs to have been
+ included before. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_SCHED_H@
+# if @HAVE_SYS_CDEFS_H@
+# include <sys/cdefs.h>
+# endif
+# @INCLUDE_NEXT@ @NEXT_SCHED_H@
+#endif
+
+#ifndef _@GUARD_PREFIX@_SCHED_H
+#define _@GUARD_PREFIX@_SCHED_H
+
+/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*. */
+#if !_GL_CONFIG_H_INCLUDED
+ #error "Please include config.h first."
+#endif
+
+/* Get pid_t.
+ This is needed on glibc 2.11 (see
+ glibc bug <https://sourceware.org/bugzilla/show_bug.cgi?id=13198>)
+ and Mac OS X 10.5. */
+#include <sys/types.h>
+
+#ifdef __KLIBC__
+/* On OS/2 kLIBC, struct sched_param is in spawn.h. */
+# include <spawn.h>
+#endif
+
+#ifdef __VMS
+/* On OpenVMS, struct sched_param is in <pthread.h>. */
+# include <pthread.h>
+#endif
+
+/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+#if !@HAVE_STRUCT_SCHED_PARAM@
+
+# if !GNULIB_defined_struct_sched_param
+struct sched_param
+{
+ int sched_priority;
+};
+# define GNULIB_defined_struct_sched_param 1
+# endif
+
+#endif
+
+#if !(defined SCHED_FIFO && defined SCHED_RR && defined SCHED_OTHER)
+# define SCHED_FIFO 1
+# define SCHED_RR 2
+# define SCHED_OTHER 0
+#endif
+
+#if @GNULIB_SCHED_YIELD@
+# if @REPLACE_SCHED_YIELD@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef sched_yield
+# define sched_yield rpl_sched_yield
+# endif
+_GL_FUNCDECL_RPL (sched_yield, int, (void));
+_GL_CXXALIAS_RPL (sched_yield, int, (void));
+# else
+# if !@HAVE_SCHED_YIELD@
+_GL_FUNCDECL_SYS (sched_yield, int, (void));
+# endif
+_GL_CXXALIAS_SYS (sched_yield, int, (void));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (sched_yield);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sched_yield
+# if HAVE_RAW_DECL_SCHED_YIELD
+_GL_WARN_ON_USE (sched_yield, "sched_yield is not portable - "
+ "use gnulib module sched_yield for portability");
+# endif
+#endif
+
+#endif /* _@GUARD_PREFIX@_SCHED_H */
+#endif /* _@GUARD_PREFIX@_SCHED_H */
diff --git a/gnulib/lib/setlocale-lock.c b/gnulib/lib/setlocale-lock.c
index 593f63711b..192489c4ab 100644
--- a/gnulib/lib/setlocale-lock.c
+++ b/gnulib/lib/setlocale-lock.c
@@ -1,5 +1,5 @@
/* Return the internal lock used by setlocale_null_r.
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
+ Copyright (C) 2019-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,9 +18,10 @@
#include <config.h>
+/* The option '--disable-threads' explicitly requests no locking. */
/* When it is known that the gl_get_setlocale_null_lock function is defined
by a dependency library, it should not be defined here. */
-#if OMIT_SETLOCALE_LOCK
+#if AVOID_ANY_THREADS || OMIT_SETLOCALE_LOCK
/* This declaration is solely to ensure that after preprocessing
this file is never empty. */
diff --git a/gnulib/lib/setlocale_null-unlocked.c
b/gnulib/lib/setlocale_null-unlocked.c
new file mode 100644
index 0000000000..0a86f0df78
--- /dev/null
+++ b/gnulib/lib/setlocale_null-unlocked.c
@@ -0,0 +1,149 @@
+/* Query the name of the current global locale, without locking.
+ Copyright (C) 2019-2024 Free Software Foundation, Inc.
+
+ This file is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019. */
+
+#include <config.h>
+
+/* Specification. */
+#include "setlocale_null.h"
+
+#include <errno.h>
+#include <locale.h>
+#include <string.h>
+#if defined _WIN32 && !defined __CYGWIN__
+# include <wchar.h>
+#endif
+
+/* Use the system's setlocale() function, not the gnulib override, here. */
+#undef setlocale
+
+const char *
+setlocale_null_unlocked (int category)
+{
+ const char *result = setlocale (category, NULL);
+
+#ifdef __ANDROID__
+ if (result == NULL)
+ switch (category)
+ {
+ case LC_CTYPE:
+ case LC_NUMERIC:
+ case LC_TIME:
+ case LC_COLLATE:
+ case LC_MONETARY:
+ case LC_MESSAGES:
+ case LC_ALL:
+ case LC_PAPER:
+ case LC_NAME:
+ case LC_ADDRESS:
+ case LC_TELEPHONE:
+ case LC_MEASUREMENT:
+ result = "C";
+ break;
+ default:
+ break;
+ }
+#endif
+
+ return result;
+}
+
+int
+setlocale_null_r_unlocked (int category, char *buf, size_t bufsize)
+{
+#if defined _WIN32 && !defined __CYGWIN__ && defined _MSC_VER
+ /* On native Windows, nowadays, the setlocale() implementation is based
+ on _wsetlocale() and uses malloc() for the result. We are better off
+ using _wsetlocale() directly. */
+ const wchar_t *result = _wsetlocale (category, NULL);
+
+ if (result == NULL)
+ {
+ /* CATEGORY is invalid. */
+ if (bufsize > 0)
+ /* Return an empty string in BUF.
+ This is a convenience for callers that don't want to write explicit
+ code for handling EINVAL. */
+ buf[0] = '\0';
+ return EINVAL;
+ }
+ else
+ {
+ size_t length = wcslen (result);
+ if (length < bufsize)
+ {
+ size_t i;
+
+ /* Convert wchar_t[] -> char[], assuming plain ASCII. */
+ for (i = 0; i <= length; i++)
+ buf[i] = result[i];
+
+ return 0;
+ }
+ else
+ {
+ if (bufsize > 0)
+ {
+ /* Return a truncated result in BUF.
+ This is a convenience for callers that don't want to write
+ explicit code for handling ERANGE. */
+ size_t i;
+
+ /* Convert wchar_t[] -> char[], assuming plain ASCII. */
+ for (i = 0; i < bufsize; i++)
+ buf[i] = result[i];
+ buf[bufsize - 1] = '\0';
+ }
+ return ERANGE;
+ }
+ }
+#else
+ const char *result = setlocale_null_unlocked (category);
+
+ if (result == NULL)
+ {
+ /* CATEGORY is invalid. */
+ if (bufsize > 0)
+ /* Return an empty string in BUF.
+ This is a convenience for callers that don't want to write explicit
+ code for handling EINVAL. */
+ buf[0] = '\0';
+ return EINVAL;
+ }
+ else
+ {
+ size_t length = strlen (result);
+ if (length < bufsize)
+ {
+ memcpy (buf, result, length + 1);
+ return 0;
+ }
+ else
+ {
+ if (bufsize > 0)
+ {
+ /* Return a truncated result in BUF.
+ This is a convenience for callers that don't want to write
+ explicit code for handling ERANGE. */
+ memcpy (buf, result, bufsize - 1);
+ buf[bufsize - 1] = '\0';
+ }
+ return ERANGE;
+ }
+ }
+#endif
+}
diff --git a/gnulib/lib/setlocale_null.c b/gnulib/lib/setlocale_null.c
index 89c8a06598..5ecf413de0 100644
--- a/gnulib/lib/setlocale_null.c
+++ b/gnulib/lib/setlocale_null.c
@@ -1,5 +1,5 @@
/* Query the name of the current global locale.
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
+ Copyright (C) 2019-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -25,12 +25,14 @@
#include <locale.h>
#include <stdlib.h>
#include <string.h>
-#if defined _WIN32 && !defined __CYGWIN__
-# include <wchar.h>
-#endif
#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE)
-# if defined _WIN32 && !defined __CYGWIN__
+
+# if AVOID_ANY_THREADS
+
+/* The option '--disable-threads' explicitly requests no locking. */
+
+# elif defined _WIN32 && !defined __CYGWIN__
# define WIN32_LEAN_AND_MEAN /* avoid including junk */
# include <windows.h>
@@ -51,148 +53,34 @@
# include <threads.h>
# endif
-#endif
-/* Use the system's setlocale() function, not the gnulib override, here. */
-#undef setlocale
-
-static const char *
-setlocale_null_androidfix (int category)
-{
- const char *result = setlocale (category, NULL);
-
-#ifdef __ANDROID__
- if (result == NULL)
- switch (category)
- {
- case LC_CTYPE:
- case LC_NUMERIC:
- case LC_TIME:
- case LC_COLLATE:
- case LC_MONETARY:
- case LC_MESSAGES:
- case LC_ALL:
- case LC_PAPER:
- case LC_NAME:
- case LC_ADDRESS:
- case LC_TELEPHONE:
- case LC_MEASUREMENT:
- result = "C";
- break;
- default:
- break;
- }
#endif
- return result;
-}
-
-static int
-setlocale_null_unlocked (int category, char *buf, size_t bufsize)
-{
-#if defined _WIN32 && !defined __CYGWIN__ && defined _MSC_VER
- /* On native Windows, nowadays, the setlocale() implementation is based
- on _wsetlocale() and uses malloc() for the result. We are better off
- using _wsetlocale() directly. */
- const wchar_t *result = _wsetlocale (category, NULL);
-
- if (result == NULL)
- {
- /* CATEGORY is invalid. */
- if (bufsize > 0)
- /* Return an empty string in BUF.
- This is a convenience for callers that don't want to write explicit
- code for handling EINVAL. */
- buf[0] = '\0';
- return EINVAL;
- }
- else
- {
- size_t length = wcslen (result);
- if (length < bufsize)
- {
- size_t i;
-
- /* Convert wchar_t[] -> char[], assuming plain ASCII. */
- for (i = 0; i <= length; i++)
- buf[i] = result[i];
-
- return 0;
- }
- else
- {
- if (bufsize > 0)
- {
- /* Return a truncated result in BUF.
- This is a convenience for callers that don't want to write
- explicit code for handling ERANGE. */
- size_t i;
-
- /* Convert wchar_t[] -> char[], assuming plain ASCII. */
- for (i = 0; i < bufsize; i++)
- buf[i] = result[i];
- buf[bufsize - 1] = '\0';
- }
- return ERANGE;
- }
- }
-#else
- const char *result = setlocale_null_androidfix (category);
-
- if (result == NULL)
- {
- /* CATEGORY is invalid. */
- if (bufsize > 0)
- /* Return an empty string in BUF.
- This is a convenience for callers that don't want to write explicit
- code for handling EINVAL. */
- buf[0] = '\0';
- return EINVAL;
- }
- else
- {
- size_t length = strlen (result);
- if (length < bufsize)
- {
- memcpy (buf, result, length + 1);
- return 0;
- }
- else
- {
- if (bufsize > 0)
- {
- /* Return a truncated result in BUF.
- This is a convenience for callers that don't want to write
- explicit code for handling ERANGE. */
- memcpy (buf, result, bufsize - 1);
- buf[bufsize - 1] = '\0';
- }
- return ERANGE;
- }
- }
-#endif
-}
-
#if !(SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE) /* musl libc,
macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin < 3.4.6 */
-/* Use a lock, so that no two threads can invoke setlocale_null_unlocked
+/* Use a lock, so that no two threads can invoke setlocale_null_r_unlocked
at the same time. */
/* Prohibit renaming this symbol. */
# undef gl_get_setlocale_null_lock
-# if defined _WIN32 && !defined __CYGWIN__
+# if AVOID_ANY_THREADS
+
+/* The option '--disable-threads' explicitly requests no locking. */
+# define setlocale_null_r_with_lock setlocale_null_r_unlocked
+
+# elif defined _WIN32 && !defined __CYGWIN__
extern __declspec(dllimport) CRITICAL_SECTION *gl_get_setlocale_null_lock
(void);
static int
-setlocale_null_with_lock (int category, char *buf, size_t bufsize)
+setlocale_null_r_with_lock (int category, char *buf, size_t bufsize)
{
CRITICAL_SECTION *lock = gl_get_setlocale_null_lock ();
int ret;
EnterCriticalSection (lock);
- ret = setlocale_null_unlocked (category, buf, bufsize);
+ ret = setlocale_null_r_unlocked (category, buf, bufsize);
LeaveCriticalSection (lock);
return ret;
@@ -223,7 +111,7 @@ extern
# endif
static int
-setlocale_null_with_lock (int category, char *buf, size_t bufsize)
+setlocale_null_r_with_lock (int category, char *buf, size_t bufsize)
{
if (pthread_in_use())
{
@@ -232,14 +120,14 @@ setlocale_null_with_lock (int category, char *buf, size_t
bufsize)
if (pthread_mutex_lock (lock))
abort ();
- ret = setlocale_null_unlocked (category, buf, bufsize);
+ ret = setlocale_null_r_unlocked (category, buf, bufsize);
if (pthread_mutex_unlock (lock))
abort ();
return ret;
}
else
- return setlocale_null_unlocked (category, buf, bufsize);
+ return setlocale_null_r_unlocked (category, buf, bufsize);
}
# elif HAVE_THREADS_H
@@ -247,14 +135,14 @@ setlocale_null_with_lock (int category, char *buf, size_t
bufsize)
extern mtx_t *gl_get_setlocale_null_lock (void);
static int
-setlocale_null_with_lock (int category, char *buf, size_t bufsize)
+setlocale_null_r_with_lock (int category, char *buf, size_t bufsize)
{
mtx_t *lock = gl_get_setlocale_null_lock ();
int ret;
if (mtx_lock (lock) != thrd_success)
abort ();
- ret = setlocale_null_unlocked (category, buf, bufsize);
+ ret = setlocale_null_r_unlocked (category, buf, bufsize);
if (mtx_unlock (lock) != thrd_success)
abort ();
@@ -271,27 +159,27 @@ setlocale_null_r (int category, char *buf, size_t bufsize)
#if SETLOCALE_NULL_ALL_MTSAFE
# if SETLOCALE_NULL_ONE_MTSAFE
- return setlocale_null_unlocked (category, buf, bufsize);
+ return setlocale_null_r_unlocked (category, buf, bufsize);
# else
if (category == LC_ALL)
- return setlocale_null_unlocked (category, buf, bufsize);
+ return setlocale_null_r_unlocked (category, buf, bufsize);
else
- return setlocale_null_with_lock (category, buf, bufsize);
+ return setlocale_null_r_with_lock (category, buf, bufsize);
# endif
#else
# if SETLOCALE_NULL_ONE_MTSAFE
if (category == LC_ALL)
- return setlocale_null_with_lock (category, buf, bufsize);
+ return setlocale_null_r_with_lock (category, buf, bufsize);
else
- return setlocale_null_unlocked (category, buf, bufsize);
+ return setlocale_null_r_unlocked (category, buf, bufsize);
# else
- return setlocale_null_with_lock (category, buf, bufsize);
+ return setlocale_null_r_with_lock (category, buf, bufsize);
# endif
#endif
@@ -301,7 +189,7 @@ const char *
setlocale_null (int category)
{
#if SETLOCALE_NULL_ALL_MTSAFE && SETLOCALE_NULL_ONE_MTSAFE
- return setlocale_null_androidfix (category);
+ return setlocale_null_unlocked (category);
#else
/* This call must be multithread-safe. To achieve this without using
@@ -317,7 +205,7 @@ setlocale_null (int category)
if (category == LC_ALL)
{
# if SETLOCALE_NULL_ALL_MTSAFE
- return setlocale_null_androidfix (LC_ALL);
+ return setlocale_null_unlocked (LC_ALL);
# else
char buf[SETLOCALE_NULL_ALL_MAX];
static char resultbuf[SETLOCALE_NULL_ALL_MAX];
@@ -331,7 +219,7 @@ setlocale_null (int category)
else
{
# if SETLOCALE_NULL_ONE_MTSAFE
- return setlocale_null_androidfix (category);
+ return setlocale_null_unlocked (category);
# else
enum
{
diff --git a/gnulib/lib/setlocale_null.h b/gnulib/lib/setlocale_null.h
index c740fa0ff6..966c53cfaa 100644
--- a/gnulib/lib/setlocale_null.h
+++ b/gnulib/lib/setlocale_null.h
@@ -1,5 +1,5 @@
/* Query the name of the current global locale.
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
+ Copyright (C) 2019-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -44,6 +44,34 @@ extern "C" {
55+5*58. */
#define SETLOCALE_NULL_ALL_MAX (148+12*256+1)
+/* setlocale_null_r_unlocked (CATEGORY, BUF, BUFSIZE) is like
+ setlocale (CATEGORY, NULL), except that
+ - it returns the resulting locale category name or locale name in the
+ user-supplied buffer BUF, which must be BUFSIZE bytes long.
+ The recommended minimum buffer size is
+ - SETLOCALE_NULL_MAX for CATEGORY != LC_ALL, and
+ - SETLOCALE_NULL_ALL_MAX for CATEGORY == LC_ALL.
+ The return value is an error code: 0 if the call is successful, EINVAL if
+ CATEGORY is invalid, or ERANGE if BUFSIZE is smaller than the length needed
+ size (including the trailing NUL byte). In the latter case, a truncated
+ result is returned in BUF, but still NUL-terminated if BUFSIZE > 0.
+ This call is guaranteed to be multithread-safe only if
+ - CATEGORY != LC_ALL and SETLOCALE_NULL_ONE_MTSAFE is true, or
+ - CATEGORY == LC_ALL and SETLOCALE_NULL_ALL_MTSAFE is true,
+ and the other threads must not make other setlocale invocations (since
+ changing the global locale has side effects on all threads). */
+extern int setlocale_null_r_unlocked (int category, char *buf, size_t bufsize)
+ _GL_ARG_NONNULL ((2));
+
+/* setlocale_null_unlocked (CATEGORY) is like setlocale (CATEGORY, NULL).
+ The return value is NULL if CATEGORY is invalid.
+ This call is guaranteed to be multithread-safe only if
+ - CATEGORY != LC_ALL and SETLOCALE_NULL_ONE_MTSAFE is true, or
+ - CATEGORY == LC_ALL and SETLOCALE_NULL_ALL_MTSAFE is true,
+ and the other threads must not make other setlocale invocations (since
+ changing the global locale has side effects on all threads). */
+extern const char *setlocale_null_unlocked (int category);
+
/* setlocale_null_r (CATEGORY, BUF, BUFSIZE) is like setlocale (CATEGORY,
NULL),
except that
- it is guaranteed to be multithread-safe,
diff --git a/gnulib/lib/size_max.h b/gnulib/lib/size_max.h
index 2cfd31a59b..bd2eb43e8d 100644
--- a/gnulib/lib/size_max.h
+++ b/gnulib/lib/size_max.h
@@ -1,5 +1,5 @@
/* size_max.h -- declare SIZE_MAX through system headers
- Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2024 Free Software Foundation, Inc.
Written by Simon Josefsson.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/stat-time.c b/gnulib/lib/stat-time.c
index bc282232ab..1ab01f532c 100644
--- a/gnulib/lib/stat-time.c
+++ b/gnulib/lib/stat-time.c
@@ -1,6 +1,6 @@
/* stat-related time functions.
- Copyright (C) 2012-2023 Free Software Foundation, Inc.
+ Copyright (C) 2012-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/stat-time.h b/gnulib/lib/stat-time.h
index 75eb27e549..3cd8478f31 100644
--- a/gnulib/lib/stat-time.h
+++ b/gnulib/lib/stat-time.h
@@ -1,6 +1,6 @@
/* stat-related time functions.
- 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: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -52,11 +52,13 @@ extern "C" {
#if _GL_WINDOWS_STAT_TIMESPEC || defined HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
# if _GL_WINDOWS_STAT_TIMESPEC || defined
TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC
# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim)
+# define STAT_TIMESPEC_OFFSETOF(st_xtim) offsetof (struct stat, st_xtim)
# else
# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim.tv_nsec)
# endif
#elif defined HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
# define STAT_TIMESPEC(st, st_xtim) ((st)->st_xtim##espec)
+# define STAT_TIMESPEC_OFFSETOF(st_xtim) offsetof (struct stat, st_xtim##espec)
#elif defined HAVE_STRUCT_STAT_ST_ATIMENSEC
# define STAT_TIMESPEC_NS(st, st_xtim) ((st)->st_xtim##ensec)
#elif defined HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC
@@ -194,20 +196,21 @@ get_stat_birthtime (_GL_UNUSED struct stat const *st)
}
/* If a stat-like function returned RESULT, normalize the timestamps
- in *ST, in case this platform suffers from the Solaris 11 bug where
+ in *ST, if this platform suffers from a macOS and Solaris bug where
tv_nsec might be negative. Return the adjusted RESULT, setting
errno to EOVERFLOW if normalization overflowed. This function
is intended to be private to this .h file. */
_GL_STAT_TIME_INLINE int
stat_time_normalize (int result, _GL_UNUSED struct stat *st)
{
-#if defined __sun && defined STAT_TIMESPEC
+#if (((defined __APPLE__ && defined __MACH__) || defined __sun) \
+ && defined STAT_TIMESPEC_OFFSETOF)
if (result == 0)
{
long int timespec_hz = 1000000000;
- short int const ts_off[] = { offsetof (struct stat, st_atim),
- offsetof (struct stat, st_mtim),
- offsetof (struct stat, st_ctim) };
+ short int const ts_off[] = { STAT_TIMESPEC_OFFSETOF (st_atim),
+ STAT_TIMESPEC_OFFSETOF (st_mtim),
+ STAT_TIMESPEC_OFFSETOF (st_ctim) };
int i;
for (i = 0; i < sizeof ts_off / sizeof *ts_off; i++)
{
diff --git a/gnulib/lib/stat-w32.c b/gnulib/lib/stat-w32.c
index 2f01197584..ddd6f59856 100644
--- a/gnulib/lib/stat-w32.c
+++ b/gnulib/lib/stat-w32.c
@@ -1,5 +1,5 @@
/* Core of implementation of fstat and stat for native Windows.
- Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/stat-w32.h b/gnulib/lib/stat-w32.h
index c6738749df..392faed168 100644
--- a/gnulib/lib/stat-w32.h
+++ b/gnulib/lib/stat-w32.h
@@ -1,5 +1,5 @@
/* Core of implementation of fstat and stat for native Windows.
- Copyright (C) 2017-2023 Free Software Foundation, Inc.
+ Copyright (C) 2017-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/stat.c b/gnulib/lib/stat.c
index 7987e26583..ecf9f9bbe9 100644
--- a/gnulib/lib/stat.c
+++ b/gnulib/lib/stat.c
@@ -1,5 +1,5 @@
/* Work around platform bugs in stat.
- Copyright (C) 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/stdarg.in.h b/gnulib/lib/stdarg.in.h
index 8145216e86..65a397759c 100644
--- a/gnulib/lib/stdarg.in.h
+++ b/gnulib/lib/stdarg.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <stdarg.h>.
- Copyright (C) 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/stdckdint.in.h b/gnulib/lib/stdckdint.in.h
index 71bab5f0c9..91848806d8 100644
--- a/gnulib/lib/stdckdint.in.h
+++ b/gnulib/lib/stdckdint.in.h
@@ -1,6 +1,6 @@
/* stdckdint.h -- checked integer arithmetic
- Copyright 2022-2023 Free Software Foundation, Inc.
+ Copyright 2022-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
diff --git a/gnulib/lib/stddef.in.h b/gnulib/lib/stddef.in.h
index 190fd575d8..63bb500e26 100644
--- a/gnulib/lib/stddef.in.h
+++ b/gnulib/lib/stddef.in.h
@@ -1,6 +1,6 @@
/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
- Copyright (C) 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -27,13 +27,21 @@
#endif
@PRAGMA_COLUMNS@
-#if defined __need_wchar_t || defined __need_size_t \
- || defined __need_ptrdiff_t || defined __need_NULL \
- || defined __need_wint_t
+#if (defined __need_wchar_t || defined __need_size_t \
+ || defined __need_ptrdiff_t || defined __need_NULL \
+ || defined __need_wint_t) \
+ /* Avoid warning triggered by "gcc -std=gnu23 -Wsystem-headers" \
+ in Fedora 40 with gcc 14.0.1. \
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870>. */ \
+ && !@STDDEF_NOT_IDEMPOTENT@
/* Special invocation convention inside gcc header files. In
- particular, gcc provides a version of <stddef.h> that blindly
- redefines NULL even when __need_wint_t was defined, even though
- wint_t is not normally provided by <stddef.h>. Hence, we must
+ particular, <stddef.h> in some ancient versions of GCC blindly
+ redefined NULL when __need_wint_t was defined, even though wint_t
+ is not normally provided by <stddef.h>.
+ (FIXME: It's not clear what GCC versions those were - perhaps so
+ ancient that we can stop worrying about this?)
+ Although glibc 2.26 (2017) and later do not use __need_wint_t,
+ for portability to macOS, Cygwin, Haiku, and older Glibc + GCC,
remember if special invocation has ever been used to obtain wint_t,
in which case we need to clean up NULL yet again. */
@@ -52,6 +60,13 @@
# endif
#else
+/* For @STDDEF_NOT_IDEMPOTENT@. */
+# undef __need_wchar_t
+# undef __need_size_t
+# undef __need_ptrdiff_t
+# undef __need_NULL
+# undef __need_wint_t
+
/* Normal invocation convention. */
# ifndef _@GUARD_PREFIX@_STDDEF_H
@@ -74,6 +89,12 @@ typedef long max_align_t;
# endif
# endif
+# if !defined _GCC_NULLPTR_T && !@NULLPTR_T_NEEDS_STDDEF@
+ /* Suppress unwanted nullptr_t typedef. See
+ <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114869>. */
+# define _GCC_NULLPTR_T
+# endif
+
/* The include_next requires a split double-inclusion guard. */
# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
diff --git a/gnulib/lib/stdint.in.h b/gnulib/lib/stdint.in.h
index 5ddc644b8e..cd3fbdd965 100644
--- a/gnulib/lib/stdint.in.h
+++ b/gnulib/lib/stdint.in.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2002, 2004-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002, 2004-2024 Free Software Foundation, Inc.
Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
This file is part of gnulib.
@@ -80,7 +80,7 @@
#define _@GUARD_PREFIX@_STDINT_H
/* Get SCHAR_MIN, SCHAR_MAX, UCHAR_MAX, INT_MIN, INT_MAX,
- LONG_MIN, LONG_MAX, ULONG_MAX, _GL_INTEGER_WIDTH. */
+ LONG_MIN, LONG_MAX, ULONG_MAX, CHAR_BIT, _GL_INTEGER_WIDTH. */
#include <limits.h>
/* Override WINT_MIN and WINT_MAX if gnulib's <wchar.h> or <wctype.h> overrides
@@ -189,6 +189,10 @@ typedef __int64 gl_int64_t;
# define int64_t gl_int64_t
# define GL_INT64_T
# else
+/* Verify that 'long long' has exactly 64 bits. */
+typedef _gl_verify_int64_bits[
+ _STDINT_MAX (1, sizeof (long long) * CHAR_BIT, 0ll) >> 31 >> 31 == 1
+ ? 1 : -1];
# undef int64_t
typedef long long int gl_int64_t;
# define int64_t gl_int64_t
@@ -210,6 +214,11 @@ typedef unsigned __int64 gl_uint64_t;
# define uint64_t gl_uint64_t
# define GL_UINT64_T
# else
+/* Verify that 'unsigned long long' has exactly 64 bits. */
+typedef _gl_verify_uint64_bits[
+ _STDINT_MAX (0, sizeof (unsigned long long) * CHAR_BIT, 0ull)
+ >> 31 >> 31 >> 1 == 1
+ ? 1 : -1];
# undef uint64_t
typedef unsigned long long int gl_uint64_t;
# define uint64_t gl_uint64_t
@@ -306,6 +315,8 @@ typedef gl_uint_fast32_t gl_uint_fast16_t;
uintptr_t to avoid conflicting declarations of system functions like
_findclose in <io.h>. */
# if !((defined __KLIBC__ && defined _INTPTR_T_DECLARED) \
+ || (defined __INTPTR_WIDTH__ \
+ && __INTPTR_WIDTH__ != (defined _WIN64 ? LLONG_WIDTH : LONG_WIDTH))
\
|| defined __MINGW32__)
# undef intptr_t
# undef uintptr_t
diff --git a/gnulib/lib/stdio-read.c b/gnulib/lib/stdio-read.c
index 6e2984c5ec..253b8aa43f 100644
--- a/gnulib/lib/stdio-read.c
+++ b/gnulib/lib/stdio-read.c
@@ -1,5 +1,5 @@
/* POSIX compatible FILE stream read function.
- Copyright (C) 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/stdio-write.c b/gnulib/lib/stdio-write.c
index 9cf36cca4c..ca6aa00cee 100644
--- a/gnulib/lib/stdio-write.c
+++ b/gnulib/lib/stdio-write.c
@@ -1,5 +1,5 @@
/* POSIX compatible FILE stream write function.
- Copyright (C) 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/stdio.in.h b/gnulib/lib/stdio.in.h
index 118874d877..1c0c9661bf 100644
--- a/gnulib/lib/stdio.in.h
+++ b/gnulib/lib/stdio.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdio.h>.
- Copyright (C) 2004, 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -38,8 +38,14 @@
/* Suppress macOS deprecation warnings for sprintf and vsprintf. */
#if (defined __APPLE__ && defined __MACH__) && !defined _POSIX_C_SOURCE
-# define _POSIX_C_SOURCE 200809L
-# define _GL_DEFINED__POSIX_C_SOURCE
+# ifdef __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__
+# include <AvailabilityMacros.h>
+# endif
+# if (defined MAC_OS_X_VERSION_MIN_REQUIRED \
+ && 130000 <= MAC_OS_X_VERSION_MIN_REQUIRED)
+# define _POSIX_C_SOURCE 200809L
+# define _GL_DEFINED__POSIX_C_SOURCE
+# endif
#endif
#define _GL_ALREADY_INCLUDING_STDIO_H
@@ -71,7 +77,8 @@
/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8
and eglibc 2.11.2.
- May also define off_t to a 64-bit type on native Windows. */
+ May also define off_t to a 64-bit type on native Windows.
+ Also defines off64_t on macOS, NetBSD, OpenBSD, MSVC, Cygwin, Haiku. */
#include <sys/types.h>
/* Solaris 10 and NetBSD 7.0 declare renameat in <unistd.h>, not in <stdio.h>.
*/
@@ -901,14 +908,14 @@ _GL_CXXALIAS_SYS (fwrite, size_t,
&& !defined __cplusplus)
# undef fwrite
# undef fwrite_unlocked
-extern size_t __REDIRECT (rpl_fwrite,
- (const void *__restrict, size_t, size_t,
- FILE *__restrict),
- fwrite);
-extern size_t __REDIRECT (rpl_fwrite_unlocked,
- (const void *__restrict, size_t, size_t,
- FILE *__restrict),
- fwrite_unlocked);
+_GL_EXTERN_C size_t __REDIRECT (rpl_fwrite,
+ (const void *__restrict, size_t, size_t,
+ FILE *__restrict),
+ fwrite);
+_GL_EXTERN_C size_t __REDIRECT (rpl_fwrite_unlocked,
+ (const void *__restrict, size_t, size_t,
+ FILE *__restrict),
+ fwrite_unlocked);
# define fwrite rpl_fwrite
# define fwrite_unlocked rpl_fwrite_unlocked
# endif
diff --git a/gnulib/lib/stdlib.in.h b/gnulib/lib/stdlib.in.h
index b9838c7d5e..cfc69d0a50 100644
--- a/gnulib/lib/stdlib.in.h
+++ b/gnulib/lib/stdlib.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <stdlib.h>.
- Copyright (C) 1995, 2001-2004, 2006-2023 Free Software Foundation, Inc.
+ Copyright (C) 1995, 2001-2004, 2006-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -26,6 +26,10 @@
#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
+/* Make sure that the macros that indicate the special invocation convention
+ get undefined. This is needed at least on CentOS 7. */
+#undef __need_malloc_and_calloc
+
#else
/* Normal invocation convention. */
@@ -216,6 +220,31 @@ _GL_WARN_ON_USE (_Exit, "_Exit is unportable - "
#endif
+#if @GNULIB_ABORT_DEBUG@
+# if @REPLACE_ABORT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef abort
+# define abort rpl_abort
+# endif
+_GL_FUNCDECL_RPL (abort, _Noreturn void, (void));
+_GL_CXXALIAS_RPL (abort, void, (void));
+# else
+_GL_CXXALIAS_SYS (abort, void, (void));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (abort);
+# endif
+#endif
+#if @GNULIB_ABORT_DEBUG@ && @REPLACE_ABORT@
+_GL_EXTERN_C void _gl_pre_abort (void);
+#else
+# if !GNULIB_defined_gl_pre_abort
+# define _gl_pre_abort() /* nothing */
+# define GNULIB_defined_gl_pre_abort 1
+# endif
+#endif
+
+
#if @GNULIB_FREE_POSIX@
# if @REPLACE_FREE@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
@@ -1047,6 +1076,10 @@ _GL_CXXALIAS_RPL (putenv, int, (char *string));
# define putenv _putenv
# endif
_GL_CXXALIAS_MDA (putenv, int, (char *string));
+# elif defined __KLIBC__
+/* Need to cast, because on OS/2 kLIBC, the first parameter is
+ const char *string. */
+_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string));
# else
_GL_CXXALIAS_SYS (putenv, int, (char *string));
# endif
@@ -1063,6 +1096,10 @@ _GL_CXXALIASWARN (putenv);
/* Need to cast, because on mingw, the parameter is either
'const char *string' or 'char *string'. */
_GL_CXXALIAS_MDA_CAST (putenv, int, (char *string));
+# elif defined __KLIBC__
+/* Need to cast, because on OS/2 kLIBC, the first parameter is
+ const char *string. */
+_GL_CXXALIAS_SYS_CAST (putenv, int, (char *string));
# else
_GL_CXXALIAS_SYS (putenv, int, (char *string));
# endif
@@ -1104,7 +1141,9 @@ _GL_CXXALIAS_SYS (qsort_r, void, (void *base, size_t
nmemb, size_t size,
_gl_qsort_r_compar_fn compare,
void *arg));
# endif
+# if __GLIBC__ >= 2
_GL_CXXALIASWARN (qsort_r);
+# endif
#elif defined GNULIB_POSIXCHECK
# undef qsort_r
# if HAVE_RAW_DECL_QSORT_R
@@ -1114,11 +1153,26 @@ _GL_WARN_ON_USE (qsort_r, "qsort_r is not portable - "
#endif
-#if @GNULIB_RANDOM_R@
-# if !@HAVE_RANDOM_R@
-# ifndef RAND_MAX
-# define RAND_MAX 2147483647
+#if @GNULIB_RAND@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@)
+# ifndef RAND_MAX
+# define RAND_MAX 2147483647
+# endif
+#endif
+
+
+#if @GNULIB_RAND@
+# if @REPLACE_RAND@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef rand
+# define rand rpl_rand
# endif
+_GL_FUNCDECL_RPL (rand, int, (void));
+_GL_CXXALIAS_RPL (rand, int, (void));
+# else
+_GL_CXXALIAS_SYS (rand, int, (void));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (rand);
# endif
#endif
@@ -1566,6 +1620,38 @@ _GL_WARN_ON_USE (strtod, "strtod is unportable - "
# endif
#endif
+#if @GNULIB_STRTOF@
+ /* Parse a float from STRING, updating ENDP if appropriate. */
+# if @REPLACE_STRTOF@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define strtof rpl_strtof
+# endif
+# define GNULIB_defined_strtof_function 1
+_GL_FUNCDECL_RPL (strtof, float,
+ (const char *restrict str, char **restrict endp)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (strtof, float,
+ (const char *restrict str, char **restrict endp));
+# else
+# if !@HAVE_STRTOF@
+_GL_FUNCDECL_SYS (strtof, float,
+ (const char *restrict str, char **restrict endp)
+ _GL_ARG_NONNULL ((1)));
+# endif
+_GL_CXXALIAS_SYS (strtof, float,
+ (const char *restrict str, char **restrict endp));
+# endif
+# if __GLIBC__ >= 2
+_GL_CXXALIASWARN (strtof);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtof
+# if HAVE_RAW_DECL_STRTOF
+_GL_WARN_ON_USE (strtof, "strtof is unportable - "
+ "use gnulib module strtof for portability");
+# endif
+#endif
+
#if @GNULIB_STRTOLD@
/* Parse a 'long double' from STRING, updating ENDP if appropriate. */
# if @REPLACE_STRTOLD@
diff --git a/gnulib/lib/stpcpy.c b/gnulib/lib/stpcpy.c
index 73c1eb786f..d4510054bf 100644
--- a/gnulib/lib/stpcpy.c
+++ b/gnulib/lib/stpcpy.c
@@ -1,5 +1,5 @@
/* stpcpy.c -- copy a string and return pointer to end of new string
- Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2023 Free Software
+ Copyright (C) 1992, 1995, 1997-1998, 2006, 2009-2024 Free Software
Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C
Library.
diff --git a/gnulib/lib/str-kmp.h b/gnulib/lib/str-kmp.h
index b8821f841b..091b921bc1 100644
--- a/gnulib/lib/str-kmp.h
+++ b/gnulib/lib/str-kmp.h
@@ -1,6 +1,6 @@
/* Substring search in a NUL terminated string of UNIT elements,
using the Knuth-Morris-Pratt algorithm.
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This file is free software.
diff --git a/gnulib/lib/str-two-way.h b/gnulib/lib/str-two-way.h
index dfe702241c..cf85e26817 100644
--- a/gnulib/lib/str-two-way.h
+++ b/gnulib/lib/str-two-way.h
@@ -1,5 +1,5 @@
/* Byte-wise substring search, using the Two-Way algorithm.
- Copyright (C) 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Eric Blake <ebb9@byu.net>, 2008.
diff --git a/gnulib/lib/strcasecmp.c b/gnulib/lib/strcasecmp.c
index 38a30ce0d7..7939b404c1 100644
--- a/gnulib/lib/strcasecmp.c
+++ b/gnulib/lib/strcasecmp.c
@@ -1,5 +1,5 @@
/* Case-insensitive string comparison function.
- Copyright (C) 1998-1999, 2005-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/strcasestr.c b/gnulib/lib/strcasestr.c
index d8e9601239..b8c0479d90 100644
--- a/gnulib/lib/strcasestr.c
+++ b/gnulib/lib/strcasestr.c
@@ -1,5 +1,5 @@
/* Case-insensitive searching in a string.
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2005.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/strdup.c b/gnulib/lib/strdup.c
index 08c40d57ab..8d9e7c57dd 100644
--- a/gnulib/lib/strdup.c
+++ b/gnulib/lib/strdup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2023 Free Software
+/* Copyright (C) 1991, 1996-1998, 2002-2004, 2006-2007, 2009-2024 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/lib/streq.h b/gnulib/lib/streq.h
index 712948eba7..8593de6dff 100644
--- a/gnulib/lib/streq.h
+++ b/gnulib/lib/streq.h
@@ -1,5 +1,5 @@
/* Optimized string comparison.
- Copyright (C) 2001-2002, 2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -21,6 +21,11 @@
#include <string.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* STREQ_OPT allows to optimize string comparison with a small literal string.
STREQ_OPT (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
is semantically equivalent to
@@ -173,4 +178,9 @@ streq0 (const char *s1, const char *s2, char s20, char s21,
char s22, char s23,
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _GL_STREQ_H */
diff --git a/gnulib/lib/strerror-override.c b/gnulib/lib/strerror-override.c
index cddaa4a9d4..b9c1c7aba8 100644
--- a/gnulib/lib/strerror-override.c
+++ b/gnulib/lib/strerror-override.c
@@ -1,6 +1,6 @@
/* strerror-override.c --- POSIX compatible system error routine
- Copyright (C) 2010-2023 Free Software Foundation, Inc.
+ Copyright (C) 2010-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/strerror-override.h b/gnulib/lib/strerror-override.h
index c9b3ba8c19..a1734a242e 100644
--- a/gnulib/lib/strerror-override.h
+++ b/gnulib/lib/strerror-override.h
@@ -1,6 +1,6 @@
/* strerror-override.h --- POSIX compatible system error routine
- Copyright (C) 2010-2023 Free Software Foundation, Inc.
+ Copyright (C) 2010-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -16,47 +16,57 @@
along with this program. If not, see <https://www.gnu.org/licenses/>. */
#ifndef _GL_STRERROR_OVERRIDE_H
-# define _GL_STRERROR_OVERRIDE_H
+#define _GL_STRERROR_OVERRIDE_H
/* This file uses _GL_ATTRIBUTE_CONST. */
-# if !_GL_CONFIG_H_INCLUDED
-# error "Please include config.h first."
-# endif
+#if !_GL_CONFIG_H_INCLUDED
+# error "Please include config.h first."
+#endif
+
+#include <errno.h>
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
-# include <errno.h>
-# include <stddef.h>
/* Reasonable buffer size that should never trigger ERANGE; if this
proves too small, we intentionally abort(), to remind us to fix
this value. */
-# define STACKBUF_LEN 256
+#define STACKBUF_LEN 256
/* If ERRNUM maps to an errno value defined by gnulib, return a string
describing the error. Otherwise return NULL. */
-# if REPLACE_STRERROR_0 \
- || GNULIB_defined_ESOCK \
- || GNULIB_defined_ESTREAMS \
- || GNULIB_defined_EWINSOCK \
- || GNULIB_defined_ENOMSG \
- || GNULIB_defined_EIDRM \
- || GNULIB_defined_ENOLINK \
- || GNULIB_defined_EPROTO \
- || GNULIB_defined_EMULTIHOP \
- || GNULIB_defined_EBADMSG \
- || GNULIB_defined_EOVERFLOW \
- || GNULIB_defined_ENOTSUP \
- || GNULIB_defined_ENETRESET \
- || GNULIB_defined_ECONNABORTED \
- || GNULIB_defined_ESTALE \
- || GNULIB_defined_EDQUOT \
- || GNULIB_defined_ECANCELED \
- || GNULIB_defined_EOWNERDEAD \
- || GNULIB_defined_ENOTRECOVERABLE \
- || GNULIB_defined_EILSEQ
+#if REPLACE_STRERROR_0 \
+ || GNULIB_defined_ESOCK \
+ || GNULIB_defined_ESTREAMS \
+ || GNULIB_defined_EWINSOCK \
+ || GNULIB_defined_ENOMSG \
+ || GNULIB_defined_EIDRM \
+ || GNULIB_defined_ENOLINK \
+ || GNULIB_defined_EPROTO \
+ || GNULIB_defined_EMULTIHOP \
+ || GNULIB_defined_EBADMSG \
+ || GNULIB_defined_EOVERFLOW \
+ || GNULIB_defined_ENOTSUP \
+ || GNULIB_defined_ENETRESET \
+ || GNULIB_defined_ECONNABORTED \
+ || GNULIB_defined_ESTALE \
+ || GNULIB_defined_EDQUOT \
+ || GNULIB_defined_ECANCELED \
+ || GNULIB_defined_EOWNERDEAD \
+ || GNULIB_defined_ENOTRECOVERABLE \
+ || GNULIB_defined_EILSEQ
extern const char *strerror_override (int errnum) _GL_ATTRIBUTE_CONST;
-# else
-# define strerror_override(ignored) NULL
-# define GNULIB_defined_strerror_override_macro 1
-# endif
+#else
+# define strerror_override(ignored) NULL
+# define GNULIB_defined_strerror_override_macro 1
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
#endif /* _GL_STRERROR_OVERRIDE_H */
diff --git a/gnulib/lib/strerror.c b/gnulib/lib/strerror.c
index d754f601ee..6b760ff45c 100644
--- a/gnulib/lib/strerror.c
+++ b/gnulib/lib/strerror.c
@@ -1,6 +1,6 @@
/* strerror.c --- POSIX compatible system error routine
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/string.in.h b/gnulib/lib/string.in.h
index 8b62ae8fc9..44ec2e7ecd 100644
--- a/gnulib/lib/string.in.h
+++ b/gnulib/lib/string.in.h
@@ -1,6 +1,6 @@
/* A GNU-like <string.h>.
- Copyright (C) 1995-1996, 2001-2023 Free Software Foundation, Inc.
+ Copyright (C) 1995-1996, 2001-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -414,11 +414,21 @@ _GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
/* Overwrite a block of memory. The compiler will not optimize
effects away, even if the block is dead after the call. */
#if @GNULIB_MEMSET_EXPLICIT@
-# if ! @HAVE_MEMSET_EXPLICIT@
+# if @REPLACE_MEMSET_EXPLICIT@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef memset_explicit
+# define memset_explicit rpl_memset_explicit
+# endif
+_GL_FUNCDECL_RPL (memset_explicit, void *,
+ (void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (memset_explicit, void *, (void *__dest, int __c, size_t
__n));
+# else
+# if !@HAVE_MEMSET_EXPLICIT@
_GL_FUNCDECL_SYS (memset_explicit, void *,
(void *__dest, int __c, size_t __n) _GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (memset_explicit, void *, (void *__dest, int __c, size_t
__n));
+# endif
_GL_CXXALIASWARN (memset_explicit);
#elif defined GNULIB_POSIXCHECK
# undef memset_explicit
@@ -1419,12 +1429,22 @@ _GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
#endif
#if @GNULIB_STRVERSCMP@
-# if !@HAVE_STRVERSCMP@
+# if @REPLACE_STRVERSCMP@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# define strverscmp rpl_strverscmp
+# endif
+_GL_FUNCDECL_RPL (strverscmp, int, (const char *, const char *)
+ _GL_ATTRIBUTE_PURE
+ _GL_ARG_NONNULL ((1, 2)));
+_GL_CXXALIAS_RPL (strverscmp, int, (const char *, const char *));
+# else
+# if !@HAVE_STRVERSCMP@
_GL_FUNCDECL_SYS (strverscmp, int, (const char *, const char *)
_GL_ATTRIBUTE_PURE
_GL_ARG_NONNULL ((1, 2)));
-# endif
+# endif
_GL_CXXALIAS_SYS (strverscmp, int, (const char *, const char *));
+# endif
_GL_CXXALIASWARN (strverscmp);
#elif defined GNULIB_POSIXCHECK
# undef strverscmp
diff --git a/gnulib/lib/strings.in.h b/gnulib/lib/strings.in.h
index 929329d003..2b3e062a82 100644
--- a/gnulib/lib/strings.in.h
+++ b/gnulib/lib/strings.in.h
@@ -1,6 +1,6 @@
/* A substitute <strings.h>.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/stripslash.c b/gnulib/lib/stripslash.c
index fe46a9c109..c127ce7e63 100644
--- a/gnulib/lib/stripslash.c
+++ b/gnulib/lib/stripslash.c
@@ -1,6 +1,6 @@
/* stripslash.c -- remove redundant trailing slashes from a file name
- Copyright (C) 1990, 2001, 2003-2006, 2009-2023 Free Software Foundation,
+ Copyright (C) 1990, 2001, 2003-2006, 2009-2024 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/strncasecmp.c b/gnulib/lib/strncasecmp.c
index 825ad5b25d..c79161f334 100644
--- a/gnulib/lib/strncasecmp.c
+++ b/gnulib/lib/strncasecmp.c
@@ -1,5 +1,5 @@
/* strncasecmp.c -- case insensitive string comparator
- Copyright (C) 1998-1999, 2005-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 1998-1999, 2005-2007, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/strndup.c b/gnulib/lib/strndup.c
index 5c1f32ff61..abfa017267 100644
--- a/gnulib/lib/strndup.c
+++ b/gnulib/lib/strndup.c
@@ -1,6 +1,6 @@
/* A replacement function, for systems that lack strndup.
- Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2023 Free Software
+ Copyright (C) 1996-1998, 2001-2003, 2005-2007, 2009-2024 Free Software
Foundation, Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/strnlen.c b/gnulib/lib/strnlen.c
index 09c010eac4..80857ec22b 100644
--- a/gnulib/lib/strnlen.c
+++ b/gnulib/lib/strnlen.c
@@ -1,5 +1,5 @@
/* Find the length of STRING, but scan at most MAXLEN characters.
- Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2007, 2009-2024 Free Software Foundation, Inc.
Written by Simon Josefsson.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/strnlen1.c b/gnulib/lib/strnlen1.c
index 25866c5e9f..27c832ad7d 100644
--- a/gnulib/lib/strnlen1.c
+++ b/gnulib/lib/strnlen1.c
@@ -1,5 +1,5 @@
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/strnlen1.h b/gnulib/lib/strnlen1.h
index 02dcd4c4ab..8943f3edff 100644
--- a/gnulib/lib/strnlen1.h
+++ b/gnulib/lib/strnlen1.h
@@ -1,5 +1,5 @@
/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
- Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/strstr.c b/gnulib/lib/strstr.c
index 574f4d5089..7ea2860397 100644
--- a/gnulib/lib/strstr.c
+++ b/gnulib/lib/strstr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2023 Free Software
+/* Copyright (C) 1991-1994, 1996-1998, 2000, 2004, 2007-2024 Free Software
Foundation, Inc.
This file is part of the GNU C Library.
diff --git a/gnulib/lib/sys_random.in.h b/gnulib/lib/sys_random.in.h
index b240033bcb..22f67b1763 100644
--- a/gnulib/lib/sys_random.in.h
+++ b/gnulib/lib/sys_random.in.h
@@ -1,5 +1,5 @@
/* Substitute for <sys/random.h>.
- Copyright (C) 2020-2023 Free Software Foundation, Inc.
+ Copyright (C) 2020-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/sys_stat.in.h b/gnulib/lib/sys_stat.in.h
index 25a539f705..bf08f33536 100644
--- a/gnulib/lib/sys_stat.in.h
+++ b/gnulib/lib/sys_stat.in.h
@@ -1,5 +1,5 @@
/* Provide a more complete sys/stat.h header file.
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/sys_types.in.h b/gnulib/lib/sys_types.in.h
index ea77e140be..4eb2e92696 100644
--- a/gnulib/lib/sys_types.in.h
+++ b/gnulib/lib/sys_types.in.h
@@ -1,6 +1,6 @@
/* Provide a more complete sys/types.h.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -60,6 +60,15 @@
# define _GL_WINDOWS_64_BIT_OFF_T 1
#endif
+/* Define the off64_t type. */
+#if !@HAVE_OFF64_T@
+# if !GNULIB_defined_off64_t
+/* Define off64_t to int64_t always. */
+typedef long long off64_t;
+# define GNULIB_defined_off64_t 1
+# endif
+#endif
+
/* Override dev_t and ino_t if distinguishable inodes support is requested
on native Windows. */
#if @WINDOWS_STAT_INODES@
diff --git a/gnulib/lib/tempname.c b/gnulib/lib/tempname.c
index bf362db6e1..446ddeaef1 100644
--- a/gnulib/lib/tempname.c
+++ b/gnulib/lib/tempname.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2023 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -193,7 +193,7 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
char *XXXXXX;
unsigned int count;
int fd = -1;
- int save_errno = errno;
+ int saved_errno = errno;
/* A lower bound on the number of temporary files to attempt to
generate. The maximum total number of temporary file names that
@@ -258,7 +258,7 @@ try_tempname_len (char *tmpl, int suffixlen, void *args,
fd = tryfunc (tmpl, args);
if (fd >= 0)
{
- __set_errno (save_errno);
+ __set_errno (saved_errno);
return fd;
}
else if (errno != EEXIST)
diff --git a/gnulib/lib/tempname.h b/gnulib/lib/tempname.h
index 36a5138154..7cbdac95de 100644
--- a/gnulib/lib/tempname.h
+++ b/gnulib/lib/tempname.h
@@ -1,6 +1,6 @@
/* Create a temporary file or directory.
- Copyright (C) 2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/time.in.h b/gnulib/lib/time.in.h
index 06824da9d3..df99c8abca 100644
--- a/gnulib/lib/time.in.h
+++ b/gnulib/lib/time.in.h
@@ -1,6 +1,6 @@
/* A more-standard <time.h>.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -154,11 +154,21 @@ _GL_WARN_ON_USE (timespec_get, "timespec_get is
unportable - "
/* Set *TS to the current time resolution, and return BASE.
Upon failure, return 0. */
# if @GNULIB_TIMESPEC_GETRES@
-# if ! @HAVE_TIMESPEC_GETRES@
+# if @REPLACE_TIMESPEC_GETRES@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef timespec_getres
+# define timespec_getres rpl_timespec_getres
+# endif
+_GL_FUNCDECL_RPL (timespec_getres, int, (struct timespec *ts, int base)
+ _GL_ARG_NONNULL ((1)));
+_GL_CXXALIAS_RPL (timespec_getres, int, (struct timespec *ts, int base));
+# else
+# if !@HAVE_TIMESPEC_GETRES@
_GL_FUNCDECL_SYS (timespec_getres, int, (struct timespec *ts, int base)
_GL_ARG_NONNULL ((1)));
-# endif
+# endif
_GL_CXXALIAS_SYS (timespec_getres, int, (struct timespec *ts, int base));
+# endif
_GL_CXXALIASWARN (timespec_getres);
# elif defined GNULIB_POSIXCHECK
# undef timespec_getres
@@ -428,11 +438,7 @@ _GL_CXXALIAS_SYS (ctime, char *, (time_t const *__tp));
_GL_CXXALIASWARN (ctime);
# endif
# elif defined GNULIB_POSIXCHECK
-# undef ctime
-# if HAVE_RAW_DECL_CTIME
-_GL_WARN_ON_USE (ctime, "ctime has portability problems - "
- "use gnulib module ctime for portability");
-# endif
+/* No need to warn about portability, as a more serious warning is below. */
# endif
/* Convert *TP to a date and time string. See
diff --git a/gnulib/lib/uchar.in.h b/gnulib/lib/uchar.in.h
index 1856aec823..166cbeccf8 100644
--- a/gnulib/lib/uchar.in.h
+++ b/gnulib/lib/uchar.in.h
@@ -1,5 +1,5 @@
/* <uchar.h> substitute - 16-bit and 32-bit wide character types.
- Copyright (C) 2019-2023 Free Software Foundation, Inc.
+ Copyright (C) 2019-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/unicase.in.h b/gnulib/lib/unicase.in.h
index 64ab3745c3..bd705baf01 100644
--- a/gnulib/lib/unicase.in.h
+++ b/gnulib/lib/unicase.in.h
@@ -1,5 +1,5 @@
/* Unicode character case mappings.
- Copyright (C) 2002, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/unicase/simple-mapping.h
b/gnulib/lib/unicase/simple-mapping.h
index 6b44fc2e87..6102b76843 100644
--- a/gnulib/lib/unicase/simple-mapping.h
+++ b/gnulib/lib/unicase/simple-mapping.h
@@ -1,5 +1,5 @@
/* Simple case mapping for Unicode characters.
- Copyright (C) 2002, 2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unicase/tolower.c b/gnulib/lib/unicase/tolower.c
index 8c8efa55e6..0a62cd5066 100644
--- a/gnulib/lib/unicase/tolower.c
+++ b/gnulib/lib/unicase/tolower.c
@@ -1,5 +1,5 @@
/* Lowercase mapping for Unicode characters (locale and context independent).
- Copyright (C) 2002, 2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unicase/tolower.h b/gnulib/lib/unicase/tolower.h
index 6fa031c911..9c125f5054 100644
--- a/gnulib/lib/unicase/tolower.h
+++ b/gnulib/lib/unicase/tolower.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Simple character mapping of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/unictype.in.h b/gnulib/lib/unictype.in.h
index bab2aaf97a..fdd2cd1cec 100644
--- a/gnulib/lib/unictype.in.h
+++ b/gnulib/lib/unictype.in.h
@@ -1,5 +1,5 @@
/* Unicode character classification and properties.
- Copyright (C) 2002, 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -640,6 +640,8 @@ extern @GNULIB_UNICTYPE_PROPERTY_ID_CONTINUE_DLL_VARIABLE@
const uc_property_t U
extern @GNULIB_UNICTYPE_PROPERTY_OTHER_ID_CONTINUE_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_OTHER_ID_CONTINUE;
extern @GNULIB_UNICTYPE_PROPERTY_XID_START_DLL_VARIABLE@ const uc_property_t
UC_PROPERTY_XID_START;
extern @GNULIB_UNICTYPE_PROPERTY_XID_CONTINUE_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_XID_CONTINUE;
+extern @GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_ID_COMPAT_MATH_START;
+extern @GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_ID_COMPAT_MATH_CONTINUE;
extern @GNULIB_UNICTYPE_PROPERTY_PATTERN_WHITE_SPACE_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_PATTERN_WHITE_SPACE;
extern @GNULIB_UNICTYPE_PROPERTY_PATTERN_SYNTAX_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_PATTERN_SYNTAX;
/* Shaping and rendering. */
@@ -673,6 +675,7 @@ extern
@GNULIB_UNICTYPE_PROPERTY_ASCII_HEX_DIGIT_DLL_VARIABLE@ const uc_property
extern @GNULIB_UNICTYPE_PROPERTY_IDEOGRAPHIC_DLL_VARIABLE@ const uc_property_t
UC_PROPERTY_IDEOGRAPHIC;
extern @GNULIB_UNICTYPE_PROPERTY_UNIFIED_IDEOGRAPH_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_UNIFIED_IDEOGRAPH;
extern @GNULIB_UNICTYPE_PROPERTY_RADICAL_DLL_VARIABLE@ const uc_property_t
UC_PROPERTY_RADICAL;
+extern @GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_IDS_UNARY_OPERATOR;
extern @GNULIB_UNICTYPE_PROPERTY_IDS_BINARY_OPERATOR_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_IDS_BINARY_OPERATOR;
extern @GNULIB_UNICTYPE_PROPERTY_IDS_TRINARY_OPERATOR_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_IDS_TRINARY_OPERATOR;
/* Emoji. */
@@ -688,6 +691,7 @@ extern @GNULIB_UNICTYPE_PROPERTY_SPACE_DLL_VARIABLE@ const
uc_property_t UC_PROP
extern @GNULIB_UNICTYPE_PROPERTY_NON_BREAK_DLL_VARIABLE@ const uc_property_t
UC_PROPERTY_NON_BREAK;
extern @GNULIB_UNICTYPE_PROPERTY_ISO_CONTROL_DLL_VARIABLE@ const uc_property_t
UC_PROPERTY_ISO_CONTROL;
extern @GNULIB_UNICTYPE_PROPERTY_FORMAT_CONTROL_DLL_VARIABLE@ const
uc_property_t UC_PROPERTY_FORMAT_CONTROL;
+extern @GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK_DLL_VARIABLE@
const uc_property_t UC_PROPERTY_PREPENDED_CONCATENATION_MARK;
extern @GNULIB_UNICTYPE_PROPERTY_DASH_DLL_VARIABLE@ const uc_property_t
UC_PROPERTY_DASH;
extern @GNULIB_UNICTYPE_PROPERTY_HYPHEN_DLL_VARIABLE@ const uc_property_t
UC_PROPERTY_HYPHEN;
extern @GNULIB_UNICTYPE_PROPERTY_PUNCTUATION_DLL_VARIABLE@ const uc_property_t
UC_PROPERTY_PUNCTUATION;
@@ -780,6 +784,10 @@ extern bool uc_is_property_xid_start (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
extern bool uc_is_property_xid_continue (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_id_compat_math_start (ucs4_t uc)
+ _UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_id_compat_math_continue (ucs4_t uc)
+ _UC_ATTRIBUTE_CONST;
extern bool uc_is_property_pattern_white_space (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
extern bool uc_is_property_pattern_syntax (ucs4_t uc)
@@ -838,6 +846,8 @@ extern bool uc_is_property_unified_ideograph (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
extern bool uc_is_property_radical (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_ids_unary_operator (ucs4_t uc)
+ _UC_ATTRIBUTE_CONST;
extern bool uc_is_property_ids_binary_operator (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
extern bool uc_is_property_ids_trinary_operator (ucs4_t uc)
@@ -864,6 +874,8 @@ extern bool uc_is_property_iso_control (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
extern bool uc_is_property_format_control (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
+extern bool uc_is_property_prepended_concatenation_mark (ucs4_t uc)
+ _UC_ATTRIBUTE_CONST;
extern bool uc_is_property_dash (ucs4_t uc)
_UC_ATTRIBUTE_CONST;
extern bool uc_is_property_hyphen (ucs4_t uc)
@@ -909,6 +921,40 @@ extern bool uc_is_property_regional_indicator (ucs4_t uc)
/* ========================================================================= */
+/* Other attributes. */
+
+/* ------------------------------------------------------------------------- */
+
+/* Indic_Conjunct_Break (InCB): from the file DerivedCoreProperties.txt
+ in the Unicode Character Database. */
+
+/* Possible values of the Indic_Conjunct_Break attribute.
+ This enumeration may be extended in the future. */
+enum
+{
+ UC_INDIC_CONJUNCT_BREAK_NONE, /* None */
+ UC_INDIC_CONJUNCT_BREAK_CONSONANT, /* Consonant */
+ UC_INDIC_CONJUNCT_BREAK_LINKER, /* Linker */
+ UC_INDIC_CONJUNCT_BREAK_EXTEND /* Extend */
+};
+
+/* Return the name of an Indic_Conjunct_Break value. */
+extern const char *
+ uc_indic_conjunct_break_name (int indic_conjunct_break)
+ _UC_ATTRIBUTE_CONST;
+
+/* Return the Indic_Conjunct_Break value given by name, e.g. "Consonant". */
+extern int
+ uc_indic_conjunct_break_byname (const char *indic_conjunct_break_name)
+ _UC_ATTRIBUTE_PURE;
+
+/* Return the Indic_Conjunct_Break attribute of a Unicode character. */
+extern int
+ uc_indic_conjunct_break (ucs4_t uc)
+ _UC_ATTRIBUTE_CONST;
+
+/* ========================================================================= */
+
/* Subdivision of the Unicode characters into scripts. */
typedef struct
diff --git a/gnulib/lib/unictype/bitmap.h b/gnulib/lib/unictype/bitmap.h
index 9da85c1126..dba2365516 100644
--- a/gnulib/lib/unictype/bitmap.h
+++ b/gnulib/lib/unictype/bitmap.h
@@ -1,5 +1,5 @@
/* Three-level bitmap lookup.
- Copyright (C) 2000-2002, 2005-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2000-2002, 2005-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2000-2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_alnum.c
b/gnulib/lib/unictype/ctype_alnum.c
index ec11ba3948..1f69c14ada 100644
--- a/gnulib/lib/unictype/ctype_alnum.c
+++ b/gnulib/lib/unictype/ctype_alnum.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_alnum.h
b/gnulib/lib/unictype/ctype_alnum.h
index 4629789862..9e28bb67dc 100644
--- a/gnulib/lib/unictype/ctype_alnum.h
+++ b/gnulib/lib/unictype/ctype_alnum.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -27,7 +27,7 @@ struct
int header[1];
int level1[4];
short level2[4 << 7];
- unsigned int level3[80 << 4];
+ unsigned int level3[81 << 4];
}
u_is_alnum =
{
@@ -413,14 +413,14 @@ u_is_alnum =
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 1216,
- -1,
- -1,
+ 5 + 512 * sizeof (short) / sizeof (int) + 336,
+ 5 + 512 * sizeof (short) / sizeof (int) + 1232,
-1,
-1,
-1,
-1,
5 + 512 * sizeof (short) / sizeof (int) + 336,
- 5 + 512 * sizeof (short) / sizeof (int) + 1232,
+ 5 + 512 * sizeof (short) / sizeof (int) + 1248,
-1,
-1,
5 + 512 * sizeof (short) / sizeof (int) + 336,
@@ -432,7 +432,7 @@ u_is_alnum =
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
- 5 + 512 * sizeof (short) / sizeof (int) + 1248,
+ 5 + 512 * sizeof (short) / sizeof (int) + 1264,
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
@@ -440,7 +440,7 @@ u_is_alnum =
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
- 5 + 512 * sizeof (short) / sizeof (int) + 1264,
+ 5 + 512 * sizeof (short) / sizeof (int) + 1280,
-1,
-1,
-1,
@@ -860,7 +860,11 @@ u_is_alnum =
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
- 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000001U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF0001U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0x3FFFFFFFU, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
0x3FFFFFFFU, 0x00000000U, 0x00000000U, 0x00000000U,
0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
diff --git a/gnulib/lib/unictype/ctype_alpha.c
b/gnulib/lib/unictype/ctype_alpha.c
index cd3629ba5e..16cddc9204 100644
--- a/gnulib/lib/unictype/ctype_alpha.c
+++ b/gnulib/lib/unictype/ctype_alpha.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_alpha.h
b/gnulib/lib/unictype/ctype_alpha.h
index 91a5e82257..7709886b17 100644
--- a/gnulib/lib/unictype/ctype_alpha.h
+++ b/gnulib/lib/unictype/ctype_alpha.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -27,7 +27,7 @@ struct
int header[1];
int level1[4];
short level2[4 << 7];
- unsigned int level3[80 << 4];
+ unsigned int level3[81 << 4];
}
u_is_alpha =
{
@@ -413,14 +413,14 @@ u_is_alpha =
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 1216,
- -1,
- -1,
+ 5 + 512 * sizeof (short) / sizeof (int) + 336,
+ 5 + 512 * sizeof (short) / sizeof (int) + 1232,
-1,
-1,
-1,
-1,
5 + 512 * sizeof (short) / sizeof (int) + 336,
- 5 + 512 * sizeof (short) / sizeof (int) + 1232,
+ 5 + 512 * sizeof (short) / sizeof (int) + 1248,
-1,
-1,
5 + 512 * sizeof (short) / sizeof (int) + 336,
@@ -432,7 +432,7 @@ u_is_alpha =
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
- 5 + 512 * sizeof (short) / sizeof (int) + 1248,
+ 5 + 512 * sizeof (short) / sizeof (int) + 1264,
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
@@ -440,7 +440,7 @@ u_is_alpha =
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
5 + 512 * sizeof (short) / sizeof (int) + 336,
- 5 + 512 * sizeof (short) / sizeof (int) + 1264,
+ 5 + 512 * sizeof (short) / sizeof (int) + 1280,
-1,
-1,
-1,
@@ -860,7 +860,11 @@ u_is_alpha =
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
- 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000001U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF0001U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0x3FFFFFFFU, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
0x3FFFFFFFU, 0x00000000U, 0x00000000U, 0x00000000U,
0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
diff --git a/gnulib/lib/unictype/ctype_blank.c
b/gnulib/lib/unictype/ctype_blank.c
index 29931929b8..cec8e023ca 100644
--- a/gnulib/lib/unictype/ctype_blank.c
+++ b/gnulib/lib/unictype/ctype_blank.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_blank.h
b/gnulib/lib/unictype/ctype_blank.h
index 5ed5fbbed8..5ba76c72d6 100644
--- a/gnulib/lib/unictype/ctype_blank.h
+++ b/gnulib/lib/unictype/ctype_blank.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/unictype/ctype_cntrl.c
b/gnulib/lib/unictype/ctype_cntrl.c
index a847a55f81..6ed527399c 100644
--- a/gnulib/lib/unictype/ctype_cntrl.c
+++ b/gnulib/lib/unictype/ctype_cntrl.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_cntrl.h
b/gnulib/lib/unictype/ctype_cntrl.h
index c1c179418c..8eb1651362 100644
--- a/gnulib/lib/unictype/ctype_cntrl.h
+++ b/gnulib/lib/unictype/ctype_cntrl.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/unictype/ctype_digit.c
b/gnulib/lib/unictype/ctype_digit.c
index 18956a51dd..906e73756b 100644
--- a/gnulib/lib/unictype/ctype_digit.c
+++ b/gnulib/lib/unictype/ctype_digit.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_digit.h
b/gnulib/lib/unictype/ctype_digit.h
index 3111b9ade1..4421f6f4b6 100644
--- a/gnulib/lib/unictype/ctype_digit.h
+++ b/gnulib/lib/unictype/ctype_digit.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/unictype/ctype_graph.c
b/gnulib/lib/unictype/ctype_graph.c
index a3674c95ce..e58f69e4d0 100644
--- a/gnulib/lib/unictype/ctype_graph.c
+++ b/gnulib/lib/unictype/ctype_graph.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_graph.h
b/gnulib/lib/unictype/ctype_graph.h
index d95722e1a3..bb5281b962 100644
--- a/gnulib/lib/unictype/ctype_graph.h
+++ b/gnulib/lib/unictype/ctype_graph.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -27,7 +27,7 @@ struct
int header[1];
int level1[17];
short level2[6 << 7];
- unsigned int level3[89 << 4];
+ unsigned int level3[90 << 4];
}
u_is_graph =
{
@@ -426,14 +426,14 @@ u_is_graph =
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 1328,
- -1,
- -1,
+ 18 + 768 * sizeof (short) / sizeof (int) + 160,
+ 18 + 768 * sizeof (short) / sizeof (int) + 1344,
-1,
-1,
-1,
-1,
18 + 768 * sizeof (short) / sizeof (int) + 160,
- 18 + 768 * sizeof (short) / sizeof (int) + 1344,
+ 18 + 768 * sizeof (short) / sizeof (int) + 1360,
-1,
-1,
18 + 768 * sizeof (short) / sizeof (int) + 160,
@@ -445,7 +445,7 @@ u_is_graph =
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
- 18 + 768 * sizeof (short) / sizeof (int) + 1360,
+ 18 + 768 * sizeof (short) / sizeof (int) + 1376,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
@@ -453,7 +453,7 @@ u_is_graph =
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
- 18 + 768 * sizeof (short) / sizeof (int) + 1376,
+ 18 + 768 * sizeof (short) / sizeof (int) + 1392,
-1,
-1,
-1,
@@ -564,7 +564,7 @@ u_is_graph =
-1,
-1,
-1,
- 18 + 768 * sizeof (short) / sizeof (int) + 1392,
+ 18 + 768 * sizeof (short) / sizeof (int) + 1408,
-1,
-1,
-1,
@@ -819,7 +819,7 @@ u_is_graph =
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
- 18 + 768 * sizeof (short) / sizeof (int) + 1408
+ 18 + 768 * sizeof (short) / sizeof (int) + 1424
},
{
0x00000000U, 0xFFFFFFFEU, 0xFFFFFFFFU, 0x7FFFFFFFU,
@@ -905,11 +905,11 @@ u_is_graph =
0xFFFFFFFFU, 0xFFFFFFFFU, 0x3FFFFFFFU, 0x00000000U,
0xFBFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x000FFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
- 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x0FFF0000U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0xFFFF0000U,
0xFFFFFFFEU, 0xFFFFFFFFU, 0xFFFFFFFEU, 0xFFFFFFFFU,
0xFE7FFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFE0U, 0xFFFEFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
- 0xFFFF7FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF000FU,
+ 0xFFFF7FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF800FU,
0x7FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
@@ -1157,7 +1157,11 @@ u_is_graph =
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
- 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000001U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF0001U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0x3FFFFFFFU, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
0x3FFFFFFFU, 0x00000000U, 0x00000000U, 0x00000000U,
0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
diff --git a/gnulib/lib/unictype/ctype_lower.c
b/gnulib/lib/unictype/ctype_lower.c
index 750b7db0fd..76c67635df 100644
--- a/gnulib/lib/unictype/ctype_lower.c
+++ b/gnulib/lib/unictype/ctype_lower.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_lower.h
b/gnulib/lib/unictype/ctype_lower.h
index c487a16922..6bde4107d2 100644
--- a/gnulib/lib/unictype/ctype_lower.h
+++ b/gnulib/lib/unictype/ctype_lower.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/unictype/ctype_print.c
b/gnulib/lib/unictype/ctype_print.c
index aa657666d7..5e73e42db5 100644
--- a/gnulib/lib/unictype/ctype_print.c
+++ b/gnulib/lib/unictype/ctype_print.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_print.h
b/gnulib/lib/unictype/ctype_print.h
index 7dce963ef5..d5d6a2a7a8 100644
--- a/gnulib/lib/unictype/ctype_print.h
+++ b/gnulib/lib/unictype/ctype_print.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -27,7 +27,7 @@ struct
int header[1];
int level1[17];
short level2[6 << 7];
- unsigned int level3[89 << 4];
+ unsigned int level3[90 << 4];
}
u_is_print =
{
@@ -426,14 +426,14 @@ u_is_print =
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 1328,
- -1,
- -1,
+ 18 + 768 * sizeof (short) / sizeof (int) + 160,
+ 18 + 768 * sizeof (short) / sizeof (int) + 1344,
-1,
-1,
-1,
-1,
18 + 768 * sizeof (short) / sizeof (int) + 160,
- 18 + 768 * sizeof (short) / sizeof (int) + 1344,
+ 18 + 768 * sizeof (short) / sizeof (int) + 1360,
-1,
-1,
18 + 768 * sizeof (short) / sizeof (int) + 160,
@@ -445,7 +445,7 @@ u_is_print =
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
- 18 + 768 * sizeof (short) / sizeof (int) + 1360,
+ 18 + 768 * sizeof (short) / sizeof (int) + 1376,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
@@ -453,7 +453,7 @@ u_is_print =
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
- 18 + 768 * sizeof (short) / sizeof (int) + 1376,
+ 18 + 768 * sizeof (short) / sizeof (int) + 1392,
-1,
-1,
-1,
@@ -564,7 +564,7 @@ u_is_print =
-1,
-1,
-1,
- 18 + 768 * sizeof (short) / sizeof (int) + 1392,
+ 18 + 768 * sizeof (short) / sizeof (int) + 1408,
-1,
-1,
-1,
@@ -819,7 +819,7 @@ u_is_print =
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
18 + 768 * sizeof (short) / sizeof (int) + 160,
- 18 + 768 * sizeof (short) / sizeof (int) + 1408
+ 18 + 768 * sizeof (short) / sizeof (int) + 1424
},
{
0x00000000U, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x7FFFFFFFU,
@@ -905,11 +905,11 @@ u_is_print =
0xFFFFFFFFU, 0xFFFFFFFFU, 0x3FFFFFFFU, 0x00000000U,
0xFBFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x000FFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
- 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x0FFF0000U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0xFFFF0000U,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFEU, 0xFFFFFFFFU,
0xFE7FFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFE0U, 0xFFFEFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
- 0xFFFF7FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF000FU,
+ 0xFFFF7FFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF800FU,
0x7FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
@@ -1157,7 +1157,11 @@ u_is_print =
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
- 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x00000001U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFF0001U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0x3FFFFFFFU, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
+ 0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
0x3FFFFFFFU, 0x00000000U, 0x00000000U, 0x00000000U,
0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
diff --git a/gnulib/lib/unictype/ctype_punct.c
b/gnulib/lib/unictype/ctype_punct.c
index 76e4594bc3..3991feed31 100644
--- a/gnulib/lib/unictype/ctype_punct.c
+++ b/gnulib/lib/unictype/ctype_punct.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_punct.h
b/gnulib/lib/unictype/ctype_punct.h
index 22f66f0139..6a0f287884 100644
--- a/gnulib/lib/unictype/ctype_punct.h
+++ b/gnulib/lib/unictype/ctype_punct.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -653,11 +653,11 @@ u_is_punct =
0xFFFFFFFFU, 0xFFFF7FFFU, 0x3FFFFFFFU, 0x00000000U,
0xFBFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0x000FFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
- 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0x0FFF0000U,
+ 0xFFFFFFFFU, 0xFFFFFFFFU, 0x003FFFFFU, 0xFFFF0000U,
0xFFFFFF1EU, 0xE0C1FC01U, 0x00000000U, 0x00000000U,
0x1E000000U, 0x00000001U, 0x00000000U, 0x08000000U,
0x00000000U, 0x00000000U, 0x00000000U, 0x00000000U,
- 0xFFFF0000U, 0x00000000U, 0xFFFFFFFFU, 0x0000000FU,
+ 0xFFFF0000U, 0x00000000U, 0xFFFFFFFFU, 0x0000800FU,
0x7FFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU, 0xFFFFFFFFU,
diff --git a/gnulib/lib/unictype/ctype_space.c
b/gnulib/lib/unictype/ctype_space.c
index 39cfe4ed5f..cdfe54d99a 100644
--- a/gnulib/lib/unictype/ctype_space.c
+++ b/gnulib/lib/unictype/ctype_space.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_space.h
b/gnulib/lib/unictype/ctype_space.h
index 69521a5a0c..89e3a329e6 100644
--- a/gnulib/lib/unictype/ctype_space.h
+++ b/gnulib/lib/unictype/ctype_space.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/unictype/ctype_upper.c
b/gnulib/lib/unictype/ctype_upper.c
index b74486171f..02110cc6af 100644
--- a/gnulib/lib/unictype/ctype_upper.c
+++ b/gnulib/lib/unictype/ctype_upper.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_upper.h
b/gnulib/lib/unictype/ctype_upper.h
index dbe1da4d54..d9259bf80d 100644
--- a/gnulib/lib/unictype/ctype_upper.h
+++ b/gnulib/lib/unictype/ctype_upper.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/unictype/ctype_xdigit.c
b/gnulib/lib/unictype/ctype_xdigit.c
index cd067269b2..1e5a162704 100644
--- a/gnulib/lib/unictype/ctype_xdigit.c
+++ b/gnulib/lib/unictype/ctype_xdigit.c
@@ -1,5 +1,5 @@
/* ISO C <ctype.h> like properties of Unicode characters.
- Copyright (C) 2002, 2006-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2006-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unictype/ctype_xdigit.h
b/gnulib/lib/unictype/ctype_xdigit.h
index 1438f94f8b..02d9c2dfc4 100644
--- a/gnulib/lib/unictype/ctype_xdigit.h
+++ b/gnulib/lib/unictype/ctype_xdigit.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* ISO C <ctype.h> like properties of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2023 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/uninorm.in.h b/gnulib/lib/uninorm.in.h
index 0698246ac7..a7f6ec3a76 100644
--- a/gnulib/lib/uninorm.in.h
+++ b/gnulib/lib/uninorm.in.h
@@ -1,5 +1,5 @@
/* Normalization forms (composition and decomposition) of Unicode strings.
- Copyright (C) 2001-2002, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2009.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/unistd.c b/gnulib/lib/unistd.c
index be7a825503..f3b3f7bd2f 100644
--- a/gnulib/lib/unistd.c
+++ b/gnulib/lib/unistd.c
@@ -1,6 +1,6 @@
/* Inline functions for <unistd.h>.
- Copyright (C) 2012-2023 Free Software Foundation, Inc.
+ Copyright (C) 2012-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -18,5 +18,5 @@
#include <config.h>
#define _GL_UNISTD_INLINE _GL_EXTERN_INLINE
-#include "unistd.h"
+#include <unistd.h>
typedef int dummy;
diff --git a/gnulib/lib/unistd.in.h b/gnulib/lib/unistd.in.h
index 2ae040a76b..e01629af25 100644
--- a/gnulib/lib/unistd.in.h
+++ b/gnulib/lib/unistd.in.h
@@ -1,5 +1,5 @@
/* Substitute for and wrapper around <unistd.h>.
- Copyright (C) 2003-2023 Free Software Foundation, Inc.
+ Copyright (C) 2003-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -159,8 +159,9 @@
#endif
/* MSVC defines off_t in <sys/types.h>.
- May also define off_t to a 64-bit type on native Windows. */
-/* Get off_t, ssize_t, mode_t. */
+ May also define off_t to a 64-bit type on native Windows.
+ Also defines off64_t on macOS, NetBSD, OpenBSD, MSVC, Cygwin, Haiku. */
+/* Get off_t, off64_t, ssize_t, mode_t. */
#include <sys/types.h>
/* The definitions of _GL_FUNCDECL_RPL etc. are copied here. */
@@ -971,23 +972,28 @@ _GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
Return 0 if successful, otherwise -1 and errno set.
See the POSIX:2008 specification
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/fchdir.html>.
*/
-# if ! @HAVE_FCHDIR@
+# if @REPLACE_FCHDIR@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef fchdir
+# define fchdir rpl_fchdir
+# endif
+_GL_FUNCDECL_RPL (fchdir, int, (int /*fd*/));
+_GL_CXXALIAS_RPL (fchdir, int, (int /*fd*/));
+# else
+# if !@HAVE_FCHDIR@ || !@HAVE_DECL_FCHDIR@
_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
-
+# endif
+_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
+# endif
+_GL_CXXALIASWARN (fchdir);
+# if @REPLACE_FCHDIR@ || !@HAVE_FCHDIR@
/* Gnulib internal hooks needed to maintain the fchdir metadata. */
_GL_EXTERN_C int _gl_register_fd (int fd, const char *filename)
_GL_ARG_NONNULL ((2));
_GL_EXTERN_C void _gl_unregister_fd (int fd);
_GL_EXTERN_C int _gl_register_dup (int oldfd, int newfd);
_GL_EXTERN_C const char *_gl_directory_name (int fd);
-
-# else
-# if !@HAVE_DECL_FCHDIR@
-_GL_FUNCDECL_SYS (fchdir, int, (int /*fd*/));
-# endif
# endif
-_GL_CXXALIAS_SYS (fchdir, int, (int /*fd*/));
-_GL_CXXALIASWARN (fchdir);
#elif defined GNULIB_POSIXCHECK
# undef fchdir
# if HAVE_RAW_DECL_FCHDIR
@@ -1113,10 +1119,10 @@ _GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
or SIZE was too small.
See the POSIX:2008 specification
<https://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html>.
- Additionally, the gnulib module 'getcwd' guarantees the following GNU
- extension: If BUF is NULL, an array is allocated with 'malloc'; the array
- is SIZE bytes long, unless SIZE == 0, in which case it is as big as
- necessary. */
+ Additionally, the gnulib module 'getcwd' or 'getcwd-lgpl' guarantees the
+ following GNU extension: If BUF is NULL, an array is allocated with
+ 'malloc'; the array is SIZE bytes long, unless SIZE == 0, in which case
+ it is as big as necessary. */
# if @REPLACE_GETCWD@
# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
# define getcwd rpl_getcwd
@@ -1525,12 +1531,21 @@ _GL_CXXALIASWARN (getpid);
#if @GNULIB_GETUSERSHELL@
+# if @REPLACE_GETUSERSHELL@
/* Return the next valid login shell on the system, or NULL when the end of
the list has been reached. */
-# if !@HAVE_DECL_GETUSERSHELL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef getusershell
+# define getusershell rpl_getusershell
+# endif
+_GL_FUNCDECL_RPL (getusershell, char *, (void));
+_GL_CXXALIAS_RPL (getusershell, char *, (void));
+# else
+# if !@HAVE_DECL_GETUSERSHELL@
_GL_FUNCDECL_SYS (getusershell, char *, (void));
-# endif
+# endif
_GL_CXXALIAS_SYS (getusershell, char *, (void));
+# endif
_GL_CXXALIASWARN (getusershell);
#elif defined GNULIB_POSIXCHECK
# undef getusershell
@@ -1542,10 +1557,19 @@ _GL_WARN_ON_USE (getusershell, "getusershell is
unportable - "
#if @GNULIB_GETUSERSHELL@
/* Rewind to pointer that is advanced at each getusershell() call. */
-# if !@HAVE_DECL_GETUSERSHELL@
+# if @REPLACE_GETUSERSHELL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef setusershell
+# define setusershell rpl_setusershell
+# endif
+_GL_FUNCDECL_RPL (setusershell, void, (void));
+_GL_CXXALIAS_RPL (setusershell, void, (void));
+# else
+# if !@HAVE_DECL_GETUSERSHELL@
_GL_FUNCDECL_SYS (setusershell, void, (void));
-# endif
+# endif
_GL_CXXALIAS_SYS (setusershell, void, (void));
+# endif
_GL_CXXALIASWARN (setusershell);
#elif defined GNULIB_POSIXCHECK
# undef setusershell
@@ -1558,10 +1582,19 @@ _GL_WARN_ON_USE (setusershell, "setusershell is
unportable - "
#if @GNULIB_GETUSERSHELL@
/* Free the pointer that is advanced at each getusershell() call and
associated resources. */
-# if !@HAVE_DECL_GETUSERSHELL@
+# if @REPLACE_GETUSERSHELL@
+# if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+# undef endusershell
+# define endusershell rpl_endusershell
+# endif
+_GL_FUNCDECL_RPL (endusershell, void, (void));
+_GL_CXXALIAS_RPL (endusershell, void, (void));
+# else
+# if !@HAVE_DECL_GETUSERSHELL@
_GL_FUNCDECL_SYS (endusershell, void, (void));
-# endif
+# endif
_GL_CXXALIAS_SYS (endusershell, void, (void));
+# endif
_GL_CXXALIASWARN (endusershell);
#elif defined GNULIB_POSIXCHECK
# undef endusershell
@@ -1928,11 +1961,7 @@ _GL_CXXALIASWARN (read);
# undef read
# define read _read
# endif
-# ifdef __MINGW32__
-_GL_CXXALIAS_MDA (read, int, (int fd, void *buf, unsigned int count));
-# else
-_GL_CXXALIAS_MDA (read, ssize_t, (int fd, void *buf, unsigned int count));
-# endif
+_GL_CXXALIAS_MDA_CAST (read, ssize_t, (int fd, void *buf, unsigned int count));
# else
_GL_CXXALIAS_SYS (read, ssize_t, (int fd, void *buf, size_t count));
# endif
@@ -2396,11 +2425,7 @@ _GL_CXXALIASWARN (write);
# undef write
# define write _write
# endif
-# ifdef __MINGW32__
-_GL_CXXALIAS_MDA (write, int, (int fd, const void *buf, unsigned int count));
-# else
-_GL_CXXALIAS_MDA (write, ssize_t, (int fd, const void *buf, unsigned int
count));
-# endif
+_GL_CXXALIAS_MDA_CAST (write, ssize_t, (int fd, const void *buf, unsigned int
count));
# else
_GL_CXXALIAS_SYS (write, ssize_t, (int fd, const void *buf, size_t count));
# endif
diff --git a/gnulib/lib/unitypes.in.h b/gnulib/lib/unitypes.in.h
index d3a4c67a19..16010d3796 100644
--- a/gnulib/lib/unitypes.in.h
+++ b/gnulib/lib/unitypes.in.h
@@ -1,5 +1,5 @@
/* Elementary types and macros for the GNU UniString library.
- Copyright (C) 2002, 2005-2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005-2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,6 +20,11 @@
/* Get uint8_t, uint16_t, uint32_t. */
#include <stdint.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* Type representing a Unicode character. */
typedef uint32_t ucs4_t;
@@ -58,4 +63,9 @@ typedef uint32_t ucs4_t;
# endif
#endif
+
+#ifdef __cplusplus
+}
+#endif
+
#endif /* _UNITYPES_H */
diff --git a/gnulib/lib/uniwidth.in.h b/gnulib/lib/uniwidth.in.h
index 66829e459d..58bfe9c1ea 100644
--- a/gnulib/lib/uniwidth.in.h
+++ b/gnulib/lib/uniwidth.in.h
@@ -1,5 +1,5 @@
/* Display width functions.
- Copyright (C) 2001-2002, 2005, 2007, 2009-2023 Free Software Foundation,
+ Copyright (C) 2001-2002, 2005, 2007, 2009-2024 Free Software Foundation,
Inc.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/uniwidth/cjk.h b/gnulib/lib/uniwidth/cjk.h
index 98f7e92669..5fab365f97 100644
--- a/gnulib/lib/uniwidth/cjk.h
+++ b/gnulib/lib/uniwidth/cjk.h
@@ -1,5 +1,5 @@
/* Test for CJK encoding.
- Copyright (C) 2001-2002, 2005-2007, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2005-2007, 2009-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/uniwidth/width.c b/gnulib/lib/uniwidth/width.c
index c9d4d1dfe6..4942aa1e78 100644
--- a/gnulib/lib/uniwidth/width.c
+++ b/gnulib/lib/uniwidth/width.c
@@ -1,5 +1,5 @@
/* Determine display width of Unicode character.
- Copyright (C) 2001-2002, 2006-2023 Free Software Foundation, Inc.
+ Copyright (C) 2001-2002, 2006-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2002.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/uniwidth/width0.h b/gnulib/lib/uniwidth/width0.h
index 0c1713ac52..6cc35536ad 100644
--- a/gnulib/lib/uniwidth/width0.h
+++ b/gnulib/lib/uniwidth/width0.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Table of non-spacing or control characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2022 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -46,19 +46,19 @@ static const unsigned char nonspacing_table_data[48*64] = {
0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, /* 0x0580-0x05bf */
0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x05c0-0x05ff */
/* 0x0600-0x07ff */
- 0x3f, 0x00, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, /* 0x0600-0x063f */
+ 0x00, 0x00, 0xff, 0x17, 0x00, 0x00, 0x00, 0x00, /* 0x0600-0x063f */
0x00, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x01, 0x00, /* 0x0640-0x067f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0680-0x06bf */
- 0x00, 0x00, 0xc0, 0xbf, 0x9f, 0x3d, 0x00, 0x00, /* 0x06c0-0x06ff */
- 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x0700-0x073f */
+ 0x00, 0x00, 0xc0, 0x9f, 0x9f, 0x3d, 0x00, 0x00, /* 0x06c0-0x06ff */
+ 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x0700-0x073f */
0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0740-0x077f */
0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, /* 0x0780-0x07bf */
0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x20, /* 0x07c0-0x07ff */
/* 0x0800-0x09ff */
0x00, 0x00, 0xc0, 0xfb, 0xef, 0x3e, 0x00, 0x00, /* 0x0800-0x083f */
0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, /* 0x0840-0x087f */
- 0x00, 0x00, 0x03, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */
- 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x08c0-0x08ff */
+ 0x00, 0x00, 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */
+ 0x00, 0xfc, 0xff, 0xff, 0xfb, 0xff, 0xff, 0xff, /* 0x08c0-0x08ff */
0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x14, /* 0x0900-0x093f */
0xfe, 0x21, 0xfe, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0940-0x097f */
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0980-0x09bf */
@@ -273,8 +273,8 @@ static const unsigned char nonspacing_table_data[48*64] = {
/* 0x11000-0x111ff */
0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, /* 0x11000-0x1103f */
0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x19, 0x80, /* 0x11040-0x1107f */
- 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x26, /* 0x11080-0x110bf */
- 0x04, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x110c0-0x110ff */
+ 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x06, /* 0x11080-0x110bf */
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x110c0-0x110ff */
0x07, 0x00, 0x00, 0x00, 0x80, 0xef, 0x1f, 0x00, /* 0x11100-0x1113f */
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, /* 0x11140-0x1117f */
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, /* 0x11180-0x111bf */
diff --git a/gnulib/lib/uniwidth/width2.h b/gnulib/lib/uniwidth/width2.h
index 19c8c02a51..47979b5d7e 100644
--- a/gnulib/lib/uniwidth/width2.h
+++ b/gnulib/lib/uniwidth/width2.h
@@ -1,8 +1,8 @@
/* DO NOT EDIT! GENERATED AUTOMATICALLY! */
/* Width 2 property of Unicode characters. */
-/* Generated automatically by gen-uni-tables.c for Unicode 15.0.0. */
+/* Generated automatically by gen-uni-tables.c for Unicode 15.1.0. */
-/* Copyright (C) 2000-2022 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/vasnprintf.c b/gnulib/lib/vasnprintf.c
index 2d9aa977ec..ac8dc8619e 100644
--- a/gnulib/lib/vasnprintf.c
+++ b/gnulib/lib/vasnprintf.c
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 1999, 2002-2023 Free Software Foundation, Inc.
+ Copyright (C) 1999, 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 Lesser General Public License as
@@ -86,7 +86,7 @@
#include <wchar.h> /* mbstate_t, mbrtowc(), mbrlen(), wcrtomb(),
mbszero() */
#include <errno.h> /* errno */
#include <limits.h> /* CHAR_BIT, INT_WIDTH, LONG_WIDTH */
-#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
+#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP, LDBL_MANT_DIG */
#if HAVE_NL_LANGINFO
# include <langinfo.h>
#endif
@@ -294,7 +294,7 @@ local_wcsnlen (const wchar_t *s, size_t maxlen)
static size_t
wctomb_fallback (char *s, wchar_t wc)
{
- static char hex[16] = "0123456789ABCDEF";
+ static char const hex[16] = "0123456789ABCDEF";
s[0] = '\\';
if (sizeof (wchar_t) > 2 && wc > 0xffff)
@@ -406,8 +406,45 @@ is_infinite_or_zerol (long double x)
#endif
+#if NEED_PRINTF_LONG_DOUBLE
+
+/* Like frexpl, except that it supports even "unsupported" numbers. */
+# if (LDBL_MANT_DIG == 64 && (defined __ia64 || (defined __x86_64__ || defined
__amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined
_M_IX86 || defined _X86_))) && (defined __APPLE__ && defined __MACH__)
+/* Don't assume that frexpl can handle pseudo-denormals; it does not on
+ macOS 12/x86_64. Therefore test for a pseudo-denormal explicitly. */
+
+static
+long double safe_frexpl (long double x, int *exp)
+{
+ union
+ {
+ long double value;
+ struct { unsigned int mant_word[2]; unsigned short sign_exp_word; } r;
+ }
+ u;
+ u.value = x;
+ if (u.r.sign_exp_word == 0 && (u.r.mant_word[1] & 0x80000000u) != 0)
+ {
+ /* Pseudo-Denormal. */
+ *exp = LDBL_MIN_EXP;
+ u.r.sign_exp_word = 1 - LDBL_MIN_EXP;
+ return u.value;
+ }
+ else
+ return frexpl (x, exp);
+}
+
+# else
+# define safe_frexpl frexpl
+# endif
+
+#endif
+
#if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE
+/* An indicator for a failed memory allocation. */
+# define NOMEM_PTR ((void *) (-1))
+
/* Converting 'long double' to decimal without rare rounding bugs requires
real bignums. We use the naming conventions of GNU gmp, but vastly simpler
(and slower) algorithms. */
@@ -428,8 +465,8 @@ typedef struct
} mpn_t;
/* Compute the product of two bignums >= 0.
- Return the allocated memory in case of success, NULL in case of memory
- allocation failure. */
+ Return the allocated memory (possibly NULL) in case of success, NOMEM_PTR
+ in case of memory allocation failure. */
static void *
multiply (mpn_t src1, mpn_t src2, mpn_t *dest)
{
@@ -457,7 +494,7 @@ multiply (mpn_t src1, mpn_t src2, mpn_t *dest)
{
/* src1 or src2 is zero. */
dest->nlimbs = 0;
- dest->limbs = (mp_limb_t *) malloc (1);
+ dest->limbs = NULL;
}
else
{
@@ -469,7 +506,7 @@ multiply (mpn_t src1, mpn_t src2, mpn_t *dest)
dlen = len1 + len2;
dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t));
if (dp == NULL)
- return NULL;
+ return NOMEM_PTR;
for (k = len2; k > 0; )
dp[--k] = 0;
for (i = 0; i < len1; i++)
@@ -500,8 +537,8 @@ multiply (mpn_t src1, mpn_t src2, mpn_t *dest)
the remainder.
Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd,
q is incremented.
- Return the allocated memory in case of success, NULL in case of memory
- allocation failure. */
+ Return the allocated memory (possibly NULL) in case of success, NOMEM_PTR
+ in case of memory allocation failure. */
static void *
divide (mpn_t a, mpn_t b, mpn_t *q)
{
@@ -572,7 +609,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q)
final rounding of q.) */
roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t));
if (roomptr == NULL)
- return NULL;
+ return NOMEM_PTR;
/* Normalise a. */
while (a_len > 0 && a_ptr[a_len - 1] == 0)
@@ -708,7 +745,7 @@ divide (mpn_t a, mpn_t b, mpn_t *q)
if (tmp_roomptr == NULL)
{
free (roomptr);
- return NULL;
+ return NOMEM_PTR;
}
{
const mp_limb_t *sourceptr = b_ptr;
@@ -1015,7 +1052,7 @@ decode_long_double (long double x, int *ep, mpn_t *mp)
if (m.limbs == NULL)
return NULL;
/* Split into exponential part and mantissa. */
- y = frexpl (x, &exp);
+ y = safe_frexpl (x, &exp);
if (!(y >= 0.0L && y < 1.0L))
abort ();
/* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * 2^LDBL_MANT_BIT), and the
@@ -1306,7 +1343,7 @@ scale10_round_decimal_decoded (int e, mpn_t m, void
*memory, int n)
mpn_t denominator;
void *tmp_memory;
tmp_memory = multiply (m, pow5, &numerator);
- if (tmp_memory == NULL)
+ if (tmp_memory == NOMEM_PTR)
{
free (pow5_ptr);
free (memory);
@@ -1379,7 +1416,7 @@ scale10_round_decimal_decoded (int e, mpn_t m, void
*memory, int n)
/* Here y = round (x * 10^n) = z * 10^extra_zeroes. */
- if (z_memory == NULL)
+ if (z_memory == NOMEM_PTR)
return NULL;
digits = convert_to_decimal (z, extra_zeroes);
free (z_memory);
@@ -1442,7 +1479,7 @@ floorlog10l (long double x)
double l;
/* Split into exponential part and mantissa. */
- y = frexpl (x, &exp);
+ y = safe_frexpl (x, &exp);
if (!(y >= 0.0L && y < 1.0L))
abort ();
if (y == 0.0L)
@@ -2335,6 +2372,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
if (dp->conversion == 'n')
{
+#if NEED_PRINTF_WITH_N_DIRECTIVE
switch (a.arg[dp->arg_index].type)
{
case TYPE_COUNT_SCHAR_POINTER:
@@ -2379,6 +2417,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
default:
abort ();
}
+#else
+ abort ();
+#endif
}
#if ENABLE_UNISTDIO
/* The unistdio extensions. */
@@ -3424,21 +3465,18 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
{
/* Count the number of bytes. */
characters = 0;
- if (arg != 0)
- {
- char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
- int count;
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
- mbstate_t state;
- mbszero (&state);
+ mbstate_t state;
+ mbszero (&state);
# endif
- count = local_wcrtomb (cbuf, arg, &state);
- if (count < 0)
- /* Cannot convert. */
- goto fail_with_EILSEQ;
- characters = count;
- }
+ count = local_wcrtomb (cbuf, arg, &state);
+ if (count < 0)
+ /* Cannot convert. */
+ goto fail_with_EILSEQ;
+ characters = count;
}
# if DCHAR_IS_TCHAR
else
@@ -3450,7 +3488,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
# if !DCHAR_IS_TCHAR
/* Convert the string into a piece of temporary memory. */
- if (characters > 0) /* implies arg != 0 */
+ if (characters > 0)
{
char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
int count;
@@ -3507,7 +3545,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
{
/* We know the number of bytes in advance. */
ENSURE_ALLOCATION (xsum (length, characters));
- if (characters > 0) /* implies arg != 0 */
+ if (characters > 0)
{
int count;
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
@@ -3524,23 +3562,20 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
else
{
- if (arg != 0)
- {
- char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
- int count;
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
- mbstate_t state;
- mbszero (&state);
+ mbstate_t state;
+ mbszero (&state);
# endif
- count = local_wcrtomb (cbuf, arg, &state);
- if (count < 0)
- /* Cannot convert. */
- goto fail_with_EILSEQ;
- ENSURE_ALLOCATION (xsum (length, count));
- memcpy (result + length, cbuf, count);
- length += count;
- }
+ count = local_wcrtomb (cbuf, arg, &state);
+ if (count < 0)
+ /* Cannot convert. */
+ goto fail_with_EILSEQ;
+ ENSURE_ALLOCATION (xsum (length, count));
+ memcpy (result + length, cbuf, count);
+ length += count;
}
# else
ENSURE_ALLOCATION_ELSE (xsum (length, tmpdst_len),
@@ -5622,24 +5657,24 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
{
arg_type type = a.arg[dp->arg_index].type;
int flags = dp->flags;
-#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int has_width;
#endif
-#if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 ||
USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 ||
USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
size_t width;
#endif
-#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) ||
!HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION &&
MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST
|| NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) ||
!HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION &&
MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST
|| NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
int has_precision;
size_t precision;
#endif
-#if NEED_PRINTF_UNBOUNDED_PRECISION
+#if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int prec_ourselves;
#else
# define prec_ourselves 0
#endif
#if (WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST
# define pad_ourselves 1
-#elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
int pad_ourselves;
#else
# define pad_ourselves 0
@@ -5654,10 +5689,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
TCHAR_T *tmp;
#endif
-#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_width = 0;
#endif
-#if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 ||
USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || WIDE_CHAR_VERSION || !HAVE_SNPRINTF_RETVAL_C99 ||
USE_MSVC__SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
width = 0;
if (dp->width_start != dp->width_end)
{
@@ -5685,13 +5720,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
width = xsum (xtimes (width, 10), *digitp++ - '0');
while (digitp != dp->width_end);
}
-# if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+# if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
has_width = 1;
# endif
}
#endif
-#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) ||
!HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION &&
MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST
|| NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+#if !USE_SNPRINTF || (WIDE_CHAR_VERSION && DCHAR_IS_TCHAR) ||
!HAVE_SNPRINTF_RETVAL_C99 || USE_MSVC__SNPRINTF || (WIDE_CHAR_VERSION &&
MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST
|| NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_FLAG_ALT_PRECISION_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
has_precision = 0;
precision = 6;
if (dp->precision_start != dp->precision_end)
@@ -5724,9 +5759,10 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#endif
/* Decide whether to handle the precision ourselves. */
-#if NEED_PRINTF_UNBOUNDED_PRECISION
+#if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
switch (dp->conversion)
{
+# if NEED_PRINTF_UNBOUNDED_PRECISION
case 'd': case 'i': case 'u':
case 'b':
#if SUPPORT_GNU_PRINTF_DIRECTIVES \
@@ -5734,9 +5770,21 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
case 'B':
#endif
case 'o':
- case 'x': case 'X': case 'p':
prec_ourselves = has_precision && (precision > 0);
break;
+# endif
+ case 'x': case 'X': case 'p':
+ prec_ourselves =
+ has_precision
+ && (0
+# if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO
+ || (precision == 0)
+# endif
+# if NEED_PRINTF_UNBOUNDED_PRECISION
+ || (precision > 0)
+# endif
+ );
+ break;
default:
prec_ourselves = 0;
break;
@@ -5744,7 +5792,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#endif
/* Decide whether to perform the padding ourselves. */
-#if !((WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST) &&
(!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION)
+#if !((WIDE_CHAR_VERSION && MUSL_LIBC) || NEED_PRINTF_FLAG_LEFTADJUST) &&
(!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION)
switch (dp->conversion)
{
# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
@@ -6508,7 +6556,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
}
#endif
-#if NEED_PRINTF_UNBOUNDED_PRECISION
+#if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
if (prec_ourselves)
{
/* Handle the precision. */
@@ -6568,6 +6616,15 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
count += insert;
}
+# if NEED_PRINTF_FLAG_ALT_PRECISION_ZERO
+ else if (precision == 0
+ && move == 1
+ && prec_ptr[prefix_count] == '0')
+ {
+ /* Replace the "0" result with an empty string. */
+ count = prefix_count;
+ }
+# endif
}
#endif
@@ -6722,7 +6779,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
/* Here count <= allocated - length. */
/* Perform padding. */
-#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_UNBOUNDED_PRECISION
+#if (WIDE_CHAR_VERSION && MUSL_LIBC) || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO ||
NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO ||
NEED_PRINTF_FLAG_ALT_PRECISION_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
if (pad_ourselves && has_width)
{
size_t w;
diff --git a/gnulib/lib/vasnprintf.h b/gnulib/lib/vasnprintf.h
index 2d13407079..7ed9145c03 100644
--- a/gnulib/lib/vasnprintf.h
+++ b/gnulib/lib/vasnprintf.h
@@ -1,5 +1,5 @@
/* vsprintf with automatic memory allocation.
- Copyright (C) 2002-2004, 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2002-2004, 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/vasprintf.c b/gnulib/lib/vasprintf.c
index d2878cd91d..e52aaca586 100644
--- a/gnulib/lib/vasprintf.c
+++ b/gnulib/lib/vasprintf.c
@@ -1,5 +1,5 @@
/* Formatted output to strings.
- Copyright (C) 1999, 2002, 2006-2023 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2002, 2006-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/verify.h b/gnulib/lib/verify.h
index 181dc6c292..978926a491 100644
--- a/gnulib/lib/verify.h
+++ b/gnulib/lib/verify.h
@@ -1,6 +1,6 @@
/* Compile-time assert-like macros.
- Copyright (C) 2005-2006, 2009-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2006, 2009-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -259,11 +259,22 @@ template <int w>
&& (!defined __cplusplus \
|| (__cpp_static_assert < 201411 \
&& __GNUG__ < 6 && __clang_major__ < 6 && _MSC_VER < 1910)))
-# if defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__
+# if (defined __cplusplus && defined __GNUG__ && __GNUG__ < 6 \
+ && __cplusplus == 201103L && !defined __clang__)
+/* g++ >= 4.7, < 6 with option -std=c++11 or -std=gnu++11 supports the
+ two-arguments static_assert but not the one-argument static_assert, and
+ it does not support _Static_assert.
+ We have to play preprocessor tricks to distinguish the two cases. */
+# define _GL_SA1(a1) static_assert ((a1), "static assertion failed")
+# define _GL_SA2 static_assert
+# define _GL_SA3 static_assert
+# define _GL_SA_PICK(x1,x2,x3,x4,...) x4
+# define static_assert(...) _GL_SA_PICK(__VA_ARGS__,_GL_SA3,_GL_SA2,_GL_SA1)
(__VA_ARGS__)
+# elif defined __cplusplus && _MSC_VER >= 1900 && !defined __clang__
/* MSVC 14 in C++ mode supports the two-arguments static_assert but not
the one-argument static_assert, and it does not support _Static_assert.
We have to play preprocessor tricks to distinguish the two cases.
- Since the MSVC preprocessor is not ISO C compliant (see above),.
+ Since the MSVC preprocessor is not ISO C compliant (see above),
the solution is specific to MSVC. */
# define _GL_EXPAND(x) x
# define _GL_SA1(a1) static_assert ((a1), "static assertion failed")
diff --git a/gnulib/lib/warn-on-use.h b/gnulib/lib/warn-on-use.h
index 30756034af..701013a07f 100644
--- a/gnulib/lib/warn-on-use.h
+++ b/gnulib/lib/warn-on-use.h
@@ -1,5 +1,5 @@
/* A C macro for emitting warnings if a function is used.
- Copyright (C) 2010-2023 Free Software Foundation, Inc.
+ Copyright (C) 2010-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published
@@ -32,6 +32,10 @@
_GL_WARN_ON_USE_ATTRIBUTE is for functions with 'static' or 'inline'
linkage.
+ _GL_WARN_ON_USE should not be used more than once for a given function
+ in a given compilation unit (because this may generate a warning even
+ if the function is never called).
+
However, one of the reasons that a function is a portability trap is
if it has the wrong signature. Declaring FUNCTION with a different
signature in C is a compilation error, so this macro must use the
diff --git a/gnulib/lib/wchar.in.h b/gnulib/lib/wchar.in.h
index f1bbff6b94..a33a10f747 100644
--- a/gnulib/lib/wchar.in.h
+++ b/gnulib/lib/wchar.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
- Copyright (C) 2007-2023 Free Software Foundation, Inc.
+ Copyright (C) 2007-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -1684,6 +1684,24 @@ _GL_WARN_ON_USE (wcsftime, "wcsftime is unportable - "
#endif
+#if @GNULIB_WGETCWD@ && (defined _WIN32 && !defined __CYGWIN__)
+/* Gets the name of the current working directory.
+ (a) If BUF is non-NULL, it is assumed to have room for SIZE wide characters.
+ This function stores the working directory (NUL-terminated) in BUF and
+ returns BUF.
+ (b) If BUF is NULL, an array is allocated with 'malloc'. The array is SIZE
+ wide characters long, unless SIZE == 0, in which case it is as big as
+ necessary.
+ If the directory couldn't be determined or SIZE was too small, this function
+ returns NULL and sets errno. For a directory of length LEN, SIZE should be
+ >= LEN + 3 in case (a) or >= LEN + 1 in case (b).
+ Possible errno values include:
+ - ERANGE if SIZE is too small.
+ - ENOMEM if the memory could no be allocated. */
+_GL_FUNCDECL_SYS (wgetcwd, wchar_t *, (wchar_t *buf, size_t size));
+#endif
+
+
#endif /* _@GUARD_PREFIX@_WCHAR_H */
#endif /* _@GUARD_PREFIX@_WCHAR_H */
#endif
diff --git a/gnulib/lib/wcrtomb.c b/gnulib/lib/wcrtomb.c
index 389d699e5f..197b020e28 100644
--- a/gnulib/lib/wcrtomb.c
+++ b/gnulib/lib/wcrtomb.c
@@ -1,5 +1,5 @@
/* Convert wide character to multibyte character.
- Copyright (C) 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2008-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2008.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/wctype-h.c b/gnulib/lib/wctype-h.c
index 7d3e14a6b5..7e4ff13a71 100644
--- a/gnulib/lib/wctype-h.c
+++ b/gnulib/lib/wctype-h.c
@@ -1,6 +1,6 @@
/* Inline functions for <wctype.h>.
- Copyright (C) 2012-2023 Free Software Foundation, Inc.
+ Copyright (C) 2012-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -20,4 +20,4 @@
#include <config.h>
#define _GL_WCTYPE_INLINE _GL_EXTERN_INLINE
-#include "wctype.h"
+#include <wctype.h>
diff --git a/gnulib/lib/wctype-impl.h b/gnulib/lib/wctype-impl.h
index 996af42a59..26d68b41b9 100644
--- a/gnulib/lib/wctype-impl.h
+++ b/gnulib/lib/wctype-impl.h
@@ -1,5 +1,5 @@
/* Get descriptor for a wide character property.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/wctype.c b/gnulib/lib/wctype.c
index af41b0554c..914f6847d9 100644
--- a/gnulib/lib/wctype.c
+++ b/gnulib/lib/wctype.c
@@ -1,5 +1,5 @@
/* Get descriptor for a wide character property.
- Copyright (C) 2011-2023 Free Software Foundation, Inc.
+ Copyright (C) 2011-2024 Free Software Foundation, Inc.
Written by Bruno Haible <bruno@clisp.org>, 2011.
This file is free software: you can redistribute it and/or modify
diff --git a/gnulib/lib/wctype.in.h b/gnulib/lib/wctype.in.h
index 6f1e7ef149..851c4f4eb2 100644
--- a/gnulib/lib/wctype.in.h
+++ b/gnulib/lib/wctype.in.h
@@ -1,6 +1,6 @@
/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
- Copyright (C) 2006-2023 Free Software Foundation, Inc.
+ Copyright (C) 2006-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/wcwidth.c b/gnulib/lib/wcwidth.c
index 1d03665496..328a89306c 100644
--- a/gnulib/lib/wcwidth.c
+++ b/gnulib/lib/wcwidth.c
@@ -1,5 +1,5 @@
/* Determine the number of screen columns needed for a character.
- Copyright (C) 2006-2007, 2010-2023 Free Software Foundation, Inc.
+ Copyright (C) 2006-2007, 2010-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/windows-initguard.h b/gnulib/lib/windows-initguard.h
index 9d36f53c82..6bace3f047 100644
--- a/gnulib/lib/windows-initguard.h
+++ b/gnulib/lib/windows-initguard.h
@@ -1,5 +1,5 @@
/* Init guards, somewhat like spinlocks (native Windows implementation).
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/windows-mutex.c b/gnulib/lib/windows-mutex.c
index ab7258c9f0..b112e13b6b 100644
--- a/gnulib/lib/windows-mutex.c
+++ b/gnulib/lib/windows-mutex.c
@@ -1,5 +1,5 @@
/* Plain mutexes (native Windows implementation).
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/windows-mutex.h b/gnulib/lib/windows-mutex.h
index 039eb7075a..88de4bdcad 100644
--- a/gnulib/lib/windows-mutex.h
+++ b/gnulib/lib/windows-mutex.h
@@ -1,5 +1,5 @@
/* Plain mutexes (native Windows implementation).
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/windows-once.c b/gnulib/lib/windows-once.c
index 0d28281ffd..a8b9e0f3ae 100644
--- a/gnulib/lib/windows-once.c
+++ b/gnulib/lib/windows-once.c
@@ -1,5 +1,5 @@
/* Once-only control (native Windows implementation).
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -29,7 +29,9 @@ glwthread_once (glwthread_once_t *once_control, void
(*initfunction) (void))
{
if (once_control->inited <= 0)
{
- if (InterlockedIncrement (&once_control->started) == 0)
+ InterlockedIncrement (&once_control->num_threads);
+ /* If once_control->started is == -1, set it to 0. */
+ if (InterlockedCompareExchange (&once_control->started, 0, -1) < 0)
{
/* This thread is the first one to come to this once_control. */
InitializeCriticalSection (&once_control->lock);
@@ -41,8 +43,6 @@ glwthread_once (glwthread_once_t *once_control, void
(*initfunction) (void))
}
else
{
- /* Don't let once_control->started grow and wrap around. */
- InterlockedDecrement (&once_control->started);
/* Some other thread has already started the initialization.
Yield the CPU while waiting for the other thread to finish
initializing and taking the lock. */
@@ -58,5 +58,48 @@ glwthread_once (glwthread_once_t *once_control, void
(*initfunction) (void))
abort ();
}
}
+ /* Here once_control->started == 0 and once_control->inited > 0. */
+ if (InterlockedDecrement (&once_control->num_threads) == 0)
+ /* once_control->num_threads is now zero, and
+ once_control->started == 0 and once_control->inited > 0.
+ No other thread will need to use the lock.
+ We can therefore destroy the lock, to free resources. */
+ /* If once_control->inited is == 1, set it to 2. */
+ if (InterlockedCompareExchange (&once_control->inited, 2, 1) == 1)
+ DeleteCriticalSection (&once_control->lock);
}
+ /* Proof of correctness:
+ * num_threads is incremented and then decremented by some threads.
+ Therefore, num_threads always stays >= 0, and is == 0 at the end.
+ * The first thread to go through the once_control->started fence
+ initializes the lock and moves inited from <= 0 to > 0. The other
+ threads don't move inited from <= 0 to > 0.
+ * started, once == 0, stays == 0.
+ * inited, once > 0, stays > 0 (since at the place where it is assigned 0,
+ it cannot be > 0).
+ * inited does not change any more once it is 2.
+ Therefore, it can be changed from 1 to 2 only once.
+ * DeleteCriticalSection gets invoked right after inited has been changed
+ from 1 to 2. Therefore, DeleteCriticalSection gets invoked only once.
+ * After a moment where num_threads was 0 and started was 0 and
+ inited was > 0, no thread can reach an InitializeCriticalSection or
+ EnterCriticalSection invocation. Proof:
+ - At such a moment, no thread is in the code range between
+ InterlockedIncrement (&once_control->num_threads)
+ and
+ InterlockedDecrement (&once_control->num_threads)
+ - After such a moment, some thread can increment num_threads, but from
+ there they cannot reach the InitializeCriticalSection invocation,
+ because the once_control->started test prevents that, and they cannot
+ reach the EnterCriticalSection invocation in the other branch because
+ the
+ if (once_control->inited <= 0)
+ test prevents that.
+ * From this it follows that:
+ - DeleteCriticalSection cannot be executed while the lock is taken
+ (because DeleteCriticalSection is only executed after a moment where
+ num_threads was 0 and started was 0 and inited was > 0).
+ - Once DeleteCriticalSection has been executed, the lock is not used any
+ more.
+ */
}
diff --git a/gnulib/lib/windows-once.h b/gnulib/lib/windows-once.h
index 54885680e2..18ed8d878a 100644
--- a/gnulib/lib/windows-once.h
+++ b/gnulib/lib/windows-once.h
@@ -1,5 +1,5 @@
/* Once-only control (native Windows implementation).
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -25,13 +25,14 @@
typedef struct
{
- volatile int inited;
+ volatile LONG inited;
+ volatile LONG num_threads;
volatile LONG started;
CRITICAL_SECTION lock;
}
glwthread_once_t;
-#define GLWTHREAD_ONCE_INIT { -1, -1 }
+#define GLWTHREAD_ONCE_INIT { -1, 0, -1 }
#ifdef __cplusplus
extern "C" {
diff --git a/gnulib/lib/windows-recmutex.c b/gnulib/lib/windows-recmutex.c
index a8ce9a0481..e5672baf6e 100644
--- a/gnulib/lib/windows-recmutex.c
+++ b/gnulib/lib/windows-recmutex.c
@@ -1,5 +1,5 @@
/* Plain recursive mutexes (native Windows implementation).
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/windows-recmutex.h b/gnulib/lib/windows-recmutex.h
index 08ff459769..9fa445b3d8 100644
--- a/gnulib/lib/windows-recmutex.h
+++ b/gnulib/lib/windows-recmutex.h
@@ -1,5 +1,5 @@
/* Plain recursive mutexes (native Windows implementation).
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/windows-rwlock.c b/gnulib/lib/windows-rwlock.c
index 7cbd7bb1dd..e60c4efcee 100644
--- a/gnulib/lib/windows-rwlock.c
+++ b/gnulib/lib/windows-rwlock.c
@@ -1,5 +1,5 @@
/* Read-write locks (native Windows implementation).
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/windows-rwlock.h b/gnulib/lib/windows-rwlock.h
index fe8381e870..08d677501c 100644
--- a/gnulib/lib/windows-rwlock.h
+++ b/gnulib/lib/windows-rwlock.h
@@ -1,5 +1,5 @@
/* Read-write locks (native Windows implementation).
- Copyright (C) 2005-2023 Free Software Foundation, Inc.
+ Copyright (C) 2005-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/xalloc-die.c b/gnulib/lib/xalloc-die.c
index 7605eee151..c053c7a8db 100644
--- a/gnulib/lib/xalloc-die.c
+++ b/gnulib/lib/xalloc-die.c
@@ -1,6 +1,6 @@
/* Report a memory allocation failure and exit.
- Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2023 Free Software
+ Copyright (C) 1997-2000, 2002-2004, 2006, 2009-2024 Free Software
Foundation, Inc.
This program is free software: you can redistribute it and/or modify
@@ -22,7 +22,7 @@
#include <stdlib.h>
-#include "error.h"
+#include <error.h>
#include "exitfail.h"
#include "gettext.h"
diff --git a/gnulib/lib/xalloc-oversized.h b/gnulib/lib/xalloc-oversized.h
index 483bd11796..7f30f83e76 100644
--- a/gnulib/lib/xalloc-oversized.h
+++ b/gnulib/lib/xalloc-oversized.h
@@ -1,6 +1,6 @@
/* xalloc-oversized.h -- memory allocation size checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2023 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -29,8 +29,7 @@
is SIZE_MAX - 1. */
#define __xalloc_oversized(n, s) \
((s) != 0 \
- && ((size_t) (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) \
- < (n)))
+ && (PTRDIFF_MAX < SIZE_MAX ? PTRDIFF_MAX : SIZE_MAX - 1) / (s) < (n))
/* Return 1 if and only if an array of N objects, each of size S,
cannot exist reliably because its total size in bytes would exceed
diff --git a/gnulib/lib/xalloc.h b/gnulib/lib/xalloc.h
index fb44f420db..75a5db30bb 100644
--- a/gnulib/lib/xalloc.h
+++ b/gnulib/lib/xalloc.h
@@ -1,6 +1,6 @@
/* xalloc.h -- malloc with out-of-memory checking
- Copyright (C) 1990-2000, 2003-2004, 2006-2023 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2003-2004, 2006-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
diff --git a/gnulib/lib/xmalloc.c b/gnulib/lib/xmalloc.c
index 289cbd05fc..5befdab77c 100644
--- a/gnulib/lib/xmalloc.c
+++ b/gnulib/lib/xmalloc.c
@@ -1,6 +1,6 @@
/* xmalloc.c -- malloc with out of memory checking
- Copyright (C) 1990-2000, 2002-2006, 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 1990-2000, 2002-2006, 2008-2024 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
#include <string.h>
static void * _GL_ATTRIBUTE_PURE
-nonnull (void *p)
+check_nonnull (void *p)
{
if (!p)
xalloc_die ();
@@ -42,13 +42,13 @@ nonnull (void *p)
void *
xmalloc (size_t s)
{
- return nonnull (malloc (s));
+ return check_nonnull (malloc (s));
}
void *
ximalloc (idx_t s)
{
- return nonnull (imalloc (s));
+ return check_nonnull (imalloc (s));
}
char *
@@ -72,7 +72,7 @@ xrealloc (void *p, size_t s)
void *
xirealloc (void *p, idx_t s)
{
- return nonnull (irealloc (p, s));
+ return check_nonnull (irealloc (p, s));
}
/* Change the size of an allocated block of memory P to an array of N
@@ -90,7 +90,7 @@ xreallocarray (void *p, size_t n, size_t s)
void *
xireallocarray (void *p, idx_t n, idx_t s)
{
- return nonnull (ireallocarray (p, n, s));
+ return check_nonnull (ireallocarray (p, n, s));
}
/* Allocate an array of N objects, each with S bytes of memory,
@@ -295,13 +295,13 @@ xizalloc (idx_t s)
void *
xcalloc (size_t n, size_t s)
{
- return nonnull (calloc (n, s));
+ return check_nonnull (calloc (n, s));
}
void *
xicalloc (idx_t n, idx_t s)
{
- return nonnull (icalloc (n, s));
+ return check_nonnull (icalloc (n, s));
}
/* Clone an object P of size S, with error checking. There's no need
diff --git a/gnulib/lib/xsize.c b/gnulib/lib/xsize.c
index 279ae824f8..8774467536 100644
--- a/gnulib/lib/xsize.c
+++ b/gnulib/lib/xsize.c
@@ -1,6 +1,6 @@
/* Checked size_t computations.
- Copyright (C) 2012-2023 Free Software Foundation, Inc.
+ Copyright (C) 2012-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
diff --git a/gnulib/lib/xsize.h b/gnulib/lib/xsize.h
index 5b08d61f2f..619c0edc2b 100644
--- a/gnulib/lib/xsize.h
+++ b/gnulib/lib/xsize.h
@@ -1,6 +1,6 @@
/* xsize.h -- Checked size_t computations.
- Copyright (C) 2003, 2008-2023 Free Software Foundation, Inc.
+ Copyright (C) 2003, 2008-2024 Free Software Foundation, Inc.
This file is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
@@ -40,6 +40,11 @@ _GL_INLINE_HEADER_BEGIN
# define XSIZE_INLINE _GL_INLINE
#endif
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
/* The size of memory objects is often computed through expressions of
type size_t. Example:
void* p = malloc (header_size + n * element_size).
@@ -105,6 +110,11 @@ xmax (size_t size1, size_t size2)
#define size_in_bounds_p(SIZE) \
((SIZE) != SIZE_MAX)
+
+#ifdef __cplusplus
+}
+#endif
+
_GL_INLINE_HEADER_END
#endif /* _XSIZE_H */
diff --git a/gnulib/m4/00gnulib.m4 b/gnulib/m4/00gnulib.m4
index 7fe03e0b9c..cd16771848 100644
--- a/gnulib/m4/00gnulib.m4
+++ b/gnulib/m4/00gnulib.m4
@@ -1,5 +1,6 @@
-# 00gnulib.m4 serial 8
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+# 00gnulib.m4
+# serial 9
+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.
@@ -49,14 +50,14 @@ dnl AC_REQUIRE([gl_COMPILER_CLANG])
[if test $gl_cv_compiler_clang = yes; then
dnl Test whether the compiler supports the option
dnl '-Werror=implicit-function-declaration'.
- save_ac_compile="$ac_compile"
+ saved_ac_compile="$ac_compile"
ac_compile="$ac_compile -Werror=implicit-function-declaration"
dnl Use _AC_COMPILE_IFELSE instead of AC_COMPILE_IFELSE, to avoid a
dnl warning "AC_COMPILE_IFELSE was called before
AC_USE_SYSTEM_EXTENSIONS".
_AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'],
[gl_cv_compiler_check_decl_option=none])
- ac_compile="$save_ac_compile"
+ ac_compile="$saved_ac_compile"
else
gl_cv_compiler_check_decl_option=none
fi
@@ -71,11 +72,11 @@ dnl Redefine _AC_CHECK_DECL_BODY so that it references
ac_compile_for_check_decl
dnl instead of ac_compile. If, for whatever reason, the override of AC_PROG_CC
dnl in zzgnulib.m4 is inactive, use the original ac_compile.
m4_define([_AC_CHECK_DECL_BODY],
-[ ac_save_ac_compile="$ac_compile"
+[ ac_saved_ac_compile="$ac_compile"
if test -n "$ac_compile_for_check_decl"; then
ac_compile="$ac_compile_for_check_decl"
fi]
-m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_save_ac_compile"
+m4_defn([_AC_CHECK_DECL_BODY])[ ac_compile="$ac_saved_ac_compile"
])
# gl_00GNULIB
diff --git a/gnulib/m4/__inline.m4 b/gnulib/m4/__inline.m4
index acf8668bc5..20baf16437 100644
--- a/gnulib/m4/__inline.m4
+++ b/gnulib/m4/__inline.m4
@@ -1,9 +1,12 @@
-# Test for __inline keyword
-dnl Copyright 2017-2023 Free Software Foundation, Inc.
+# __inline.m4
+# serial 1
+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.
+# Test for __inline keyword
+
AC_DEFUN([gl___INLINE],
[
AC_CACHE_CHECK([whether the compiler supports the __inline keyword],
diff --git a/gnulib/m4/absolute-header.m4 b/gnulib/m4/absolute-header.m4
index 0cab36454d..0abd6d9002 100644
--- a/gnulib/m4/absolute-header.m4
+++ b/gnulib/m4/absolute-header.m4
@@ -1,5 +1,6 @@
-# absolute-header.m4 serial 18
-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.
diff --git a/gnulib/m4/alloca.m4 b/gnulib/m4/alloca.m4
index c685fac918..dc78dc19a8 100644
--- a/gnulib/m4/alloca.m4
+++ b/gnulib/m4/alloca.m4
@@ -1,5 +1,6 @@
-# alloca.m4 serial 21
-dnl Copyright (C) 2002-2004, 2006-2007, 2009-2023 Free Software Foundation,
+# alloca.m4
+# serial 21
+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/gnulib/m4/argz.m4 b/gnulib/m4/argz.m4
index ed432322c1..51a358d55a 100644
--- a/gnulib/m4/argz.m4
+++ b/gnulib/m4/argz.m4
@@ -1,13 +1,13 @@
+# argz.m4
+# serial 15
+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.
+
# Portability macros for glibc argz. -*- Autoconf -*-
-#
-# Copyright (C) 2004-2023 Free Software Foundation, Inc.
-# Written by Gary V. Vaughan <gary@gnu.org>
-#
-# 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 14 argz.m4
+# Written by Gary V. Vaughan <gary@gnu.org>
AC_DEFUN([gl_FUNC_ARGZ],
[gl_PREREQ_ARGZ
@@ -50,10 +50,10 @@ AS_IF([! $GL_GENERATE_ARGZ_H],
lt_cv_sys_argz_works="$gl_cross_guess_normal"
else
lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
- save_IFS=$IFS
+ saved_IFS=$IFS
IFS=-.
set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
- IFS=$save_IFS
+ IFS=$saved_IFS
lt_os_major=${2-0}
lt_os_minor=${3-0}
lt_os_micro=${4-0}
diff --git a/gnulib/m4/assert_h.m4 b/gnulib/m4/assert_h.m4
index d255855d31..b90d0f1939 100644
--- a/gnulib/m4/assert_h.m4
+++ b/gnulib/m4/assert_h.m4
@@ -1,5 +1,6 @@
-# assert-h.m4
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# assert_h.m4
+# serial 1
+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.
@@ -9,10 +10,10 @@ dnl From Paul Eggert.
AC_DEFUN([gl_ASSERT_H],
[
AC_CACHE_CHECK([for static_assert], [gl_cv_static_assert],
- [gl_save_CFLAGS=$CFLAGS
+ [gl_saved_CFLAGS=$CFLAGS
for gl_working in "yes, a keyword" "yes, an <assert.h> macro"; do
AS_CASE([$gl_working],
- [*assert.h*], [CFLAGS="$gl_save_CFLAGS -DINCLUDE_ASSERT_H"])
+ [*assert.h*], [CFLAGS="$gl_saved_CFLAGS -DINCLUDE_ASSERT_H"])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
@@ -32,7 +33,7 @@ AC_DEFUN([gl_ASSERT_H],
]])],
[gl_cv_static_assert=$gl_working],
[gl_cv_static_assert=no])
- CFLAGS=$gl_save_CFLAGS
+ CFLAGS=$gl_saved_CFLAGS
test "$gl_cv_static_assert" != no && break
done])
diff --git a/gnulib/m4/btowc.m4 b/gnulib/m4/btowc.m4
index c1d956b755..d9dd7036a2 100644
--- a/gnulib/m4/btowc.m4
+++ b/gnulib/m4/btowc.m4
@@ -1,5 +1,6 @@
-# btowc.m4 serial 14
-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.
diff --git a/gnulib/m4/builtin-expect.m4 b/gnulib/m4/builtin-expect.m4
index 531ed48af7..c7af926b34 100644
--- a/gnulib/m4/builtin-expect.m4
+++ b/gnulib/m4/builtin-expect.m4
@@ -1,10 +1,12 @@
-dnl Check for __builtin_expect.
-
-dnl Copyright 2016-2023 Free Software Foundation, Inc.
+# builtin-expect.m4
+# serial 1
+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.
+dnl Check for __builtin_expect.
+
dnl Written by Paul Eggert.
AC_DEFUN([gl___BUILTIN_EXPECT],
diff --git a/gnulib/m4/c-bool.m4 b/gnulib/m4/c-bool.m4
index f614371bb2..0fb0de3b59 100644
--- a/gnulib/m4/c-bool.m4
+++ b/gnulib/m4/c-bool.m4
@@ -1,10 +1,12 @@
-# Check for bool that conforms to C2023.
-
-dnl Copyright 2022-2023 Free Software Foundation, Inc.
+# c-bool.m4
+# serial 1
+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.
+# Check for bool that conforms to C2023.
+
AC_DEFUN([gl_C_BOOL],
[
AC_CACHE_CHECK([for bool, true, false], [gl_cv_c_bool],
diff --git a/gnulib/m4/calloc.m4 b/gnulib/m4/calloc.m4
index e2f5677556..550cf5cc90 100644
--- a/gnulib/m4/calloc.m4
+++ b/gnulib/m4/calloc.m4
@@ -1,9 +1,9 @@
-# calloc.m4 serial 31
-
-# Copyright (C) 2004-2023 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# calloc.m4
+# serial 31
+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.
# Written by Jim Meyering.
diff --git a/gnulib/m4/clock_time.m4 b/gnulib/m4/clock_time.m4
index 7ed718c003..27f6fd153a 100644
--- a/gnulib/m4/clock_time.m4
+++ b/gnulib/m4/clock_time.m4
@@ -1,5 +1,6 @@
-# clock_time.m4 serial 14
-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.
diff --git a/gnulib/m4/close.m4 b/gnulib/m4/close.m4
index 0feabd6917..88c37fab6c 100644
--- a/gnulib/m4/close.m4
+++ b/gnulib/m4/close.m4
@@ -1,5 +1,6 @@
-# close.m4 serial 10
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+# close.m4
+# serial 10
+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/gnulib/m4/codeset.m4 b/gnulib/m4/codeset.m4
index 5804f472e9..e69b7402fc 100644
--- a/gnulib/m4/codeset.m4
+++ b/gnulib/m4/codeset.m4
@@ -1,5 +1,6 @@
-# codeset.m4 serial 5 (gettext-0.18.2)
-dnl Copyright (C) 2000-2002, 2006, 2008-2014, 2016, 2019-2023 Free Software
+# codeset.m4
+# serial 5 (gettext-0.18.2)
+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/gnulib/m4/double-slash-root.m4 b/gnulib/m4/double-slash-root.m4
index 1776e5eb75..3437c699ad 100644
--- a/gnulib/m4/double-slash-root.m4
+++ b/gnulib/m4/double-slash-root.m4
@@ -1,5 +1,6 @@
-# double-slash-root.m4 serial 4 -*- Autoconf -*-
-dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
+# double-slash-root.m4
+# serial 4 -*- Autoconf -*-
+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/gnulib/m4/dup2.m4 b/gnulib/m4/dup2.m4
index 876e0d8bd2..786121fd8f 100644
--- a/gnulib/m4/dup2.m4
+++ b/gnulib/m4/dup2.m4
@@ -1,5 +1,6 @@
-#serial 28
-dnl Copyright (C) 2002, 2005, 2007, 2009-2023 Free Software Foundation, Inc.
+# dup2.m4
+# 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.
diff --git a/gnulib/m4/eealloc.m4 b/gnulib/m4/eealloc.m4
index cb3e08fe53..8a15e70554 100644
--- a/gnulib/m4/eealloc.m4
+++ b/gnulib/m4/eealloc.m4
@@ -1,5 +1,6 @@
-# eealloc.m4 serial 3
-dnl Copyright (C) 2003, 2009-2023 Free Software Foundation, Inc.
+# eealloc.m4
+# serial 3
+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/gnulib/m4/errno_h.m4 b/gnulib/m4/errno_h.m4
index 4c70d22528..b6050e5d8e 100644
--- a/gnulib/m4/errno_h.m4
+++ b/gnulib/m4/errno_h.m4
@@ -1,5 +1,6 @@
-# errno_h.m4 serial 14
-dnl Copyright (C) 2004, 2006, 2008-2023 Free Software Foundation, Inc.
+# errno_h.m4
+# serial 14
+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/gnulib/m4/error.m4 b/gnulib/m4/error.m4
index 93a7558b5f..273b636b5d 100644
--- a/gnulib/m4/error.m4
+++ b/gnulib/m4/error.m4
@@ -1,10 +1,9 @@
-#serial 16
-
-# Copyright (C) 1996-1998, 2001-2004, 2009-2023 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# error.m4
+# serial 16
+dnl Copyright (C) 1996-1998, 2001-2004, 2009-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_ERROR],
[
diff --git a/gnulib/m4/error_h.m4 b/gnulib/m4/error_h.m4
index e8a58f6fbd..050a410ce4 100644
--- a/gnulib/m4/error_h.m4
+++ b/gnulib/m4/error_h.m4
@@ -1,11 +1,12 @@
-# error_h.m4 serial 4
-dnl Copyright (C) 1996-2023 Free Software Foundation, Inc.
+# error_h.m4
+# serial 4
+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.
dnl From Bruno Haible.
-dnl Provide a working "error.h".
+dnl Provide a working <error.h>.
AC_DEFUN_ONCE([gl_ERROR_H],
[
diff --git a/gnulib/m4/exponentd.m4 b/gnulib/m4/exponentd.m4
index 163114b89e..db597afccc 100644
--- a/gnulib/m4/exponentd.m4
+++ b/gnulib/m4/exponentd.m4
@@ -1,5 +1,6 @@
-# exponentd.m4 serial 4
-dnl Copyright (C) 2007-2008, 2010-2023 Free Software Foundation, Inc.
+# exponentd.m4
+# serial 4
+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/gnulib/m4/extensions.m4 b/gnulib/m4/extensions.m4
index 5336b8daf7..1fb68956b3 100644
--- a/gnulib/m4/extensions.m4
+++ b/gnulib/m4/extensions.m4
@@ -1,10 +1,11 @@
-# serial 23 -*- Autoconf -*-
-# Enable extensions on systems that normally disable them.
+# extensions.m4
+# serial 25 -*- Autoconf -*-
+dnl Copyright (C) 2003, 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.
-# Copyright (C) 2003, 2006-2023 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Enable extensions on systems that normally disable them.
dnl Define to empty for the benefit of Autoconf 2.69 and earlier, so that
dnl AC_USE_SYSTEM_EXTENSIONS (below) can be used unchanged from Autoconf 2.70+.
@@ -229,4 +230,15 @@ AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
[Define to enable the declarations of ISO C 11 types and functions.])
;;
esac
+
+ dnl On OpenSolaris derivatives, the include files contains a couple of
+ dnl declarations that are only activated with an explicit
+ dnl -D__STDC_WANT_LIB_EXT1__.
+ AH_VERBATIM([USE_ISO_C_23_ANNEX_K_EXTENSIONS],
+[/* Define to enable the declarations of ISO C 23 Annex K types and functions.
*/
+#if !(defined __STDC_WANT_LIB_EXT1__ && __STDC_WANT_LIB_EXT1__)
+#undef/**/__STDC_WANT_LIB_EXT1__
+#define __STDC_WANT_LIB_EXT1__ 1
+#endif
+])
])
diff --git a/gnulib/m4/extern-inline.m4 b/gnulib/m4/extern-inline.m4
index f9894d7fe5..547da82afa 100644
--- a/gnulib/m4/extern-inline.m4
+++ b/gnulib/m4/extern-inline.m4
@@ -1,10 +1,12 @@
-dnl 'extern inline' a la ISO C99.
-
-dnl Copyright 2012-2023 Free Software Foundation, Inc.
+# extern-inline.m4
+# serial 1
+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.
+dnl 'extern inline' a la ISO C99.
+
AC_DEFUN([gl_EXTERN_INLINE],
[
AC_CACHE_CHECK([whether ctype.h defines __header_inline],
diff --git a/gnulib/m4/fcntl-o.m4 b/gnulib/m4/fcntl-o.m4
index 2fc3d09ad7..43aa132579 100644
--- a/gnulib/m4/fcntl-o.m4
+++ b/gnulib/m4/fcntl-o.m4
@@ -1,5 +1,6 @@
-# fcntl-o.m4 serial 8
-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.
diff --git a/gnulib/m4/fcntl.m4 b/gnulib/m4/fcntl.m4
index 524a99af80..f6d0f37731 100644
--- a/gnulib/m4/fcntl.m4
+++ b/gnulib/m4/fcntl.m4
@@ -1,5 +1,6 @@
-# fcntl.m4 serial 11
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+# fcntl.m4
+# serial 12
+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.
@@ -82,7 +83,7 @@ AC_DEFUN([gl_FUNC_FCNTL],
esac
dnl Many systems lack F_DUPFD_CLOEXEC.
- dnl NetBSD 9.0 declares F_DUPFD_CLOEXEC but it works only like F_DUPFD.
+ dnl NetBSD 10.0 declares F_DUPFD_CLOEXEC but it works only like F_DUPFD.
AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC],
[gl_cv_func_fcntl_f_dupfd_cloexec],
[AC_RUN_IFELSE(
diff --git a/gnulib/m4/fcntl_h.m4 b/gnulib/m4/fcntl_h.m4
index 68f4e64802..b69f7a0ca8 100644
--- a/gnulib/m4/fcntl_h.m4
+++ b/gnulib/m4/fcntl_h.m4
@@ -1,10 +1,12 @@
+# fcntl_h.m4
# 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.
+# Configure fcntl.h.
+
dnl Written by Paul Eggert.
AC_DEFUN_ONCE([gl_FCNTL_H],
diff --git a/gnulib/m4/float_h.m4 b/gnulib/m4/float_h.m4
index 95897cf17b..c95d417161 100644
--- a/gnulib/m4/float_h.m4
+++ b/gnulib/m4/float_h.m4
@@ -1,5 +1,6 @@
-# float_h.m4 serial 14
-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.
diff --git a/gnulib/m4/free.m4 b/gnulib/m4/free.m4
index 0389dea3f4..a2b596d67f 100644
--- a/gnulib/m4/free.m4
+++ b/gnulib/m4/free.m4
@@ -1,8 +1,9 @@
-# free.m4 serial 6
-# Copyright (C) 2003-2005, 2009-2023 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# free.m4
+# serial 6
+dnl Copyright (C) 2003-2005, 2009-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.
# Written by Paul Eggert and Bruno Haible.
diff --git a/gnulib/m4/fstat.m4 b/gnulib/m4/fstat.m4
index 382741f412..47777b0c5a 100644
--- a/gnulib/m4/fstat.m4
+++ b/gnulib/m4/fstat.m4
@@ -1,5 +1,6 @@
-# fstat.m4 serial 9
-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 +11,10 @@ AC_DEFUN([gl_FUNC_FSTAT],
AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
case "$host_os" in
- mingw* | windows* | solaris*)
+ darwin* | mingw* | windows* | solaris*)
+ dnl macOS and Solaris stat can return a negative tv_nsec.
dnl On MinGW, the original stat() returns st_atime, st_mtime,
dnl st_ctime values that are affected by the time zone.
- dnl Solaris stat can return a negative tv_nsec.
REPLACE_FSTAT=1
;;
esac
diff --git a/gnulib/m4/getdtablesize.m4 b/gnulib/m4/getdtablesize.m4
index 8bcda9053b..aaefe9b298 100644
--- a/gnulib/m4/getdtablesize.m4
+++ b/gnulib/m4/getdtablesize.m4
@@ -1,5 +1,6 @@
-# getdtablesize.m4 serial 8
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+# getdtablesize.m4
+# serial 8
+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/gnulib/m4/getopt.m4 b/gnulib/m4/getopt.m4
index b136ce9537..53cab8bef9 100644
--- a/gnulib/m4/getopt.m4
+++ b/gnulib/m4/getopt.m4
@@ -1,5 +1,6 @@
-# getopt.m4 serial 49
-dnl Copyright (C) 2002-2006, 2008-2023 Free Software Foundation, Inc.
+# getopt.m4
+# serial 50
+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.
@@ -365,14 +366,7 @@ dnl is ambiguous with environment values that contain
newlines.
AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
[
- AC_CHECK_HEADERS_ONCE([sys/cdefs.h])
- if test $ac_cv_header_sys_cdefs_h = yes; then
- HAVE_SYS_CDEFS_H=1
- else
- HAVE_SYS_CDEFS_H=0
- fi
- AC_SUBST([HAVE_SYS_CDEFS_H])
-
+ gl_CHECK_HEADER_SYS_CDEFS_H
AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
[Define to rpl_ if the getopt replacement functions and variables
should be used.])
diff --git a/gnulib/m4/getprogname.m4 b/gnulib/m4/getprogname.m4
index 2b741f5083..b24f448055 100644
--- a/gnulib/m4/getprogname.m4
+++ b/gnulib/m4/getprogname.m4
@@ -1,11 +1,11 @@
-# getprogname.m4 - check for getprogname or replacements for it
-
-# Copyright (C) 2016-2023 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.
-
+# getprogname.m4
# serial 8
+dnl Copyright (C) 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.
+
+# Check for getprogname or replacements for it
AC_DEFUN([gl_FUNC_GETPROGNAME],
[
diff --git a/gnulib/m4/getrandom.m4 b/gnulib/m4/getrandom.m4
index fd73191b7b..0051c9c421 100644
--- a/gnulib/m4/getrandom.m4
+++ b/gnulib/m4/getrandom.m4
@@ -1,5 +1,6 @@
-# getrandom.m4 serial 12
-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 +10,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. */
diff --git a/gnulib/m4/gnulib-cache.m4 b/gnulib/m4/gnulib-cache.m4
index 54cdf6a50b..50da779473 100644
--- a/gnulib/m4/gnulib-cache.m4
+++ b/gnulib/m4/gnulib-cache.m4
@@ -1,4 +1,4 @@
-# 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
diff --git a/gnulib/m4/gnulib-common.m4 b/gnulib/m4/gnulib-common.m4
index c372316135..b34b4534bf 100644
--- a/gnulib/m4/gnulib-common.m4
+++ b/gnulib/m4/gnulib-common.m4
@@ -1,5 +1,6 @@
-# gnulib-common.m4 serial 88
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# gnulib-common.m4
+# serial 95
+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.
@@ -76,48 +77,60 @@ AC_DEFUN([gl_COMMON_BODY], [
#endif])
AH_VERBATIM([attribute],
[/* Attributes. */
-#if (defined __has_attribute \
- && (!defined __clang_minor__ \
- || (defined __apple_build_version__ \
- ? 6000000 <= __apple_build_version__ \
- : 5 <= __clang_major__)))
-# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
-#else
-# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
-# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
-# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
-# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
-# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
-# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
-# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
-# define _GL_ATTR_diagnose_if 0
-# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
-# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
-# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
-# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7)
-# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6)
-# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0)
-# ifdef _ICC
-# define _GL_ATTR_may_alias 0
+/* Define _GL_HAS_ATTRIBUTE only once, because on FreeBSD, with gcc < 5, if
+ <config.h> gets included once again after <sys/cdefs.h>, __has_attribute(x)
+ expands to 0 always, and redefining _GL_HAS_ATTRIBUTE would turn off all
+ attributes. */
+#ifndef _GL_HAS_ATTRIBUTE
+# if (defined __has_attribute \
+ && (!defined __clang_minor__ \
+ || (defined __apple_build_version__ \
+ ? 7000000 <= __apple_build_version__ \
+ : 5 <= __clang_major__)))
+# define _GL_HAS_ATTRIBUTE(attr) __has_attribute (__##attr##__)
# else
-# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3)
+# define _GL_HAS_ATTRIBUTE(attr) _GL_ATTR_##attr
+# define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
+# define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_cold _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_const _GL_GNUC_PREREQ (2, 95)
+# define _GL_ATTR_deprecated _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_diagnose_if 0
+# define _GL_ATTR_error _GL_GNUC_PREREQ (4, 3)
+# define _GL_ATTR_externally_visible _GL_GNUC_PREREQ (4, 1)
+# define _GL_ATTR_fallthrough _GL_GNUC_PREREQ (7, 0)
+# define _GL_ATTR_format _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_leaf _GL_GNUC_PREREQ (4, 6)
+# define _GL_ATTR_malloc _GL_GNUC_PREREQ (3, 0)
+# ifdef _ICC
+# define _GL_ATTR_may_alias 0
+# else
+# define _GL_ATTR_may_alias _GL_GNUC_PREREQ (3, 3)
+# endif
+# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1)
+# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3)
+# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0)
+# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3)
+# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96)
+# define _GL_ATTR_reproducible 0 /* not yet supported, as of GCC 14 */
+# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9)
+# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0)
+# define _GL_ATTR_unsequenced 0 /* not yet supported, as of GCC 14 */
+# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7)
+# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
# endif
-# define _GL_ATTR_noinline _GL_GNUC_PREREQ (3, 1)
-# define _GL_ATTR_nonnull _GL_GNUC_PREREQ (3, 3)
-# define _GL_ATTR_nonstring _GL_GNUC_PREREQ (8, 0)
-# define _GL_ATTR_nothrow _GL_GNUC_PREREQ (3, 3)
-# define _GL_ATTR_packed _GL_GNUC_PREREQ (2, 7)
-# define _GL_ATTR_pure _GL_GNUC_PREREQ (2, 96)
-# define _GL_ATTR_returns_nonnull _GL_GNUC_PREREQ (4, 9)
-# define _GL_ATTR_sentinel _GL_GNUC_PREREQ (4, 0)
-# define _GL_ATTR_unused _GL_GNUC_PREREQ (2, 7)
-# define _GL_ATTR_warn_unused_result _GL_GNUC_PREREQ (3, 4)
#endif
-/* 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
@@ -141,7 +154,7 @@ AC_DEFUN([gl_COMMON_BODY], [
_GL_ATTRIBUTE_ALLOC_SIZE ((M, N)) declares that the Mth argument multiplied
by the Nth argument of the function is the size of the returned memory
block.
*/
-/* Applies to: function, pointer to function, function types. */
+/* Applies to: functions, pointer to functions, function types. */
#ifndef _GL_ATTRIBUTE_ALLOC_SIZE
# if _GL_HAS_ATTRIBUTE (alloc_size)
# define _GL_ATTRIBUTE_ALLOC_SIZE(args) __attribute__ ((__alloc_size__ args))
@@ -152,7 +165,7 @@ AC_DEFUN([gl_COMMON_BODY], [
/* _GL_ATTRIBUTE_ALWAYS_INLINE tells that the compiler should always inline the
function and report an error if it cannot do so. */
-/* Applies to: function. */
+/* Applies to: functions. */
#ifndef _GL_ATTRIBUTE_ALWAYS_INLINE
# if _GL_HAS_ATTRIBUTE (always_inline)
# define _GL_ATTRIBUTE_ALWAYS_INLINE __attribute__ ((__always_inline__))
@@ -164,7 +177,7 @@ AC_DEFUN([gl_COMMON_BODY], [
/* _GL_ATTRIBUTE_ARTIFICIAL declares that the function is not important to show
in stack traces when debugging. The compiler should omit the function from
stack traces. */
-/* Applies to: function. */
+/* Applies to: functions. */
#ifndef _GL_ATTRIBUTE_ARTIFICIAL
# if _GL_HAS_ATTRIBUTE (artificial)
# define _GL_ATTRIBUTE_ARTIFICIAL __attribute__ ((__artificial__))
@@ -190,18 +203,23 @@ AC_DEFUN([gl_COMMON_BODY], [
# endif
#endif
-/* _GL_ATTRIBUTE_CONST declares that it is OK for a compiler to omit duplicate
- calls to the function with the same arguments.
- This attribute is safe for a function that neither depends on nor affects
- observable state, and always returns exactly once - e.g., does not loop
- forever, and does not call longjmp.
- (This attribute is stricter than _GL_ATTRIBUTE_PURE.) */
+/* _GL_ATTRIBUTE_CONST declares:
+ It is OK for a compiler to move calls to the function and to omit
+ calls to the function if another call has the same arguments or the
+ result is not used.
+ This attribute is safe for a function that neither depends on
+ nor affects state, and always returns exactly once -
+ e.g., does not raise an exception, call longjmp, or loop forever.
+ (This attribute is stricter than _GL_ATTRIBUTE_PURE because the
+ function cannot observe state. It is stricter than
+ _GL_ATTRIBUTE_UNSEQUENCED because the function must return exactly
+ once and cannot depend on state addressed by its arguments.) */
/* Applies to: functions. */
#ifndef _GL_ATTRIBUTE_CONST
# if _GL_HAS_ATTRIBUTE (const)
# define _GL_ATTRIBUTE_CONST __attribute__ ((__const__))
# else
-# define _GL_ATTRIBUTE_CONST
+# define _GL_ATTRIBUTE_CONST _GL_ATTRIBUTE_UNSEQUENCED
# endif
#endif
@@ -242,7 +260,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 +309,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 +398,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 +429,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
@@ -495,25 +513,58 @@ AC_DEFUN([gl_COMMON_BODY], [
/* Applies to: struct members, struct, union,
in C++ also: class. */
#ifndef _GL_ATTRIBUTE_PACKED
-# if _GL_HAS_ATTRIBUTE (packed)
+/* Oracle Studio 12.6 miscompiles code with __attribute__ ((__packed__))
despite
+ __has_attribute OK. */
+# if _GL_HAS_ATTRIBUTE (packed) && !defined __SUNPRO_C
# define _GL_ATTRIBUTE_PACKED __attribute__ ((__packed__))
# else
# define _GL_ATTRIBUTE_PACKED
# endif
#endif
-/* _GL_ATTRIBUTE_PURE declares that It is OK for a compiler to omit duplicate
- calls to the function with the same arguments if observable state is not
- changed between calls.
- This attribute is safe for a function that does not affect
- observable state, and always returns exactly once.
- (This attribute is looser than _GL_ATTRIBUTE_CONST.) */
+/* _GL_ATTRIBUTE_PURE declares:
+ It is OK for a compiler to move calls to the function and to omit
+ calls to the function if another call has the same arguments or the
+ result is not used, and if observable state is the same.
+ This attribute is safe for a function that does not affect observable state
+ and always returns exactly once.
+ (This attribute is looser than _GL_ATTRIBUTE_CONST because the function
+ can depend on observable state. It is stricter than
+ _GL_ATTRIBUTE_REPRODUCIBLE because the function must return exactly
+ once and cannot affect state addressed by its arguments.) */
/* Applies to: functions. */
#ifndef _GL_ATTRIBUTE_PURE
# if _GL_HAS_ATTRIBUTE (pure)
# define _GL_ATTRIBUTE_PURE __attribute__ ((__pure__))
# else
-# define _GL_ATTRIBUTE_PURE
+# define _GL_ATTRIBUTE_PURE _GL_ATTRIBUTE_REPRODUCIBLE
+# endif
+#endif
+
+/* _GL_ATTRIBUTE_REPRODUCIBLE declares:
+ It is OK for a compiler to move calls to the function and to omit duplicate
+ calls to the function with the same arguments, so long as the state
+ addressed by its arguments is the same and is updated in time for
+ the rest of the program.
+ This attribute is safe for a function that is effectless and idempotent; see
+ ISO C 23 ยง 6.7.12.7 for a definition of these terms.
+ (This attribute is looser than _GL_ATTRIBUTE_UNSEQUENCED because
+ the function need not be stateless and idempotent. It is looser
+ than _GL_ATTRIBUTE_PURE because the function need not return
+ exactly once and can affect state addressed by its arguments.)
+ See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
+ <https://stackoverflow.com/questions/76847905/>. */
+/* Applies to: functions, pointer to functions, function types. */
+#ifndef _GL_ATTRIBUTE_REPRODUCIBLE
+/* This may be revisited when gcc and clang support [[reproducible]] or
possibly
+ __attribute__ ((__reproducible__)). */
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if _GL_HAS_ATTRIBUTE (reproducible)
+# define _GL_ATTRIBUTE_REPRODUCIBLE [[reproducible]]
+# endif
+# endif
+# ifndef _GL_ATTRIBUTE_REPRODUCIBLE
+# define _GL_ATTRIBUTE_REPRODUCIBLE
# endif
#endif
@@ -541,6 +592,33 @@ AC_DEFUN([gl_COMMON_BODY], [
# endif
#endif
+/* _GL_ATTRIBUTE_UNSEQUENCED declares:
+ It is OK for a compiler to move calls to the function and to omit duplicate
+ calls to the function with the same arguments, so long as the state
+ addressed by its arguments is the same.
+ This attribute is safe for a function that is effectless, idempotent,
+ stateless, and independent; see ISO C 23 ยง 6.7.12.7 for a definition of
+ these terms.
+ (This attribute is stricter than _GL_ATTRIBUTE_REPRODUCIBLE because
+ the function must be stateless and independent. It is looser than
+ _GL_ATTRIBUTE_CONST because the function need not return exactly
+ once and can depend on state addressed by its arguments.)
+ See also <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2956.htm> and
+ <https://stackoverflow.com/questions/76847905/>. */
+/* Applies to: functions, pointer to functions, function types. */
+#ifndef _GL_ATTRIBUTE_UNSEQUENCED
+/* This may be revisited when gcc and clang support [[unsequenced]] or possibly
+ __attribute__ ((__unsequenced__)). */
+# ifndef _GL_BRACKET_BEFORE_ATTRIBUTE
+# if _GL_HAS_ATTRIBUTE (unsequenced)
+# define _GL_ATTRIBUTE_UNSEQUENCED [[unsequenced]]
+# endif
+# endif
+# ifndef _GL_ATTRIBUTE_UNSEQUENCED
+# define _GL_ATTRIBUTE_UNSEQUENCED
+# endif
+#endif
+
/* A helper macro. Don't use it directly. */
#ifndef _GL_ATTRIBUTE_UNUSED
# if _GL_HAS_ATTRIBUTE (unused)
@@ -1070,6 +1148,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
@@ -1095,6 +1174,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
@@ -1158,12 +1240,12 @@ AC_DEFUN([gl_PREPARE_CHECK_FUNCS_MACOS],
if test $gl_cv_compiler_clang = yes; then
dnl Test whether the compiler supports the option
dnl '-Werror=unguarded-availability-new'.
- save_ac_compile="$ac_compile"
+ saved_ac_compile="$ac_compile"
ac_compile="$ac_compile -Werror=unguarded-availability-new"
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]],[[]])],
[gl_cv_compiler_check_future_option='-Werror=unguarded-availability-new'],
[gl_cv_compiler_check_future_option=none])
- ac_compile="$save_ac_compile"
+ ac_compile="$saved_ac_compile"
else
gl_cv_compiler_check_future_option=none
fi
@@ -1211,14 +1293,14 @@ AC_DEFUN([gl_CHECK_FUNCS_CASE_FOR_MACOS],
darwin*)
if test "x$gl_cv_compiler_check_future_option" != "xnone"; then
dnl Use a compile test, not a link test.
- save_ac_compile="$ac_compile"
+ saved_ac_compile="$ac_compile"
ac_compile="$ac_compile $gl_cv_compiler_check_future_option"
- save_ac_compile_for_check_decl="$ac_compile_for_check_decl"
+ saved_ac_compile_for_check_decl="$ac_compile_for_check_decl"
ac_compile_for_check_decl="$ac_compile_for_check_decl
$gl_cv_compiler_check_future_option"
unset [ac_cv_have_decl_][$1]
AC_CHECK_DECL([$1], , , [$2])
- ac_compile="$save_ac_compile"
- ac_compile_for_check_decl="$save_ac_compile_for_check_decl"
+ ac_compile="$saved_ac_compile"
+ ac_compile_for_check_decl="$saved_ac_compile_for_check_decl"
[ac_cv_func_][$1]="$[ac_cv_have_decl_][$1]"
if test $[ac_cv_func_][$1] = yes; then
[gl_cv_onwards_func_][$1]=yes
diff --git a/gnulib/m4/gnulib-comp.m4 b/gnulib/m4/gnulib-comp.m4
index 50234dca55..653d791aa1 100644
--- a/gnulib/m4/gnulib-comp.m4
+++ b/gnulib/m4/gnulib-comp.m4
@@ -1,5 +1,5 @@
# DO NOT EDIT! GENERATED AUTOMATICALLY!
-# Copyright (C) 2002-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
@@ -149,11 +149,16 @@ AC_DEFUN([gl_EARLY],
# Code from module nocrash:
# Code from module open:
# Code from module pathmax:
+ # Code from module pthread-h:
+ gl_ANYTHREADLIB_EARLY
+ # Code from module pthread-once:
# Code from module realloc-gnu:
# Code from module realloc-posix:
# Code from module reallocarray:
# Code from module regex:
+ # Code from module sched:
# Code from module setlocale-null:
+ # Code from module setlocale-null-unlocked:
# Code from module size_max:
# Code from module snippet/_Noreturn:
# Code from module snippet/arg-nonnull:
@@ -192,6 +197,7 @@ AC_DEFUN([gl_EARLY],
# Code from module sys_random:
# Code from module sys_stat:
# Code from module sys_types:
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
# Code from module tempname:
# Code from module threadlib:
gl_THREADLIB_EARLY
@@ -624,9 +630,9 @@ AC_DEFUN([gl_INIT],
gl_UNICTYPE_H_REQUIRE_DEFAULTS
AC_PROG_MKDIR_P
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-alnum])
+ gl_LIBUNISTRING_MODULE([1.2], [unictype/ctype-alnum])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-alpha])
+ gl_LIBUNISTRING_MODULE([1.2], [unictype/ctype-alpha])
AC_REQUIRE([AC_C_INLINE])
gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-blank])
AC_REQUIRE([AC_C_INLINE])
@@ -634,13 +640,13 @@ AC_DEFUN([gl_INIT],
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])
+ gl_LIBUNISTRING_MODULE([1.2], [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])
+ gl_LIBUNISTRING_MODULE([1.2], [unictype/ctype-print])
AC_REQUIRE([AC_C_INLINE])
- gl_LIBUNISTRING_MODULE([1.1], [unictype/ctype-punct])
+ gl_LIBUNISTRING_MODULE([1.2], [unictype/ctype-punct])
AC_REQUIRE([AC_C_INLINE])
gl_LIBUNISTRING_MODULE([0.9.8], [unictype/ctype-space])
AC_REQUIRE([AC_C_INLINE])
@@ -673,7 +679,7 @@ AC_DEFUN([gl_INIT],
])
gl_LIBUNISTRING_LIBHEADER([0.9.11], [uniwidth.h])
AC_PROG_MKDIR_P
- gl_LIBUNISTRING_MODULE([1.1], [uniwidth/width])
+ gl_LIBUNISTRING_MODULE([1.2], [uniwidth/width])
AC_C_VARARRAYS
gl_FUNC_VASPRINTF
gl_STDIO_MODULE_INDICATOR([vasprintf])
@@ -736,7 +742,11 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_nl_langinfo=false
gl_gnulib_enabled_open=false
gl_gnulib_enabled_pathmax=false
+ gl_gnulib_enabled_94ea50e7ff7c2508f8a5894b17b1211c=false
+ gl_gnulib_enabled_e0dc424e76447be3f4b8566d84038f5a=false
+ gl_gnulib_enabled_sched=false
gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd=false
+ gl_gnulib_enabled_e7ab648fbf42deb155fb024e2402e26d=false
gl_gnulib_enabled_size_max=false
gl_gnulib_enabled_stat=false
gl_gnulib_enabled_0137e3d3638b33e5819d132d0b23165c=false
@@ -1096,6 +1106,9 @@ AC_DEFUN([gl_INIT],
gl_LOCK
gl_MODULE_INDICATOR([lock])
gl_gnulib_enabled_lock=true
+ if test $gl_threads_api = posix; then
+ func_gl_gnulib_m4code_e0dc424e76447be3f4b8566d84038f5a
+ fi
func_gl_gnulib_m4code_threadlib
if test $gl_threads_api = windows; then
func_gl_gnulib_m4code_503a4cb75d69c787103d0aa2ab7d8440
@@ -1273,6 +1286,40 @@ AC_DEFUN([gl_INIT],
gl_gnulib_enabled_pathmax=true
fi
}
+ func_gl_gnulib_m4code_94ea50e7ff7c2508f8a5894b17b1211c ()
+ {
+ if $gl_gnulib_enabled_94ea50e7ff7c2508f8a5894b17b1211c; then :; else
+ gl_PTHREAD_H
+ gl_PTHREAD_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
+ gl_gnulib_enabled_94ea50e7ff7c2508f8a5894b17b1211c=true
+ func_gl_gnulib_m4code_sched
+ func_gl_gnulib_m4code_cb7562e84d8cf7185af782fe497b53dd
+ fi
+ }
+ func_gl_gnulib_m4code_e0dc424e76447be3f4b8566d84038f5a ()
+ {
+ if $gl_gnulib_enabled_e0dc424e76447be3f4b8566d84038f5a; then :; else
+ gl_PTHREAD_ONCE
+ gl_CONDITIONAL([GL_COND_OBJ_PTHREAD_ONCE],
+ [test $HAVE_PTHREAD_ONCE = 0 || test
$REPLACE_PTHREAD_ONCE = 1])
+ gl_PTHREAD_MODULE_INDICATOR([pthread-once])
+ gl_gnulib_enabled_e0dc424e76447be3f4b8566d84038f5a=true
+ func_gl_gnulib_m4code_94ea50e7ff7c2508f8a5894b17b1211c
+ if test $gl_threads_api = windows; then
+ func_gl_gnulib_m4code_68a4501daeca58988392c7e60b4917ab
+ fi
+ fi
+ }
+ func_gl_gnulib_m4code_sched ()
+ {
+ if $gl_gnulib_enabled_sched; then :; else
+ gl_SCHED_H
+ gl_SCHED_H_REQUIRE_DEFAULTS
+ AC_PROG_MKDIR_P
+ gl_gnulib_enabled_sched=true
+ fi
+ }
func_gl_gnulib_m4code_e7e881d32ca02f1c997b13c737c64bbd ()
{
if $gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd; then :; else
@@ -1285,6 +1332,14 @@ AC_DEFUN([gl_INIT],
gl_LOCALE_MODULE_INDICATOR([setlocale_null])
gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd=true
func_gl_gnulib_m4code_locale
+ func_gl_gnulib_m4code_e7ab648fbf42deb155fb024e2402e26d
+ fi
+ }
+ func_gl_gnulib_m4code_e7ab648fbf42deb155fb024e2402e26d ()
+ {
+ if $gl_gnulib_enabled_e7ab648fbf42deb155fb024e2402e26d; then :; else
+ gl_gnulib_enabled_e7ab648fbf42deb155fb024e2402e26d=true
+ func_gl_gnulib_m4code_locale
fi
}
func_gl_gnulib_m4code_size_max ()
@@ -1718,7 +1773,11 @@ AC_DEFUN([gl_INIT],
AM_CONDITIONAL([gl_GNULIB_ENABLED_nl_langinfo],
[$gl_gnulib_enabled_nl_langinfo])
AM_CONDITIONAL([gl_GNULIB_ENABLED_open], [$gl_gnulib_enabled_open])
AM_CONDITIONAL([gl_GNULIB_ENABLED_pathmax], [$gl_gnulib_enabled_pathmax])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_94ea50e7ff7c2508f8a5894b17b1211c],
[$gl_gnulib_enabled_94ea50e7ff7c2508f8a5894b17b1211c])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_e0dc424e76447be3f4b8566d84038f5a],
[$gl_gnulib_enabled_e0dc424e76447be3f4b8566d84038f5a])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_sched], [$gl_gnulib_enabled_sched])
AM_CONDITIONAL([gl_GNULIB_ENABLED_e7e881d32ca02f1c997b13c737c64bbd],
[$gl_gnulib_enabled_e7e881d32ca02f1c997b13c737c64bbd])
+ AM_CONDITIONAL([gl_GNULIB_ENABLED_e7ab648fbf42deb155fb024e2402e26d],
[$gl_gnulib_enabled_e7ab648fbf42deb155fb024e2402e26d])
AM_CONDITIONAL([gl_GNULIB_ENABLED_size_max], [$gl_gnulib_enabled_size_max])
AM_CONDITIONAL([gl_GNULIB_ENABLED_stat], [$gl_gnulib_enabled_stat])
AM_CONDITIONAL([gl_GNULIB_ENABLED_0137e3d3638b33e5819d132d0b23165c],
[$gl_gnulib_enabled_0137e3d3638b33e5819d132d0b23165c])
@@ -2064,6 +2123,8 @@ AC_DEFUN([gl_FILE_LIST], [
lib/printf-args.h
lib/printf-parse.c
lib/printf-parse.h
+ lib/pthread-once.c
+ lib/pthread.in.h
lib/realloc.c
lib/reallocarray.c
lib/regcomp.c
@@ -2072,7 +2133,9 @@ AC_DEFUN([gl_FILE_LIST], [
lib/regex_internal.c
lib/regex_internal.h
lib/regexec.c
+ lib/sched.in.h
lib/setlocale-lock.c
+ lib/setlocale_null-unlocked.c
lib/setlocale_null.c
lib/setlocale_null.h
lib/size_max.h
@@ -2266,6 +2329,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/musl.m4
m4/nl_langinfo.m4
m4/nocrash.m4
+ m4/off64_t.m4
m4/off_t.m4
m4/open-cloexec.m4
m4/open-slash.m4
@@ -2273,10 +2337,14 @@ AC_DEFUN([gl_FILE_LIST], [
m4/pathmax.m4
m4/pid_t.m4
m4/printf.m4
+ m4/pthread-once.m4
+ m4/pthread-spin.m4
+ m4/pthread_h.m4
m4/pthread_rwlock_rdlock.m4
m4/realloc.m4
m4/reallocarray.m4
m4/regex.m4
+ m4/sched_h.m4
m4/setlocale_null.m4
m4/size_max.m4
m4/ssize_t.m4
@@ -2300,6 +2368,7 @@ AC_DEFUN([gl_FILE_LIST], [
m4/strndup.m4
m4/strnlen.m4
m4/strstr.m4
+ m4/sys_cdefs_h.m4
m4/sys_random_h.m4
m4/sys_socket_h.m4
m4/sys_stat_h.m4
diff --git a/gnulib/m4/gnulib-tool.m4 b/gnulib/m4/gnulib-tool.m4
index a9dd569bdb..ef45f51fc8 100644
--- a/gnulib/m4/gnulib-tool.m4
+++ b/gnulib/m4/gnulib-tool.m4
@@ -1,5 +1,6 @@
-# gnulib-tool.m4 serial 4
-dnl Copyright (C) 2004-2005, 2009-2023 Free Software Foundation, Inc.
+# gnulib-tool.m4
+# serial 4
+dnl Copyright (C) 2004-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/gnulib/m4/host-cpu-c-abi.m4 b/gnulib/m4/host-cpu-c-abi.m4
index 134f228341..6053930288 100644
--- a/gnulib/m4/host-cpu-c-abi.m4
+++ b/gnulib/m4/host-cpu-c-abi.m4
@@ -1,5 +1,6 @@
-# host-cpu-c-abi.m4 serial 15
-dnl Copyright (C) 2002-2023 Free Software Foundation, Inc.
+# host-cpu-c-abi.m4
+# serial 17
+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.
@@ -461,217 +462,66 @@ EOF
dnl Sets the HOST_CPU_C_ABI_32BIT variable to 'yes' if the C language ABI
dnl (application binary interface) is a 32-bit one, to 'no' if it is a 64-bit
-dnl one, or to 'unknown' if unknown.
+dnl one.
dnl This is a simplified variant of gl_HOST_CPU_C_ABI.
AC_DEFUN([gl_HOST_CPU_C_ABI_32BIT],
[
AC_REQUIRE([AC_CANONICAL_HOST])
AC_CACHE_CHECK([32-bit host C ABI], [gl_cv_host_cpu_c_abi_32bit],
- [if test -n "$gl_cv_host_cpu_c_abi"; then
- case "$gl_cv_host_cpu_c_abi" in
- i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 |
mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
- gl_cv_host_cpu_c_abi_32bit=yes ;;
- x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 |
powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 )
- gl_cv_host_cpu_c_abi_32bit=no ;;
- *)
- gl_cv_host_cpu_c_abi_32bit=unknown ;;
- esac
- else
- case "$host_cpu" in
-
- # CPUs that only support a 32-bit ABI.
- arc \
- | bfin \
- | cris* \
- | csky \
- | epiphany \
- | ft32 \
- | h8300 \
- | m68k \
- | microblaze | microblazeel \
- | nds32 | nds32le | nds32be \
- | nios2 | nios2eb | nios2el \
- | or1k* \
- | or32 \
- | sh | sh[1234] | sh[1234]e[lb] \
- | tic6x \
- | xtensa* )
- gl_cv_host_cpu_c_abi_32bit=yes
- ;;
+ [case "$host_cpu" in
- # CPUs that only support a 64-bit ABI.
-changequote(,)dnl
- alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
- | mmix )
-changequote([,])dnl
- gl_cv_host_cpu_c_abi_32bit=no
- ;;
+ # CPUs that only support a 32-bit ABI.
+ arc \
+ | bfin \
+ | cris* \
+ | csky \
+ | epiphany \
+ | ft32 \
+ | h8300 \
+ | m68k \
+ | microblaze | microblazeel \
+ | nds32 | nds32le | nds32be \
+ | nios2 | nios2eb | nios2el \
+ | or1k* \
+ | or32 \
+ | sh | sh[1234] | sh[1234]e[lb] \
+ | tic6x \
+ | xtensa* )
+ gl_cv_host_cpu_c_abi_32bit=yes
+ ;;
+ # CPUs that only support a 64-bit ABI.
changequote(,)dnl
- i[34567]86 )
+ alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \
+ | mmix )
changequote([,])dnl
- gl_cv_host_cpu_c_abi_32bit=yes
- ;;
-
- x86_64 )
- # On x86_64 systems, the C compiler may be generating code in one of
- # these ABIs:
- # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64.
- # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64
- # with native Windows (mingw, MSVC).
- # - 64-bit instruction set, 32-bit pointers, 32-bit 'long':
x86_64-x32.
- # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if (defined __x86_64__ || defined __amd64__ \
- || defined _M_X64 || defined _M_AMD64) \
- && !(defined __ILP32__ || defined _ILP32)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- arm* | aarch64 )
- # Assume arm with EABI.
- # On arm64 systems, the C compiler may be generating code in one of
- # these ABIs:
- # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64.
- # - aarch64 instruction set, 32-bit pointers, 32-bit 'long':
arm64-ilp32.
- # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or
armhf.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __aarch64__ && !(defined __ILP32__ || defined
_ILP32)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- hppa1.0 | hppa1.1 | hppa2.0* | hppa64 )
- # On hppa, the C compiler may be generating 32-bit code or 64-bit
- # code. In the latter case, it defines _LP64 and __LP64__.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef __LP64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- ia64* )
- # On ia64 on HP-UX, the C compiler may be generating 64-bit code or
- # 32-bit code. In the latter case, it defines _ILP32.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#ifdef _ILP32
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=yes],
- [gl_cv_host_cpu_c_abi_32bit=no])
- ;;
-
- mips* )
- # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this
- # at 32.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64)
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- powerpc* )
- # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD.
- # No need to distinguish them here; the caller may distinguish
- # them based on the OS.
- # On powerpc64 systems, the C compiler may still be generating
- # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may
- # be generating 64-bit code.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __powerpc64__ || defined __LP64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- rs6000 )
- gl_cv_host_cpu_c_abi_32bit=yes
- ;;
-
- riscv32 | riscv64 )
- # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d.
- # Size of 'long' and 'void *':
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __LP64__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- s390* )
- # On s390x, the C compiler may be generating 64-bit (= s390x) code
- # or 31-bit (= s390) code.
- AC_COMPILE_IFELSE(
- [AC_LANG_SOURCE(
- [[#if defined __LP64__ || defined __s390x__
- int ok;
- #else
- error fail
- #endif
- ]])],
- [gl_cv_host_cpu_c_abi_32bit=no],
- [gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
+ gl_cv_host_cpu_c_abi_32bit=no
+ ;;
- sparc | sparc64 )
- # UltraSPARCs running Linux have `uname -m` = "sparc64", but the
- # C compiler still generates 32-bit code.
+ *)
+ if test -n "$gl_cv_host_cpu_c_abi"; then
+ dnl gl_HOST_CPU_C_ABI has already been run. Use its result.
+ case "$gl_cv_host_cpu_c_abi" in
+ i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32
| mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc)
+ gl_cv_host_cpu_c_abi_32bit=yes ;;
+ 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 ;;
+ esac
+ else
+ gl_cv_host_cpu_c_abi_32bit=unknown
+ fi
+ if test $gl_cv_host_cpu_c_abi_32bit = unknown; then
AC_COMPILE_IFELSE(
[AC_LANG_SOURCE(
- [[#if defined __sparcv9 || defined __arch64__
- int ok;
- #else
- error fail
- #endif
+ [[int test_pointer_size[sizeof (void *) - 5];
]])],
[gl_cv_host_cpu_c_abi_32bit=no],
[gl_cv_host_cpu_c_abi_32bit=yes])
- ;;
-
- *)
- gl_cv_host_cpu_c_abi_32bit=unknown
- ;;
- esac
- fi
+ fi
+ ;;
+ esac
])
HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit"
diff --git a/gnulib/m4/iconv.m4 b/gnulib/m4/iconv.m4
index ff5d526113..b414bfca62 100644
--- a/gnulib/m4/iconv.m4
+++ b/gnulib/m4/iconv.m4
@@ -1,5 +1,6 @@
-# iconv.m4 serial 26
-dnl Copyright (C) 2000-2002, 2007-2014, 2016-2023 Free Software Foundation,
+# iconv.m4
+# serial 28
+dnl Copyright (C) 2000-2002, 2007-2014, 2016-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,
@@ -38,7 +39,7 @@ AC_DEFUN([AM_ICONV_LINK],
dnl because if the user has installed libiconv and not disabled its use
dnl via --without-libiconv-prefix, he wants to use it. The first
dnl AC_LINK_IFELSE will then fail, the second AC_LINK_IFELSE will succeed.
- am_save_CPPFLAGS="$CPPFLAGS"
+ gl_saved_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
@@ -55,7 +56,7 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close(cd);]])],
[am_cv_func_iconv=yes])
if test "$am_cv_func_iconv" != yes; then
- am_save_LIBS="$LIBS"
+ gl_saved_LIBS="$LIBS"
LIBS="$LIBS $LIBICONV"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
@@ -68,14 +69,14 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close(cd);]])],
[am_cv_lib_iconv=yes]
[am_cv_func_iconv=yes])
- LIBS="$am_save_LIBS"
+ LIBS="$gl_saved_LIBS"
fi
])
if test "$am_cv_func_iconv" = yes; then
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
dnl This tests against bugs in AIX 5.1, AIX 6.1..7.1, HP-UX 11.11,
- dnl Solaris 10.
- am_save_LIBS="$LIBS"
+ dnl Solaris 10, macOS 14.4.
+ gl_saved_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
@@ -113,6 +114,35 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_close (cd_utf8_to_88591);
}
}
+ /* Test against macOS 14.4 bug: Failures are not distinguishable from
+ successful returns.
+ POSIX:2018 says: "The iconv() function shall ... return the number of
+ non-identical conversions performed."
+ But here, the conversion always does transliteration (the suffixes
+ "//TRANSLIT" and "//IGNORE" have no effect, nor does iconvctl()) and
+ does not report when it does a non-identical conversion. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static ICONV_CONST char input[] = "\305\202"; /* LATIN SMALL LETTER L
WITH STROKE */
+ char buf[10];
+ ICONV_CONST char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ /* Here:
+ With glibc, GNU libiconv (including macOS up to 13): res ==
(size_t)-1, errno == EILSEQ.
+ With musl libc, NetBSD 10, Solaris 11: res == 1.
+ With macOS 14.4: res == 0, output is "l". */
+ if (res == 0)
+ result |= 2;
+ iconv_close (cd_utf8_to_88591);
+ }
+ }
/* Test against Solaris 10 bug: Failures are not distinguishable from
successful returns. */
{
@@ -129,7 +159,7 @@ AC_DEFUN([AM_ICONV_LINK],
&inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
- result |= 2;
+ result |= 4;
iconv_close (cd_ascii_to_88591);
}
}
@@ -148,7 +178,7 @@ AC_DEFUN([AM_ICONV_LINK],
&inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
- result |= 4;
+ result |= 8;
iconv_close (cd_88591_to_utf8);
}
}
@@ -168,7 +198,7 @@ AC_DEFUN([AM_ICONV_LINK],
&inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
- result |= 8;
+ result |= 16;
iconv_close (cd_88591_to_utf8);
}
}
@@ -186,7 +216,7 @@ AC_DEFUN([AM_ICONV_LINK],
iconv_t cd4 = iconv_open ("utf8", "eucJP");
if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1)
&& cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1))
- result |= 16;
+ result |= 32;
if (cd1 != (iconv_t)(-1))
iconv_close (cd1);
if (cd2 != (iconv_t)(-1))
@@ -205,7 +235,7 @@ AC_DEFUN([AM_ICONV_LINK],
esac])
test "$am_cv_func_iconv_works" = no || break
done
- LIBS="$am_save_LIBS"
+ LIBS="$gl_saved_LIBS"
])
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
@@ -224,7 +254,7 @@ AC_DEFUN([AM_ICONV_LINK],
else
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
dnl either.
- CPPFLAGS="$am_save_CPPFLAGS"
+ CPPFLAGS="$gl_saved_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi
diff --git a/gnulib/m4/include_next.m4 b/gnulib/m4/include_next.m4
index 9f19215ef0..03e852518e 100644
--- a/gnulib/m4/include_next.m4
+++ b/gnulib/m4/include_next.m4
@@ -1,5 +1,6 @@
-# include_next.m4 serial 26
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+# include_next.m4
+# serial 27
+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.
@@ -74,17 +75,17 @@ EOF
#endif
#define DEFINED_IN_CONFTESTD2
EOF
- gl_save_CPPFLAGS="$CPPFLAGS"
- CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+ gl_saved_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$gl_saved_CPPFLAGS -Iconftestd1b -Iconftestd2"
dnl We intentionally avoid using AC_LANG_SOURCE here.
AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
[gl_cv_have_include_next=yes],
- [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+ [CPPFLAGS="$gl_saved_CPPFLAGS -Iconftestd1a -Iconftestd2"
AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[#include <conftest.h>]],
[gl_cv_have_include_next=buggy],
[gl_cv_have_include_next=no])
])
- CPPFLAGS="$gl_save_CPPFLAGS"
+ CPPFLAGS="$gl_saved_CPPFLAGS"
rm -rf conftestd1a conftestd1b conftestd2
])
PRAGMA_SYSTEM_HEADER=
diff --git a/gnulib/m4/intmax_t.m4 b/gnulib/m4/intmax_t.m4
index ef32e1b9ca..72858ea86c 100644
--- a/gnulib/m4/intmax_t.m4
+++ b/gnulib/m4/intmax_t.m4
@@ -1,5 +1,6 @@
-# intmax_t.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006-2007, 2009-2023 Free Software Foundation,
+# intmax_t.m4
+# serial 9
+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/gnulib/m4/inttypes.m4 b/gnulib/m4/inttypes.m4
index e7efbe9416..c43cd16207 100644
--- a/gnulib/m4/inttypes.m4
+++ b/gnulib/m4/inttypes.m4
@@ -1,5 +1,6 @@
-# inttypes.m4 serial 37
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+# inttypes.m4
+# serial 37
+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/gnulib/m4/inttypes_h.m4 b/gnulib/m4/inttypes_h.m4
index 68c60e9dbb..3b9da5b0ac 100644
--- a/gnulib/m4/inttypes_h.m4
+++ b/gnulib/m4/inttypes_h.m4
@@ -1,5 +1,6 @@
-# inttypes_h.m4 serial 10
-dnl Copyright (C) 1997-2004, 2006, 2008-2023 Free Software Foundation, Inc.
+# inttypes_h.m4
+# serial 10
+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/gnulib/m4/iswblank.m4 b/gnulib/m4/iswblank.m4
index b1220b1e93..4dc12d9adf 100644
--- a/gnulib/m4/iswblank.m4
+++ b/gnulib/m4/iswblank.m4
@@ -1,5 +1,6 @@
-# iswblank.m4 serial 7
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# 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.
diff --git a/gnulib/m4/iswctype.m4 b/gnulib/m4/iswctype.m4
index 5dedaa365a..16031be475 100644
--- a/gnulib/m4/iswctype.m4
+++ b/gnulib/m4/iswctype.m4
@@ -1,5 +1,6 @@
-# iswctype.m4 serial 3
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# 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.
diff --git a/gnulib/m4/iswdigit.m4 b/gnulib/m4/iswdigit.m4
index b0572819ce..999acd2891 100644
--- a/gnulib/m4/iswdigit.m4
+++ b/gnulib/m4/iswdigit.m4
@@ -1,5 +1,6 @@
-# iswdigit.m4 serial 5
-dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
+# iswdigit.m4
+# serial 7
+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.
@@ -12,6 +13,7 @@ AC_DEFUN([gl_FUNC_ISWDIGIT],
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.
@@ -75,7 +77,7 @@ main (int argc, char *argv[])
if (strcmp ("$LOCALE_JA", "none") != 0
&& setlocale (LC_ALL, "$LOCALE_JA") != NULL)
{
- /* This fails on NetBSD 8.0. */
+ /* This fails on NetBSD 10.0. */
/* U+FF11 FULLWIDTH DIGIT ONE */
is = for_character ("\243\261", 2);
if (!(is == 0))
@@ -84,12 +86,12 @@ main (int argc, char *argv[])
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. */
+ /* This fails on FreeBSD 13.0, NetBSD 10.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. */
+ /* This fails on FreeBSD 13.0, NetBSD 10.0, MSVC 14. */
/* U+FF11 FULLWIDTH DIGIT ONE */
is = for_character ("\357\274\221", 3);
if (!(is == 0))
@@ -98,7 +100,7 @@ main (int argc, char *argv[])
if (strcmp ("$LOCALE_ZH_CN", "none") != 0
&& setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
{
- /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4. */
+ /* This fails on NetBSD 10.0, Solaris 10, Solaris 11.4. */
/* U+FF11 FULLWIDTH DIGIT ONE */
is = for_character ("\243\261", 2);
if (!(is == 0))
diff --git a/gnulib/m4/iswpunct.m4 b/gnulib/m4/iswpunct.m4
index 14691154cf..1edf58aa81 100644
--- a/gnulib/m4/iswpunct.m4
+++ b/gnulib/m4/iswpunct.m4
@@ -1,5 +1,6 @@
-# iswpunct.m4 serial 1
-dnl Copyright (C) 2023 Free Software Foundation, Inc.
+# 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.
@@ -8,6 +9,7 @@ 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.
diff --git a/gnulib/m4/iswxdigit.m4 b/gnulib/m4/iswxdigit.m4
index 7321807bc6..6085bf6b01 100644
--- a/gnulib/m4/iswxdigit.m4
+++ b/gnulib/m4/iswxdigit.m4
@@ -1,5 +1,6 @@
-# iswxdigit.m4 serial 5
-dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
+# iswxdigit.m4
+# serial 7
+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.
@@ -11,6 +12,7 @@ AC_DEFUN([gl_FUNC_ISWXDIGIT],
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.
@@ -65,7 +67,7 @@ main (int argc, char *argv[])
if (strcmp ("$LOCALE_JA", "none") != 0
&& setlocale (LC_ALL, "$LOCALE_JA") != NULL)
{
- /* This fails on NetBSD 8.0. */
+ /* This fails on NetBSD 10.0. */
/* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
is = for_character ("\243\301", 2);
if (!(is == 0))
@@ -79,7 +81,7 @@ main (int argc, char *argv[])
is = for_character ("\331\243", 2);
if (!(is == 0))
result |= 2;
- /* This fails on MSVC 14. */
+ /* This fails on NetBSD 10.0, MSVC 14. */
/* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
is = for_character ("\357\274\241", 3);
if (!(is == 0))
diff --git a/gnulib/m4/langinfo_h.m4 b/gnulib/m4/langinfo_h.m4
index b17a526ab9..5eee8a71f6 100644
--- a/gnulib/m4/langinfo_h.m4
+++ b/gnulib/m4/langinfo_h.m4
@@ -1,5 +1,6 @@
-# langinfo_h.m4 serial 12
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+# langinfo_h.m4
+# serial 12
+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/gnulib/m4/largefile.m4 b/gnulib/m4/largefile.m4
index 7e65d72fea..2f824089b0 100644
--- a/gnulib/m4/largefile.m4
+++ b/gnulib/m4/largefile.m4
@@ -1,11 +1,13 @@
+# largefile.m4
+# serial 1
+dnl Copyright 1992-1996, 1998-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.
+
# 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.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
# The following macro works around a problem in Autoconf's AC_FUNC_FSEEKO:
# It does not set _LARGEFILE_SOURCE=1 on HP-UX/ia64 32-bit, although this
# setting of _LARGEFILE_SOURCE is needed so that <stdio.h> declares fseeko
@@ -24,9 +26,20 @@ AC_DEFUN([gl_SET_LARGEFILE_SOURCE],
]])
)
+dnl Remove AC_SYS_YEAR2038_RECOMMENDED if unpatched Autoconf 2.72 or earlier.
+dnl Autoconf 2.72 still uses -n32, which is not a C preprocessor option,
+dnl and which was useful only on IRIX which is no longer supported.
+dnl This should be fixed in Autoconf 2.73.
+m4_ifdef([AC_SYS_YEAR2038_RECOMMENDED],
+ [m4_bmatch(m4_ifdef([_AC_SYS_LARGEFILE_OPTIONS],
+ [m4_defn([_AC_SYS_LARGEFILE_OPTIONS])],
+ ["-n32"]),
+ ["-n32"],
+ [m4_undefine([AC_SYS_YEAR2038_RECOMMENDED])])])
+
m4_ifndef([AC_SYS_YEAR2038_RECOMMENDED], [
-# Support AC_SYS_YEAR2038_RECOMMENDED and related macros, even if
-# Autoconf 2.71 or earlier. This code is taken from Autoconf master.
+# Fix up AC_SYS_YEAR2038_RECOMMENDED and related macros, even if
+# unpatched Autoconf 2.72 or earlier. This code is taken from Autoconf master.
# _AC_SYS_YEAR2038_TEST_CODE
# --------------------------
@@ -75,7 +88,7 @@ m4_define([_AC_SYS_YEAR2038_OPTIONS], m4_normalize(
# If you change this macro you may also need to change
# _AC_SYS_YEAR2038_OPTIONS.
AC_DEFUN([_AC_SYS_YEAR2038_PROBE],
-[AC_CACHE_CHECK([for $CC option for timestamps after 2038],
+[AC_CACHE_CHECK([for $CPPFLAGS option for timestamps after 2038],
[ac_cv_sys_year2038_opts],
[ac_save_CPPFLAGS="$CPPFLAGS"
ac_opt_found=no
@@ -205,7 +218,6 @@ m4_define([_AC_SYS_LARGEFILE_OPTIONS], m4_normalize(
["none needed"] dnl Most current systems
["-D_FILE_OFFSET_BITS=64"] dnl X/Open LFS spec
["-D_LARGE_FILES=1"] dnl 32-bit AIX 4.2.1+, 32-bit z/OS
- ["-n32"] dnl 32-bit IRIX 6, SGI cc (obsolete)
))
# _AC_SYS_LARGEFILE_PROBE
@@ -222,25 +234,25 @@ m4_define([_AC_SYS_LARGEFILE_OPTIONS], m4_normalize(
# If you change this macro you may also need to change
# _AC_SYS_LARGEFILE_OPTIONS.
AC_DEFUN([_AC_SYS_LARGEFILE_PROBE],
-[AC_CACHE_CHECK([for $CC option to enable large file support],
+[AC_CACHE_CHECK([for $CPPFLAGS option for large files],
[ac_cv_sys_largefile_opts],
- [ac_save_CC="$CC"
+ [ac_save_CPPFLAGS=$CPPFLAGS
ac_opt_found=no
for ac_opt in _AC_SYS_LARGEFILE_OPTIONS; do
AS_IF([test x"$ac_opt" != x"none needed"],
- [CC="$ac_save_CC $ac_opt"])
+ [CPPFLAGS="$ac_save_CPPFLAGS $ac_opt"])
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([_AC_SYS_LARGEFILE_TEST_CODE])],
[AS_IF([test x"$ac_opt" = x"none needed"],
[# GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t.
- CC="$CC -DFTYPE=ino_t"
+ CPPFLAGS="$CPPFLAGS -DFTYPE=ino_t"
AC_COMPILE_IFELSE([], [],
- [CC="$CC -D_FILE_OFFSET_BITS=64"
+ [CPPFLAGS="$CPPFLAGS -D_FILE_OFFSET_BITS=64"
AC_COMPILE_IFELSE([], [ac_opt='-D_FILE_OFFSET_BITS=64'])])])
ac_cv_sys_largefile_opts=$ac_opt
ac_opt_found=yes])
test $ac_opt_found = no || break
done
- CC="$ac_save_CC"
+ CPPFLAGS=$ac_save_CPPFLAGS
dnl Gnulib implements large file support for native Windows, based on the
dnl variables WINDOWS_64_BIT_OFF_T, WINDOWS_64_BIT_ST_SIZE.
m4_ifdef([gl_LARGEFILE], [
@@ -270,9 +282,6 @@ AS_CASE([$ac_cv_sys_largefile_opts],
[AC_DEFINE([_LARGE_FILES], [1],
[Define to 1 on platforms where this makes off_t a 64-bit type.])],
- ["-n32"],
- [CC="$CC -n32"],
-
[AC_MSG_ERROR(
[internal error: bad value for \$ac_cv_sys_largefile_opts])])
diff --git a/gnulib/m4/lib-ld.m4 b/gnulib/m4/lib-ld.m4
index 70ca4a2e1d..5da3eecfc6 100644
--- a/gnulib/m4/lib-ld.m4
+++ b/gnulib/m4/lib-ld.m4
@@ -1,5 +1,6 @@
-# lib-ld.m4 serial 12
-dnl Copyright (C) 1996-2003, 2009-2023 Free Software Foundation, Inc.
+# lib-ld.m4
+# serial 13
+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.
@@ -97,9 +98,9 @@ else
fi
if test -n "$ac_prog"; then
# Search for $ac_prog in $PATH.
- acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ acl_saved_IFS="$IFS"; IFS=$PATH_SEPARATOR
for ac_dir in $PATH; do
- IFS="$acl_save_ifs"
+ IFS="$acl_saved_IFS"
test -z "$ac_dir" && ac_dir=.
if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext";
then
acl_cv_path_LD="$ac_dir/$ac_prog"
@@ -116,7 +117,7 @@ else
esac
fi
done
- IFS="$acl_save_ifs"
+ IFS="$acl_saved_IFS"
fi
case $host in
*-*-aix*)
diff --git a/gnulib/m4/lib-link.m4 b/gnulib/m4/lib-link.m4
index 5f8afae61a..fb764d3229 100644
--- a/gnulib/m4/lib-link.m4
+++ b/gnulib/m4/lib-link.m4
@@ -1,5 +1,6 @@
-# lib-link.m4 serial 33
-dnl Copyright (C) 2001-2023 Free Software Foundation, Inc.
+# lib-link.m4
+# serial 34
+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.
@@ -69,11 +70,11 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
dnl because if the user has installed lib[]Name and not disabled its use
dnl via --without-lib[]Name-prefix, he wants to use it.
- ac_save_CPPFLAGS="$CPPFLAGS"
+ acl_saved_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
- ac_save_LIBS="$LIBS"
+ acl_saved_LIBS="$LIBS"
dnl If $LIB[]NAME contains some -l options, add it to the end of LIBS,
dnl because these -l options might require -L options that are present in
dnl LIBS. -l options benefit only from the -L options listed before it.
@@ -89,7 +90,7 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
[AC_LANG_PROGRAM([[$3]], [[$4]])],
[ac_cv_lib[]Name=yes],
[ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
- LIBS="$ac_save_LIBS"
+ LIBS="$acl_saved_LIBS"
])
if test "$ac_cv_lib[]Name" = yes; then
HAVE_LIB[]NAME=yes
@@ -100,7 +101,7 @@ AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
HAVE_LIB[]NAME=no
dnl If $LIB[]NAME didn't lead to a usable library, we don't need
dnl $INC[]NAME either.
- CPPFLAGS="$ac_save_CPPFLAGS"
+ CPPFLAGS="$acl_saved_CPPFLAGS"
LIB[]NAME=
LTLIB[]NAME=
LIB[]NAME[]_PREFIX=
@@ -537,12 +538,12 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
dnl Read the .la file. It defines the variables
dnl dlname, library_names, old_library, dependency_libs, current,
dnl age, revision, installed, dlopen, dlpreopen, libdir.
- save_libdir="$libdir"
+ saved_libdir="$libdir"
case "$found_la" in
*/* | *\\*) . "$found_la" ;;
*) . "./$found_la" ;;
esac
- libdir="$save_libdir"
+ libdir="$saved_libdir"
dnl We use only dependency_libs.
for dep in $dependency_libs; do
case "$dep" in
@@ -682,18 +683,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
done
dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
- acl_save_libdir="$libdir"
+ acl_saved_libdir="$libdir"
libdir="$alldirs"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
+ libdir="$acl_saved_libdir"
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
else
dnl The -rpath options are cumulative.
for found_dir in $rpathdirs; do
- acl_save_libdir="$libdir"
+ acl_saved_libdir="$libdir"
libdir="$found_dir"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
+ libdir="$acl_saved_libdir"
LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
done
fi
@@ -790,18 +791,18 @@ AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
for dir in $rpathdirs; do
alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
done
- acl_save_libdir="$libdir"
+ acl_saved_libdir="$libdir"
libdir="$alldirs"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
+ libdir="$acl_saved_libdir"
$1="$flag"
else
dnl The -rpath options are cumulative.
for dir in $rpathdirs; do
- acl_save_libdir="$libdir"
+ acl_saved_libdir="$libdir"
libdir="$dir"
eval flag=\"$acl_hardcode_libdir_flag_spec\"
- libdir="$acl_save_libdir"
+ libdir="$acl_saved_libdir"
$1="${$1}${$1:+ }$flag"
done
fi
diff --git a/gnulib/m4/lib-prefix.m4 b/gnulib/m4/lib-prefix.m4
index aefe7f7124..6277f72d0c 100644
--- a/gnulib/m4/lib-prefix.m4
+++ b/gnulib/m4/lib-prefix.m4
@@ -1,5 +1,6 @@
-# lib-prefix.m4 serial 20
-dnl Copyright (C) 2001-2005, 2008-2023 Free Software Foundation, Inc.
+# lib-prefix.m4
+# serial 23
+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.
@@ -126,10 +127,10 @@ AC_DEFUN([AC_LIB_PREPARE_PREFIX],
else
acl_final_exec_prefix="$exec_prefix"
fi
- acl_save_prefix="$prefix"
+ acl_saved_prefix="$prefix"
prefix="$acl_final_prefix"
eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
- prefix="$acl_save_prefix"
+ prefix="$acl_saved_prefix"
])
dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
@@ -137,13 +138,13 @@ dnl variables prefix and exec_prefix bound to the values
they will have
dnl at the end of the configure script.
AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
[
- acl_save_prefix="$prefix"
+ acl_saved_prefix="$prefix"
prefix="$acl_final_prefix"
- acl_save_exec_prefix="$exec_prefix"
+ acl_saved_exec_prefix="$exec_prefix"
exec_prefix="$acl_final_exec_prefix"
$1
- exec_prefix="$acl_save_exec_prefix"
- prefix="$acl_save_prefix"
+ exec_prefix="$acl_saved_exec_prefix"
+ prefix="$acl_saved_prefix"
])
dnl AC_LIB_PREPARE_MULTILIB creates
@@ -174,7 +175,7 @@ AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
AC_CACHE_CHECK([for ELF binary format], [gl_cv_elf],
[AC_EGREP_CPP([Extensible Linking Format],
- [#if defined __ELF__ || (defined __linux__ && defined __EDG__)
+ [#if defined __ELF__ || (defined __linux__ && (defined __EDG__ ||
defined __SUNPRO_C))
Extensible Linking Format
#endif
],
@@ -256,6 +257,15 @@ changequote([,])dnl
esac
fi
;;
+ netbsd*)
+ dnl On NetBSD/sparc64, there is a 'sparc' subdirectory that contains
+ dnl 32-bit libraries.
+ if test $HOST_CPU_C_ABI_32BIT != no; then
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparc ;;
+ esac
+ fi
+ ;;
*)
dnl If $CC generates code for a 32-bit ABI, the libraries are
dnl surely under $prefix/lib or $prefix/lib32, not $prefix/lib64.
@@ -280,7 +290,7 @@ changequote([,])dnl
fi
fi
if test -n "$searchpath"; then
- acl_save_IFS="${IFS= }"; IFS=":"
+ acl_saved_IFS="${IFS= }"; IFS=":"
for searchdir in $searchpath; do
if test -d "$searchdir"; then
case "$searchdir" in
@@ -297,7 +307,7 @@ changequote([,])dnl
esac
fi
done
- IFS="$acl_save_IFS"
+ IFS="$acl_saved_IFS"
if test $HOST_CPU_C_ABI_32BIT = yes; then
# 32-bit ABI.
acl_libdirstem3=
diff --git a/gnulib/m4/libunistring-base.m4 b/gnulib/m4/libunistring-base.m4
index 6dd184a789..21e0e44212 100644
--- a/gnulib/m4/libunistring-base.m4
+++ b/gnulib/m4/libunistring-base.m4
@@ -1,5 +1,6 @@
-# libunistring-base.m4 serial 8
-dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
+# libunistring-base.m4
+# serial 9
+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.
@@ -152,6 +153,10 @@ dnl gl_LIBUNISTRING_VERSION_CMP([VERSION])
dnl Expands to a shell statement that evaluates to true if LIBUNISTRING_VERSION
dnl is less than the VERSION argument.
AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP],
+[dnl VERSION = 999.9 means to evaluates to true always, i.e. to ignore
+dnl the installed libunistring regardless of its version.
+m4_if([$1], [999.9],
+[true],
[ { test "$HAVE_LIBUNISTRING" != yes \
|| {
dnl AS_LITERAL_IF exists and works fine since autoconf-2.59 at least.
@@ -189,7 +194,7 @@ AC_DEFUN([gl_LIBUNISTRING_VERSION_CMP],
}
])
}
- }])
+ }])])
dnl gl_LIBUNISTRING_ARG_OR_ZERO([ARG], [ORIG]) expands to ARG if it is not the
dnl same as ORIG, otherwise to 0.
diff --git a/gnulib/m4/limits-h.m4 b/gnulib/m4/limits-h.m4
index 6a5983ebc2..1b619e1eb2 100644
--- a/gnulib/m4/limits-h.m4
+++ b/gnulib/m4/limits-h.m4
@@ -1,10 +1,12 @@
-dnl Check whether limits.h has needed features.
-
-dnl Copyright 2016-2023 Free Software Foundation, Inc.
+# limits-h.m4
+# serial 1
+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.
+dnl Check whether limits.h has needed features.
+
dnl From Paul Eggert.
AC_DEFUN_ONCE([gl_LIMITS_H],
diff --git a/gnulib/m4/localcharset.m4 b/gnulib/m4/localcharset.m4
index 15b6b2a553..807a5eedac 100644
--- a/gnulib/m4/localcharset.m4
+++ b/gnulib/m4/localcharset.m4
@@ -1,5 +1,6 @@
-# localcharset.m4 serial 8
-dnl Copyright (C) 2002, 2004, 2006, 2009-2023 Free Software Foundation, Inc.
+# localcharset.m4
+# serial 8
+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/gnulib/m4/locale-fr.m4 b/gnulib/m4/locale-fr.m4
index ac1c7217da..f8d7c543e0 100644
--- a/gnulib/m4/locale-fr.m4
+++ b/gnulib/m4/locale-fr.m4
@@ -1,5 +1,6 @@
-# locale-fr.m4 serial 23
-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.
@@ -116,7 +117,7 @@ int main () {
if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
gt_cv_locale_fr=fr_FR.iso88591
else
- # Test for the Solaris 7 locale name.
+ # Test for the Solaris 10 locale name.
if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
gt_cv_locale_fr=fr
else
@@ -250,7 +251,7 @@ int main () {
if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
gt_cv_locale_fr_utf8=fr_FR.UTF-8
else
- # Test for the Solaris 7 locale name.
+ # Test for the Solaris 10 locale name.
if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
gt_cv_locale_fr_utf8=fr.UTF-8
else
diff --git a/gnulib/m4/locale-ja.m4 b/gnulib/m4/locale-ja.m4
index 4350010cba..8423bcb972 100644
--- a/gnulib/m4/locale-ja.m4
+++ b/gnulib/m4/locale-ja.m4
@@ -1,5 +1,6 @@
-# locale-ja.m4 serial 18
-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.
@@ -117,7 +118,7 @@ int main ()
if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
gt_cv_locale_ja=ja_JP.EUC
else
- # Test for the Solaris 7 locale name.
+ # Test for the Solaris 10 locale name.
if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit)
2>/dev/null; then
gt_cv_locale_ja=ja
else
diff --git a/gnulib/m4/locale-zh.m4 b/gnulib/m4/locale-zh.m4
index 10a2b5875a..fb9f26ab9f 100644
--- a/gnulib/m4/locale-zh.m4
+++ b/gnulib/m4/locale-zh.m4
@@ -1,5 +1,6 @@
-# locale-zh.m4 serial 18
-dnl Copyright (C) 2003, 2005-2023 Free Software Foundation, Inc.
+# locale-zh.m4
+# serial 19
+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.
@@ -21,6 +22,7 @@ AC_DEFUN_ONCE([gt_LOCALE_ZH_CN],
#endif
#include <stdlib.h>
#include <string.h>
+#include <wchar.h>
struct tm t;
char buf[16];
int main ()
@@ -79,6 +81,19 @@ int main ()
single wide character. This excludes the GB2312 and GBK encodings. */
if (mblen ("\203\062\332\066", 5) != 4)
return 1;
+ /* Check whether mbrtowc accept this character one byte at a time.
+ This excludes NetBSD 10.0. */
+ if (sizeof (wchar_t) > 2)
+ {
+ wchar_t wc;
+ mbstate_t state;
+ memset (&state, 0, sizeof (state));
+ if (!(mbrtowc (&wc, "\203", 1, &state) == (size_t)(-2)
+ && mbrtowc (&wc, "\062", 1, &state) == (size_t)(-2)
+ && mbrtowc (&wc, "\332", 1, &state) == (size_t)(-2)
+ && mbrtowc (&wc, "\066", 1, &state) == 1))
+ return 1;
+ }
return 0;
#endif
}
diff --git a/gnulib/m4/locale_h.m4 b/gnulib/m4/locale_h.m4
index f7281ac0c8..cd1c81ec12 100644
--- a/gnulib/m4/locale_h.m4
+++ b/gnulib/m4/locale_h.m4
@@ -1,5 +1,6 @@
-# locale_h.m4 serial 29
-dnl Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
+# locale_h.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.
@@ -59,9 +60,6 @@ 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
- windows*-gnu*)
- REPLACE_STRUCT_LCONV=1
- ;;
windows*-msvc*)
;;
mingw* | windows*)
@@ -157,7 +155,7 @@ AC_DEFUN([gl_LOCALE_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETLOCALE])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETLOCALE_NULL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_DUPLOCALE])
- gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALENAME])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_LOCALENAME_UNSAFE])
])
m4_require(GL_MODULE_INDICATOR_PREFIX[_LOCALE_H_MODULE_INDICATOR_DEFAULTS])
AC_REQUIRE([gl_LOCALE_H_DEFAULTS])
diff --git a/gnulib/m4/localeconv.m4 b/gnulib/m4/localeconv.m4
index b9d8c1b113..77d5684ff0 100644
--- a/gnulib/m4/localeconv.m4
+++ b/gnulib/m4/localeconv.m4
@@ -1,5 +1,6 @@
-# localeconv.m4 serial 3
-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.
diff --git a/gnulib/m4/lock.m4 b/gnulib/m4/lock.m4
index 88cf5575d5..eb0fc6a181 100644
--- a/gnulib/m4/lock.m4
+++ b/gnulib/m4/lock.m4
@@ -1,5 +1,6 @@
-# lock.m4 serial 14
-dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
+# lock.m4
+# serial 14
+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/gnulib/m4/lstat.m4 b/gnulib/m4/lstat.m4
index 977386348a..f838e2cc1e 100644
--- a/gnulib/m4/lstat.m4
+++ b/gnulib/m4/lstat.m4
@@ -1,10 +1,9 @@
-# serial 35
-
-# Copyright (C) 1997-2001, 2003-2023 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# lstat.m4
+# serial 36
+dnl Copyright (C) 1997-2001, 2003-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 Jim Meyering.
@@ -18,7 +17,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
diff --git a/gnulib/m4/malloc.m4 b/gnulib/m4/malloc.m4
index 096c262b17..41a46937ea 100644
--- a/gnulib/m4/malloc.m4
+++ b/gnulib/m4/malloc.m4
@@ -1,5 +1,6 @@
-# malloc.m4 serial 30
-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 +17,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;]])
],
diff --git a/gnulib/m4/malloca.m4 b/gnulib/m4/malloca.m4
index 1d777ebe6d..9e09d22cb9 100644
--- a/gnulib/m4/malloca.m4
+++ b/gnulib/m4/malloca.m4
@@ -1,5 +1,6 @@
-# malloca.m4 serial 2
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 Free Software Foundation,
+# malloca.m4
+# serial 2
+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/gnulib/m4/math_h.m4 b/gnulib/m4/math_h.m4
index c214f8efa8..4b26c9e9dc 100644
--- a/gnulib/m4/math_h.m4
+++ b/gnulib/m4/math_h.m4
@@ -1,5 +1,6 @@
-# math_h.m4 serial 126
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# math_h.m4
+# serial 138
+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.
@@ -42,15 +43,21 @@ AC_DEFUN_ONCE([gl_MATH_H],
cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf
expf expl exp2 exp2f exp2l expm1 expm1f expm1l
fabsf fabsl floorf floorl fma fmaf fmal
- fmod fmodf fmodl frexpf frexpl hypotf hypotl
+ fmod fmodf fmodl frexpf frexpl
+ getpayload getpayloadf getpayloadl
+ hypotf hypotl
ilogb ilogbf ilogbl
ldexpf ldexpl
log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l
logb logbf logbl
modf modff modfl powf
remainder remainderf remainderl
- rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl
- tanf tanl tanhf trunc truncf truncl])
+ rint rintf rintl round roundf roundl
+ setpayload setpayloadf setpayloadl
+ setpayloadsig setpayloadsigf setpayloadsigl
+ sinf sinl sinhf sqrtf sqrtl
+ tanf tanl tanhf totalorder totalorderf totalorderl totalordermag
+ totalordermagf totalordermagl trunc truncf truncl])
])
# gl_MATH_MODULE_INDICATOR([modulename])
@@ -113,6 +120,9 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXPF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXP])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_FREXPL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAYLOAD])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAYLOADF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_GETPAYLOADL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOTF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_HYPOTL])
@@ -156,6 +166,12 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUND])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUNDF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ROUNDL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOAD])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIG])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETPAYLOADSIGL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SIGNBIT])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SINL])
@@ -165,6 +181,12 @@ AC_DEFUN([gl_MATH_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TANHF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDER])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERL])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERMAG])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERMAGF])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TOTALORDERMAGL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_TRUNCL])
@@ -210,6 +232,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_FMODF=1; AC_SUBST([HAVE_FMODF])
HAVE_FMODL=1; AC_SUBST([HAVE_FMODL])
HAVE_FREXPF=1; AC_SUBST([HAVE_FREXPF])
+ HAVE_GETPAYLOAD=1; AC_SUBST([HAVE_GETPAYLOAD])
+ HAVE_GETPAYLOADF=1; AC_SUBST([HAVE_GETPAYLOADF])
+ HAVE_GETPAYLOADL=1; AC_SUBST([HAVE_GETPAYLOADL])
HAVE_HYPOTF=1; AC_SUBST([HAVE_HYPOTF])
HAVE_HYPOTL=1; AC_SUBST([HAVE_HYPOTL])
HAVE_ILOGB=1; AC_SUBST([HAVE_ILOGB])
@@ -235,6 +260,12 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_REMAINDERF=1; AC_SUBST([HAVE_REMAINDERF])
HAVE_RINT=1; AC_SUBST([HAVE_RINT])
HAVE_RINTL=1; AC_SUBST([HAVE_RINTL])
+ HAVE_SETPAYLOAD=1; AC_SUBST([HAVE_SETPAYLOAD])
+ HAVE_SETPAYLOADF=1; AC_SUBST([HAVE_SETPAYLOADF])
+ HAVE_SETPAYLOADL=1; AC_SUBST([HAVE_SETPAYLOADL])
+ HAVE_SETPAYLOADSIG=1; AC_SUBST([HAVE_SETPAYLOADSIG])
+ HAVE_SETPAYLOADSIGF=1; AC_SUBST([HAVE_SETPAYLOADSIGF])
+ HAVE_SETPAYLOADSIGL=1; AC_SUBST([HAVE_SETPAYLOADSIGL])
HAVE_SINF=1; AC_SUBST([HAVE_SINF])
HAVE_SINL=1; AC_SUBST([HAVE_SINL])
HAVE_SINHF=1; AC_SUBST([HAVE_SINHF])
@@ -243,6 +274,12 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
HAVE_TANF=1; AC_SUBST([HAVE_TANF])
HAVE_TANL=1; AC_SUBST([HAVE_TANL])
HAVE_TANHF=1; AC_SUBST([HAVE_TANHF])
+ HAVE_TOTALORDER=1; AC_SUBST([HAVE_TOTALORDER])
+ HAVE_TOTALORDERF=1; AC_SUBST([HAVE_TOTALORDERF])
+ HAVE_TOTALORDERL=1; AC_SUBST([HAVE_TOTALORDERL])
+ HAVE_TOTALORDERMAG=1; AC_SUBST([HAVE_TOTALORDERMAG])
+ HAVE_TOTALORDERMAGF=1; AC_SUBST([HAVE_TOTALORDERMAGF])
+ HAVE_TOTALORDERMAGL=1; AC_SUBST([HAVE_TOTALORDERMAGL])
HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL])
HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL])
HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL])
@@ -310,6 +347,9 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
REPLACE_FREXPF=0; AC_SUBST([REPLACE_FREXPF])
REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP])
REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL])
+ REPLACE_GETPAYLOAD=0; AC_SUBST([REPLACE_GETPAYLOAD])
+ REPLACE_GETPAYLOADF=0; AC_SUBST([REPLACE_GETPAYLOADF])
+ REPLACE_GETPAYLOADL=0; AC_SUBST([REPLACE_GETPAYLOADL])
REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL])
REPLACE_HYPOT=0; AC_SUBST([REPLACE_HYPOT])
REPLACE_HYPOTF=0; AC_SUBST([REPLACE_HYPOTF])
@@ -356,6 +396,12 @@ 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_TOTALORDERMAG=0; AC_SUBST([REPLACE_TOTALORDERMAG])
+ REPLACE_TOTALORDERMAGF=0; AC_SUBST([REPLACE_TOTALORDERMAGF])
+ REPLACE_TOTALORDERMAGL=0; AC_SUBST([REPLACE_TOTALORDERMAGL])
REPLACE_TRUNC=0; AC_SUBST([REPLACE_TRUNC])
REPLACE_TRUNCF=0; AC_SUBST([REPLACE_TRUNCF])
REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL])
@@ -366,7 +412,7 @@ AC_DEFUN([gl_MATH_H_DEFAULTS],
# Sets variable HAVE_SAME_LONG_DOUBLE_AS_DOUBLE to 0 or 1, and defines
# HAVE_SAME_LONG_DOUBLE_AS_DOUBLE accordingly.
# The currently known platforms where this is the case are:
-# Linux/HPPA, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9.
+# Linux/HPPA, NetBSD/sparc32, Minix 3.1.8, AIX 5, AIX 6 and 7 with xlc, MSVC 9.
AC_DEFUN([gl_LONG_DOUBLE_VS_DOUBLE],
[
AC_CACHE_CHECK([whether long double and double are the same],
diff --git a/gnulib/m4/mbchar.m4 b/gnulib/m4/mbchar.m4
index aed40a53c6..b84eb4dc96 100644
--- a/gnulib/m4/mbchar.m4
+++ b/gnulib/m4/mbchar.m4
@@ -1,5 +1,6 @@
-# mbchar.m4 serial 9
-dnl Copyright (C) 2005-2007, 2009-2023 Free Software Foundation, Inc.
+# mbchar.m4
+# serial 9
+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/gnulib/m4/mbiter.m4 b/gnulib/m4/mbiter.m4
index 8e879dc4b9..e1f4ae65b7 100644
--- a/gnulib/m4/mbiter.m4
+++ b/gnulib/m4/mbiter.m4
@@ -1,5 +1,6 @@
-# mbiter.m4 serial 7
-dnl Copyright (C) 2005, 2008-2023 Free Software Foundation, Inc.
+# mbiter.m4
+# serial 7
+dnl Copyright (C) 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/gnulib/m4/mbrtoc32.m4 b/gnulib/m4/mbrtoc32.m4
index 361c9f8380..1f1d91cd72 100644
--- a/gnulib/m4/mbrtoc32.m4
+++ b/gnulib/m4/mbrtoc32.m4
@@ -1,5 +1,6 @@
-# mbrtoc32.m4 serial 18
-dnl Copyright (C) 2014-2023 Free Software Foundation, Inc.
+# mbrtoc32.m4
+# serial 19
+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.
@@ -26,6 +27,7 @@ AC_DEFUN([gl_FUNC_MBRTOC32],
else
gl_MBRTOC32_EMPTY_INPUT
gl_MBRTOC32_C_LOCALE
+ gl_MBRTOC32_UTF8_LOCALE
case "$gl_cv_func_mbrtoc32_empty_input" in
*yes) ;;
*) AC_DEFINE([MBRTOC32_EMPTY_INPUT_BUG], [1],
@@ -40,6 +42,15 @@ AC_DEFUN([gl_FUNC_MBRTOC32],
REPLACE_MBRTOC32=1
;;
esac
+ case "$gl_cv_func_mbrtoc32_utf8_locale_works" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOC32_MULTIBYTE_LOCALE_BUG], [1],
+ [Define if the mbrtoc32 function does not accept the input bytes
one-by-one.])
+ REPLACE_MBRTOC32=1
+ dnl Our replacement mbrtoc32 can handle UTF-8, but not GB18030.
+ LOCALE_ZH_CN=none
+ ;;
+ esac
fi
if test $HAVE_WORKING_MBRTOC32 = 0; then
REPLACE_MBRTOC32=1
@@ -162,6 +173,53 @@ AC_DEFUN([gl_MBRTOC32_C_LOCALE],
])
])
+dnl Test whether mbrtoc32 works when it's fed the bytes one-by-one in an UTF-8
+dnl locale.
+
+AC_DEFUN([gl_MBRTOC32_UTF8_LOCALE],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtoc32 works in an UTF-8 locale],
+ [gl_cv_func_mbrtoc32_utf8_locale_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <locale.h>
+ #ifdef __HAIKU__
+ #include <stdint.h>
+ #endif
+ #include <uchar.h>
+ ]], [[
+ char *locale = setlocale (LC_ALL, "en_US.UTF-8");
+ if (locale)
+ {
+ /* This test fails on Cygwin 3.5.3. */
+ mbstate_t state = { 0, };
+ char32_t uc = 0xDEADBEEF;
+ /* \360\237\220\203 = U+0001F403 */
+ if (mbrtoc32 (&uc, "\360", 1, &state) != (size_t)-2)
+ return 1;
+ if (mbrtoc32 (&uc, "\237", 1, &state) != (size_t)-2)
+ return 2;
+ if (mbrtoc32 (&uc, "\220", 1, &state) != (size_t)-2)
+ return 3;
+ if (mbrtoc32 (&uc, "\203", 1, &state) != 1)
+ return 4;
+ if (uc != 0x0001F403)
+ return 5;
+ }
+ return 0;
+ ]])],
+ [gl_cv_func_mbrtoc32_utf8_locale_works=yes],
+ [gl_cv_func_mbrtoc32_utf8_locale_works=no],
+ [case "$host_os" in
+ # Guess no on Cygwin.
+ cygwin*) gl_cv_func_mbrtoc32_utf8_locale_works="guessing yes" ;;
+ *)
gl_cv_func_mbrtoc32_utf8_locale_works="$gl_cross_guess_normal" ;;
+ esac
+ ])
+ ])
+])
+
dnl Test whether mbrtoc32 works not worse than mbrtowc.
dnl Result is HAVE_WORKING_MBRTOC32.
diff --git a/gnulib/m4/mbrtowc.m4 b/gnulib/m4/mbrtowc.m4
index ea0789510f..62c4fdb348 100644
--- a/gnulib/m4/mbrtowc.m4
+++ b/gnulib/m4/mbrtowc.m4
@@ -1,5 +1,6 @@
-# mbrtowc.m4 serial 44 -*- 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,
diff --git a/gnulib/m4/mbsinit.m4 b/gnulib/m4/mbsinit.m4
index 8d10569f64..10c86ba94e 100644
--- a/gnulib/m4/mbsinit.m4
+++ b/gnulib/m4/mbsinit.m4
@@ -1,5 +1,6 @@
-# mbsinit.m4 serial 10
-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.
diff --git a/gnulib/m4/mbslen.m4 b/gnulib/m4/mbslen.m4
index a9e0ed2a58..429317c8c0 100644
--- a/gnulib/m4/mbslen.m4
+++ b/gnulib/m4/mbslen.m4
@@ -1,5 +1,6 @@
-# mbslen.m4 serial 3
-dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
+# mbslen.m4
+# serial 3
+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/gnulib/m4/mbstate_t.m4 b/gnulib/m4/mbstate_t.m4
index dcd66b9613..66d65cd7c1 100644
--- a/gnulib/m4/mbstate_t.m4
+++ b/gnulib/m4/mbstate_t.m4
@@ -1,5 +1,6 @@
-# mbstate_t.m4 serial 14
-dnl Copyright (C) 2000-2002, 2008-2023 Free Software Foundation, Inc.
+# mbstate_t.m4
+# serial 14
+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/gnulib/m4/mbswidth.m4 b/gnulib/m4/mbswidth.m4
index 0b7f90273e..321d15c0b2 100644
--- a/gnulib/m4/mbswidth.m4
+++ b/gnulib/m4/mbswidth.m4
@@ -1,5 +1,6 @@
-# mbswidth.m4 serial 19
-dnl Copyright (C) 2000-2002, 2004, 2006-2023 Free Software Foundation, Inc.
+# mbswidth.m4
+# serial 19
+dnl Copyright (C) 2000-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.
diff --git a/gnulib/m4/mbtowc.m4 b/gnulib/m4/mbtowc.m4
index 02ed6ebb33..603b0c1ae5 100644
--- a/gnulib/m4/mbtowc.m4
+++ b/gnulib/m4/mbtowc.m4
@@ -1,5 +1,6 @@
-# mbtowc.m4 serial 5
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# mbtowc.m4
+# serial 5
+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/gnulib/m4/memchr.m4 b/gnulib/m4/memchr.m4
index 1523f19e09..346a288210 100644
--- a/gnulib/m4/memchr.m4
+++ b/gnulib/m4/memchr.m4
@@ -1,5 +1,6 @@
-# memchr.m4 serial 19
-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.
diff --git a/gnulib/m4/mempcpy.m4 b/gnulib/m4/mempcpy.m4
index 612b77b3c1..377fda3cac 100644
--- a/gnulib/m4/mempcpy.m4
+++ b/gnulib/m4/mempcpy.m4
@@ -1,5 +1,6 @@
-# mempcpy.m4 serial 14
-dnl Copyright (C) 2003-2004, 2006-2007, 2009-2023 Free Software Foundation,
+# mempcpy.m4
+# serial 14
+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/gnulib/m4/memrchr.m4 b/gnulib/m4/memrchr.m4
index 7611ac7e3a..d8c931e90c 100644
--- a/gnulib/m4/memrchr.m4
+++ b/gnulib/m4/memrchr.m4
@@ -1,5 +1,6 @@
-# memrchr.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation,
+# memrchr.m4
+# serial 11
+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/gnulib/m4/minmax.m4 b/gnulib/m4/minmax.m4
index fd09846ffb..bc7d0c345f 100644
--- a/gnulib/m4/minmax.m4
+++ b/gnulib/m4/minmax.m4
@@ -1,5 +1,6 @@
-# minmax.m4 serial 4
-dnl Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
+# minmax.m4
+# serial 4
+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/gnulib/m4/mkdir.m4 b/gnulib/m4/mkdir.m4
index 79c5e2c740..894cab7203 100644
--- a/gnulib/m4/mkdir.m4
+++ b/gnulib/m4/mkdir.m4
@@ -1,9 +1,9 @@
-# serial 19
-
-# Copyright (C) 2001, 2003-2004, 2006, 2008-2023 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.
+# mkdir.m4
+# serial 20
+dnl Copyright (C) 2001, 2003-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.
# On some systems, mkdir ("foo/", 0700) fails because of the trailing slash.
# On others, mkdir ("foo/./", 0700) mistakenly succeeds.
@@ -32,7 +32,6 @@ AC_DEFUN([gl_FUNC_MKDIR],
# Guess yes on glibc systems.
*-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing
yes" ;;
# Guess yes on MSVC, no on mingw.
- windows*-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing
no" ;;
windows*-msvc*) gl_cv_func_mkdir_trailing_slash_works="guessing
yes" ;;
mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
diff --git a/gnulib/m4/mkstemp.m4 b/gnulib/m4/mkstemp.m4
index 40958a72c4..311e6afd45 100644
--- a/gnulib/m4/mkstemp.m4
+++ b/gnulib/m4/mkstemp.m4
@@ -1,9 +1,9 @@
-#serial 30
-
-# Copyright (C) 2001, 2003-2007, 2009-2023 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.
+# mkstemp.m4
+# serial 30
+dnl Copyright (C) 2001, 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.
# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a
# silly limit that it can create no more than 26 files from a given template.
diff --git a/gnulib/m4/mmap-anon.m4 b/gnulib/m4/mmap-anon.m4
index d07d26e49e..61ca0120da 100644
--- a/gnulib/m4/mmap-anon.m4
+++ b/gnulib/m4/mmap-anon.m4
@@ -1,5 +1,6 @@
-# mmap-anon.m4 serial 12
-dnl Copyright (C) 2005, 2007, 2009-2023 Free Software Foundation, Inc.
+# mmap-anon.m4
+# serial 12
+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/gnulib/m4/mode_t.m4 b/gnulib/m4/mode_t.m4
index 82197c0214..0d5c280828 100644
--- a/gnulib/m4/mode_t.m4
+++ b/gnulib/m4/mode_t.m4
@@ -1,5 +1,6 @@
-# mode_t.m4 serial 2
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+# mode_t.m4
+# serial 2
+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/gnulib/m4/msvc-inval.m4 b/gnulib/m4/msvc-inval.m4
index 8d9d21b529..7919ff1223 100644
--- a/gnulib/m4/msvc-inval.m4
+++ b/gnulib/m4/msvc-inval.m4
@@ -1,5 +1,6 @@
-# msvc-inval.m4 serial 1
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# msvc-inval.m4
+# serial 1
+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/gnulib/m4/msvc-nothrow.m4 b/gnulib/m4/msvc-nothrow.m4
index 0263e49088..007c762018 100644
--- a/gnulib/m4/msvc-nothrow.m4
+++ b/gnulib/m4/msvc-nothrow.m4
@@ -1,5 +1,6 @@
-# msvc-nothrow.m4 serial 1
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# msvc-nothrow.m4
+# serial 1
+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/gnulib/m4/multiarch.m4 b/gnulib/m4/multiarch.m4
index 3ba5b0f76c..3af29d39a0 100644
--- a/gnulib/m4/multiarch.m4
+++ b/gnulib/m4/multiarch.m4
@@ -1,5 +1,6 @@
-# multiarch.m4 serial 9
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+# multiarch.m4
+# serial 9
+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/gnulib/m4/musl.m4 b/gnulib/m4/musl.m4
index e28a3fed67..0d4de8926a 100644
--- a/gnulib/m4/musl.m4
+++ b/gnulib/m4/musl.m4
@@ -1,5 +1,6 @@
-# musl.m4 serial 4
-dnl Copyright (C) 2019-2023 Free Software Foundation, Inc.
+# musl.m4
+# serial 4
+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/gnulib/m4/nl_langinfo.m4 b/gnulib/m4/nl_langinfo.m4
index 7648d52467..f38f11bbd3 100644
--- a/gnulib/m4/nl_langinfo.m4
+++ b/gnulib/m4/nl_langinfo.m4
@@ -1,5 +1,6 @@
-# nl_langinfo.m4 serial 11
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+# nl_langinfo.m4
+# serial 11
+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/gnulib/m4/nocrash.m4 b/gnulib/m4/nocrash.m4
index 6a76638761..cbe8fe82d5 100644
--- a/gnulib/m4/nocrash.m4
+++ b/gnulib/m4/nocrash.m4
@@ -1,5 +1,6 @@
-# nocrash.m4 serial 5
-dnl Copyright (C) 2005, 2009-2023 Free Software Foundation, Inc.
+# nocrash.m4
+# serial 5
+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/gnulib/m4/off64_t.m4 b/gnulib/m4/off64_t.m4
new file mode 100644
index 0000000000..34fa21eb16
--- /dev/null
+++ b/gnulib/m4/off64_t.m4
@@ -0,0 +1,31 @@
+# off64_t.m4
+# serial 1
+dnl Copyright (C) 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 Check whether <sys/types.h> defines the 'off64_t' type.
+dnl Set HAVE_OFF64_T.
+
+AC_DEFUN([gl_TYPE_OFF64_T],
+[
+ dnl Persuade glibc <sys/types.h>, <stdio.h>, <fcntl.h>, <unistd.h>, <aio.h>
+ dnl to define off64_t.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CACHE_CHECK([for off64_t], [gl_cv_off64_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>]],
+ [[int x = sizeof (off64_t *) + sizeof (off64_t);
+ return !x;]])],
+ [gl_cv_off64_t=yes], [gl_cv_off64_t=no])])
+
+ if test $gl_cv_off64_t != no; then
+ HAVE_OFF64_T=1
+ else
+ HAVE_OFF64_T=0
+ fi
+ AC_SUBST([HAVE_OFF64_T])
+])
diff --git a/gnulib/m4/off_t.m4 b/gnulib/m4/off_t.m4
index 880f347250..db6035dbeb 100644
--- a/gnulib/m4/off_t.m4
+++ b/gnulib/m4/off_t.m4
@@ -1,5 +1,6 @@
-# off_t.m4 serial 1
-dnl Copyright (C) 2012-2023 Free Software Foundation, Inc.
+# off_t.m4
+# serial 1
+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/gnulib/m4/open-cloexec.m4 b/gnulib/m4/open-cloexec.m4
index fd572fcd1d..6defdfb400 100644
--- a/gnulib/m4/open-cloexec.m4
+++ b/gnulib/m4/open-cloexec.m4
@@ -1,10 +1,12 @@
-# Test whether O_CLOEXEC is defined.
-
-dnl Copyright 2017-2023 Free Software Foundation, Inc.
+# open-cloexec.m4
+# serial 1
+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.
+# Test whether O_CLOEXEC is defined.
+
AC_DEFUN([gl_PREPROC_O_CLOEXEC],
[
AC_CACHE_CHECK([for O_CLOEXEC],
diff --git a/gnulib/m4/open-slash.m4 b/gnulib/m4/open-slash.m4
index 1f731f8ad8..03460e422d 100644
--- a/gnulib/m4/open-slash.m4
+++ b/gnulib/m4/open-slash.m4
@@ -1,5 +1,6 @@
-# open-slash.m4 serial 2
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# open-slash.m4
+# serial 2
+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/gnulib/m4/open.m4 b/gnulib/m4/open.m4
index b14fd013fc..62a11a110c 100644
--- a/gnulib/m4/open.m4
+++ b/gnulib/m4/open.m4
@@ -1,5 +1,6 @@
-# open.m4 serial 16
-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.
diff --git a/gnulib/m4/pathmax.m4 b/gnulib/m4/pathmax.m4
index 6d47d2c026..4280837f1e 100644
--- a/gnulib/m4/pathmax.m4
+++ b/gnulib/m4/pathmax.m4
@@ -1,5 +1,6 @@
-# pathmax.m4 serial 11
-dnl Copyright (C) 2002-2003, 2005-2006, 2009-2023 Free Software Foundation,
+# pathmax.m4
+# serial 11
+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/gnulib/m4/pid_t.m4 b/gnulib/m4/pid_t.m4
index 0fd7d0a181..8bedcc6bcd 100644
--- a/gnulib/m4/pid_t.m4
+++ b/gnulib/m4/pid_t.m4
@@ -1,5 +1,6 @@
-# pid_t.m4 serial 4
-dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
+# pid_t.m4
+# serial 4
+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/gnulib/m4/printf.m4 b/gnulib/m4/printf.m4
index 3be48277a6..220f37cb5e 100644
--- a/gnulib/m4/printf.m4
+++ b/gnulib/m4/printf.m4
@@ -1,5 +1,6 @@
-# printf.m4 serial 85
-dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
+# printf.m4
+# serial 92
+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 +87,6 @@ changequote(,)dnl
linux*-android*) gl_cv_func_printf_sizes_c99="guessing yes";;
changequote([,])dnl
# Guess yes on MSVC, no on mingw.
- windows*-gnu*) gl_cv_func_printf_sizes_c99="guessing no" ;;
windows*-msvc*) gl_cv_func_printf_sizes_c99="guessing yes" ;;
mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
@@ -230,7 +230,6 @@ int main ()
# Guess yes on Android.
linux*-android*) gl_cv_func_printf_long_double="guessing yes";;
# Guess yes on MSVC, no on mingw.
- windows*-gnu*) gl_cv_func_printf_long_double="guessing no" ;;
windows*-msvc*) gl_cv_func_printf_long_double="guessing yes" ;;
mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
@@ -358,7 +357,6 @@ changequote(,)dnl
linux*-android*) gl_cv_func_printf_infinite="guessing no";;
changequote([,])dnl
# Guess yes on MSVC, no on mingw.
- windows*-gnu*) gl_cv_func_printf_infinite="guessing no" ;;
windows*-msvc*) gl_cv_func_printf_infinite="guessing yes" ;;
mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
@@ -574,7 +572,6 @@ changequote(,)dnl
linux*-android*)
gl_cv_func_printf_infinite_long_double="guessing no";;
changequote([,])dnl
# Guess yes on MSVC, no on mingw.
- windows*-gnu*)
gl_cv_func_printf_infinite_long_double="guessing no" ;;
windows*-msvc*)
gl_cv_func_printf_infinite_long_double="guessing yes" ;;
mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
@@ -865,7 +862,6 @@ changequote(,)dnl
linux*-android*) gl_cv_func_printf_directive_f="guessing no";;
changequote([,])dnl
# Guess yes on MSVC, no on mingw.
- windows*-gnu*) gl_cv_func_printf_directive_f="guessing no" ;;
windows*-msvc*) gl_cv_func_printf_directive_f="guessing yes"
;;
mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
@@ -895,10 +891,12 @@ AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
[
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
+#include <signal.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef _MSC_VER
+#include <crtdbg.h>
#include <inttypes.h>
/* See page about "Parameter Validation" on msdn.microsoft.com.
<https://docs.microsoft.com/en-us/cpp/c-runtime-library/parameter-validation>
@@ -912,6 +910,12 @@ invalid_parameter_handler (const wchar_t *expression,
exit (1);
}
#endif
+static void
+abort_handler (int sig)
+{
+ (void) sig;
+ _exit (1);
+}
static char fmtstring[10];
static char buf[100];
int main ()
@@ -919,7 +923,11 @@ int main ()
int count = -1;
#ifdef _MSC_VER
_set_invalid_parameter_handler (invalid_parameter_handler);
+ /* Also avoid an Abort/Retry/Ignore dialog in debug builds.
+
<https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/crtsetreportmode>
*/
+ _CrtSetReportMode (_CRT_ASSERT, 0);
#endif
+ signal (SIGABRT, abort_handler);
/* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
support %n in format strings in read-only memory but not in writable
memory. */
@@ -1037,7 +1045,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],
@@ -1056,13 +1065,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;
@@ -1072,10 +1079,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
])
@@ -1265,6 +1272,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
@@ -1629,7 +1680,6 @@ changequote(,)dnl
linux*-android*) gl_cv_func_snprintf_retval_c99="guessing
yes";;
changequote([,])dnl
# Guess yes on MSVC, no on mingw.
- windows*-gnu*) gl_cv_func_snprintf_retval_c99="guessing no"
;;
windows*-msvc*) gl_cv_func_snprintf_retval_c99="guessing yes"
;;
mingw* | windows*) AC_EGREP_CPP([Known], [
#ifdef _MSC_VER
@@ -1660,6 +1710,7 @@ AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N],
[
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
+#include <signal.h>
#include <stdio.h>
#include <string.h>
#if HAVE_SNPRINTF
@@ -1676,11 +1727,18 @@ static int my_snprintf (char *buf, int size, const char
*format, ...)
return ret;
}
#endif
+static void
+abort_handler (int sig)
+{
+ (void) sig;
+ _exit (1);
+}
static char fmtstring[10];
static char buf[100];
int main ()
{
int count = -1;
+ signal (SIGABRT, abort_handler);
/* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
support %n in format strings in read-only memory but not in writable
memory. */
@@ -1986,7 +2044,7 @@ static wchar_t buf[100];
int main ()
{
int result = 0;
- /* This catches a glibc 2.15 and Haiku 2022 bug. */
+ /* This catches a glibc 2.15, Haiku 2022, NetBSD 10.0 bug. */
if (swprintf (buf, sizeof (buf) / sizeof (wchar_t),
L"%La %d", 3.1416015625L, 33, 44, 55) < 0
|| (wcscmp (buf, L"0x1.922p+1 33") != 0
@@ -2016,6 +2074,8 @@ int main ()
*-musl* | midipix*) gl_cv_func_swprintf_directive_la="guessing
yes";;
# Guess yes on Android.
linux*-android*) gl_cv_func_swprintf_directive_la="guessing
yes";;
+ # Guess no on NetBSD.
+ netbsd*) gl_cv_func_swprintf_directive_la="guessing no";;
# Guess no on native Windows.
mingw* | windows*) gl_cv_func_swprintf_directive_la="guessing no";;
# If we don't know, obey --enable-cross-guesses.
@@ -2089,17 +2149,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...
@@ -2117,58 +2178,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/gnulib/m4/pthread-once.m4 b/gnulib/m4/pthread-once.m4
new file mode 100644
index 0000000000..46b8840e2b
--- /dev/null
+++ b/gnulib/m4/pthread-once.m4
@@ -0,0 +1,36 @@
+# pthread-once.m4
+# serial 3
+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.
+
+AC_DEFUN([gl_PTHREAD_ONCE],
+[
+ AC_REQUIRE([gl_PTHREAD_H])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
+ && test $gl_threads_api = windows; then
+ dnl Choose function names that don't conflict with the mingw-w64
winpthreads
+ dnl library.
+ REPLACE_PTHREAD_ONCE=1
+ else
+ if test $HAVE_PTHREAD_H = 0; then
+ HAVE_PTHREAD_ONCE=0
+ else
+ dnl Work around Cygwin 3.5.3 bug.
+ AC_CACHE_CHECK([whether pthread_once works],
+ [gl_cv_func_pthread_once_works],
+ [case "$host_os" in
+ cygwin*) gl_cv_func_pthread_once_works="guessing no" ;;
+ *) gl_cv_func_pthread_once_works="yes" ;;
+ esac
+ ])
+ case "$gl_cv_func_pthread_once_works" in
+ *yes) ;;
+ *) REPLACE_PTHREAD_ONCE=1 ;;
+ esac
+ fi
+ fi
+])
diff --git a/gnulib/m4/pthread-spin.m4 b/gnulib/m4/pthread-spin.m4
new file mode 100644
index 0000000000..67a50fa4db
--- /dev/null
+++ b/gnulib/m4/pthread-spin.m4
@@ -0,0 +1,71 @@
+# pthread-spin.m4
+# serial 8
+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.
+
+AC_DEFUN_ONCE([gl_PTHREAD_SPIN],
+[
+ AC_REQUIRE([gl_PTHREAD_H_PART1])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
+ && test $gl_threads_api = windows; then
+ dnl Choose function names that don't conflict with the mingw-w64
winpthreads
+ dnl library.
+ REPLACE_PTHREAD_SPIN_INIT=1
+ REPLACE_PTHREAD_SPIN_LOCK=1
+ REPLACE_PTHREAD_SPIN_TRYLOCK=1
+ REPLACE_PTHREAD_SPIN_UNLOCK=1
+ REPLACE_PTHREAD_SPIN_DESTROY=1
+ else
+ if test $HAVE_PTHREAD_H = 0 || test $HAVE_PTHREAD_SPINLOCK_T = 0; then
+ HAVE_PTHREAD_SPIN_INIT=0
+ HAVE_PTHREAD_SPIN_LOCK=0
+ HAVE_PTHREAD_SPIN_TRYLOCK=0
+ HAVE_PTHREAD_SPIN_UNLOCK=0
+ HAVE_PTHREAD_SPIN_DESTROY=0
+ else
+ dnl Test whether the gnulib module 'threadlib' is in use.
+ dnl Some packages like Emacs use --avoid=threadlib.
+ dnl Write the symbol in such a way that it does not cause 'aclocal' to
pick
+ dnl the threadlib.m4 file that is installed in $PREFIX/share/aclocal/.
+ m4_ifdef([gl_][THREADLIB], [
+ AC_REQUIRE([gl_][THREADLIB])
+ dnl Test whether the functions actually exist.
+ dnl FreeBSD 5.2.1 declares them but does not define them.
+ AC_CACHE_CHECK([for pthread_spin_init],
+ [gl_cv_func_pthread_spin_init_in_LIBMULTITHREAD],
+ [gl_saved_LIBS="$LIBS"
+ LIBS="$LIBS $LIBMULTITHREAD"
+ AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ ]],
+ [[pthread_spinlock_t lock;
+ return pthread_spin_init (&lock, 0);
+ ]])
+ ],
+ [gl_cv_func_pthread_spin_init_in_LIBMULTITHREAD=yes],
+ [gl_cv_func_pthread_spin_init_in_LIBMULTITHREAD=no])
+ LIBS="$gl_saved_LIBS"
+ ])
+ if test $gl_cv_func_pthread_spin_init_in_LIBMULTITHREAD != yes; then
+ HAVE_PTHREAD_SPIN_INIT=0
+ REPLACE_PTHREAD_SPIN_INIT=1
+ HAVE_PTHREAD_SPIN_LOCK=0
+ REPLACE_PTHREAD_SPIN_LOCK=1
+ HAVE_PTHREAD_SPIN_TRYLOCK=0
+ REPLACE_PTHREAD_SPIN_TRYLOCK=1
+ HAVE_PTHREAD_SPIN_UNLOCK=0
+ REPLACE_PTHREAD_SPIN_UNLOCK=1
+ HAVE_PTHREAD_SPIN_DESTROY=0
+ REPLACE_PTHREAD_SPIN_DESTROY=1
+ fi
+ ], [
+ :
+ ])
+ fi
+ fi
+])
diff --git a/gnulib/m4/pthread_h.m4 b/gnulib/m4/pthread_h.m4
new file mode 100644
index 0000000000..42001213d0
--- /dev/null
+++ b/gnulib/m4/pthread_h.m4
@@ -0,0 +1,292 @@
+# pthread_h.m4
+# serial 11
+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.
+
+AC_DEFUN_ONCE([gl_PTHREAD_H_PART1],
+[
+ dnl Ensure to expand the default settings once only, before all statements
+ dnl that occur in other macros.
+ AC_REQUIRE([gl_PTHREAD_H_DEFAULTS])
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_PTHREADLIB])
+
+ gl_CHECK_NEXT_HEADERS([pthread.h])
+ if test $ac_cv_header_pthread_h = yes; then
+ HAVE_PTHREAD_H=1
+ dnl On mingw, if --enable-threads=windows or gl_AVOID_WINPTHREAD is used,
+ dnl ignore the <pthread.h> from the mingw-w64 winpthreads library.
+ m4_ifdef([gl_][THREADLIB], [
+ AC_REQUIRE([gl_][THREADLIB])
+ if { case "$host_os" in mingw* | windows*) true;; *) false;; esac; } \
+ && test $gl_threads_api = windows; then
+ HAVE_PTHREAD_H=0
+ fi
+ ])
+ else
+ HAVE_PTHREAD_H=0
+ fi
+ AC_SUBST([HAVE_PTHREAD_H])
+
+ AC_CHECK_TYPES([pthread_t, pthread_spinlock_t], [], [],
+ [AC_INCLUDES_DEFAULT[
+ #if HAVE_PTHREAD_H
+ #include <pthread.h>
+ #endif]])
+ if test $ac_cv_type_pthread_t != yes; then
+ HAVE_PTHREAD_T=0
+ fi
+ if test $ac_cv_type_pthread_spinlock_t != yes; then
+ HAVE_PTHREAD_SPINLOCK_T=0
+ fi
+])
+
+AC_DEFUN([gl_PTHREAD_H],
+[
+ AC_REQUIRE([gl_PTHREAD_H_PART1])
+
+ dnl Set HAVE_PTHREAD_SPIN_INIT, REPLACE_PTHREAD_SPIN_INIT.
+ gl_PTHREAD_SPIN
+
+ dnl Constants may be defined as C preprocessor macros or as enum items.
+
+ AC_CACHE_CHECK([for PTHREAD_CREATE_DETACHED],
+ [gl_cv_const_PTHREAD_CREATE_DETACHED],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ int x = PTHREAD_CREATE_DETACHED;
+ ]],
+ [[]])],
+ [gl_cv_const_PTHREAD_CREATE_DETACHED=yes],
+ [gl_cv_const_PTHREAD_CREATE_DETACHED=no])
+ ])
+ if test $gl_cv_const_PTHREAD_CREATE_DETACHED != yes; then
+ HAVE_PTHREAD_CREATE_DETACHED=0
+ fi
+
+ AC_CACHE_CHECK([for PTHREAD_MUTEX_RECURSIVE],
+ [gl_cv_const_PTHREAD_MUTEX_RECURSIVE],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ int x = PTHREAD_MUTEX_RECURSIVE;
+ ]],
+ [[]])],
+ [gl_cv_const_PTHREAD_MUTEX_RECURSIVE=yes],
+ [gl_cv_const_PTHREAD_MUTEX_RECURSIVE=no])
+ ])
+ if test $gl_cv_const_PTHREAD_MUTEX_RECURSIVE != yes; then
+ HAVE_PTHREAD_MUTEX_RECURSIVE=0
+ fi
+
+ AC_CACHE_CHECK([for PTHREAD_MUTEX_ROBUST],
+ [gl_cv_const_PTHREAD_MUTEX_ROBUST],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ int x = PTHREAD_MUTEX_ROBUST;
+ ]],
+ [[]])],
+ [gl_cv_const_PTHREAD_MUTEX_ROBUST=yes],
+ [gl_cv_const_PTHREAD_MUTEX_ROBUST=no])
+ ])
+ if test $gl_cv_const_PTHREAD_MUTEX_ROBUST != yes; then
+ HAVE_PTHREAD_MUTEX_ROBUST=0
+ fi
+
+ AC_CACHE_CHECK([for PTHREAD_PROCESS_SHARED],
+ [gl_cv_const_PTHREAD_PROCESS_SHARED],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <pthread.h>
+ int x = PTHREAD_PROCESS_SHARED;
+ ]],
+ [[]])],
+ [gl_cv_const_PTHREAD_PROCESS_SHARED=yes],
+ [gl_cv_const_PTHREAD_PROCESS_SHARED=no])
+ ])
+ if test $gl_cv_const_PTHREAD_PROCESS_SHARED != yes; then
+ HAVE_PTHREAD_PROCESS_SHARED=0
+ fi
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, if it is not common
+ dnl enough to be declared everywhere.
+ gl_WARN_ON_USE_PREPARE([[#include <pthread.h>
+ ]], [
+ pthread_create pthread_attr_init pthread_attr_getdetachstate
+ pthread_attr_setdetachstate pthread_attr_destroy pthread_self pthread_equal
+ pthread_detach pthread_join pthread_exit
+ pthread_once
+ pthread_mutex_init pthread_mutexattr_init pthread_mutexattr_gettype
+ pthread_mutexattr_settype pthread_mutexattr_getrobust
+ pthread_mutexattr_setrobust pthread_mutexattr_destroy pthread_mutex_lock
+ pthread_mutex_trylock pthread_mutex_timedlock pthread_mutex_unlock
+ pthread_mutex_destroy
+ pthread_rwlock_init pthread_rwlockattr_init pthread_rwlockattr_destroy
+ pthread_rwlock_rdlock pthread_rwlock_wrlock pthread_rwlock_tryrdlock
+ pthread_rwlock_trywrlock pthread_rwlock_timedrdlock
+ pthread_rwlock_timedwrlock pthread_rwlock_unlock pthread_rwlock_destroy
+ pthread_cond_init pthread_condattr_init pthread_condattr_destroy
+ pthread_cond_wait pthread_cond_timedwait pthread_cond_signal
+ pthread_cond_broadcast pthread_cond_destroy
+ pthread_key_create pthread_setspecific pthread_getspecific
+ pthread_key_delete
+ pthread_spin_init pthread_spin_lock pthread_spin_trylock
pthread_spin_unlock
+ pthread_spin_destroy])
+
+ AC_REQUIRE([AC_C_RESTRICT])
+
+ dnl For backward compatibility with gnulib versions <= 2019-07.
+ LIB_PTHREAD="$LIBPMULTITHREAD"
+ AC_SUBST([LIB_PTHREAD])
+])
+
+# gl_PTHREAD_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_PTHREAD_MODULE_INDICATOR],
+[
+ dnl Ensure to expand the default settings once only.
+ gl_PTHREAD_H_REQUIRE_DEFAULTS
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd. It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_PTHREAD_H_REQUIRE_DEFAULTS],
+[
+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_PTHREAD_H_MODULE_INDICATOR_DEFAULTS], [
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_THREAD])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_ONCE])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_MUTEX])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_RWLOCK])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_COND])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_TSS])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_SPIN])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_PTHREAD_MUTEX_TIMEDLOCK])
+ ])
+ m4_require(GL_MODULE_INDICATOR_PREFIX[_PTHREAD_H_MODULE_INDICATOR_DEFAULTS])
+ AC_REQUIRE([gl_PTHREAD_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_PTHREAD_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_PTHREAD_T=1; AC_SUBST([HAVE_PTHREAD_T])
+ HAVE_PTHREAD_SPINLOCK_T=1; AC_SUBST([HAVE_PTHREAD_SPINLOCK_T])
+ HAVE_PTHREAD_CREATE_DETACHED=1;
AC_SUBST([HAVE_PTHREAD_CREATE_DETACHED])
+ HAVE_PTHREAD_MUTEX_RECURSIVE=1;
AC_SUBST([HAVE_PTHREAD_MUTEX_RECURSIVE])
+ HAVE_PTHREAD_MUTEX_ROBUST=1; AC_SUBST([HAVE_PTHREAD_MUTEX_ROBUST])
+ HAVE_PTHREAD_PROCESS_SHARED=1;
AC_SUBST([HAVE_PTHREAD_PROCESS_SHARED])
+ HAVE_PTHREAD_CREATE=1; AC_SUBST([HAVE_PTHREAD_CREATE])
+ HAVE_PTHREAD_ATTR_INIT=1; AC_SUBST([HAVE_PTHREAD_ATTR_INIT])
+ HAVE_PTHREAD_ATTR_GETDETACHSTATE=1;
AC_SUBST([HAVE_PTHREAD_ATTR_GETDETACHSTATE])
+ HAVE_PTHREAD_ATTR_SETDETACHSTATE=1;
AC_SUBST([HAVE_PTHREAD_ATTR_SETDETACHSTATE])
+ HAVE_PTHREAD_ATTR_DESTROY=1; AC_SUBST([HAVE_PTHREAD_ATTR_DESTROY])
+ HAVE_PTHREAD_SELF=1; AC_SUBST([HAVE_PTHREAD_SELF])
+ HAVE_PTHREAD_EQUAL=1; AC_SUBST([HAVE_PTHREAD_EQUAL])
+ HAVE_PTHREAD_DETACH=1; AC_SUBST([HAVE_PTHREAD_DETACH])
+ HAVE_PTHREAD_JOIN=1; AC_SUBST([HAVE_PTHREAD_JOIN])
+ HAVE_PTHREAD_EXIT=1; AC_SUBST([HAVE_PTHREAD_EXIT])
+ HAVE_PTHREAD_ONCE=1; AC_SUBST([HAVE_PTHREAD_ONCE])
+ HAVE_PTHREAD_MUTEX_INIT=1; AC_SUBST([HAVE_PTHREAD_MUTEX_INIT])
+ HAVE_PTHREAD_MUTEXATTR_INIT=1;
AC_SUBST([HAVE_PTHREAD_MUTEXATTR_INIT])
+ HAVE_PTHREAD_MUTEXATTR_GETTYPE=1;
AC_SUBST([HAVE_PTHREAD_MUTEXATTR_GETTYPE])
+ HAVE_PTHREAD_MUTEXATTR_SETTYPE=1;
AC_SUBST([HAVE_PTHREAD_MUTEXATTR_SETTYPE])
+ HAVE_PTHREAD_MUTEXATTR_GETROBUST=1;
AC_SUBST([HAVE_PTHREAD_MUTEXATTR_GETROBUST])
+ HAVE_PTHREAD_MUTEXATTR_SETROBUST=1;
AC_SUBST([HAVE_PTHREAD_MUTEXATTR_SETROBUST])
+ HAVE_PTHREAD_MUTEXATTR_DESTROY=1;
AC_SUBST([HAVE_PTHREAD_MUTEXATTR_DESTROY])
+ HAVE_PTHREAD_MUTEX_LOCK=1; AC_SUBST([HAVE_PTHREAD_MUTEX_LOCK])
+ HAVE_PTHREAD_MUTEX_TRYLOCK=1; AC_SUBST([HAVE_PTHREAD_MUTEX_TRYLOCK])
+ HAVE_PTHREAD_MUTEX_TIMEDLOCK=1;
AC_SUBST([HAVE_PTHREAD_MUTEX_TIMEDLOCK])
+ HAVE_PTHREAD_MUTEX_UNLOCK=1; AC_SUBST([HAVE_PTHREAD_MUTEX_UNLOCK])
+ HAVE_PTHREAD_MUTEX_DESTROY=1; AC_SUBST([HAVE_PTHREAD_MUTEX_DESTROY])
+ HAVE_PTHREAD_RWLOCK_INIT=1; AC_SUBST([HAVE_PTHREAD_RWLOCK_INIT])
+ HAVE_PTHREAD_RWLOCKATTR_INIT=1;
AC_SUBST([HAVE_PTHREAD_RWLOCKATTR_INIT])
+ HAVE_PTHREAD_RWLOCKATTR_DESTROY=1;
AC_SUBST([HAVE_PTHREAD_RWLOCKATTR_DESTROY])
+ HAVE_PTHREAD_RWLOCK_RDLOCK=1; AC_SUBST([HAVE_PTHREAD_RWLOCK_RDLOCK])
+ HAVE_PTHREAD_RWLOCK_WRLOCK=1; AC_SUBST([HAVE_PTHREAD_RWLOCK_WRLOCK])
+ HAVE_PTHREAD_RWLOCK_TRYRDLOCK=1;
AC_SUBST([HAVE_PTHREAD_RWLOCK_TRYRDLOCK])
+ HAVE_PTHREAD_RWLOCK_TRYWRLOCK=1;
AC_SUBST([HAVE_PTHREAD_RWLOCK_TRYWRLOCK])
+ HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK=1;
AC_SUBST([HAVE_PTHREAD_RWLOCK_TIMEDRDLOCK])
+ HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK=1;
AC_SUBST([HAVE_PTHREAD_RWLOCK_TIMEDWRLOCK])
+ HAVE_PTHREAD_RWLOCK_UNLOCK=1; AC_SUBST([HAVE_PTHREAD_RWLOCK_UNLOCK])
+ HAVE_PTHREAD_RWLOCK_DESTROY=1;
AC_SUBST([HAVE_PTHREAD_RWLOCK_DESTROY])
+ HAVE_PTHREAD_COND_INIT=1; AC_SUBST([HAVE_PTHREAD_COND_INIT])
+ HAVE_PTHREAD_CONDATTR_INIT=1; AC_SUBST([HAVE_PTHREAD_CONDATTR_INIT])
+ HAVE_PTHREAD_CONDATTR_DESTROY=1;
AC_SUBST([HAVE_PTHREAD_CONDATTR_DESTROY])
+ HAVE_PTHREAD_COND_WAIT=1; AC_SUBST([HAVE_PTHREAD_COND_WAIT])
+ HAVE_PTHREAD_COND_TIMEDWAIT=1;
AC_SUBST([HAVE_PTHREAD_COND_TIMEDWAIT])
+ HAVE_PTHREAD_COND_SIGNAL=1; AC_SUBST([HAVE_PTHREAD_COND_SIGNAL])
+ HAVE_PTHREAD_COND_BROADCAST=1;
AC_SUBST([HAVE_PTHREAD_COND_BROADCAST])
+ HAVE_PTHREAD_COND_DESTROY=1; AC_SUBST([HAVE_PTHREAD_COND_DESTROY])
+ HAVE_PTHREAD_KEY_CREATE=1; AC_SUBST([HAVE_PTHREAD_KEY_CREATE])
+ HAVE_PTHREAD_SETSPECIFIC=1; AC_SUBST([HAVE_PTHREAD_SETSPECIFIC])
+ HAVE_PTHREAD_GETSPECIFIC=1; AC_SUBST([HAVE_PTHREAD_GETSPECIFIC])
+ HAVE_PTHREAD_KEY_DELETE=1; AC_SUBST([HAVE_PTHREAD_KEY_DELETE])
+ HAVE_PTHREAD_SPIN_INIT=1; AC_SUBST([HAVE_PTHREAD_SPIN_INIT])
+ HAVE_PTHREAD_SPIN_LOCK=1; AC_SUBST([HAVE_PTHREAD_SPIN_LOCK])
+ HAVE_PTHREAD_SPIN_TRYLOCK=1; AC_SUBST([HAVE_PTHREAD_SPIN_TRYLOCK])
+ HAVE_PTHREAD_SPIN_UNLOCK=1; AC_SUBST([HAVE_PTHREAD_SPIN_UNLOCK])
+ HAVE_PTHREAD_SPIN_DESTROY=1; AC_SUBST([HAVE_PTHREAD_SPIN_DESTROY])
+ REPLACE_PTHREAD_CREATE=0; AC_SUBST([REPLACE_PTHREAD_CREATE])
+ REPLACE_PTHREAD_ATTR_INIT=0; AC_SUBST([REPLACE_PTHREAD_ATTR_INIT])
+ REPLACE_PTHREAD_ATTR_GETDETACHSTATE=0;
AC_SUBST([REPLACE_PTHREAD_ATTR_GETDETACHSTATE])
+ REPLACE_PTHREAD_ATTR_SETDETACHSTATE=0;
AC_SUBST([REPLACE_PTHREAD_ATTR_SETDETACHSTATE])
+ REPLACE_PTHREAD_ATTR_DESTROY=0;
AC_SUBST([REPLACE_PTHREAD_ATTR_DESTROY])
+ REPLACE_PTHREAD_SELF=0; AC_SUBST([REPLACE_PTHREAD_SELF])
+ REPLACE_PTHREAD_EQUAL=0; AC_SUBST([REPLACE_PTHREAD_EQUAL])
+ REPLACE_PTHREAD_DETACH=0; AC_SUBST([REPLACE_PTHREAD_DETACH])
+ REPLACE_PTHREAD_JOIN=0; AC_SUBST([REPLACE_PTHREAD_JOIN])
+ REPLACE_PTHREAD_EXIT=0; AC_SUBST([REPLACE_PTHREAD_EXIT])
+ REPLACE_PTHREAD_ONCE=0; AC_SUBST([REPLACE_PTHREAD_ONCE])
+ REPLACE_PTHREAD_MUTEX_INIT=0; AC_SUBST([REPLACE_PTHREAD_MUTEX_INIT])
+ REPLACE_PTHREAD_MUTEXATTR_INIT=0;
AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_INIT])
+ REPLACE_PTHREAD_MUTEXATTR_GETTYPE=0;
AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_GETTYPE])
+ REPLACE_PTHREAD_MUTEXATTR_SETTYPE=0;
AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_SETTYPE])
+ REPLACE_PTHREAD_MUTEXATTR_GETROBUST=0;
AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_GETROBUST])
+ REPLACE_PTHREAD_MUTEXATTR_SETROBUST=0;
AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_SETROBUST])
+ REPLACE_PTHREAD_MUTEXATTR_DESTROY=0;
AC_SUBST([REPLACE_PTHREAD_MUTEXATTR_DESTROY])
+ REPLACE_PTHREAD_MUTEX_LOCK=0; AC_SUBST([REPLACE_PTHREAD_MUTEX_LOCK])
+ REPLACE_PTHREAD_MUTEX_TRYLOCK=0;
AC_SUBST([REPLACE_PTHREAD_MUTEX_TRYLOCK])
+ REPLACE_PTHREAD_MUTEX_TIMEDLOCK=0;
AC_SUBST([REPLACE_PTHREAD_MUTEX_TIMEDLOCK])
+ REPLACE_PTHREAD_MUTEX_UNLOCK=0;
AC_SUBST([REPLACE_PTHREAD_MUTEX_UNLOCK])
+ REPLACE_PTHREAD_MUTEX_DESTROY=0;
AC_SUBST([REPLACE_PTHREAD_MUTEX_DESTROY])
+ REPLACE_PTHREAD_RWLOCK_INIT=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCK_INIT])
+ REPLACE_PTHREAD_RWLOCKATTR_INIT=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCKATTR_INIT])
+ REPLACE_PTHREAD_RWLOCKATTR_DESTROY=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCKATTR_DESTROY])
+ REPLACE_PTHREAD_RWLOCK_RDLOCK=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCK_RDLOCK])
+ REPLACE_PTHREAD_RWLOCK_WRLOCK=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCK_WRLOCK])
+ REPLACE_PTHREAD_RWLOCK_TRYRDLOCK=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCK_TRYRDLOCK])
+ REPLACE_PTHREAD_RWLOCK_TRYWRLOCK=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCK_TRYWRLOCK])
+ REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCK_TIMEDRDLOCK])
+ REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCK_TIMEDWRLOCK])
+ REPLACE_PTHREAD_RWLOCK_UNLOCK=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCK_UNLOCK])
+ REPLACE_PTHREAD_RWLOCK_DESTROY=0;
AC_SUBST([REPLACE_PTHREAD_RWLOCK_DESTROY])
+ REPLACE_PTHREAD_COND_INIT=0; AC_SUBST([REPLACE_PTHREAD_COND_INIT])
+ REPLACE_PTHREAD_CONDATTR_INIT=0;
AC_SUBST([REPLACE_PTHREAD_CONDATTR_INIT])
+ REPLACE_PTHREAD_CONDATTR_DESTROY=0;
AC_SUBST([REPLACE_PTHREAD_CONDATTR_DESTROY])
+ REPLACE_PTHREAD_COND_WAIT=0; AC_SUBST([REPLACE_PTHREAD_COND_WAIT])
+ REPLACE_PTHREAD_COND_TIMEDWAIT=0;
AC_SUBST([REPLACE_PTHREAD_COND_TIMEDWAIT])
+ REPLACE_PTHREAD_COND_SIGNAL=0;
AC_SUBST([REPLACE_PTHREAD_COND_SIGNAL])
+ REPLACE_PTHREAD_COND_BROADCAST=0;
AC_SUBST([REPLACE_PTHREAD_COND_BROADCAST])
+ REPLACE_PTHREAD_COND_DESTROY=0;
AC_SUBST([REPLACE_PTHREAD_COND_DESTROY])
+ REPLACE_PTHREAD_KEY_CREATE=0; AC_SUBST([REPLACE_PTHREAD_KEY_CREATE])
+ REPLACE_PTHREAD_SETSPECIFIC=0;
AC_SUBST([REPLACE_PTHREAD_SETSPECIFIC])
+ REPLACE_PTHREAD_GETSPECIFIC=0;
AC_SUBST([REPLACE_PTHREAD_GETSPECIFIC])
+ REPLACE_PTHREAD_KEY_DELETE=0; AC_SUBST([REPLACE_PTHREAD_KEY_DELETE])
+ REPLACE_PTHREAD_SPIN_INIT=0; AC_SUBST([REPLACE_PTHREAD_SPIN_INIT])
+ REPLACE_PTHREAD_SPIN_LOCK=0; AC_SUBST([REPLACE_PTHREAD_SPIN_LOCK])
+ REPLACE_PTHREAD_SPIN_TRYLOCK=0;
AC_SUBST([REPLACE_PTHREAD_SPIN_TRYLOCK])
+ REPLACE_PTHREAD_SPIN_UNLOCK=0;
AC_SUBST([REPLACE_PTHREAD_SPIN_UNLOCK])
+ REPLACE_PTHREAD_SPIN_DESTROY=0;
AC_SUBST([REPLACE_PTHREAD_SPIN_DESTROY])
+])
diff --git a/gnulib/m4/pthread_rwlock_rdlock.m4
b/gnulib/m4/pthread_rwlock_rdlock.m4
index 7cc650c49d..b8b5b11724 100644
--- a/gnulib/m4/pthread_rwlock_rdlock.m4
+++ b/gnulib/m4/pthread_rwlock_rdlock.m4
@@ -1,5 +1,6 @@
-# pthread_rwlock_rdlock.m4 serial 6
-dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
+# pthread_rwlock_rdlock.m4
+# serial 8
+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,11 +35,11 @@ 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],
- [save_LIBS="$LIBS"
+ [saved_LIBS="$LIBS"
LIBS="$LIBS $LIBMULTITHREAD"
AC_RUN_IFELSE(
[AC_LANG_SOURCE([[
@@ -174,7 +175,7 @@ main ()
*)
gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;;
esac
])
- LIBS="$save_LIBS"
+ LIBS="$saved_LIBS"
])
case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
*yes)
diff --git a/gnulib/m4/realloc.m4 b/gnulib/m4/realloc.m4
index fcd6253557..eb90d5885c 100644
--- a/gnulib/m4/realloc.m4
+++ b/gnulib/m4/realloc.m4
@@ -1,5 +1,6 @@
-# realloc.m4 serial 28
-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 +17,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;]])
],
diff --git a/gnulib/m4/reallocarray.m4 b/gnulib/m4/reallocarray.m4
index 6a5b5ab344..958095e15c 100644
--- a/gnulib/m4/reallocarray.m4
+++ b/gnulib/m4/reallocarray.m4
@@ -1,5 +1,6 @@
-# reallocarray.m4 serial 5
-dnl Copyright (C) 2017-2023 Free Software Foundation, Inc.
+# reallocarray.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.
diff --git a/gnulib/m4/regex.m4 b/gnulib/m4/regex.m4
index 20082b89a8..f0101fe67c 100644
--- a/gnulib/m4/regex.m4
+++ b/gnulib/m4/regex.m4
@@ -1,10 +1,9 @@
+# regex.m4
# serial 75
-
-# Copyright (C) 1996-2001, 2003-2023 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+dnl Copyright (C) 1996-2001, 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.
dnl Initially derived from code in GNU grep.
dnl Mostly written by Jim Meyering.
diff --git a/gnulib/m4/sched_h.m4 b/gnulib/m4/sched_h.m4
new file mode 100644
index 0000000000..61c202ef0c
--- /dev/null
+++ b/gnulib/m4/sched_h.m4
@@ -0,0 +1,101 @@
+# sched_h.m4
+# serial 16
+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.
+
+dnl Written by Bruno Haible.
+
+AC_DEFUN_ONCE([gl_SCHED_H],
+[
+ dnl Ensure to expand the default settings once only, before all statements
+ dnl that occur in other macros.
+ AC_REQUIRE([gl_SCHED_H_DEFAULTS])
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_REQUIRE([gl_CHECK_HEADER_SYS_CDEFS_H])
+
+ AC_CHECK_HEADERS([sched.h], [], [],
+ [[#if HAVE_SYS_CDEFS_H
+ #include <sys/cdefs.h>
+ #endif
+ ]])
+ gl_NEXT_HEADERS([sched.h])
+
+ if test "$ac_cv_header_sched_h" = yes; then
+ HAVE_SCHED_H=1
+ else
+ HAVE_SCHED_H=0
+ fi
+ AC_SUBST([HAVE_SCHED_H])
+
+ if test "$HAVE_SCHED_H" = 1; then
+ AC_CHECK_TYPE([struct sched_param],
+ [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
+ [[#if HAVE_SYS_CDEFS_H
+ #include <sys/cdefs.h>
+ #endif
+ #include <sched.h>
+ ]])
+ else
+ HAVE_STRUCT_SCHED_PARAM=0
+ case "$host_os" in
+ os2*)
+ dnl On OS/2 kLIBC, struct sched_param is in spawn.h.
+ AC_CHECK_TYPE([struct sched_param],
+ [HAVE_STRUCT_SCHED_PARAM=1], [],
+ [#include <spawn.h>])
+ ;;
+ vms)
+ dnl On OpenVMS 7.2 or newer, struct sched_param is in pthread.h.
+ AC_CHECK_TYPE([struct sched_param],
+ [HAVE_STRUCT_SCHED_PARAM=1], [],
+ [#include <pthread.h>])
+ ;;
+ esac
+ fi
+ AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
+
+ dnl Ensure the type pid_t gets defined.
+ AC_REQUIRE([AC_TYPE_PID_T])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, if it is not common
+ dnl enough to be declared everywhere.
+ gl_WARN_ON_USE_PREPARE([[#include <sched.h>
+ ]], [sched_yield])
+])
+
+# gl_SCHED_MODULE_INDICATOR([modulename])
+# sets the shell variable that indicates the presence of the given module
+# to a C preprocessor expression that will evaluate to 1.
+# This macro invocation must not occur in macros that are AC_REQUIREd.
+AC_DEFUN([gl_SCHED_MODULE_INDICATOR],
+[
+ dnl Ensure to expand the default settings once only.
+ gl_SCHED_H_REQUIRE_DEFAULTS
+ gl_MODULE_INDICATOR_SET_VARIABLE([$1])
+ dnl Define it also as a C macro, for the benefit of the unit tests.
+ gl_MODULE_INDICATOR_FOR_TESTS([$1])
+])
+
+# Initializes the default values for AC_SUBSTed shell variables.
+# This macro must not be AC_REQUIREd. It must only be invoked, and only
+# outside of macros or in macros that are not AC_REQUIREd.
+AC_DEFUN([gl_SCHED_H_REQUIRE_DEFAULTS],
+[
+ m4_defun(GL_MODULE_INDICATOR_PREFIX[_SCHED_H_MODULE_INDICATOR_DEFAULTS], [
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SCHED_YIELD])
+ ])
+ m4_require(GL_MODULE_INDICATOR_PREFIX[_SCHED_H_MODULE_INDICATOR_DEFAULTS])
+ AC_REQUIRE([gl_SCHED_H_DEFAULTS])
+])
+
+AC_DEFUN([gl_SCHED_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_SCHED_YIELD=1; AC_SUBST([HAVE_SCHED_YIELD])
+ REPLACE_SCHED_YIELD=0; AC_SUBST([REPLACE_SCHED_YIELD])
+])
diff --git a/gnulib/m4/setlocale_null.m4 b/gnulib/m4/setlocale_null.m4
index bafc5be8ec..e5b7d28b16 100644
--- a/gnulib/m4/setlocale_null.m4
+++ b/gnulib/m4/setlocale_null.m4
@@ -1,5 +1,6 @@
-# setlocale_null.m4 serial 9
-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.
diff --git a/gnulib/m4/size_max.m4 b/gnulib/m4/size_max.m4
index 0763366dfc..df91cf0629 100644
--- a/gnulib/m4/size_max.m4
+++ b/gnulib/m4/size_max.m4
@@ -1,5 +1,6 @@
-# size_max.m4 serial 12
-dnl Copyright (C) 2003, 2005-2006, 2008-2023 Free Software Foundation, Inc.
+# size_max.m4
+# serial 12
+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/gnulib/m4/ssize_t.m4 b/gnulib/m4/ssize_t.m4
index 52bd77d2ae..c15f948adb 100644
--- a/gnulib/m4/ssize_t.m4
+++ b/gnulib/m4/ssize_t.m4
@@ -1,5 +1,6 @@
-# ssize_t.m4 serial 6
-dnl Copyright (C) 2001-2003, 2006, 2010-2023 Free Software Foundation, Inc.
+# ssize_t.m4
+# serial 6
+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/gnulib/m4/stat-time.m4 b/gnulib/m4/stat-time.m4
index 40993d5731..e8ee7d5125 100644
--- a/gnulib/m4/stat-time.m4
+++ b/gnulib/m4/stat-time.m4
@@ -1,11 +1,11 @@
-# Checks for stat-related time functions.
-
-# Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2023 Free Software
-# Foundation, Inc.
+# stat-time.m4
+# serial 1
+dnl Copyright (C) 1998-1999, 2001, 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.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Checks for stat-related time functions.
dnl From Paul Eggert.
diff --git a/gnulib/m4/stat.m4 b/gnulib/m4/stat.m4
index 81bd16a8f4..fabd360c7a 100644
--- a/gnulib/m4/stat.m4
+++ b/gnulib/m4/stat.m4
@@ -1,10 +1,9 @@
-# serial 20
-
-# Copyright (C) 2009-2023 Free Software Foundation, Inc.
-#
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# stat.m4
+# serial 21
+dnl Copyright (C) 2009-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_STAT],
[
@@ -61,8 +60,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
;;
diff --git a/gnulib/m4/std-gnu11.m4 b/gnulib/m4/std-gnu11.m4
index 4179470ec9..37324c158e 100644
--- a/gnulib/m4/std-gnu11.m4
+++ b/gnulib/m4/std-gnu11.m4
@@ -1,3 +1,6 @@
+# std-gnu11.m4
+# serial 1
+
# Prefer GNU C11 and C++11 to earlier versions. -*- coding: utf-8 -*-
# This implementation is taken from GNU Autoconf lib/autoconf/c.m4
@@ -9,7 +12,7 @@
m4_version_prereq([2.70], [], [
-# Copyright (C) 2001-2023 Free Software Foundation, Inc.
+# Copyright (C) 2001-2024 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/gnulib/m4/stdalign.m4 b/gnulib/m4/stdalign.m4
index 5880efb2eb..1c29d1e4fb 100644
--- a/gnulib/m4/stdalign.m4
+++ b/gnulib/m4/stdalign.m4
@@ -1,10 +1,12 @@
-# Check for alignas and alignof that conform to C23.
-
-dnl Copyright 2011-2023 Free Software Foundation, Inc.
+# stdalign.m4
+# serial 1
+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.
+# Check for alignas and alignof that conform to C23.
+
dnl Written by Paul Eggert and Bruno Haible.
# Prepare for substituting <stdalign.h> if it is not supported.
@@ -13,10 +15,10 @@ AC_DEFUN([gl_ALIGNASOF],
[
AC_CACHE_CHECK([for alignas and alignof],
[gl_cv_header_working_stdalign_h],
- [gl_save_CFLAGS=$CFLAGS
+ [gl_saved_CFLAGS=$CFLAGS
for gl_working in "yes, keywords" "yes, <stdalign.h> macros"; do
AS_CASE([$gl_working],
- [*stdalign.h*], [CFLAGS="$gl_save_CFLAGS -DINCLUDE_STDALIGN_H"])
+ [*stdalign.h*], [CFLAGS="$gl_saved_CFLAGS -DINCLUDE_STDALIGN_H"])
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM(
[[#include <stdint.h>
@@ -56,7 +58,7 @@ AC_DEFUN([gl_ALIGNASOF],
[gl_cv_header_working_stdalign_h=$gl_working],
[gl_cv_header_working_stdalign_h=no])
- CFLAGS=$gl_save_CFLAGS
+ CFLAGS=$gl_saved_CFLAGS
test "$gl_cv_header_working_stdalign_h" != no && break
done])
@@ -79,7 +81,7 @@ AC_DEFUN([gl_ALIGNASOF],
References:
ISO C23 (latest free draft
- <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf>)
+ <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3096.pdf>)
sections 6.5.3.4, 6.7.5, 7.15.
C++11 (latest free draft
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
diff --git a/gnulib/m4/stdarg.m4 b/gnulib/m4/stdarg.m4
index 94787ccc5e..980f410413 100644
--- a/gnulib/m4/stdarg.m4
+++ b/gnulib/m4/stdarg.m4
@@ -1,5 +1,6 @@
-# stdarg.m4 serial 8
-dnl Copyright (C) 2006, 2008-2023 Free Software Foundation, Inc.
+# stdarg.m4
+# serial 8
+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/gnulib/m4/stddef_h.m4 b/gnulib/m4/stddef_h.m4
index aa012219fc..998fe12fa8 100644
--- a/gnulib/m4/stddef_h.m4
+++ b/gnulib/m4/stddef_h.m4
@@ -1,5 +1,6 @@
-# stddef_h.m4 serial 14
-dnl Copyright (C) 2009-2023 Free Software Foundation, Inc.
+# stddef_h.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.
@@ -83,6 +84,36 @@ AC_DEFUN_ONCE([gl_STDDEF_H],
GL_GENERATE_STDDEF_H=true
fi
+ dnl https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114869
+ AC_CACHE_CHECK([whether nullptr_t needs <stddef.h>],
+ [gl_cv_nullptr_t_needs_stddef],
+ [AC_COMPILE_IFELSE([AC_LANG_DEFINES_PROVIDED[nullptr_t x;]],
+ [gl_cv_nullptr_t_needs_stddef=no],
+ [gl_cv_nullptr_t_needs_stddef=yes])])
+ if test "$gl_cv_nullptr_t_needs_stddef" = no; then
+ NULLPTR_T_NEEDS_STDDEF=0
+ GL_GENERATE_STDDEF_H=true
+ fi
+
+ AC_CACHE_CHECK([for clean definition of __STDC_VERSION_STDDEF_H__],
+ [gl_cv_clean_version_stddef],
+ [AC_PREPROC_IFELSE(
+ [AC_LANG_SOURCE(
+ [[/* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114870 */
+ #include <stddef.h>
+ #undef __STDC_VERSION_STDDEF_H__
+ #include <time.h>
+ #ifdef __STDC_VERSION_STDDEF_H__
+ # error "<time.h> defines __STDC_VERSION_STDDEF_H__"
+ #endif
+ ]])],
+ [gl_cv_clean_version_stddef=yes],
+ [gl_cv_clean_version_stddef=no])])
+ if test "$gl_cv_clean_version_stddef" = no; then
+ STDDEF_NOT_IDEMPOTENT=1
+ GL_GENERATE_STDDEF_H=true
+ fi
+
if $GL_GENERATE_STDDEF_H; then
gl_NEXT_HEADERS([stddef.h])
fi
@@ -113,6 +144,8 @@ AC_DEFUN([gl_STDDEF_H_REQUIRE_DEFAULTS],
AC_DEFUN([gl_STDDEF_H_DEFAULTS],
[
dnl Assume proper GNU behavior unless another module says otherwise.
+ NULLPTR_T_NEEDS_STDDEF=1; AC_SUBST([NULLPTR_T_NEEDS_STDDEF])
+ STDDEF_NOT_IDEMPOTENT=0; AC_SUBST([STDDEF_NOT_IDEMPOTENT])
REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
HAVE_MAX_ALIGN_T=1; AC_SUBST([HAVE_MAX_ALIGN_T])
HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
diff --git a/gnulib/m4/stdint.m4 b/gnulib/m4/stdint.m4
index d5ff08b1b8..2dea846914 100644
--- a/gnulib/m4/stdint.m4
+++ b/gnulib/m4/stdint.m4
@@ -1,5 +1,6 @@
-# stdint.m4 serial 63
-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.
diff --git a/gnulib/m4/stdint_h.m4 b/gnulib/m4/stdint_h.m4
index 70349f6cb2..29f42160b0 100644
--- a/gnulib/m4/stdint_h.m4
+++ b/gnulib/m4/stdint_h.m4
@@ -1,5 +1,6 @@
-# stdint_h.m4 serial 9
-dnl Copyright (C) 1997-2004, 2006, 2008-2023 Free Software Foundation, Inc.
+# stdint_h.m4
+# serial 9
+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/gnulib/m4/stdio_h.m4 b/gnulib/m4/stdio_h.m4
index dbfa0d5d61..8eb5816ad7 100644
--- a/gnulib/m4/stdio_h.m4
+++ b/gnulib/m4/stdio_h.m4
@@ -1,5 +1,6 @@
-# stdio_h.m4 serial 63
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# stdio_h.m4
+# serial 63
+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/gnulib/m4/stdlib_h.m4 b/gnulib/m4/stdlib_h.m4
index f47c1eb37b..bb5a646041 100644
--- a/gnulib/m4/stdlib_h.m4
+++ b/gnulib/m4/stdlib_h.m4
@@ -1,5 +1,6 @@
-# stdlib_h.m4 serial 75
-dnl Copyright (C) 2007-2023 Free Software Foundation, Inc.
+# stdlib_h.m4
+# serial 78
+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.
@@ -109,6 +110,7 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
[
m4_defun(GL_MODULE_INDICATOR_PREFIX[_STDLIB_H_MODULE_INDICATOR_DEFAULTS], [
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB__EXIT])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ABORT_DEBUG])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ALIGNED_ALLOC])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_ATOLL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_CALLOC_GNU])
@@ -134,6 +136,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])
@@ -144,6 +147,7 @@ AC_DEFUN([gl_STDLIB_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SECURE_GETENV])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_SETENV])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOD])
+ gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOF])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOL])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLD])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STRTOLL])
@@ -204,6 +208,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_SETSTATE=1; AC_SUBST([HAVE_SETSTATE])
HAVE_DECL_SETSTATE=1; AC_SUBST([HAVE_DECL_SETSTATE])
HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
+ HAVE_STRTOF=1; AC_SUBST([HAVE_STRTOF])
HAVE_STRTOL=1; AC_SUBST([HAVE_STRTOL])
HAVE_STRTOLD=1; AC_SUBST([HAVE_STRTOLD])
HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
@@ -214,6 +219,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
HAVE_UNLOCKPT=1; AC_SUBST([HAVE_UNLOCKPT])
HAVE_DECL_UNSETENV=1; AC_SUBST([HAVE_DECL_UNSETENV])
REPLACE__EXIT=0; AC_SUBST([REPLACE__EXIT])
+ REPLACE_ABORT=0; AC_SUBST([REPLACE_ABORT])
REPLACE_ALIGNED_ALLOC=0; AC_SUBST([REPLACE_ALIGNED_ALLOC])
REPLACE_CALLOC_FOR_CALLOC_GNU=0; AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_GNU])
REPLACE_CALLOC_FOR_CALLOC_POSIX=0;
AC_SUBST([REPLACE_CALLOC_FOR_CALLOC_POSIX])
@@ -237,6 +243,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])
@@ -246,6 +253,7 @@ AC_DEFUN([gl_STDLIB_H_DEFAULTS],
REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
REPLACE_SETSTATE=0; AC_SUBST([REPLACE_SETSTATE])
REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
+ REPLACE_STRTOF=0; AC_SUBST([REPLACE_STRTOF])
REPLACE_STRTOL=0; AC_SUBST([REPLACE_STRTOL])
REPLACE_STRTOLD=0; AC_SUBST([REPLACE_STRTOLD])
REPLACE_STRTOLL=0; AC_SUBST([REPLACE_STRTOLL])
diff --git a/gnulib/m4/stpcpy.m4 b/gnulib/m4/stpcpy.m4
index f3acbee7be..c4d71dd9fa 100644
--- a/gnulib/m4/stpcpy.m4
+++ b/gnulib/m4/stpcpy.m4
@@ -1,5 +1,6 @@
-# stpcpy.m4 serial 11
-dnl Copyright (C) 2002, 2007, 2009-2023 Free Software Foundation, Inc.
+# stpcpy.m4
+# serial 11
+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/gnulib/m4/strcase.m4 b/gnulib/m4/strcase.m4
index 3cf740d234..63021733bd 100644
--- a/gnulib/m4/strcase.m4
+++ b/gnulib/m4/strcase.m4
@@ -1,5 +1,6 @@
-# strcase.m4 serial 12
-dnl Copyright (C) 2002, 2005-2023 Free Software Foundation, Inc.
+# strcase.m4
+# serial 12
+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/gnulib/m4/strcasestr.m4 b/gnulib/m4/strcasestr.m4
index 971e0b2314..d254871677 100644
--- a/gnulib/m4/strcasestr.m4
+++ b/gnulib/m4/strcasestr.m4
@@ -1,5 +1,6 @@
-# strcasestr.m4 serial 28
-dnl Copyright (C) 2005, 2007-2023 Free Software Foundation, Inc.
+# strcasestr.m4
+# serial 28
+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/gnulib/m4/strdup.m4 b/gnulib/m4/strdup.m4
index ecfcdd0150..14b1de070b 100644
--- a/gnulib/m4/strdup.m4
+++ b/gnulib/m4/strdup.m4
@@ -1,6 +1,7 @@
-# strdup.m4 serial 15
+# 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/gnulib/m4/strerror.m4 b/gnulib/m4/strerror.m4
index 0e1f7d73aa..0272c6f4ba 100644
--- a/gnulib/m4/strerror.m4
+++ b/gnulib/m4/strerror.m4
@@ -1,5 +1,6 @@
-# strerror.m4 serial 25
-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.
diff --git a/gnulib/m4/string_h.m4 b/gnulib/m4/string_h.m4
index 7f51391cbf..f31264ae85 100644
--- a/gnulib/m4/string_h.m4
+++ b/gnulib/m4/string_h.m4
@@ -1,11 +1,11 @@
-# Configure a GNU-like replacement for <string.h>.
-
-# Copyright (C) 2007-2023 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# string_h.m4
+# serial 39
+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.
-# serial 37
+# Configure a GNU-like replacement for <string.h>.
# Written by Paul Eggert.
@@ -132,6 +132,7 @@ AC_DEFUN([gl_STRING_H_DEFAULTS],
REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
REPLACE_MEMPCPY=0; AC_SUBST([REPLACE_MEMPCPY])
+ REPLACE_MEMSET_EXPLICIT=0; AC_SUBST([REPLACE_MEMSET_EXPLICIT])
REPLACE_STPCPY=0; AC_SUBST([REPLACE_STPCPY])
REPLACE_STPNCPY=0; AC_SUBST([REPLACE_STPNCPY])
REPLACE_STRCHRNUL=0; AC_SUBST([REPLACE_STRCHRNUL])
@@ -146,5 +147,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/gnulib/m4/strings_h.m4 b/gnulib/m4/strings_h.m4
index 4c41221b15..aaafb55966 100644
--- a/gnulib/m4/strings_h.m4
+++ b/gnulib/m4/strings_h.m4
@@ -1,10 +1,11 @@
-# Configure a replacement for <strings.h>.
+# strings_h.m4
# serial 9
+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.
-# Copyright (C) 2007, 2009-2023 Free Software Foundation, Inc.
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Configure a replacement for <strings.h>.
AC_DEFUN_ONCE([gl_STRINGS_H],
[
diff --git a/gnulib/m4/strndup.m4 b/gnulib/m4/strndup.m4
index 9ec9715c79..7a2c5860b8 100644
--- a/gnulib/m4/strndup.m4
+++ b/gnulib/m4/strndup.m4
@@ -1,5 +1,6 @@
-# strndup.m4 serial 23
-dnl Copyright (C) 2002-2003, 2005-2023 Free Software Foundation, Inc.
+# strndup.m4
+# serial 23
+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/gnulib/m4/strnlen.m4 b/gnulib/m4/strnlen.m4
index d2cac59b6f..b4d2778524 100644
--- a/gnulib/m4/strnlen.m4
+++ b/gnulib/m4/strnlen.m4
@@ -1,5 +1,6 @@
-# strnlen.m4 serial 14
-dnl Copyright (C) 2002-2003, 2005-2007, 2009-2023 Free Software Foundation,
+# strnlen.m4
+# serial 14
+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/gnulib/m4/strstr.m4 b/gnulib/m4/strstr.m4
index 7de203a7b7..957ed2e307 100644
--- a/gnulib/m4/strstr.m4
+++ b/gnulib/m4/strstr.m4
@@ -1,5 +1,6 @@
-# strstr.m4 serial 24
-dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
+# strstr.m4
+# serial 24
+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/gnulib/m4/sys_cdefs_h.m4 b/gnulib/m4/sys_cdefs_h.m4
new file mode 100644
index 0000000000..22fa6c3849
--- /dev/null
+++ b/gnulib/m4/sys_cdefs_h.m4
@@ -0,0 +1,25 @@
+# sys_cdefs_h.m4 - Is <sys/cdefs.h> compatible enough with glibc?
+# serial 2
+dnl Copyright 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 Paul Eggert.
+
+AC_DEFUN_ONCE([gl_CHECK_HEADER_SYS_CDEFS_H],
+ [AC_CACHE_CHECK([for glibc-compatible sys/cdefs.h],
+ [gl_cv_header_sys_cdefs_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_DEFINES_PROVIDED
+ [#include <sys/cdefs.h>
+ enum { foo = __GNUC_PREREQ (14, 1) } bar;
+ ]],
+ [gl_cv_header_sys_cdefs_h=yes],
+ [gl_cv_header_sys_cdefs_h=no])])
+ if test "$gl_cv_header_sys_cdefs_h" = yes; then
+ HAVE_SYS_CDEFS_H=1
+ else
+ HAVE_SYS_CDEFS_H=0
+ fi
+ AC_SUBST([HAVE_SYS_CDEFS_H])])
diff --git a/gnulib/m4/sys_random_h.m4 b/gnulib/m4/sys_random_h.m4
index 01d5feebb3..62fd519e36 100644
--- a/gnulib/m4/sys_random_h.m4
+++ b/gnulib/m4/sys_random_h.m4
@@ -1,5 +1,6 @@
-# sys_random_h.m4 serial 8
-dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
+# sys_random_h.m4
+# serial 8
+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/gnulib/m4/sys_socket_h.m4 b/gnulib/m4/sys_socket_h.m4
index 98a10416ca..3bf3cb4777 100644
--- a/gnulib/m4/sys_socket_h.m4
+++ b/gnulib/m4/sys_socket_h.m4
@@ -1,5 +1,6 @@
-# sys_socket_h.m4 serial 29
-dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
+# sys_socket_h.m4
+# serial 29
+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/gnulib/m4/sys_stat_h.m4 b/gnulib/m4/sys_stat_h.m4
index ca57398aeb..3cc50ce677 100644
--- a/gnulib/m4/sys_stat_h.m4
+++ b/gnulib/m4/sys_stat_h.m4
@@ -1,5 +1,6 @@
-# sys_stat_h.m4 serial 42 -*- Autoconf -*-
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+# sys_stat_h.m4
+# serial 42 -*- Autoconf -*-
+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/gnulib/m4/sys_types_h.m4 b/gnulib/m4/sys_types_h.m4
index 627671fbdf..7c7f265527 100644
--- a/gnulib/m4/sys_types_h.m4
+++ b/gnulib/m4/sys_types_h.m4
@@ -1,5 +1,6 @@
-# sys_types_h.m4 serial 13
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# sys_types_h.m4
+# serial 14
+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.
@@ -22,6 +23,9 @@ AC_DEFUN_ONCE([gl_SYS_TYPES_H],
dnl Whether to override the 'off_t' type.
AC_REQUIRE([gl_TYPE_OFF_T])
+ dnl Whether to define the 'off64_t' type.
+ AC_REQUIRE([gl_TYPE_OFF64_T])
+
dnl Whether to override the 'dev_t' and 'ino_t' types.
m4_ifdef([gl_WINDOWS_STAT_INODES], [
AC_REQUIRE([gl_WINDOWS_STAT_INODES])
diff --git a/gnulib/m4/tempname.m4 b/gnulib/m4/tempname.m4
index abed7991da..795a9803fd 100644
--- a/gnulib/m4/tempname.m4
+++ b/gnulib/m4/tempname.m4
@@ -1,9 +1,9 @@
-#serial 5
-
-# Copyright (C) 2006-2007, 2009-2023 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.
+# tempname.m4
+# serial 5
+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.
# glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose
# it as a public API, and provide it on systems that are lacking.
diff --git a/gnulib/m4/threadlib.m4 b/gnulib/m4/threadlib.m4
index 303382881a..f5e81479cc 100644
--- a/gnulib/m4/threadlib.m4
+++ b/gnulib/m4/threadlib.m4
@@ -1,5 +1,6 @@
-# threadlib.m4 serial 39
-dnl Copyright (C) 2005-2023 Free Software Foundation, Inc.
+# threadlib.m4
+# serial 42
+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.
@@ -206,7 +207,7 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
# If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
# needs -pthread for some reason. See:
# https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
- save_LIBS=$LIBS
+ saved_LIBS="$LIBS"
for gl_pthread in '' '-pthread'; do
LIBS="$LIBS $gl_pthread"
AC_LINK_IFELSE(
@@ -220,7 +221,7 @@ AC_DEFUN([gl_PTHREADLIB_BODY],
[gl_pthread_api=yes
LIBPTHREAD=$gl_pthread
LIBPMULTITHREAD=$gl_pthread])
- LIBS=$save_LIBS
+ LIBS="$saved_LIBS"
test $gl_pthread_api = yes && break
done
echo "$as_me:__oline__: gl_pthread_api=$gl_pthread_api"
>&AS_MESSAGE_LOG_FD
@@ -269,6 +270,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.
@@ -575,6 +585,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/gnulib/m4/time_h.m4 b/gnulib/m4/time_h.m4
index 632d18fc07..d2f3c9701c 100644
--- a/gnulib/m4/time_h.m4
+++ b/gnulib/m4/time_h.m4
@@ -1,12 +1,11 @@
-# Configure a more-standard replacement for <time.h>.
-
-# Copyright (C) 2000-2001, 2003-2007, 2009-2023 Free Software Foundation, Inc.
+# time_h.m4
+# serial 25
+dnl Copyright (C) 2000-2001, 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.
-# serial 24
-
-# This file is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
+# Configure a more-standard replacement for <time.h>.
# Written by Paul Eggert and Jim Meyering.
@@ -175,5 +174,6 @@ AC_DEFUN([gl_TIME_H_DEFAULTS],
REPLACE_TIME=0; AC_SUBST([REPLACE_TIME])
REPLACE_TIMEGM=0; AC_SUBST([REPLACE_TIMEGM])
REPLACE_TIMESPEC_GET=0; AC_SUBST([REPLACE_TIMESPEC_GET])
+ REPLACE_TIMESPEC_GETRES=0; AC_SUBST([REPLACE_TIMESPEC_GETRES])
REPLACE_TZSET=0; AC_SUBST([REPLACE_TZSET])
])
diff --git a/gnulib/m4/uchar_h.m4 b/gnulib/m4/uchar_h.m4
index 299075f572..bb8801b164 100644
--- a/gnulib/m4/uchar_h.m4
+++ b/gnulib/m4/uchar_h.m4
@@ -1,5 +1,6 @@
-# uchar_h.m4 serial 31
-dnl Copyright (C) 2019-2023 Free Software Foundation, Inc.
+# 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.
diff --git a/gnulib/m4/unicase_h.m4 b/gnulib/m4/unicase_h.m4
index 86a1b7c47e..20f2d11264 100644
--- a/gnulib/m4/unicase_h.m4
+++ b/gnulib/m4/unicase_h.m4
@@ -1,5 +1,6 @@
-# unicase_h.m4 serial 1
-dnl Copyright (C) 2023 Free Software Foundation, Inc.
+# 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.
diff --git a/gnulib/m4/unictype_h.m4 b/gnulib/m4/unictype_h.m4
index bab46356d3..477fec995d 100644
--- a/gnulib/m4/unictype_h.m4
+++ b/gnulib/m4/unictype_h.m4
@@ -1,5 +1,6 @@
-# unictype_h.m4 serial 1
-dnl Copyright (C) 2023 Free Software Foundation, Inc.
+# unictype_h.m4
+# serial 3
+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.
@@ -98,6 +99,8 @@ AC_DEFUN([gl_UNICTYPE_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_OTHER_ID_CONTINUE_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_XID_START_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_XID_CONTINUE_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
+
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_START_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
+
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ID_COMPAT_MATH_CONTINUE_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PATTERN_WHITE_SPACE_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PATTERN_SYNTAX_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_JOIN_CONTROL_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
@@ -127,6 +130,7 @@ AC_DEFUN([gl_UNICTYPE_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_IDEOGRAPHIC_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_UNIFIED_IDEOGRAPH_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_RADICAL_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
+
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_IDS_UNARY_OPERATOR_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_IDS_BINARY_OPERATOR_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_IDS_TRINARY_OPERATOR_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_EMOJI_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
@@ -140,6 +144,7 @@ AC_DEFUN([gl_UNICTYPE_H_REQUIRE_DEFAULTS],
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_NON_BREAK_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_ISO_CONTROL_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_FORMAT_CONTROL_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
+
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PREPENDED_CONCATENATION_MARK_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_DASH_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_HYPHEN_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_UNICTYPE_PROPERTY_PUNCTUATION_DLL_VARIABLE],
['LIBUNISTRING_DLL_VARIABLE'])
diff --git a/gnulib/m4/uninorm_h.m4 b/gnulib/m4/uninorm_h.m4
index b6b342d8cc..455a360f11 100644
--- a/gnulib/m4/uninorm_h.m4
+++ b/gnulib/m4/uninorm_h.m4
@@ -1,5 +1,6 @@
-# uninorm_h.m4 serial 1
-dnl Copyright (C) 2023 Free Software Foundation, Inc.
+# 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.
diff --git a/gnulib/m4/unistd_h.m4 b/gnulib/m4/unistd_h.m4
index 1c96158155..04fa79c9ca 100644
--- a/gnulib/m4/unistd_h.m4
+++ b/gnulib/m4/unistd_h.m4
@@ -1,5 +1,6 @@
-# unistd_h.m4 serial 94
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+# unistd_h.m4
+# serial 96
+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 +235,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])
@@ -246,6 +248,7 @@ AC_DEFUN([gl_UNISTD_H_DEFAULTS],
REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
REPLACE_GETPASS=0; AC_SUBST([REPLACE_GETPASS])
REPLACE_GETPASS_FOR_GETPASS_GNU=0;
AC_SUBST([REPLACE_GETPASS_FOR_GETPASS_GNU])
+ REPLACE_GETUSERSHELL=0; AC_SUBST([REPLACE_GETUSERSHELL])
REPLACE_ISATTY=0; AC_SUBST([REPLACE_ISATTY])
REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
diff --git a/gnulib/m4/vararrays.m4 b/gnulib/m4/vararrays.m4
index fd6230c296..9211f69d4d 100644
--- a/gnulib/m4/vararrays.m4
+++ b/gnulib/m4/vararrays.m4
@@ -1,13 +1,13 @@
-# Check for variable-length arrays.
-
+# vararrays.m4
# serial 6
+dnl Copyright (C) 2001, 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.
-# From Paul Eggert
+# Check for variable-length arrays.
-# Copyright (C) 2001, 2009-2023 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.
+# From Paul Eggert
m4_version_prereq([2.70], [], [
diff --git a/gnulib/m4/vasnprintf.m4 b/gnulib/m4/vasnprintf.m4
index df87b9e798..1ea2055ea8 100644
--- a/gnulib/m4/vasnprintf.m4
+++ b/gnulib/m4/vasnprintf.m4
@@ -1,5 +1,6 @@
-# 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 +95,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 +369,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 +443,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/gnulib/m4/vasprintf.m4 b/gnulib/m4/vasprintf.m4
index 6e6156a754..73f7b8073d 100644
--- a/gnulib/m4/vasprintf.m4
+++ b/gnulib/m4/vasprintf.m4
@@ -1,5 +1,6 @@
-# vasprintf.m4 serial 6
-dnl Copyright (C) 2002-2003, 2006-2007, 2009-2023 Free Software Foundation,
+# vasprintf.m4
+# serial 6
+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/gnulib/m4/visibility.m4 b/gnulib/m4/visibility.m4
index f0468e89b5..ecf0968683 100644
--- a/gnulib/m4/visibility.m4
+++ b/gnulib/m4/visibility.m4
@@ -1,5 +1,6 @@
-# visibility.m4 serial 8
-dnl Copyright (C) 2005, 2008, 2010-2023 Free Software Foundation, Inc.
+# visibility.m4
+# serial 9
+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.
@@ -31,18 +32,18 @@ AC_DEFUN([gl_VISIBILITY],
dnl user has put into $CC $CFLAGS $CPPFLAGS.
AC_CACHE_CHECK([whether the -Werror option is usable],
[gl_cv_cc_vis_werror],
- [gl_save_CFLAGS="$CFLAGS"
+ [gl_saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -Werror"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]], [[]])],
[gl_cv_cc_vis_werror=yes],
[gl_cv_cc_vis_werror=no])
- CFLAGS="$gl_save_CFLAGS"
+ CFLAGS="$gl_saved_CFLAGS"
])
dnl Now check whether visibility declarations are supported.
AC_CACHE_CHECK([for simple visibility declarations],
[gl_cv_cc_visibility],
- [gl_save_CFLAGS="$CFLAGS"
+ [gl_saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS -fvisibility=hidden"
dnl We use the option -Werror and a function dummyfunc, because on some
dnl platforms (Cygwin 1.7) the use of -fvisibility triggers a warning
@@ -68,7 +69,7 @@ AC_DEFUN([gl_VISIBILITY],
[[]])],
[gl_cv_cc_visibility=yes],
[gl_cv_cc_visibility=no])
- CFLAGS="$gl_save_CFLAGS"
+ CFLAGS="$gl_saved_CFLAGS"
])
if test $gl_cv_cc_visibility = yes; then
CFLAG_VISIBILITY="-fvisibility=hidden"
diff --git a/gnulib/m4/warn-on-use.m4 b/gnulib/m4/warn-on-use.m4
index 10649c5cba..6c8c76b883 100644
--- a/gnulib/m4/warn-on-use.m4
+++ b/gnulib/m4/warn-on-use.m4
@@ -1,5 +1,6 @@
-# warn-on-use.m4 serial 10
-dnl Copyright (C) 2010-2023 Free Software Foundation, Inc.
+# warn-on-use.m4
+# serial 11
+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.
@@ -36,7 +37,7 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
dnl clang (e.g. strndup), reference ac_compile_for_check_decl instead
dnl of ac_compile. If, for whatever reason, the override of AC_PROG_CC
dnl in zzgnulib.m4 is inactive, use the original ac_compile.
- ac_save_ac_compile="$ac_compile"
+ ac_saved_ac_compile="$ac_compile"
if test -n "$ac_compile_for_check_decl"; then
ac_compile="$ac_compile_for_check_decl"
fi
@@ -46,7 +47,7 @@ AC_DEFUN([gl_WARN_ON_USE_PREPARE],
[[#undef $gl_func
(void) $gl_func;]])],
[AS_VAR_SET([gl_Symbol], [yes])], [AS_VAR_SET([gl_Symbol], [no])])])
- ac_compile="$ac_save_ac_compile"
+ ac_compile="$ac_saved_ac_compile"
AS_VAR_IF([gl_Symbol], [yes],
[AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
dnl Shortcut for an AC_CHECK_DECL invocation that may come later:
diff --git a/gnulib/m4/wchar_h.m4 b/gnulib/m4/wchar_h.m4
index 31f5b0794d..995bdc659d 100644
--- a/gnulib/m4/wchar_h.m4
+++ b/gnulib/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.
+# wchar_h.m4
+# serial 64
+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.
+dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
-# wchar_h.m4 serial 61
+dnl Written by Eric Blake.
AC_DEFUN_ONCE([gl_WCHAR_H],
[
@@ -86,8 +86,8 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK],
dnl z/OS when using the XPLINK object format (due to duplicate
dnl CSECT names). Instead, temporarily redefine $ac_compile so
dnl that the object file has the latter name from the start.
- save_ac_compile="$ac_compile"
- ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
+ saved_ac_compile="$ac_compile"
+ ac_compile=`echo "$saved_ac_compile" | sed s/conftest/conftest1/`
if echo '#include "conftest.c"' >conftest1.c \
&& AC_TRY_EVAL([ac_compile]); then
AC_LANG_CONFTEST([
@@ -97,7 +97,7 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK],
int zero (void) { return 0; }
]])])
dnl See note above about renaming object files.
- ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
+ ac_compile=`echo "$saved_ac_compile" | sed s/conftest/conftest2/`
if echo '#include "conftest.c"' >conftest2.c \
&& AC_TRY_EVAL([ac_compile]); then
if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS
conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
@@ -107,7 +107,7 @@ AC_DEFUN([gl_WCHAR_H_INLINE_OK],
fi
fi
fi
- ac_compile="$save_ac_compile"
+ ac_compile="$saved_ac_compile"
rm -f conftest[12].c conftest[12].$ac_objext conftest$ac_exeext
;;
esac
@@ -186,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/gnulib/m4/wchar_t.m4 b/gnulib/m4/wchar_t.m4
index 50bde08aec..968832cb29 100644
--- a/gnulib/m4/wchar_t.m4
+++ b/gnulib/m4/wchar_t.m4
@@ -1,5 +1,6 @@
-# wchar_t.m4 serial 4 (gettext-0.18.2)
-dnl Copyright (C) 2002-2003, 2008-2023 Free Software Foundation, Inc.
+# wchar_t.m4
+# serial 4 (gettext-0.18.2)
+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/gnulib/m4/wcrtomb.m4 b/gnulib/m4/wcrtomb.m4
index 3152b37563..35dff6f037 100644
--- a/gnulib/m4/wcrtomb.m4
+++ b/gnulib/m4/wcrtomb.m4
@@ -1,5 +1,6 @@
-# wcrtomb.m4 serial 19
-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.
diff --git a/gnulib/m4/wctype.m4 b/gnulib/m4/wctype.m4
index 4f3a836dc5..e5d7074011 100644
--- a/gnulib/m4/wctype.m4
+++ b/gnulib/m4/wctype.m4
@@ -1,5 +1,6 @@
-# wctype.m4 serial 6
-dnl Copyright (C) 2011-2023 Free Software Foundation, Inc.
+# 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.
diff --git a/gnulib/m4/wctype_h.m4 b/gnulib/m4/wctype_h.m4
index ac9c35b2da..a3b07c2a23 100644
--- a/gnulib/m4/wctype_h.m4
+++ b/gnulib/m4/wctype_h.m4
@@ -1,8 +1,9 @@
-# wctype_h.m4 serial 33
+# 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.
diff --git a/gnulib/m4/wcwidth.m4 b/gnulib/m4/wcwidth.m4
index e7829e98c8..1bf79ca167 100644
--- a/gnulib/m4/wcwidth.m4
+++ b/gnulib/m4/wcwidth.m4
@@ -1,5 +1,6 @@
-# wcwidth.m4 serial 36
-dnl Copyright (C) 2006-2023 Free Software Foundation, Inc.
+# wcwidth.m4
+# serial 37
+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.
@@ -41,9 +42,9 @@ AC_DEFUN([gl_FUNC_WCWIDTH],
if test $ac_cv_func_wcwidth = yes || test $gl_cv_func_wcwidth_macro = yes;
then
HAVE_WCWIDTH=1
dnl On Mac OS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
- dnl On macOS 12.5, NetBSD 9.0, OpenBSD 5.0, MidnightBSD 1.1,
+ dnl On macOS 12.5, NetBSD 9.3, OpenBSD 5.0, MidnightBSD 1.1,
dnl wcwidth(0x05B0) (HEBREW POINT SHEVA) returns 1.
- dnl On macOS 12.5, NetBSD 9.0, MidnightBSD 1.1, OSF/1 5.1,
+ dnl On macOS 12.5, NetBSD 9.3, MidnightBSD 1.1, OSF/1 5.1,
dnl wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
dnl On OpenBSD 5.8, wcwidth(0xFF1A) (FULLWIDTH COLON) returns 0.
dnl This leads to bugs in 'ls' (coreutils).
diff --git a/gnulib/m4/wint_t.m4 b/gnulib/m4/wint_t.m4
index dfd743b3a6..883fac28ed 100644
--- a/gnulib/m4/wint_t.m4
+++ b/gnulib/m4/wint_t.m4
@@ -1,5 +1,6 @@
-# wint_t.m4 serial 11
-dnl Copyright (C) 2003, 2007-2023 Free Software Foundation, Inc.
+# wint_t.m4
+# serial 11
+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/gnulib/m4/xalloc.m4 b/gnulib/m4/xalloc.m4
index fc56f59a00..d44d0f088a 100644
--- a/gnulib/m4/xalloc.m4
+++ b/gnulib/m4/xalloc.m4
@@ -1,5 +1,6 @@
-# xalloc.m4 serial 18
-dnl Copyright (C) 2002-2006, 2009-2023 Free Software Foundation, Inc.
+# xalloc.m4
+# serial 18
+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/gnulib/m4/xsize.m4 b/gnulib/m4/xsize.m4
index 649db9c5ea..e5784973e7 100644
--- a/gnulib/m4/xsize.m4
+++ b/gnulib/m4/xsize.m4
@@ -1,5 +1,6 @@
-# xsize.m4 serial 5
-dnl Copyright (C) 2003-2004, 2008-2023 Free Software Foundation, Inc.
+# xsize.m4
+# serial 5
+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/gnulib/m4/zzgnulib.m4 b/gnulib/m4/zzgnulib.m4
index 362102b606..710fba4e29 100644
--- a/gnulib/m4/zzgnulib.m4
+++ b/gnulib/m4/zzgnulib.m4
@@ -1,5 +1,6 @@
-# zzgnulib.m4 serial 1
-dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
+# zzgnulib.m4
+# serial 1
+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.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- branch master updated: Run gnulib-tool --add-import at top level,
Gavin D. Smith <=