]> git.ipfire.org Git - thirdparty/gnulib.git/log
thirdparty/gnulib.git
2 months agoparse-datetime: avoid false test failure on windows
Pádraig Brady [Mon, 16 Feb 2026 11:21:57 +0000 (11:21 +0000)] 
parse-datetime: avoid false test failure on windows

* tests/test-parse-datetime.c: Tweak so that year 2003 rather than 0003
is used, as the latter is not supported by mktime on Windows or Cygwin.
Reported by Bruno Haible.

2 months agoHACKING: Add an LLM policy.
Bruno Haible [Mon, 16 Feb 2026 08:29:10 +0000 (09:29 +0100)] 
HACKING: Add an LLM policy.

* HACKING (Acceptable use of LLM generated code): New section.

2 months agoparse-datetime: Prefer ckd_add to checking overflow by hand.
Collin Funk [Sun, 15 Feb 2026 23:18:37 +0000 (15:18 -0800)] 
parse-datetime: Prefer ckd_add to checking overflow by hand.

* lib/parse-datetime.y (time_overflow): Use ckd_add to check for
overflow.

2 months agoUpdate users.txt.
Collin Funk [Sun, 15 Feb 2026 19:01:33 +0000 (11:01 -0800)] 
Update users.txt.

* users.txt: Add universal-ctags.

2 months agofchownat: port to IBM XL C for AIX 16.1
Paul Eggert [Sun, 15 Feb 2026 02:59:54 +0000 (18:59 -0800)] 
fchownat: port to IBM XL C for AIX 16.1

* lib/chown.c (rpl_chown):
* lib/fchownat.c (rpl_fchownat):
* lib/lchown.c (rpl_lchown):
Avoid using designated initializers (or even ordinary initializers)
in a way that provokes a bug in IBM XL C for AIX 16.1 (2018).
IBM says they will support this old compiler through April 2026
with extended support through April 2029.

2 months agostdcountof-h: port to IBM XL C for AIX 16.1
Paul Eggert [Sun, 15 Feb 2026 02:50:17 +0000 (18:50 -0800)] 
stdcountof-h: port to IBM XL C for AIX 16.1

Improve the test for the bug in MSVC and Oracle Developer Studio
so that it does not rely on symbols like _MSC_VER and so is more
likely to be portable to other compilers that have the bug, e.g.,
IBM XL C for AIX 16.1.  Also, document bug since countof exposes it.
* doc/posix-headers/stdcountof.texi: New file.
* tests/test-stdcountof-h.c (a, b, c): Remove these extern decls.
(call_count): New static var.
(do_call): New static function.
(test_func): Use it to test whether the compiler bug exists with
sizeof, and if so, to skip the countof test.

2 months agoobstack-printf-{posix,gnu}: Fix broken configuration result.
Bruno Haible [Sat, 14 Feb 2026 14:43:47 +0000 (15:43 +0100)] 
obstack-printf-{posix,gnu}: Fix broken configuration result.

Reported by Eric Blake in
<https://lists.gnu.org/archive/html/bug-gnulib/2026-02/msg00028.html>.

* m4/obstack-printf.m4 (gl_FUNC_OBSTACK_PRINTF_REPLACE): New macro,
extracted from gl_FUNC_OBSTACK_PRINTF.
(gl_FUNC_OBSTACK_PRINTF): Invoke it.
* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX_REPLACE): New
macro, extracted from gl_FUNC_OBSTACK_PRINTF_POSIX.
(gl_FUNC_OBSTACK_PRINTF_POSIX): Require gl_FUNC_OBSTACK_PRINTF_REPLACE.
* m4/obstack-printf-gnu.m4 (gl_FUNC_OBSTACK_PRINTF_GNU_REPLACE): New
macro, extracted from gl_FUNC_OBSTACK_PRINTF_GNU.
(gl_FUNC_OBSTACK_PRINTF_GNU): Require gl_FUNC_OBSTACK_PRINTF_REPLACE.

2 months agocrypto/sha3-buffer: pacify -Wcast-qual
Paul Eggert [Thu, 12 Feb 2026 21:36:26 +0000 (13:36 -0800)] 
crypto/sha3-buffer: pacify -Wcast-qual

* lib/sha3.c (sha3_process_bytes): Pacify clang -Wcast-qual.

2 months agocrypto/rijndael: pacify -Wcast-qual
Paul Eggert [Thu, 12 Feb 2026 21:34:10 +0000 (13:34 -0800)] 
crypto/rijndael: pacify -Wcast-qual

* lib/rijndael-api-fst.c (rijndaelBlockEncrypt)
(rijndaelPadEncrypt): Pacify clang -Wcast-qual.

