]> git.ipfire.org Git - thirdparty/gnulib.git/log
thirdparty/gnulib.git
102 min agombrtowc: Fix handling of s==NULL on all possible platforms. master
Bruno Haible [Sat, 6 Jun 2026 19:04:18 +0000 (21:04 +0200)] 
mbrtowc: Fix handling of s==NULL on all possible platforms.

* lib/mbrtowc.c (rpl_mbrtowc): Enable the s==NULL test also on platforms
that define only MBRTOWC_NUL_RETVAL_BUG or
MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ.

3 hours agombrtoc32: fix ChangeLog typo
Paul Eggert [Sat, 6 Jun 2026 17:41:07 +0000 (10:41 -0700)] 
mbrtoc32: fix ChangeLog typo

Problem reported by Tim Rühsen in:
https://lists.gnu.org/r/bug-gnulib/2026-06/msg00018.html

26 hours agoquotearg: fix ChangeLog typo
Paul Eggert [Fri, 5 Jun 2026 18:33:15 +0000 (11:33 -0700)] 
quotearg: fix ChangeLog typo

Problem reported by Pavel Cahyna in
https://lists.gnu.org/r/bug-gnulib/2026-06/msg00015.html

4 days agombrtowc: Work around a NetBSD bug in UTF-8 locales, part 2.
Bruno Haible [Tue, 2 Jun 2026 20:17:38 +0000 (22:17 +0200)] 
mbrtowc: Work around a NetBSD bug in UTF-8 locales, part 2.

* m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Also set REPLACE_MBSRTOWCS
to 1 if gl_MBRTOWC_INVALID_UTF8 reports "no".
* m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Also set REPLACE_MBSNRTOWCS
to 1 if gl_MBRTOWC_INVALID_UTF8 reports "no".

4 days agoc32width etc.: Fix compilation error on GNU systems (regr. 2026-04-24).
Bruno Haible [Tue, 2 Jun 2026 19:16:31 +0000 (21:16 +0200)] 
c32width etc.: Fix compilation error on GNU systems (regr. 2026-04-24).

* lib/uchar.in.h: Do include <wchar.h> when any of the modules c32width,
c32snrtombs, c32srtombs, c32swidth, mbsnrtoc32s, mbsrtoc32s is in use.

4 days agoautoupdate
Karl Berry [Tue, 2 Jun 2026 14:43:36 +0000 (07:43 -0700)] 
autoupdate

4 days agombrtowc: Fix handling of n==0 on CentOS 7, MSVC (regr. 2026-05-25).
Bruno Haible [Tue, 2 Jun 2026 12:14:09 +0000 (14:14 +0200)] 
mbrtowc: Fix handling of n==0 on CentOS 7, MSVC (regr. 2026-05-25).

* lib/mbrtowc.c (rpl_mbrtowc): Fix botched condition for the n==0 case.

4 days agombrtowc, mbrlen: Work around a NetBSD bug in UTF-8 locales.
Bruno Haible [Tue, 2 Jun 2026 11:13:20 +0000 (13:13 +0200)] 
mbrtowc, mbrlen: Work around a NetBSD bug in UTF-8 locales.

* m4/mbrtowc.m4 (gl_MBRTOWC_INVALID_UTF8): New macro.
(gl_FUNC_MBRTOWC): Invoke it. Define MBRTOWC_INVALID_UTF8_BUG if mbrtowc
does not recognize some invalid UTF-8 byte sequences.
* lib/mbrtowc.c (is_locale_utf8, is_locale_utf8_cached): Define also if
MBRTOWC_INVALID_UTF8_BUG.
(rpl_mbrtowc): Handle UTF-8 locales specially also on NetBSD.
* tests/test-mbrtowc.c (main): Add more test cases for the UTF-8
encoding.
* tests/test-mbrlen.c (main): Likewise.
* doc/posix-functions/mbrtowc.texi: Mention the NetBSD bug.
* doc/posix-functions/mbrlen.texi: Likewise.

6 days agoautoupdate
Karl Berry [Sun, 31 May 2026 14:39:50 +0000 (07:39 -0700)] 
autoupdate

6 days agoparse-datetime: INT_BITS → INT_WIDTH in comments
Paul Eggert [Sun, 31 May 2026 07:33:08 +0000 (00:33 -0700)] 
parse-datetime: INT_BITS → INT_WIDTH in comments

6 days agoquotearg: remove SIZE_MAX, INT_BITS
Paul Eggert [Sun, 31 May 2026 07:32:30 +0000 (00:32 -0700)] 
quotearg: remove SIZE_MAX, INT_BITS

This is a minor cleanup, as quotearg can assume
* modules/quotearg (Depends-on): Add limits-h.
* lib/quotearg.c (SIZE_MAX): Remove; <stdint.h> defines this now.
(INT_BITS): Remove.  All uses replaced by UINT_WIDTH,
which <limits.h> defines.

6 days agofree-posix: remove stray wchar-h dependency
Paul Eggert [Sun, 31 May 2026 06:21:52 +0000 (23:21 -0700)] 
free-posix: remove stray wchar-h dependency

* modules/free-posix (Depends-on): Don’t depend on wchar-h.
Discovered because gzip unnecessarily brought in wchar-h machinery.

6 days agoquotearg: escape C1 codes in C locale
Paul Eggert [Sun, 31 May 2026 04:57:03 +0000 (21:57 -0700)] 
quotearg: escape C1 codes in C locale

Problem reported by Lasse Collin <https://bugs.gnu.org/81135#29>.
For lib/quotearg.c, m4/quotearg.m4 and modules/quotearg,
go back to the old way of doing things, without the recently-added
USE_C_LOCALE stuff.  Then make the following changes instead:
* lib/quotearg.c [_QUOTEARG_AVOID_UCHAR_H]: Don’t include <uchar.h>.
(mbrto2c, mbstate_t) [_QUOTEARG_AVOID_UCHAR_H && defined __UCLIBC__
&& !defined __UCLIBC_HAS_WCHAR__]: New macros.
Also, don’t include <wchar.h> or <wctype.h>.
(char32_t, c32isprint, mbrtoc32, GNULIB_MBRTOC32_REGULAR)
[_QUOTEARG_AVOID_UCHAR_H]: New macros.
(mbszero) [!GNULIB_defined_mbszero]: New macro.

7 days agoquotearg: improve USE_C_LOCALE + UTF-8
Paul Eggert [Fri, 29 May 2026 20:56:42 +0000 (13:56 -0700)] 
quotearg: improve USE_C_LOCALE + UTF-8

