]> git.ipfire.org Git - thirdparty/gnulib.git/log
thirdparty/gnulib.git
8 weeks 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+.

8 weeks 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.

2 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

2 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.

2 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.

2 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.

2 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.

2 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.

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

2 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

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

2 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

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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().

2 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.

2 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++.

2 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.

2 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.

2 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

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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'.

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

2 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.

2 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>).

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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>
2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

2 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.

3 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.

3 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".

3 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.

3 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.

3 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.

3 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.

3 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.

3 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.

3 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

3 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.

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

3 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.

3 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.

3 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.

3 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".

3 months agomaint: run 'make update-copyright'
Collin Funk [Thu, 1 Jan 2026 18:37:05 +0000 (10:37 -0800)] 
maint: run 'make update-copyright'

3 months agomountlist: Fix compilation error on Haiku (regr. 2025-11-18).
Bruno Haible [Thu, 1 Jan 2026 13:06:42 +0000 (14:06 +0100)] 
mountlist: Fix compilation error on Haiku (regr. 2025-11-18).

* lib/mountlist.c (read_file_system_list): Declare a variable before the
'for' loop.

3 months agogetprogname: Fix missing declaration on QNX.
Collin Funk [Thu, 1 Jan 2026 06:25:46 +0000 (22:25 -0800)] 
getprogname: Fix missing declaration on QNX.

* lib/stdlib.in.h [@GNULIB_GETPROGNAME@ && @HAVE_SYS_PROCESS_H@]:
Include sys/process.h.
* m4/getprogname.m4 (gl_FUNC_GETPROGNAME): Check for sys/process.h.
* m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Initialize HAVE_SYS_PROCESS_H
to zero.
* modules/stdlib-h (Makefile.am): Substitute HAVE_SYS_PROCESS_H.

3 months agoinet_ntop, inet_pton: Fix a link error on QNX.
Collin Funk [Thu, 1 Jan 2026 04:20:49 +0000 (20:20 -0800)] 
inet_ntop, inet_pton: Fix a link error on QNX.

* m4/inet_ntop.m4 (gl_FUNC_INET_NTOP): Also check for inet_ntop in
libsocket.
* m4/inet_pton.m4 (gl_FUNC_INET_PTON): Likewise for inet_pton.

3 months agosys_stat-h tests: Fix a static_assert failure on QNX.
Collin Funk [Thu, 1 Jan 2026 01:59:14 +0000 (17:59 -0800)] 
sys_stat-h tests: Fix a static_assert failure on QNX.

* tests/test-sys_stat-h.c [__QNX__]: Don't check that blksize_t and
blkcnt_t are signed. Add some parentheses for readability.
* doc/posix-headers/sys_stat.texi: Mention that these types are unsigned
on this platform.

3 months agosys_types-h tests: Fix a static_assert failure on QNX.
Collin Funk [Thu, 1 Jan 2026 01:21:18 +0000 (17:21 -0800)] 
sys_types-h tests: Fix a static_assert failure on QNX.

* tests/test-sys_types-h.c [__QNX__]: Don't check that blksize_t and
blkcnt_t are signed. Add some parentheses for readability.
* doc/posix-headers/sys_types.texi: Mention that these types are
unsigned on this platform.

3 months agosetlocale: Update regarding ISO 3166.
Bruno Haible [Fri, 26 Dec 2025 21:49:00 +0000 (22:49 +0100)] 
setlocale: Update regarding ISO 3166.

* lib/setlocale.c (locales_with_principal_territory,
locales_with_principal_language): Update comments to match
<https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>.

3 months agoSpelling fixes
Paul Eggert [Fri, 26 Dec 2025 19:13:11 +0000 (11:13 -0800)] 
Spelling fixes

3 months agostrftime: avoid false failure with empty strings
Pádraig Brady [Thu, 25 Dec 2025 13:42:26 +0000 (13:42 +0000)] 
strftime: avoid false failure with empty strings

* lib/strftime.c (width_cpy): Avoid fwrite() with 0 size objects,
to avoid false failure.  This was seen with %p in ms_MY locale
on Debian 11 at least.

3 months ago* build-aux/gcc-warning.spec: Sort.
Paul Eggert [Wed, 24 Dec 2025 22:40:54 +0000 (14:40 -0800)] 
* build-aux/gcc-warning.spec: Sort.

3 months agoFix gcc-warning.spec comments
Paul Eggert [Wed, 24 Dec 2025 22:26:48 +0000 (14:26 -0800)] 
Fix gcc-warning.spec comments

3 months agoautoupdate
Karl Berry [Wed, 24 Dec 2025 20:04:20 +0000 (12:04 -0800)] 
autoupdate

3 months agoOmit "ATTENTION!" comments re reproducible/unsequenced
Paul Eggert [Wed, 24 Dec 2025 08:51:26 +0000 (00:51 -0800)] 
Omit "ATTENTION!" comments re reproducible/unsequenced

These comments are out of date as the efforts did not pan out.

3 months agoattribute: new C macro UNNAMED
Paul Eggert [Wed, 24 Dec 2025 08:08:50 +0000 (00:08 -0800)] 
attribute: new C macro UNNAMED

* lib/attribute.h (UNNAMED): New macro, like _GL_UNNAMED.
When applicable, prefer this new macro to MAYBE_UNUSED.

3 months agoNew C macro _GL_UNNAMED
Paul Eggert [Wed, 24 Dec 2025 07:19:09 +0000 (23:19 -0800)] 
New C macro _GL_UNNAMED

C23 introduced the longstanding C++ convention that a function
parameter’s identifier can be omitted, meaning that the parameter
is unnamed.  This is clearer than [[maybe_unused]], as it means
the parameter is definitely (not maybe) unused.  When applicable,
prefer this new macro to _GL_ATTRIBUTE_MAYBE_UNUSED.
* Makefile (config_h_MACROS2): Add _GL_UNNAMED.
* lib/se-context.in.h, lib/se-label.in.h, lib/se-selinux.in.h:
* lib/textstyle.in.h: Define a backup _GL_UNNAMED macro instead of
defining a backup _GL_ATTRIBUTE_MAYBE_UNUSED macro, even though
I’m unsure why any backup macro definition is needed,
as other gnulib-common macros are used without defining them.
* m4/gnulib-common.m4 (_GL_UNNAMED): New macro.
All uses of _GL_ATTRIBUTE_MAYBE_UNUSED replaced to use the new macro,
when that makes sense.

3 months agoUpdate some attribute.h comments
Paul Eggert [Sat, 20 Dec 2025 18:37:05 +0000 (10:37 -0800)] 
Update some attribute.h comments

* lib/attribute.h: Update [[unsequenced]]/[[reproducible]]
comments to match m4/gnulib-common.m4.