2 months agocrypto/*-buffer: propagate 'const'
Paul Eggert [Thu, 12 Feb 2026 21:02:48 +0000 (13:02 -0800)] 
crypto/*-buffer: propagate 'const'

Problem reported by Arun Giridhar in:
https://savannah.gnu.org/bugs/index.php?68042
* lib/gl_openssl.h (GL_CRYPTO_FN): Use a const pointer.

2 months agoparse-datetime: support dd.mm. in combination
Pádraig Brady [Mon, 9 Feb 2026 17:06:11 +0000 (17:06 +0000)] 
parse-datetime: support dd.mm. in combination

* lib/parse-datetime.y: The previous commit added DD.MM. and DD.MM.YYYY
grammar rules, plus lexer logic (NOT_DECIMAL flag) to prevent 17.6 from
being lexed as a single decimal token. The resulting shift/reduce
conflict between the two rules caused "1.2. 6:7:8.9" to consume 6 as
a year. Also the NOT_DECIMAL flag was never cleared in the DD.MM. case,
later preventing 8.9 from being lexed as a decimal.
  Since the lexer already distinguishes the contiguous 1.2.3 and spaced,
we introduce tUNUMBER_DOTTED so each rule expects different tokens,
thus removing the shift/reduce conflict.  Also we clear NOT_DECIMAL
in the normal path.
* tests/test-parse-datetime.c: Add test cases.

2 months agoparse-datetime: add tests for dd.mm.yy and mm/dd/yy formats
Pádraig Brady [Mon, 9 Feb 2026 15:36:46 +0000 (15:36 +0000)] 
parse-datetime: add tests for dd.mm.yy and mm/dd/yy formats

* tests/test-parse-datetime.c: Add test cases.

3 months agopoll: When setting POLLHUP in revents, set also POLLIN and POLLRDNORM.
Sergei Litvin [Mon, 9 Feb 2026 01:24:30 +0000 (02:24 +0100)] 
poll: When setting POLLHUP in revents, set also POLLIN and POLLRDNORM.

This fixes a hang of wget2 on Windows
<https://gitlab.com/gnuwget/wget2/-/issues/715>.

* lib/poll.c (windows_compute_revents_socket): Set POLLIN and POLLRDNORM
whenever lNetworkEvents has one of the bits FD_READ, FD_ACCEPT, FD_CLOSE
set.
(compute_revents): Set POLLIN and POLLRDNORM whenever fd is set in
rfds[].

Copyright-paperwork-exempt: Yes

3 months agocrypto/{sha*,md5}-buffer: Improve ./configure --help output.
Collin Funk [Tue, 10 Feb 2026 03:25:41 +0000 (19:25 -0800)] 
crypto/{sha*,md5}-buffer: Improve ./configure --help output.

* m4/gl-openssl.m4 (gl_CRYPTO_CHECK): Mention that --with-openssl=yes
will use libcrypto and --with-openssl=no will use a fallback
implementation provided by gnulib.

3 months agosignbit: Fix compil. error in C++ mode on macOS 14 (regr. 2026-02-03).
Bruno Haible [Mon, 9 Feb 2026 16:53:38 +0000 (17:53 +0100)] 
signbit: Fix compil. error in C++ mode on macOS 14 (regr. 2026-02-03).

* lib/math.in.h (signbit): Don't define as a template if the compiler
is clang.

3 months agoisnan: Fix compilation error in C++ mode on NetBSD (regr. 2026-02-03).
Bruno Haible [Mon, 9 Feb 2026 15:30:16 +0000 (16:30 +0100)] 
isnan: Fix compilation error in C++ mode on NetBSD (regr. 2026-02-03).

* lib/math.in.h (isnan): Undefine before defining as a template.

3 months agostrncpy: Change license header in sources to LGPLv2+.
Collin Funk [Sun, 8 Feb 2026 22:27:11 +0000 (14:27 -0800)] 
strncpy: Change license header in sources to LGPLv2+.

Bruno Haible authored this file and approved this change here
<https://lists.gnu.org/r/bug-gnulib/2026-02/msg00047.html>.

* lib/strncpy.c: Change license header to LGPLv2+.

3 months agoparse-datetime: support dd.mm.yy format
Gabriel [Sat, 7 Feb 2026 14:12:45 +0000 (14:12 +0000)] 
parse-datetime: support dd.mm.yy format

* doc/parse-datetime.texi: Document dd.mm.yy support.
* lib/parse-datetime.y: Add grammar for dd.mm.yy and dd.mm.,
and logic to distinguish from tUDECIMAL_NUMBER.

3 months agocpu-supports: fix license in source headers
Pádraig Brady [Sun, 8 Feb 2026 14:09:51 +0000 (14:09 +0000)] 
cpu-supports: fix license in source headers

* lib/cpu-supports.c: s/GPL/LGPL/ as per commit 2bad49a5f9.
* lib/cpu-supports.h: Likewise.
Reported by Collin Funk

3 months agodoc: Separate header files removed by POSIX.
Collin Funk [Sun, 8 Feb 2026 04:56:25 +0000 (20:56 -0800)] 
doc: Separate header files removed by POSIX.

* doc/pastposix-headers/stropts.texi: Renamed from
doc/posix-headers/stropts.texi.
* doc/pastposix-headers/sys_timeb.texi: Renamed from
doc/posix-headers/sys_timeb.texi.
* doc/pastposix-headers/trace.texi: Renamed from
doc/posix-headers/trace.texi.
* doc/pastposix-headers/ucontext.texi: Renamed from
doc/posix-headers/ucontext.texi.
* doc/pastposix-headers/ulimit.texi: Renamed from
doc/posix-headers/ulimit.texi.
* doc/pastposix-headers/utime.texi: Renamed from
doc/posix-headers/utime.texi.
* doc/Makefile (GNULIB_TEXI_FILES): Add files from
doc/pastposix-functions and doc/pastposix-headers.
* doc/gnulib.texi (Legacy Header File Substitutes): New node. Move
header files removed from POSIX here.

3 months agodoc: Fix links to headers removed in POSIX.1-2024 (regr. 2024-07-20).
Collin Funk [Sat, 7 Feb 2026 22:43:47 +0000 (14:43 -0800)] 
doc: Fix links to headers removed in POSIX.1-2024 (regr. 2024-07-20).

* doc/posix-headers/stropts.texi: Use the POSIX.1-2017 link where this
header exists.
* doc/posix-headers/trace.texi: Likewise.
* doc/posix-headers/ulimit.texi: Likewise.
* doc/posix-headers/utime.texi: Likewise.

3 months agogendocs: support compound $MAKEINFO
Pádraig Brady [Sat, 7 Feb 2026 21:10:47 +0000 (21:10 +0000)] 
gendocs: support compound $MAKEINFO

* build-aux/gendocs.sh: Use eval consistently with $MAKEINFO,
to support it being a compound command.  In coreutils at least,
it has the value: SHELL='/bin/sh' build-aux/makeinfo-wrapper.sh
Reported by Collin Funk.

3 months agomaintainer-makefile: propagate MAKEINFO to gendocs
Pádraig Brady [Mon, 2 Feb 2026 19:56:52 +0000 (19:56 +0000)] 
maintainer-makefile: propagate MAKEINFO to gendocs

* top/maint.mk (web-manual): Propagate MAKEINFO explicitly,
rather than requiring it exported in the environment,
which can be awkward on Solaris make for example.

3 months agodo-release-commit-and-tag: Fix stub line numbers.
Basil L. Contovounesios [Wed, 4 Feb 2026 13:52:47 +0000 (14:52 +0100)] 
do-release-commit-and-tag: Fix stub line numbers.

Reported by Pádraig Brady in
<https://lists.gnu.org/r/bug-gnulib/2026-02/msg00027.html>.
* build-aux/do-release-commit-and-tag: The stub_line number is
relative to the --stub-lines sed address, so offset it accordingly.

3 months agoautoupdate
Karl Berry [Wed, 4 Feb 2026 16:11:37 +0000 (08:11 -0800)] 
autoupdate

3 months agomaintainer-makefile: Avoid false positives of unsigned_* syntax checks.
Zack Weinberg [Tue, 3 Feb 2026 16:34:15 +0000 (11:34 -0500)] 
maintainer-makefile: Avoid false positives of unsigned_* syntax checks.

* top/maint.mk (sc_unsigned_char, sc_unsigned_short, sc_unsigned_int,
sc_unsigned_log): Add ‘exclude’ patterns so that these tests do not
throw a false positive on their own commentary.

Copyright-paperwork-exempt: Yes

3 months agoautoupdate
Karl Berry [Tue, 3 Feb 2026 17:16:41 +0000 (09:16 -0800)] 
autoupdate

3 months agomaintainer-makefile: Avoid false positive of fsf_postal syntax check.
Zack Weinberg [Tue, 3 Feb 2026 16:18:48 +0000 (11:18 -0500)] 
maintainer-makefile: Avoid false positive of fsf_postal syntax check.

* top/maint.mk (sc_fsf_postal): Adjust ‘prohibit’ regex to not match
itself.

Copyright-paperwork-exempt: Yes

3 months agosignbit: Make more C++ safe.
Bruno Haible [Tue, 3 Feb 2026 09:58:36 +0000 (10:58 +0100)] 
signbit: Make more C++ safe.

* lib/math.in.h (signbit): In C++ mode, define as a template with three
instantiations, instead of as a macro.

3 months agoisnan: Make more C++ safe.
Bruno Haible [Tue, 3 Feb 2026 09:52:13 +0000 (10:52 +0100)] 
isnan: Make more C++ safe.

* lib/math.in.h (isnan): In C++ mode, define as a template with three
instantiations, instead of as a macro.

3 months agoisinf: Make more C++ safe.
Bruno Haible [Tue, 3 Feb 2026 09:46:27 +0000 (10:46 +0100)] 
isinf: Make more C++ safe.

* lib/math.in.h (isinf): In C++ mode, define as a template with three
instantiations, instead of as a macro.

3 months agoisinf: Avoid unnecessary override of isinf().
Bruno Haible [Tue, 3 Feb 2026 00:58:16 +0000 (01:58 +0100)] 
isinf: Avoid unnecessary override of isinf().

* m4/isinf.m4 (gl_ISINFL_WORKS): Link the test program with -lm if
necessary.

3 months agoisfinite-no-c++: Avoid unnecessary override of isfinite().
Bruno Haible [Tue, 3 Feb 2026 00:30:28 +0000 (01:30 +0100)] 
isfinite-no-c++: Avoid unnecessary override of isfinite().

* m4/isfinite.m4 (gl_ISFINITEL_WORKS): Link the test program with -lm if
necessary.

3 months agofilename: warn re IS_RELATIVE_FILE_NAME ("")
Paul Eggert [Mon, 2 Feb 2026 21:06:51 +0000 (13:06 -0800)] 
filename: warn re IS_RELATIVE_FILE_NAME ("")

* lib/filename.h: Add warning that IS_RELATIVE_FILE_NAME ("") is 1.

3 months agogettext: Partially update to gettext 1.0.
Bruno Haible [Thu, 29 Jan 2026 18:28:59 +0000 (19:28 +0100)] 
gettext: Partially update to gettext 1.0.

* m4/gettext.m4: Update from gettext 1.0.
* m4/nls.m4: Likewise.
* m4/progtest.m4: Likewise.

3 months agorelocatable-prog-wrapper: Fix syntax error on Linux (regr. 2025-12-09).
Bruno Haible [Thu, 29 Jan 2026 18:04:32 +0000 (19:04 +0100)] 
relocatable-prog-wrapper: Fix syntax error on Linux (regr. 2025-12-09).

Reported by Erik Schnetter <schnetter@gmail.com>
at <https://savannah.gnu.org/bugs/?67987>.

* lib/progreloc.c (find_executable): Remove extraneous brace.

3 months agodoc: Fix some links to copy_file_range issues.
Collin Funk [Wed, 28 Jan 2026 03:32:01 +0000 (19:32 -0800)] 
doc: Fix some links to copy_file_range issues.

* doc/glibc-functions/copy_file_range.texi: Correct the order of
arguments to @url.

3 months agoisfinite-no-c++: Make more C++ safe.
Bruno Haible [Tue, 27 Jan 2026 18:39:03 +0000 (19:39 +0100)] 
isfinite-no-c++: Make more C++ safe.

* lib/math.in.h (isfinite): In C++ mode, define as a template with three
instantiations, instead of as a macro.

3 months agostdio-windows: Fix compilation error on old mingw.
Bruno Haible [Sat, 24 Jan 2026 22:56:58 +0000 (23:56 +0100)] 
stdio-windows: Fix compilation error on old mingw.

Reported by Eli Zaretskii in
<https://lists.gnu.org/archive/html/bug-texinfo/2026-01/msg00099.html>.

* lib/stdio-consolesafe.c (local_vasprintf): Renamed from vasprintf.
(vasprintf): Define as a macro, not as a function.

3 months agoselinux-h: Fix compilation errors on Android outside Termux.
Bruno Haible [Sat, 24 Jan 2026 06:57:31 +0000 (07:57 +0100)] 
selinux-h: Fix compilation errors on Android outside Termux.

* m4/selinux-selinux-h.m4 (gl_LIBSELINUX): Test for getfilecon_raw
instead of setfilecon.
(gl_CHECK_HEADER_SELINUX_SELINUX_H): Update.

3 months agoselinux-h: Fix compilation errors in Termux on Android.
Bruno Haible [Sat, 24 Jan 2026 06:31:19 +0000 (07:31 +0100)] 
selinux-h: Fix compilation errors in Termux on Android.

* m4/selinux-selinux-h.m4 (gl_LIBSELINUX): Prefer libandroid-selinux to
libselinux.

3 months agodoc: uimaxabs → umaxabs
Paul Eggert [Sat, 24 Jan 2026 01:52:13 +0000 (17:52 -0800)] 
doc: uimaxabs → umaxabs

C2y has renamed uimaxabs to umaxabs.
It is supported in glibc 2.43, released today.
This patch affects only documentation,
as Gnulib does not support the function by either name.

3 months agogetaddrinfo: Fix test failure on Solaris 10.
Bruno Haible [Fri, 23 Jan 2026 16:30:02 +0000 (17:30 +0100)] 
getaddrinfo: Fix test failure on Solaris 10.

* m4/getaddrinfo.m4 (gl_GETADDRINFO): Test also whether getaddrinfo
supports AI_NUMERICHOST.
* lib/getaddrinfo.c (is_numeric_host): Define also on Solaris.
(getaddrinfo): Add a workaround for Solaris 10.
* doc/posix-functions/getaddrinfo.texi: Mention the Solaris 10 bug.

3 months agogetdelim, getline: Don't replace these functions on glibc.
Collin Funk [Fri, 23 Jan 2026 05:15:29 +0000 (21:15 -0800)] 
getdelim, getline: Don't replace these functions on glibc.

This largely reverts my 2025-10-10 commits since POSIX has relaxed the
requirements to make glibc's behavior compliant. See:
<https://www.austingroupbugs.net/bug_view_page.php?bug_id=1953>.

* doc/posix-functions/getdelim.texi: Move the text about glibc 2.42
to under "Portability problems not fixed by Gnulib".
* doc/posix-functions/getline.texi: Likewise.
* m4/getdelim.m4 (gl_FUNC_GETDELIM): Remove the test on an empty file.
* m4/getline.m4 (gl_FUNC_GETLINE): Likewise.
* tests/test-getdelim.c (main): Remove the test case.
* tests/test-getline.c (main): Likewise.

3 months agodoc: document a portability issue with macOS getrusage.
Collin Funk [Thu, 22 Jan 2026 05:43:56 +0000 (21:43 -0800)] 
doc: document a portability issue with macOS getrusage.

* doc/posix-functions/getrusage.texi: Document that the 'ru_maxrss'
field of 'struct rusage' is measured in bytes on macOS.

3 months agovasnprintf: Optimize when 'long double' is the same as 'double'.
Bruno Haible [Tue, 20 Jan 2026 06:11:31 +0000 (07:11 +0100)] 
vasnprintf: Optimize when 'long double' is the same as 'double'.

* lib/vasnprintf.c (DECL_LONG_DOUBLE_ROUNDING,
BEGIN_LONG_DOUBLE_ROUNDING, END_LONG_DOUBLE_ROUNDING): Override when
HAVE_SAME_LONG_DOUBLE_AS_DOUBLE.

3 months agodoc: mention an OpenBSD printf bug.
Collin Funk [Mon, 19 Jan 2026 20:45:07 +0000 (12:45 -0800)] 
doc: mention an OpenBSD printf bug.

* doc/posix-functions/printf.texi: Mention that OpenBSD does not return
a negative number after running out of memory.

3 months agoxalloc: tweak for GCC 4.6, possible inlining bugs
Paul Eggert [Mon, 19 Jan 2026 17:33:36 +0000 (09:33 -0800)] 
xalloc: tweak for GCC 4.6, possible inlining bugs

* lib/xmalloc.c: Also ignore -Wsuggest-attribute=pure for GCC 4.6,
and do not pop the warning.  This is consistent with how gnulib
does this sort of thing elsewhere.

3 months agoxalloc: use check_nonnull() in more places
Pádraig Brady [Mon, 19 Jan 2026 14:17:33 +0000 (14:17 +0000)] 
xalloc: use check_nonnull() in more places

* lib/xmalloc.c (xrealloc, xreallocarray): Use check_nonnull().

3 months agoxalloc: fix possible elimination of NULL checks
Pádraig Brady [Mon, 19 Jan 2026 14:13:02 +0000 (14:13 +0000)] 
xalloc: fix possible elimination of NULL checks

Commit ff7c8b21 (2021) to pacify -Wsuggest-attribute=pure with GCC 10.3
induces the code to be removed with clang 21,22 with -fno-inline.
I don't see the same code elimination on GCC 15,
but the the incorrect warning is still there.
Note xalloc_die() is marked _Noreturn so GCC is wrong here,
as already reported at https://gcc.gnu.org/PR115237

You can see the difference using split(1).
Without -fno-inline it behaves as expected:

  $ src/split --number=r/9223372036854775808
  split: memory exhausted

and with the -fno-inline:

  $ src/split --number=r/9223372036854775807
  Segmentation fault         (core dumped)

* lib/xmalloc.c (check_nonnull): Remove the "pure" attribute,
and suppress the incorrect GCC warning with pragmas.

3 months agomanywarnings: omit two C++ options for C
Paul Eggert [Mon, 19 Jan 2026 00:40:18 +0000 (16:40 -0800)] 
manywarnings: omit two C++ options for C

* build-aux/gcc-warning.spec:
Update C++ warnings to match GCC 15.2.1 manual.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Remove
-Wsuggest-final-methods, -Wsuggest-final-types as they are C++.

3 months agomanywarnings: update spec, too
Paul Eggert [Sun, 18 Jan 2026 02:07:21 +0000 (18:07 -0800)] 
manywarnings: update spec, too

* build-aux/gcc-warning.spec:
Document -Wzero-as-null-pointer-constant.

3 months agomountlist: Fix a -Wincompatible-pointer-types warning on AIX.
Collin Funk [Sat, 17 Jan 2026 20:13:42 +0000 (12:13 -0800)] 
mountlist: Fix a -Wincompatible-pointer-types warning on AIX.

* lib/mountlist.c (read_file_system_list): Cast the buffer size stored
by mntctl to a char pointer.

3 months agoFix some "it's"s in commentary
Paul Eggert [Sat, 17 Jan 2026 17:51:25 +0000 (09:51 -0800)] 
Fix some "it's"s in commentary

3 months agodoc: Mention another Haiku bug.
Bruno Haible [Sat, 17 Jan 2026 17:30:26 +0000 (18:30 +0100)] 
doc: Mention another Haiku bug.

* doc/posix-functions/mbrtowc.texi: Mention a Haiku bug.

3 months agoc32is* tests: Avoid test failures on Haiku.
Bruno Haible [Sat, 17 Jan 2026 12:31:50 +0000 (13:31 +0100)] 
c32is* tests: Avoid test failures on Haiku.

* tests/test-c32iscntrl.c (main): Disable tests that fail on Haiku.
* tests/test-c32isgraph.c (main): Likewise.
* tests/test-c32islower.c (main): Likewise.
* tests/test-c32isprint.c (main): Likewise.
* tests/test-c32ispunct.c (main): Likewise.
* tests/test-c32toupper.c (main): Likewise.
* tests/test-isgraph_l.c (main): Likewise.
* tests/test-islower_l.c (main): Likewise.
* tests/test-ispunct_l.c (main): Likewise.

3 months agomanywarnings: omit new C warning for GCC 10
Pádraig Brady [Sat, 17 Jan 2026 12:24:39 +0000 (12:24 +0000)] 
manywarnings: omit new C warning for GCC 10

* m4/manywarnings.m4: Fix a typo in the matched versions
to ensure -Wzero-as-null-pointer-constant is not used on GCC 10.

3 months agounlinkat tests: Avoid a test failure on Haiku.
Bruno Haible [Sat, 17 Jan 2026 11:42:56 +0000 (12:42 +0100)] 
unlinkat tests: Avoid a test failure on Haiku.

* tests/test-rmdir.h (test_rmdir_func): Accept EPERM error.

3 months agofenv-exceptions-state-c99: Avoid a Haiku crash dialog at configure time.
Bruno Haible [Sat, 17 Jan 2026 01:22:22 +0000 (02:22 +0100)] 
fenv-exceptions-state-c99: Avoid a Haiku crash dialog at configure time.

* m4/fenv-exceptions-state.m4 (gl_FENV_EXCEPTIONS_STATE): In the test
program, add a signal handler, like in m4/nocrash.m4.

3 months agoselinux-h: Add tests.
Bruno Haible [Sat, 17 Jan 2026 00:52:50 +0000 (01:52 +0100)] 
selinux-h: Add tests.

* tests/test-selinux-context-h.c: New file.
* tests/test-selinux-label-h.c: New file.
* tests/test-selinux-selinux-h.c: New file.
* modules/selinux-h-tests: New file.
* tests/test-selinux-context-h-c++.cc: New file.
* tests/test-selinux-label-h-c++.cc: New file.
* tests/test-selinux-selinux-h-c++.cc: New file.
* modules/selinux-h-c++-tests: New file.

3 months agoselinux-h: Fix compilation errors and link errors in C++ mode.
Bruno Haible [Sat, 17 Jan 2026 00:52:09 +0000 (01:52 +0100)] 
selinux-h: Fix compilation errors and link errors in C++ mode.

* lib/se-selinux.in.h: Mark the functions as 'extern "C"'.
* lib/se-label.in.h: Mark the functions as 'extern "C"'. Avoid implicit
casts from 'void *' to other pointer types.
* lib/se-context.in.h: Likewise.
(context_t): Don't use 'struct context_t'.

3 months agoChangeLog spelling fix
Paul Eggert [Fri, 16 Jan 2026 21:04:54 +0000 (13:04 -0800)] 
ChangeLog spelling fix

3 months agomanywarnings: omit new C warning for GCC < 15
Paul Eggert [Fri, 16 Jan 2026 20:26:22 +0000 (12:26 -0800)] 
manywarnings: omit new C warning for GCC < 15

Problem reported by Pádraig Brady in:
https://lists.gnu.org/r/bug-gnulib/2026-01/msg00135.html
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)):
Do not add -Wzero-as-null-pointer-constant for GCC < 15.
Also, accept strings like "gcc-14 (Ubuntu 14.3.0-8ubuntu1) 14.3.0"
as specifying GCC versions like 14.3.0.

3 months agoselinux-h: pacify -Wzero-as-null-pointer-constant
Paul Eggert [Fri, 16 Jan 2026 19:17:26 +0000 (11:17 -0800)] 
selinux-h: pacify -Wzero-as-null-pointer-constant

* lib/se-context.in.h (context_t): Make it a pointer to an
incomplete type rather than an int, so that callers can initialize
it with NULL regardless of whehter --with-selinux is used.
* lib/se-context.in.h (context_new):
* lib/se-label.in.h (selabel_open): Use the equivalent of
NULL (not NULL, since that would require including <stddef.h>).

3 months agomanywarnings: -Wzero-as-null-pointer-constant in C
Paul Eggert [Thu, 15 Jan 2026 23:12:59 +0000 (15:12 -0800)] 
manywarnings: -Wzero-as-null-pointer-constant in C

Although -Wzero-as-null-pointer-constant was long specific to C++
and Objective C++, as of GCC 15 it also applies to C.
* build-aux/gcc-warning.spec:
Remove -Wzero-as-null-pointer-constant.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)):
Add -Wzero-as-null-pointer-constant.

3 months agostdcountof-h tests: Fix link error on MSVC (regression 2026-01-13).
Bruno Haible [Thu, 15 Jan 2026 13:24:53 +0000 (14:24 +0100)] 
stdcountof-h tests: Fix link error on MSVC (regression 2026-01-13).

* tests/test-stdcountof-h.c: Revert 2026-01-13 change. Instead:
(a, b, c): Declare extern at top level.

3 months agoFix date of recent ChangeLog entry.
Bruno Haible [Thu, 15 Jan 2026 13:23:24 +0000 (14:23 +0100)] 
Fix date of recent ChangeLog entry.

3 months agostdcountof-h tests: Avoid compilation error in C++ mode.
Bruno Haible [Wed, 14 Jan 2026 22:26:51 +0000 (23:26 +0100)] 
stdcountof-h tests: Avoid compilation error in C++ mode.

* tests/test-stdcountof-h.c (test_func): Don't test ISO C initializer
syntax in C++ mode.

3 months agomaint: pacify -Wdiscarded-qualifiers
Paul Eggert [Tue, 13 Jan 2026 16:10:50 +0000 (08:10 -0800)] 
maint: pacify -Wdiscarded-qualifiers

* tests/test-posix_spawn-dup2-stdin.c (main):
* tests/test-posix_spawn-dup2-stdout.c (main):
* tests/test-posix_spawn-inherit0.c (parent_main):
* tests/test-posix_spawn-inherit1.c (parent_main):
* tests/test-posix_spawn-open1.c (parent_main):
* tests/test-posix_spawn-open2.c (parent_main):
Reword to avoid need to cast string literals to char *,
while also pacifying gcc -Wdiscarded-qualifiers.

3 months agotrunc-tests: pacify -Wmissing-prototypes
Paul Eggert [Tue, 13 Jan 2026 16:06:57 +0000 (08:06 -0800)] 
trunc-tests: pacify -Wmissing-prototypes

* tests/test-trunc2.c (trunc_reference): Now static.

3 months agostdcountof-h-tests: pacify -Wnested-externs
Paul Eggert [Tue, 13 Jan 2026 16:02:42 +0000 (08:02 -0800)] 
stdcountof-h-tests: pacify -Wnested-externs

* tests/test-stdcountof-h.c (test_func): Use top-level non-constant.

3 months agoisinf-no-c++-tests: pacify -Wshadow
Paul Eggert [Tue, 13 Jan 2026 15:51:58 +0000 (07:51 -0800)] 
isinf-no-c++-tests: pacify -Wshadow

* tests/test-isinf.c (mem_long_double): Rename this local type
from memory_long_double, to avoid confusion with the top-level
memory_long_double in snan.h.  All uses changed.

3 months agodoc: Add maintainer-makefile section to manual.
Basil L. Contovounesios [Mon, 17 Nov 2025 17:33:52 +0000 (18:33 +0100)] 
doc: Add maintainer-makefile section to manual.

Suggested by Simon Josefsson <simon@josefsson.org> in
<https://lists.gnu.org/r/bug-gnulib/2025-11/msg00178.html>.

* doc/maintainer-makefile.texi: New file documenting
maintainer-makefile targets and supported NEWS formats.
* doc/gnulib.texi (Build Infrastructure Modules): Include it here.
(Release Management Files): Tweak grammar.

Signed-off-by: Simon Josefsson <simon@josefsson.org>
3 months agoobstack-printf-posix: Improve comment.
Bruno Haible [Mon, 12 Jan 2026 23:02:36 +0000 (00:02 +0100)] 
obstack-printf-posix: Improve comment.

Reported by Eric Blake in
<https://lists.gnu.org/archive/html/bug-gnulib/2026-01/msg00085.html>.

* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): Improve
comment.

4 months agogethostname: Fix link error on native Windows.
Bruno Haible [Mon, 12 Jan 2026 12:11:08 +0000 (13:11 +0100)] 
gethostname: Fix link error on native Windows.

Reported by Michele Locati <michele@locati.it> in
<https://lists.gnu.org/archive/html/bug-gettext/2026-01/msg00029.html>.

* modules/gethostname (Dependencies, configure.ac): Compile
gethostname.c also when UNISTD_H_HAVE_WINSOCK2_H is 1.

4 months agostring-desc: Fix compilation error with gcc 4.8.x (regr. yesterday).
Bruno Haible [Mon, 12 Jan 2026 09:49:07 +0000 (10:49 +0100)] 
string-desc: Fix compilation error with gcc 4.8.x (regr. yesterday).

* lib/string-desc.h (HAVE__GENERIC): Ignore __STDC_VERSION__ for GCC.

4 months agoutimens tests: Avoid an assertion failure on Haiku.
Bruno Haible [Mon, 12 Jan 2026 01:30:41 +0000 (02:30 +0100)] 
utimens tests: Avoid an assertion failure on Haiku.

* tests/test-utimens.h (test_utimens): Skip the comparison of the access
times on Haiku.

4 months agostring-desc: Avoid compilation error with clang-cl in C++ mode.
Bruno Haible [Sun, 11 Jan 2026 21:58:51 +0000 (22:58 +0100)] 
string-desc: Avoid compilation error with clang-cl in C++ mode.

Reported by Kirill Makurin <maiddaisuki@outlook.com> in
<https://lists.gnu.org/archive/html/bug-gettext/2026-01/msg00020.html>.

* lib/string-desc.h (HAVE_TYPEOF): New macro.
(HAVE_RW_STRING_DESC): Test also HAVE_TYPEOF.

4 months agostring-desc: Revisit feature tests regarding C++.
Bruno Haible [Sun, 11 Jan 2026 21:58:14 +0000 (22:58 +0100)] 
string-desc: Revisit feature tests regarding C++.

* lib/string-desc.h (HAVE_STATEMENT_EXPRESSIONS): Also define with
SunPRO C++.
(HAVE__GENERIC): Don't define with GNU C++. Define in ISO C 11 or newer.

4 months agoselinux-h: warning about missing libselinux on modern systems
Pádraig Brady [Sat, 10 Jan 2026 19:17:54 +0000 (19:17 +0000)] 
selinux-h: warning about missing libselinux on modern systems

* m4/selinux-selinux-h.m4 (gl_LIBSELINUX): /sys/fs/selinux is generally
used since Linux kernel 2.6, so test that also.

4 months agoselinux-h: only override default --with-selinux user setting
Pádraig Brady [Sat, 10 Jan 2026 19:12:41 +0000 (19:12 +0000)] 
selinux-h: only override default --with-selinux user setting

* m4/selinux-selinux-h.m4 (gl_LIBSELINUX): Only override the default
with_selinux user setting, leaving explicit --with-selinux untouched.
E.g., coreutils uses --with-selinux to force build the runcon
and chcon stubs on systems without libselinux.

4 months agodoc: Fix typo.
Bruno Haible [Fri, 9 Jan 2026 17:14:20 +0000 (18:14 +0100)] 
doc: Fix typo.

Reported by Eric Blake.

* doc/posix-functions/getlocalename_l.texi: Fix typo.

4 months agoannounce-gen: Fix instructions for verifying the SHA3-256 checksums.
Bruno Haible [Fri, 9 Jan 2026 10:54:12 +0000 (11:54 +0100)] 
announce-gen: Fix instructions for verifying the SHA3-256 checksums.

* build-aux/announce-gen (print_checksums): Use quotes. Fix cksum
invocation for hex SHA3-256 checksum.

4 months agodoc: Improvements for gnulib git bundle.
Bruno Haible [Fri, 9 Jan 2026 10:28:58 +0000 (11:28 +0100)] 
doc: Improvements for gnulib git bundle.

* doc/gnulib-git-bundle.texi: Explain how to verify the checksums.

4 months agodoc: Improvements for gnulib git bundle.
Simon Josefsson [Fri, 9 Jan 2026 08:29:31 +0000 (09:29 +0100)] 
doc: Improvements for gnulib git bundle.

* doc/gnulib-git-bundle.texi: Add 20260109 release.
Add SHA3-256 hashes.  Improve reproducibility instructions.

4 months agodoc: Update for Haiku.
Bruno Haible [Thu, 8 Jan 2026 23:52:55 +0000 (00:52 +0100)] 
doc: Update for Haiku.

* doc/posix-functions/open.texi: Document a Haiku bug.
* doc/posix-functions/wcrtomb.texi: Likewise.

4 months agotime_r tests: Avoid test failure on Haiku.
Bruno Haible [Thu, 8 Jan 2026 23:49:08 +0000 (00:49 +0100)] 
time_r tests: Avoid test failure on Haiku.

* tests/test-localtime_r.c (main): On Haiku, expect a different tm_zone
value than "CET" and "CEST".

4 months agoget-rusage-data tests: Avoid test failure on Haiku.
Bruno Haible [Thu, 8 Jan 2026 23:46:34 +0000 (00:46 +0100)] 
get-rusage-data tests: Avoid test failure on Haiku.

* tests/test-get-rusage-data.c (main): Disable a failing assertion on
Haiku.

4 months agoAvoid test failures on Haiku, where -1 behaves like AT_FDCWD.
Bruno Haible [Thu, 8 Jan 2026 23:38:37 +0000 (00:38 +0100)] 
Avoid test failures on Haiku, where -1 behaves like AT_FDCWD.

* tests/test-readlinkat.c (main): Test file descriptor -2 instead of -1.
* tests/test-areadlinkat.c (main): Likewise.
* tests/test-areadlinkat-with-size.c (main): Likewise.
* tests/test-faccessat.c (main): Likewise.
* tests/test-fchmodat.c (main): Likewise.
* tests/test-fchownat.c (main): Likewise.
* tests/test-fstatat.c (main): Likewise.
* tests/test-linkat.c (main): Likewise.
* tests/test-mkdirat.c (main): Likewise.
* tests/test-mkfifoat.c (main): Likewise.
* tests/test-openat.c (main): Likewise.
* tests/test-openat-safer.c (main): Likewise.
* tests/test-openat2.c (main): Likewise.
* tests/test-renameat.c (main): Likewise.
* tests/test-renameatu.c (main): Likewise.
* tests/test-symlinkat.c (main): Likewise.
* tests/test-unlinkat.c (main): Likewise.
* tests/test-utimensat.c (main): Likewise.

4 months agogetlocalename_l-unsafe: Avoid hack on newer Haiku versions.
Bruno Haible [Thu, 8 Jan 2026 13:31:48 +0000 (14:31 +0100)] 
getlocalename_l-unsafe: Avoid hack on newer Haiku versions.

Suggested by Augustin Cavalier <waddlesplash@gmail.com>.

* lib/getlocalename_l-unsafe.c (getlocalename_l_unsafe) [HAIKU]: Use the
getlocalename_l function if available.

4 months agogetlocalename_l-unsafe: Avoid hack on newer Haiku versions.
Bruno Haible [Thu, 8 Jan 2026 13:15:40 +0000 (14:15 +0100)] 
getlocalename_l-unsafe: Avoid hack on newer Haiku versions.

* lib/getlocalename_l-unsafe.c (getlocalename_l_unsafe) [HAIKU]: Use the
getlocalename_l function if available.

4 months agogetlocalename_l: Work around portability problem on Haiku.
Bruno Haible [Thu, 8 Jan 2026 13:01:32 +0000 (14:01 +0100)] 
getlocalename_l: Work around portability problem on Haiku.

* m4/getlocalename_l.m4 (gl_FUNC_GETLOCALENAME_L_UNSAFE): Check against
a Haiku problem.
* doc/posix-functions/getlocalename_l.texi: Mention the Haiku problem.

4 months agogetdelim: Avoid a -Wjump-misses-init warning (regr. 2025-12-09).
Bruno Haible [Wed, 7 Jan 2026 10:02:00 +0000 (11:02 +0100)] 
getdelim: Avoid a -Wjump-misses-init warning (regr. 2025-12-09).

Reported by correctmost <cmlists@sent.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2026-01/msg00019.html>.

* lib/getdelim.c (getdelim): Reduce the scope of the 'cur_len' variable.

4 months agostd-gnu11: port C++11 test to C++20
Paul Eggert [Mon, 5 Jan 2026 18:26:08 +0000 (10:26 -0800)] 
std-gnu11: port C++11 test to C++20

* m4/std-gnu11.m4 (_AC_CXX_CXX11_TEST_BODY): Port to C++20.
Suggested by Jonathan Wakely in:
https://lists.gnu.org/r/bug-gnulib/2026-01/msg00035.html

4 months agofts: Prefer reallocarray to checking overflow by hand.
Collin Funk [Sat, 3 Jan 2026 20:14:43 +0000 (12:14 -0800)] 
fts: Prefer reallocarray to checking overflow by hand.

* lib/fts.c (fts_sort): Use reallocarray instead of checking for
overflow before calling realloc.
* modules/fts (Depends-on): Add reallocarray.

4 months agoautoupdate
Karl Berry [Fri, 2 Jan 2026 15:08:51 +0000 (07:08 -0800)] 
autoupdate

4 months agoFix a typo in the previous commit.
Collin Funk [Fri, 2 Jan 2026 04:36:49 +0000 (20:36 -0800)] 
Fix a typo in the previous commit.

4 months agofts: Improve performance on the Lustre file system.
Collin Funk [Fri, 2 Jan 2026 04:24:29 +0000 (20:24 -0800)] 
fts: Improve performance on the Lustre file system.

Reported by Tim Day <timday@amazon.com> in
<https://bugs.gnu.org/80106>.

* lib/fts.c (S_MAGIC_LUSTRE): New macro.
(dirent_inode_sort_may_be_useful): Return false on Lustre file systems
so inode sorting is not performed.

4 months agodoc: Update regarding stable branches.
Bruno Haible [Thu, 1 Jan 2026 20:16:44 +0000 (21:16 +0100)] 
doc: Update regarding stable branches.

* doc/gnulib-readme.texi (Stable Branches): Mention new branch
stable-202601. Mention that stable-202501 is no longer updated.

4 months agomaint: update copyrights by hand
Bruno Haible [Thu, 1 Jan 2026 20:09:46 +0000 (21:09 +0100)] 
maint: update copyrights by hand

This fixes some copyright dates that were not updated correctly by
"make update-copyright".