Problem reported by Bruno Haible <https://bugs.gnu.org/81135>.
* lib/quotearg.c (chisprint, wchisprint) [USE_C_LOCALE]:
Treat unassigned characters as printable.

8 days agomanywarnings: deprecate -Whsa etc. too
Paul Eggert [Fri, 29 May 2026 00:48:00 +0000 (17:48 -0700)] 
manywarnings: deprecate -Whsa etc. too

-Whsa, -Wunreachable-code and -Wunsafe-loop-optimizations
are now ignored, so stop worrying about them too.

9 days agomanywarnings: -Wstrict-overflow is deprecated
Paul Eggert [Thu, 28 May 2026 20:27:01 +0000 (13:27 -0700)] 
manywarnings: -Wstrict-overflow is deprecated

Issue reported by Drea Pinski in:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101913#c6
* HACKING: Stop recommending -Wstrict-overflow.
* build-aux/g++-warning.spec:
* build-aux/gcc-warning.spec: Say -Wstrict-overflow is deprecated.
* doc/manywarnings.texi (manywarnings): Stop mentioning it.
* m4/manywarnings-c++.m4 (gl_MANYWARN_ALL_GCC_CXX_IMPL):
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC):
Stop using it.

10 days agofma: Work around glibc 2.43 regression.
Bruno Haible [Wed, 27 May 2026 17:08:16 +0000 (19:08 +0200)] 
fma: Work around glibc 2.43 regression.

* m4/fma.m4 (gl_FUNC_FMA_WORKS): Check against glibc 2.43 bug.
* doc/posix-functions/fma.texi: Mention glibc 2.43 as being buggy.

10 days agolibgmp-mpz: pacify -Wuseless-cast
Paul Eggert [Wed, 27 May 2026 05:17:29 +0000 (22:17 -0700)] 
libgmp-mpz: pacify -Wuseless-cast

* lib/mini-gmp-gnulib.c: Ignore -Wuseless-cast, as we
don’t want top change lib/mini-gmp.c.

11 days agoquotearg: Fix compilation error in USE_C_LOCALE code.
Bruno Haible [Tue, 26 May 2026 18:35:50 +0000 (20:35 +0200)] 
quotearg: Fix compilation error in USE_C_LOCALE code.

* lib/quotearg.c: If USE_C_LOCALE && C_LOCALE_MIGHT_BE_MULTIBYTE,
include c-ctype.h instead of <ctype.h>.
* modules/quotearg (Depends-on): Add c-ctype.

11 days agoquotearg: Improve USE_C_LOCALE code on Haiku.
Bruno Haible [Tue, 26 May 2026 17:49:09 +0000 (19:49 +0200)] 
quotearg: Improve USE_C_LOCALE code on Haiku.

* lib/quotearg.c (C_LOCALE_MIGHT_BE_MULTIBYTE): Define also on Haiku.
Add comments.

11 days agoquotearg: Improve USE_C_LOCALE code on musl libc.
Bruno Haible [Tue, 26 May 2026 17:40:43 +0000 (19:40 +0200)] 
quotearg: Improve USE_C_LOCALE code on musl libc.

* m4/quotearg.m4 (gl_QUOTEARG): Require gl_MUSL_LIBC.
* modules/quotearg (Files): Add m4/musl.m4.

11 days agoautoupdate
Karl Berry [Tue, 26 May 2026 14:23:39 +0000 (07:23 -0700)] 
autoupdate

11 days agoxalloc-oversized: pacify gcc -Wuseless-cast
Paul Eggert [Tue, 26 May 2026 03:09:50 +0000 (20:09 -0700)] 
xalloc-oversized: pacify gcc -Wuseless-cast

* lib/xalloc-oversized.h (xalloc_oversized): 1 → 1u.

