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.
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[].
* 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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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:
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++.
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.
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'.
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.
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>).
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.
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.
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.
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.
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.
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.
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.
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>.