11 days agoquotearg: be nicer on macOS etc
Paul Eggert [Tue, 26 May 2026 00:08:48 +0000 (17:08 -0700)] 
quotearg: be nicer on macOS etc

Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2026-05/msg00150.html
* lib/quotearg.c (C_LOCALE_MIGHT_BE_MULTIBYTE): New macro.
(wch, mbstate, mbs_clear, mbrtowch, chisprint, wchisprint
(quotearg_buffer_restyled): Fall back on <wchar.h> and <wctype.h>
functions if USE_C_LOCALE and C_LOCALE_MIGHT_BE_MULTIBYTE.

11 days agoFix ChangeLog to match recent commit message
Paul Eggert [Tue, 26 May 2026 00:06:42 +0000 (17:06 -0700)] 
Fix ChangeLog to match recent commit message

11 days agombuiterf: Implement multi-byte per encoding error (MEE) consistently.
Bruno Haible [Mon, 25 May 2026 23:29:29 +0000 (01:29 +0200)] 
mbuiterf: Implement multi-byte per encoding error (MEE) consistently.

* lib/mbuiterf.h: Include mbiter-aux.h.
(struct mbuif_state): Add field is_utf8.
(mbuiterf_next): Invoke mbiter_is_utf8, mbiter_utf8_maximal_subpart.
(mbuif_init): Initialize the field is_utf8.
* modules/mbuiterf (Depends-on): Add mbiter-aux.
* tests/test-mbslen.c (OR): New macro, copied from
tests/test-mbsnlen.c.
(main): Add more test cases with incomplete characters.
* tests/test-mbschr2.sh: Renamed from tests/test-mbschr.sh.
* tests/test-mbschr2.c: Renamed from tests/test-mbschr.c.
* tests/test-mbschr1.sh: New file, based on
tests/test-mbmemcasecmp-3.sh.
* tests/test-mbschr1.c: New file.
* modules/mbschr-tests (Files): Update accordingly. Add locale-en.m4,
locale-fr.m4.
(configure.ac): Invoke gt_LOCALE_EN_UTF8, gt_LOCALE_FR_UTF8.
(Makefile.am): Arrange to compile test-mbschr1 and test-mbschr2 and to
run test-mbschr1.sh, test-mbschr2.sh.
* tests/test-mbsrchr2.sh: Renamed from tests/test-mbsrchr.sh.
* tests/test-mbsrchr2.c: Renamed from tests/test-mbsrchr.c.
* tests/test-mbsrchr1.sh: New file, based on
tests/test-mbmemcasecmp-3.sh.
* tests/test-mbsrchr1.c: New file.
* modules/mbsrchr-tests (Files): Update accordingly. Add locale-en.m4,
locale-fr.m4.
(configure.ac): Invoke gt_LOCALE_EN_UTF8, gt_LOCALE_FR_UTF8.
(Makefile.am): Arrange to compile test-mbsrchr1 and test-mbsrchr2 and to
run test-mbsrchr1.sh, test-mbsrchr2.sh.
* tests/test-mbscspn.c (OR): New macro, copied from
tests/test-mbsnlen.c.
(main): Add test cases with incomplete characters.
* tests/test-mbspbrk.c (OR): New macro, copied from
tests/test-mbsnlen.c.
(main): Add test cases with incomplete characters.
* tests/test-mbsspn.c (OR): New macro, copied from
tests/test-mbsnlen.c.
(main): Add test cases with incomplete characters.

11 days agombuiter: Implement multi-byte per encoding error (MEE) consistently.
Bruno Haible [Mon, 25 May 2026 22:53:31 +0000 (00:53 +0200)] 
mbuiter: Implement multi-byte per encoding error (MEE) consistently.

* lib/mbuiter.h: Include mbiter-aux.h.
(struct mbuiter_multi): Add field is_utf8.
(mbuiter_multi_next): Invoke mbiter_is_utf8,
mbiter_utf8_maximal_subpart.
(mbui_init): Initialize the field is_utf8.
* modules/mbuiter (Depends-on): Add mbiter-aux.
* tests/test-mbsstr2.c (OR): New macro, copied from
tests/test-mbsnlen.c.
(main): Add test cases with incomplete characters.
* tests/test-mbsstr1.c: Update comments.
* tests/test-mbsstr3.c: Likewise.
* tests/test-mbscasestr2.c (OR): New macro, copied from
tests/test-mbsnlen.c.
(main): Add test cases with incomplete characters.
* tests/test-mbscasestr1.c: Update comments.
* tests/test-mbscasestr3.c: Likewise.
* tests/test-mbscasestr4.c: Likewise.

11 days agombiterf: Implement multi-byte per encoding error (MEE) consistently.
Bruno Haible [Mon, 25 May 2026 22:42:39 +0000 (00:42 +0200)] 
mbiterf: Implement multi-byte per encoding error (MEE) consistently.

* lib/mbiterf.h: Include mbiter-aux.h.
(struct mbif_state): Add field is_utf8.
(mbiterf_next): Invoke mbiter_is_utf8, mbiter_utf8_maximal_subpart.
(mbif_init): Initialize the field is_utf8.
* modules/mbiterf (Depends-on): Add mbiter-aux.
* tests/test-mbsnlen.c (main): Add test cases with incomplete characters
not at the end of the string.

11 days agombiter: Implement multi-byte per encoding error consistently.
Bruno Haible [Mon, 25 May 2026 17:06:55 +0000 (19:06 +0200)] 
mbiter: Implement multi-byte per encoding error consistently.

* lib/mbiter.h: Include mbiter-aux.h.
(struct mbiter_multi): Add field is_utf8.
(mbiter_multi_next): Invoke mbiter_is_utf8, mbiter_utf8_maximal_subpart.
(mbi_init): Initialize the field is_utf8.
* modules/mbiter (Depends-on): Add mbiter-aux.
* tests/test-mbs_startswith2.c (main): Add test cases with incomplete
characters not at the end of the string.
* tests/test-mbs_endswith2.c (OR): New macro, copied from
tests/test-mbsnlen.c.
(main): Add test cases with incomplete characters not at the end of the
string.

11 days agombiter-aux: New module.
Bruno Haible [Mon, 25 May 2026 16:58:12 +0000 (18:58 +0200)] 
mbiter-aux: New module.

* lib/mbiter-aux.h: New file.
* lib/mbiter-aux.c: New file. mbiter_is_utf8 is based on
lib/localeinfo.c.
* modules/mbiter-aux: New file.

11 days agombrtoc32, mbrtowc: do not optimze for uClibc-ng
Paul Eggert [Mon, 25 May 2026 18:37:32 +0000 (20:37 +0200)] 
mbrtoc32, mbrtowc: do not optimze for uClibc-ng

Problem reported by Waldemar Brodkorb in:
https://lists.gnu.org/r/bug-gnulib/2026-05/msg00145.html
* lib/mbrtoc32.c (mbrtoc32):
* lib/mbrtowc.c (rpl_mbrtowc):
Treat uClibc-ng as non-glibc.

11 days agoquotearg: support USE_C_LOCALE variant
Paul Eggert [Mon, 25 May 2026 21:30:05 +0000 (14:30 -0700)] 
quotearg: support USE_C_LOCALE variant

This is for gzip, which does not use setlocale,
but does need to quote file names.
* lib/quotearg.c (USE_C_LOCALE): Default to 0.  If set, include
c-ctype.h instead of ctype.h, gettext.h, uchar.h, wchar.h; and
define _ to be an identity macro.
(wch, mbstate): New types.
(mbs_clear, mbrtowch, wchisprint, chisprint): New functions.
(gettext_quote, quotearg_buffer_restyled): Use them.

11 days agoquotearg: lessen dependencies
Paul Eggert [Mon, 25 May 2026 18:32:32 +0000 (11:32 -0700)] 
quotearg: lessen dependencies

* lib/quotearg.c: Do not include c-strcaseeq.h, as its
macros are no longer used here.
* modules/quotearg (Depends-on): Remove c-strcaseeq.
Also remove memcmp, since the code no longer uses memcmp.

11 days agodiffseq: pacify gcc -Wusless-cast
Paul Eggert [Mon, 25 May 2026 18:31:06 +0000 (11:31 -0700)] 
diffseq: pacify gcc -Wusless-cast

* lib/diffseq.h (OFFSET_MAX): Pacify when OFFSET is int.

12 days agotrim tests: Enhance tests.
Bruno Haible [Mon, 25 May 2026 16:37:25 +0000 (18:37 +0200)] 
trim tests: Enhance tests.

* tests/test-trim.c (main): Add test cases with incomplete characters.

12 days agombmemcasecmp tests: Enhance tests.
Bruno Haible [Mon, 25 May 2026 16:36:12 +0000 (18:36 +0200)] 
mbmemcasecmp tests: Enhance tests.

* tests/test-mbmemcasecmp.h (test_utf_8): Add test cases with incomplete
characters.

12 days agombspcasecmp tests: Enhance tests.
Bruno Haible [Mon, 25 May 2026 16:32:18 +0000 (18:32 +0200)] 
mbspcasecmp tests: Enhance tests.

* tests/test-mbspcasecmp.c (test_ascii): New function, extracted from
main.
(test_utf_8): Likewise. Add test cases with incomplete characters.
(main): Invoke them. Accept a numeric argument.
* tests/test-mbspcasecmp-4.sh: Renamed from tests/test-mbspcasecmp.sh.
* tests/test-mbspcasecmp-3.sh: New file, based on
tests/test-mbmemcasecmp-3.sh.
* modules/mbspcasecmp-tests (Files): Update after rename. Add
locale-en.m4, locale-fr.m4.
(configure.ac): Invoke gt_LOCALE_EN_UTF8, gt_LOCALE_FR_UTF8.
(Makefile.am): Arrange to run test-mbspcasecmp-3.sh,
test-mbspcasecmp-4.sh, instead of test-mbspcasecmp.sh.

12 days agombsncasecmp tests: Enhance tests.
Bruno Haible [Mon, 25 May 2026 16:27:18 +0000 (18:27 +0200)] 
mbsncasecmp tests: Enhance tests.

* tests/test-mbsncasecmp.c (test_ascii): New function, extracted from
main.
(test_utf_8): Likewise. Add test cases with incomplete characters.
(main): Invoke them. Accept a numeric argument.
* tests/test-mbsncasecmp-4.sh: Renamed from tests/test-mbsncasecmp.sh.
* tests/test-mbsncasecmp-3.sh: New file, based on
tests/test-mbmemcasecmp-3.sh.
* modules/mbsncasecmp-tests (Files): Update after rename. Add
locale-en.m4, locale-fr.m4.
(configure.ac): Invoke gt_LOCALE_EN_UTF8, gt_LOCALE_FR_UTF8.
(Makefile.am): Arrange to run test-mbsncasecmp-3.sh,
test-mbsncasecmp-4.sh, instead of test-mbsncasecmp.sh.

12 days agombscasecmp tests: Enhance tests.
Bruno Haible [Mon, 25 May 2026 16:20:40 +0000 (18:20 +0200)] 
mbscasecmp tests: Enhance tests.

* tests/test-mbscasecmp.c (test_ascii): New function, extracted from
main.
(test_utf_8): Likewise. Add test cases with incomplete characters.
(main): Invoke them. Accept a numeric argument.
* tests/test-mbscasecmp-4.sh: Renamed from tests/test-mbscasecmp.sh.
* tests/test-mbscasecmp-3.sh: New file, based on
tests/test-mbmemcasecmp-3.sh.
* modules/mbscasecmp-tests (Files): Update after rename. Add
locale-en.m4, locale-fr.m4.
(configure.ac): Invoke gt_LOCALE_EN_UTF8, gt_LOCALE_FR_UTF8.
(Makefile.am): Arrange to run test-mbscasecmp-3.sh,
test-mbscasecmp-4.sh, instead of test-mbscasecmp.sh.

12 days agombs_endswith tests: Enhance tests.
Bruno Haible [Mon, 25 May 2026 15:56:44 +0000 (17:56 +0200)] 
mbs_endswith tests: Enhance tests.

* tests/test-mbs_endswith2.c (main): Add more test cases. Add more
comments.
* tests/test-mbs_endswith1.c: Update comments.
* tests/test-mbs_endswith3.c: Likewise.

12 days agombs_startswith tests: Enhance tests.
Bruno Haible [Mon, 25 May 2026 15:55:56 +0000 (17:55 +0200)] 
mbs_startswith tests: Enhance tests.

* tests/test-mbs_startswith2.c (OR): New macro, copied from
tests/test-mbsnlen.c.
(main): Add more test cases. Add more comments.
* tests/test-mbs_startswith1.c: Update comments.
* tests/test-mbs_startswith3.c: Likewise.

13 days agoregex: pacify 16.1.1 -Wanalyzer-out-of-bounds
Paul Eggert [Sun, 24 May 2026 17:48:54 +0000 (10:48 -0700)] 
regex: pacify 16.1.1 -Wanalyzer-out-of-bounds

* lib/regex_internal.c (re_node_set_insert): Add a DEBUG_ASSERT.
Needed for gcc 16.1.1 20260515 (Red Hat 16.1.1-2) on x86-64 when
_REGEX_AVOID_UCHAR_H is defined.

13 days agoregex: new _REGEX_AVOID_UCHAR_H option
Paul Eggert [Sun, 24 May 2026 17:44:42 +0000 (10:44 -0700)] 
regex: new _REGEX_AVOID_UCHAR_H option

This is for GNU Emacs, where the regex code is only auxiliary,
probably not enough to justify the hassle of incorporating
Gnulib’s uchar-h module and its dependencies.
The following changes are in effect only if _REGEX_AVOID_UCHAR_H,
and cause the code to avoid the need for Gnulib’s uchar-h module.
* lib/regcomp.c: Don’t include localeinfo.h.
(re_set_fastmap_icase): Don’t use localeinfo.h functions,
as they rely on char32_t.
* lib/regex_internal.h: Just use of wchar_t, wctype_t and related
functions, instead of using char32_t and related functions.

2 weeks agoregex-tests: omit unused parts
Paul Eggert [Fri, 22 May 2026 15:44:12 +0000 (08:44 -0700)] 
regex-tests: omit unused parts

Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2026-05/msg00137.html
* tests/test-regex-en.c (tests, bug_regex11): Remove; unused.
* tests/test-regex-en.c, tests/test-regex-tr.c, tests/test-regex.c:
(main): Omit unused args.

2 weeks agodoc: Update for OpenBSD 7.9.
Bruno Haible [Fri, 22 May 2026 10:13:51 +0000 (12:13 +0200)] 
doc: Update for OpenBSD 7.9.

* doc/posix-headers/*.texi: Update.
* doc/pastposix-headers/*.texi: Update.
* doc/glibc-headers/*.texi: Likewise.
* doc/posix-functions/*.texi: Likewise.
* doc/pastposix-functions/*.texi: Likewise.
* doc/glibc-functions/*.texi: Likewise.

2 weeks agothread-optim: Add some optional rudimentary logging.
Bruno Haible [Tue, 19 May 2026 00:17:49 +0000 (02:17 +0200)] 
thread-optim: Add some optional rudimentary logging.

* lib/thread-optim.c (DEBUG_ELF, dbg_printf): New macros.
(inspect_one_GOT): Log the return value through dbg_printf.
(gl_multithreaded): Log the override through dbg_printf.

2 weeks agoterm-style-control: Make multithread-safe, part 6: Link dependencies.
Bruno Haible [Mon, 18 May 2026 23:52:40 +0000 (01:52 +0200)] 
term-style-control: Make multithread-safe, part 6: Link dependencies.

* m4/pthread_kill.m4: New file.
* modules/term-style-control (Files): Add it.
(configure.ac): Invoke gl_FUNC_PTHREAD_KILL.
(Link): Add $(PTHREAD_SIGMASK_LIB) and $(PTHREAD_KILL_LIB).
* modules/term-style-control-tests (Makefile.am): Link
test-term-style-control-hello and test-term-style-control-yes with
$(PTHREAD_SIGMASK_LIB) and $(PTHREAD_KILL_LIB).

2 weeks agofree-posix: Omit wrapper in musl libc >= 1.2.3.
Alyssa Ross [Mon, 18 May 2026 19:43:45 +0000 (21:43 +0200)] 
free-posix: Omit wrapper in musl libc >= 1.2.3.

* m4/free.m4 (gl_FUNC_FREE): Require gl_MUSL_LIBC. Guess yes on musl
libc versions that define SEEK_DATA.
* modules/free-posix (Files): Add m4/musl.m4.

Copyright-paperwork-exempt: Yes

2 weeks agothread-optim tests: Fix a test failure with --disable-threads.
Bruno Haible [Mon, 18 May 2026 19:21:34 +0000 (21:21 +0200)] 
thread-optim tests: Fix a test failure with --disable-threads.

* tests/test-thread-optim2.c: Skip the test if multithreading is not
enabled.

2 weeks agoterm-style-control: Make multithread-safe, part 5: SIGCONT handler.
Bruno Haible [Mon, 18 May 2026 08:40:20 +0000 (10:40 +0200)] 
term-style-control: Make multithread-safe, part 5: SIGCONT handler.

* lib/term-style-control.c (stopped_controller, stopped_user_data,
stopped_signal_handler_needs_reinstall): New variables.
(stopping_signal_handler): Set these variables.
(continuing_signal_handler): Use these variables instead of
active_controller and active_control_data, that may already be NULL
at this point.
(activate_term_style_controller): Initialize
stopped_signal_handler_needs_reinstall.

2 weeks agoterm-style-control: Make multithread-safe, part 4: Redirect signals.
Bruno Haible [Mon, 18 May 2026 08:33:54 +0000 (10:33 +0200)] 
term-style-control: Make multithread-safe, part 4: Redirect signals.

* lib/term-style-control.c (active_thread): New variable.
(fatal_signal_handler, stopping_signal_handler): Redirect the signal
from the current thread to the active_thread.
(activate_term_non_default_mode): Initialize active_thread.
(deactivate_term_non_default_mode): Reset active_thread to NULL.

2 weeks agoterm-style-control: Make multithread-safe, part 3: Use sigdelay.
Bruno Haible [Mon, 18 May 2026 08:17:08 +0000 (10:17 +0200)] 
term-style-control: Make multithread-safe, part 3: Use sigdelay.

* lib/term-style-control.h (struct term_style_control_data): Add field
'multithreaded'.
* lib/term-style-control.c: Include thread-optim.h, sigdelay.h.
(block_relevant_signals, unblock_relevant_signals): Add a
'multithreaded' parameter.
(fatal_or_stopping_signal_handler, continuing_signal_handler,
activate_term_non_default_mode, deactivate_term_non_default_mode):
Update.
(activate_term_style_controller): Determine whether the process is
multithreaded.
* modules/term-style-control (Depends-on): Add thread-optim, sigdelay.

2 weeks agoterm-style-control: Make multithread-safe, part 2: Improve logging.
Bruno Haible [Mon, 18 May 2026 07:58:41 +0000 (09:58 +0200)] 
term-style-control: Make multithread-safe, part 2: Improve logging.

* lib/term-style-control.c: Include <stdint.h>, <pthread.h>.
(HAVE_POSIX_THREADS): New macro.
(log_message): Preserve errno.
(sprintf_integer_hex): New function.
(log_signal_handler_called): Show also the current thread ID.
(fatal_or_stopping_signal_handler): Add log_message invocations to show
the taken code path.
* modules/term-style-control (Depends-on): Add stdint-h.
(configure.ac): Test for <pthread.h>.

2 weeks agoterm-style-control: Make multithread-safe, part 1.
Bruno Haible [Mon, 18 May 2026 07:46:41 +0000 (09:46 +0200)] 
term-style-control: Make multithread-safe, part 1.

* lib/term-style-control.h (activate_term_style_controller): Document a
constraint regarding thread creation.
(activate_term_non_default_mode): Document threading constraint.

2 weeks agoterm-style-control tests: Add a test with multithreading.
Bruno Haible [Mon, 18 May 2026 07:43:37 +0000 (09:43 +0200)] 
term-style-control tests: Add a test with multithreading.

* tests/test-term-style-control-yes.h: New file, based on
tests/test-term-style-control-yes.c.
* tests/test-term-style-control-yes.c: Move most definitions to
tests/test-term-style-control-yes.h.
Include test-term-style-control-yes.h.
(main): Just invoke styled_yes_loop.
* tests/test-term-style-control-yes-mt.c: New file.
* modules/term-style-control-tests (Files): Add
tests/test-term-style-control-yes.h,
tests/test-term-style-control-yes-mt.c.
(Depends-on): Add thread, nanosleep.
(Makefile.am): Arrange to build test-term-style-control-yes-mt.

2 weeks agothread-optim: Update documentation.
Bruno Haible [Sun, 17 May 2026 06:46:47 +0000 (08:46 +0200)] 
thread-optim: Update documentation.

* doc/multithread.texi (Multithreading Optimizations): Update the
platforms list.

2 weeks agofatal-signal: Make really multithread-safe.
Bruno Haible [Sat, 16 May 2026 21:36:09 +0000 (23:36 +0200)] 
fatal-signal: Make really multithread-safe.

* lib/fatal-signal.h (block_fatal_signals): Document a constraint
regarding thread creation.
* lib/fatal-signal.c: Include sigdelay.h.
(fatal_signals_block_initially_mt): New variable.
(block_fatal_signals, unblock_fatal_signals): In a multithreaded
process, use sigdelay instead of pthread_sigmask.
* modules/fatal-signal (Depends-on): Add sigdelay.

3 weeks agothread-optim: Add tests.
Bruno Haible [Sat, 16 May 2026 10:42:39 +0000 (12:42 +0200)] 
thread-optim: Add tests.

* tests/test-thread-optim1.c: New file.
* tests/test-thread-optim2.c: New file.
* modules/thread-optim-tests: New file.

3 weeks agothread-optim: Port to older glibc, musl libc, *BSD, Solaris, Android.
Bruno Haible [Sat, 16 May 2026 10:41:01 +0000 (12:41 +0200)] 
thread-optim: Port to older glibc, musl libc, *BSD, Solaris, Android.

* lib/thread-optim.h: Include <stdbool.h>.
(gl_multithreaded): Define differently on ELF platforms.
(_GL_MULTITHREADED_ALWAYS_TRUE, _GL_MULTITHREADED_VIA_ELF): New macros.
(gl_set_multithreaded): New declaration.
* lib/thread-optim.c: New file.
* lib/thread-creators.gperf: New file.
* lib/thread-optim-proto.c: New file.
* modules/thread-optim (Files): Add these files.
(Depends-on): Add gperf, bool, stdint-h.
(configure.ac): Test for <link.h>, dl_iterate_phdr.
(Makefile.am): Compile thread-optim.c. Create thread-creators.h through
gperf.

tweak

3 weeks agointprops-tests: check TYPE_SIGNED (char)
Paul Eggert [Thu, 14 May 2026 01:42:27 +0000 (18:42 -0700)] 
intprops-tests: check TYPE_SIGNED (char)

* tests/test-intprops.c (main): Also check TYPE_SIGNED on ‘char’.

3 weeks agointprops-tests: new boundary tests
Paul Eggert [Wed, 13 May 2026 22:21:12 +0000 (15:21 -0700)] 
intprops-tests: new boundary tests

* tests/test-intprops.c (CHECK_BOUNDARIES): New macro,
implementing more tests.

3 weeks agointprops: Fix compilation error in MSVC.
Bruno Haible [Wed, 13 May 2026 10:51:40 +0000 (12:51 +0200)] 
intprops: Fix compilation error in MSVC.

* lib/intprops.h (TYPE_IS_INTEGER, TYPE_MINIMUM, TYPE_MAXIMUM): Don't
use _Generic to distinguish between 'char' and 'signed char' with MSVC
before version 14.44.
* lib/intprops-internal.h (_GL_TYPE_SIGNED): Likewise.

3 weeks agoregex: Fix "macro redefinition" warning on MSVC.
Bruno Haible [Wed, 13 May 2026 10:07:30 +0000 (12:07 +0200)] 
regex: Fix "macro redefinition" warning on MSVC.

* lib/regex_internal.h (wctype_t): Undefine before redefining it.

3 weeks agoannounce-gen: Ignore libtoolize --version Debianism
Simon Josefsson [Tue, 12 May 2026 19:54:57 +0000 (21:54 +0200)] 
announce-gen: Ignore libtoolize --version Debianism

* build-aux/announce-gen (get_tool_versions): Ignore trailing ' Debian*'.

3 weeks agomaintainer-makefile: Fix sc_po_check failure.
Bruno Haible [Tue, 12 May 2026 18:48:04 +0000 (20:48 +0200)] 
maintainer-makefile: Fix sc_po_check failure.

* top/maint.mk (perl_translatable_files_list_): Filter out gettext.h.

3 weeks agolocaleinfo: Make sure mbszero can be called.
Bruno Haible [Tue, 12 May 2026 10:35:59 +0000 (12:35 +0200)] 
localeinfo: Make sure mbszero can be called.

* lib/localeinfo.c: Include <wchar.h>.
* modules/localeinfo (Depends-on): Add wchar-h.

3 weeks agoerror: Restore library name-spacing of verror_at_line.
Bruno Haible [Tue, 12 May 2026 09:39:58 +0000 (11:39 +0200)] 
error: Restore library name-spacing of verror_at_line.

* lib/error.in.h (verror_at_line): Don't define as a macro if
_GL_NO_INLINE_ERROR is defined.

3 weeks agostdc_bit_floor, stdc_bit_ceil: Work around Solaris 11 OpenIndiana bug.
Bruno Haible [Tue, 12 May 2026 08:49:49 +0000 (10:49 +0200)] 
stdc_bit_floor, stdc_bit_ceil: Work around Solaris 11 OpenIndiana bug.

* lib/stdbit.in.h (stdc_bit_floor, stdc_bit_ceil): Override the macro
definition from Solaris 11.
* doc/posix-functions/stdc_bit_floor.texi: Mention the Solaris 11
OpenIndiana bug.
* doc/posix-functions/stdc_bit_ceil.texi: Likewise.

3 weeks agounictype/base: Fix compilation error on systems with libunistring 1.3.
Bruno Haible [Tue, 12 May 2026 05:24:36 +0000 (07:24 +0200)] 
unictype/base: Fix compilation error on systems with libunistring 1.3.

* modules/unictype/base (configure.ac): Omit generating unictype.h in
the presence of libunistring >= 1.4, not >= 1.3.

3 weeks agogettext-h: Tweak comments.
Bruno Haible [Tue, 12 May 2026 00:36:08 +0000 (02:36 +0200)] 
gettext-h: Tweak comments.

* lib/gettext.h: Small comment improvements.

3 weeks agostat-time: Use countof.
Bruno Haible [Mon, 11 May 2026 22:57:55 +0000 (00:57 +0200)] 
stat-time: Use countof.

* lib/stat-time.h: Include <stdcountof.h>.
(stat_time_normalize): Use countof.
* modules/stat-time (Depends-on): Add stdcountof-h.
* modules/relocatable-prog-wrapper (Depends-on): Likewise.

3 weeks agosetlocale: Use countof.
Bruno Haible [Mon, 11 May 2026 22:54:57 +0000 (00:54 +0200)] 
setlocale: Use countof.

* lib/setlocale.c: Include <stdcountof.h>.
(setlocale_unixlike, get_main_locale_with_same_language,
get_main_locale_with_same_territory, setlocale_improved): Use countof.
* modules/setlocale (Depends-on): Add stdcountof-h.

3 weeks agogettext: tweak lib/gettext.h indenting
Paul Eggert [Mon, 11 May 2026 22:01:01 +0000 (15:01 -0700)] 
gettext: tweak lib/gettext.h indenting

* lib/gettext.h: fix preprocessor indenting glitches found by cppi.

3 weeks agogettext-h: Ensure no warnings with --disable-nls and -Wformat=2.
Bruno Haible [Mon, 11 May 2026 19:15:44 +0000 (21:15 +0200)] 
gettext-h: Ensure no warnings with --disable-nls and -Wformat=2.

* lib/gettext.h (gettext, dgettext, dcgettext): Define differently for
clang.
(ngettext, dngettext, dcngettext): Define differently for gcc and clang.
With gcc in C mode, silence -Wuseless-cast warnings.

3 weeks agocareadlinkat: pacify GCC 12+ -Wreturn-local-addr more simply
Paul Eggert [Mon, 11 May 2026 17:20:45 +0000 (10:20 -0700)] 
careadlinkat: pacify GCC 12+ -Wreturn-local-addr more simply

* lib/careadlinkat.c (readlink_stk):
Now also noinline when _GL_GNUC_PREREQ (12, 1) && !USING_LTO.
The small inlining performance improvement for GCC 12+ was not worth
the hassle of documenting or autoconfiguring USING_LTO.
This change removes the need for USING_LTO.
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2026-05/msg00103.html

3 weeks agocareadlinkat: fix comment
Paul Eggert [Mon, 11 May 2026 16:53:40 +0000 (09:53 -0700)] 
careadlinkat: fix comment

* lib/careadlinkat.c: Fix comment.  Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2026-05/msg00103.html

3 weeks agointprops: ignore -Wuseless-cast less often
Paul Eggert [Mon, 11 May 2026 03:55:24 +0000 (20:55 -0700)] 
intprops: ignore -Wuseless-cast less often

Using _Generic instead of casting should help includers of
<intprops.h> to avoid suppression of -Wuseless-cast diagnostics.
* lib/intprops-internal.h: Ignore -Wuseless-cast only
if (__STDC_VERSION__ < 201112 && 14 <= __GNUC__).
(_GL__GENERIC_BOGUS): Move definition up.
* lib/intprops-internal.h (_GL_TYPE_SIGNED):
* lib/intprops.h (TYPE_IS_INTEGER, TYPE_MINIMUM, TYPE_MAXIMUM):
Use _Generic if this should work, to avoid the need for casts.
* lib/intprops-internal.h (_GL_INT_NEGATE_OVERFLOW):
* lib/intprops.h (_GL_ADD_OVERFLOW, _GL_SUBTRACT_OVERFLOW)
(_GL_MULTIPLY_OVERFLOW): When _GL_HAS_BUILTIN_OVERFLOW_P, use
_GL_INT_CONVERT to avoid the need for a cast.

3 weeks agoposixtm-tests: pacify -Wuseless-cast
Paul Eggert [Mon, 11 May 2026 03:50:26 +0000 (20:50 -0700)] 
posixtm-tests: pacify -Wuseless-cast

* tests/test-posixtm.c (main): Use compound literals, not casts.

3 weeks agointtostr-tests: pacify -Wuseless-cast
Paul Eggert [Mon, 11 May 2026 03:49:19 +0000 (20:49 -0700)] 
inttostr-tests: pacify -Wuseless-cast

* tests/test-inttostr.c (CK): Use compound literals, not casts.

3 weeks agounilbrk/ulc-width-linebreaks: omit no-op casts
Paul Eggert [Mon, 11 May 2026 03:48:15 +0000 (20:48 -0700)] 
unilbrk/ulc-width-linebreaks: omit no-op casts

* lib/unilbrk/ulc-width-linebreaks.c (ulc_width_linebreaks_internal):
Omit casts from char * to char *.

3 weeks agounictype/block-test: pacify -Wuseless-cast
Paul Eggert [Mon, 11 May 2026 03:45:55 +0000 (20:45 -0700)] 
unictype/block-test: pacify -Wuseless-cast

* lib/unictype/block_test.c (uc_is_block):
Use compound literal, not cast.

3 weeks agoregex: omit useless casts
Paul Eggert [Mon, 11 May 2026 01:44:40 +0000 (18:44 -0700)] 
regex: omit useless casts

* lib/regex_internal.c (build_wcs_upper_buffer):
Omit cast from char * to char *.
* lib/regex_internal.h (re_string_wchar_at):
Omit casts to wint_t in a context that will already convert to wint_t.

3 weeks agomanywarnings: fix -Wuseless-cast cataloging
Paul Eggert [Sun, 10 May 2026 22:51:44 +0000 (15:51 -0700)] 
manywarnings: fix -Wuseless-cast cataloging

* build-aux/gcc-warning.spec: Mention -Wuseless-cast as a special case.

3 weeks agomanywarnings: add -Wstringop-overflow=4
Paul Eggert [Sun, 10 May 2026 20:52:28 +0000 (13:52 -0700)] 
manywarnings: add -Wstringop-overflow=4

* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Add
-Wstringop-overflow=4.  This option, when used with GCC 16, works
with current Gnulib and with coreutils, so it seems like a good
thing to add to the default list.

3 weeks agocareadlinkat: pacify GCC 16 -flto
Paul Eggert [Sun, 10 May 2026 20:09:27 +0000 (13:09 -0700)] 
careadlinkat: pacify GCC 16 -flto

Use a simpler scheme to pacify GCC.
* lib/careadlinkat.c (readlink_stk): With GCC 12+,
do not ignore -Wreturn-local-addr if -flto is being used,
as this does not work with current coreutils and with
gcc 16.1.1 20260501 (Red Hat 16.1.1-1) x86-64.
Instead, fall back on __attribute__ ((__noinline__)).
(GCC_BOGUS_WRETURN_LOCAL_ADDR): Remove.  Do not bother
with this as it complicates maintenance and is present only
for better diagnostics in older compilers.
Just use __attribute__ ((__noinline__)) instead.
All uses removed.

3 weeks agochown: use AC_CHECK_HEADERS_ONCE on standard headers
Paul Eggert [Sun, 10 May 2026 18:23:37 +0000 (11:23 -0700)] 
chown: use AC_CHECK_HEADERS_ONCE on standard headers

* m4/chown.m4 (AC_FUNC_CHOWN):
* m4/size_max.m4 (gl_SIZE_MAX):
* m4/xsize.m4 (gl_XSIZE): Prefer AC_CHECK_HEADERS_ONCE to
AC_CHECK_HEADERS for standard headers that Autoconf will use
AC_CHECK_HEADERS_ONCE on anyway.

3 weeks agocanonicalize: use stdckdint.h not intprops.h
Paul Eggert [Sun, 10 May 2026 18:20:07 +0000 (11:20 -0700)] 
canonicalize: use stdckdint.h not intprops.h

canonicalize: use stdckdint.h not intprops.h
<stdckdint.h> is standard, so prefer that to the pre-standard
intprops.h.
* lib/canonicalize.c: Include stdckdint.h, not intprops.h.
(canonicalize_filename_mode_stk): Use ckd_add, not INT_ADD_OVERFLOW.
* modules/canonicalize (Depends-on): Remove intprops.
Add stdckdint-h. Sort.

3 weeks agocanonicalize: pacify -Wmaybe-uninitialized without ignoring
Paul Eggert [Sun, 10 May 2026 17:35:50 +0000 (10:35 -0700)] 
canonicalize: pacify -Wmaybe-uninitialized without ignoring

* lib/canonicalize.c: Do not ignore -Wmaybe-uninitialized.
(IF_LINT): Remove; no longer used.
(canonicalize_filename_mode_stk): Use a single local rather than two.
Ordinarily portmanteau variables are iffy, but this one is a win.

3 weeks agostring-buffer-reversed: Fix comments.
Bruno Haible [Sun, 10 May 2026 22:39:51 +0000 (00:39 +0200)] 
string-buffer-reversed: Fix comments.

* lib/string-buffer-reversed.h: Fix comments and indentation.

3 weeks agoRevisit some -Wuseless-cast changes.
Bruno Haible [Sun, 10 May 2026 22:10:44 +0000 (00:10 +0200)] 
Revisit some -Wuseless-cast changes.

* lib/fstrcmp.c (fstrcmp_free_resources, fstrcmp_bounded): Use a
compound literal to convert to uintptr_t.
* lib/wait-process.c (wait_subprocess): Use a compound literal to
convert to int.
* lib/sigsegv.c: Revert last change. Instead, disable -Wuseless-cast
in this compilation unit.
* tests/jit/test-cache.c: Likewise.
* tests/test-limits-h.c: Disable -Wuseless-cast warnings also for
gcc 14, 15.

3 weeks agoFix many test failures on Windows and 32-bit AIX (regr. 2026-05-08).
Bruno Haible [Sun, 10 May 2026 21:13:57 +0000 (23:13 +0200)] 
Fix many test failures on Windows and 32-bit AIX (regr. 2026-05-08).

* tests/test-iswdigit.c (for_character): Restore cast of constants to
wchar_t, but in the form of a compound initializer.
* tests/test-iswpunct.c (for_character): Likewise.
* tests/test-iswxdigit.c (for_character): Likewise.
* tests/test-mbrtowc.c (main): Likewise.
* tests/test-mbrtowc-w32.c (test_one_locale): Likewise.
* tests/test-mbrtowc-w32utf8.c (main): Likewise.
* tests/test-mbsnrtowcs.c (main): Likewise.
* tests/test-mbsrtowcs.c (main): Likewise.
* tests/test-mbstowcs.c (main): Likewise.
* tests/test-snprintf-posix.h (test_function): Likewise.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-towctrans.c (main): Likewise.
* tests/test-vasnprintf-posix.c (test_function): Likewise.
* tests/test-vasnwprintf-posix.c (test_function): Likewise.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* tests/test-wcrtomb.c (check_character): Likewise.
* tests/test-wcscmp.c (main): Likewise.
* tests/test-wcsncmp.c (main): Likewise.
* tests/test-wmemcmp.c (main): Likewise.
* m4/c32rtomb.m4 (gl_C32RTOMB_SANITYCHECK): Likewise.
* m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Likewise.
* m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
* m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
* m4/mbrtowc.m4 (gl_MBRTOWC_NULL_ARG1, gl_MBRTOWC_STORES_INCOMPLETE):
Likewise.
* m4/mbsnrtowcs.m4 (gl_MBSNRTOWCS_WORKS_IN_TRADITIONAL_LOCALE):
Likewise.
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.

3 weeks agostrings-h: Revert last change, now unnecessary.
Bruno Haible [Sun, 10 May 2026 18:17:12 +0000 (20:17 +0200)] 
strings-h: Revert last change, now unnecessary.

* lib/strings.in.h: Revert last change.
* lib/string.in.h: Update comments.

3 weeks agosignal.h: Fix compilation error on Solaris 10 in C++ mode.
Bruno Haible [Sun, 10 May 2026 15:04:19 +0000 (17:04 +0200)] 
signal.h: Fix compilation error on Solaris 10 in C++ mode.

* lib/signal.in.h: On Solaris in C++ mode, don't include <pthread.h>.
The include <pthread.h> is only needed for Solaris versions < 9.

3 weeks agosys_wait-h: Fix compilation error on Solaris 10 in C++ mode.
Bruno Haible [Sun, 10 May 2026 14:29:18 +0000 (16:29 +0200)] 
sys_wait-h: Fix compilation error on Solaris 10 in C++ mode.

* lib/sys_wait.in.h (_GL_INCLUDING_SYS_WAIT_H): New macro, to avoid
recursive include problems.
* modules/sys_wait-h (Makefile.am): Substitute
INCLUDE_NEXT_AS_FIRST_DIRECTIVE, NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H.

3 weeks agostrnul: Fix compilation in C++ mode on Solaris 10 with Oracle Studio 12.
Bruno Haible [Sun, 10 May 2026 14:23:02 +0000 (16:23 +0200)] 
strnul: Fix compilation in C++ mode on Solaris 10 with Oracle Studio 12.

Reported by Paul Eggert in
<https://lists.gnu.org/archive/html/bug-gnulib/2026-05/msg00068.html>.

* lib/string.in.h (strnul): Wrap template declarations and definitions
in 'extern "C++" { ... }'.

3 weeks agoxstring-desc: Fix link error with non-optimizing compilers.
Bruno Haible [Sun, 10 May 2026 12:33:43 +0000 (14:33 +0200)] 
xstring-desc: Fix link error with non-optimizing compilers.

* lib/xstring-desc.h (xsd_c): Define with GL_XSTRING_DESC_INLINE.

3 weeks agospawn-pipe tests: Fix link error with non-optimizing compilers.
Bruno Haible [Sun, 10 May 2026 12:21:01 +0000 (14:21 +0200)] 
spawn-pipe tests: Fix link error with non-optimizing compilers.

* tests/test-spawn-pipe-child.c (print_stack_trace): Define to empty.

3 weeks agocalloc-gnu tests: Skip expensive part on Solaris.
Bruno Haible [Sun, 10 May 2026 10:35:01 +0000 (12:35 +0200)] 
calloc-gnu tests: Skip expensive part on Solaris.

* tests/test-calloc-gnu.c (main): Don't attempt to allocate a huge block
of memory on Solaris.
* tests/test-malloc-gnu.c (main): Add a comment.

3 weeks agostdlib-h-c++-tests: Fix link error on Solaris 10 with Oracle Studio 12.
Bruno Haible [Sun, 10 May 2026 09:13:46 +0000 (11:13 +0200)] 
stdlib-h-c++-tests: Fix link error on Solaris 10 with Oracle Studio 12.

* modules/stdlib-h-c++-tests (Makefile.am): Link test-stdlib-h-c++ with
$(LIBUNISTRING).

3 weeks agonetdb-h-c++-tests: Fix link error on Solaris 10 with Oracle Studio 12.6.
Bruno Haible [Sun, 10 May 2026 09:07:50 +0000 (11:07 +0200)] 
netdb-h-c++-tests: Fix link error on Solaris 10 with Oracle Studio 12.6.

* modules/netdb-h-c++-tests (Makefile.am): Link test-netdb-h-c++ with
$(LIBINTL).