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

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

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

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

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

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

6 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

6 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’.

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

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

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

6 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*'.

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

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

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

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

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

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

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

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

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

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

6 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

6 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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

7 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++" { ... }'.

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

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

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

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

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

7 weeks agostrings-h: Fix compilation error on AIX in C++ mode.
Bruno Haible [Sat, 9 May 2026 22:37:23 +0000 (00:37 +0200)] 
strings-h: Fix compilation error on AIX in C++ mode.

* lib/strings.in.h: On AIX in C++ mode, before including the system's
<strings.h> file, include <string.h>.

7 weeks agoFix 'restrict' on MSVC and on Solaris 11.4 g++ (regression 2026-05-04).
Bruno Haible [Sat, 9 May 2026 21:09:39 +0000 (23:09 +0200)] 
Fix 'restrict' on MSVC and on Solaris 11.4 g++ (regression 2026-05-04).

* m4/gnulib-common.m4 (AC_C_RESTRICT): Ignore the value of
__STDC_VERSION__ on MSVC or in C++ mode.

7 weeks agoDocument Solaris 10 mmap etc. issues with caddr_t
Paul Eggert [Sat, 9 May 2026 16:17:51 +0000 (09:17 -0700)] 
Document Solaris 10 mmap etc. issues with caddr_t

7 weeks agoDocument another quality assurance recipe.
Bruno Haible [Sat, 9 May 2026 07:12:17 +0000 (09:12 +0200)] 
Document another quality assurance recipe.

* HACKING (Maintaining high quality): Document how to use gnulib-tool
--create-testdir with --extract-recursive-dependents.

7 weeks agogettext-h: fix recently-introduced category typos
Paul Eggert [Sat, 9 May 2026 07:04:17 +0000 (00:04 -0700)] 
gettext-h: fix recently-introduced category typos

* lib/gettext.h (dcgettext, dcngettext): The category arg has type
int, not const char *. Problem found on Solaris 10 with Oracle
Solaris Studio 12.6.

7 weeks agou64: go back to casts for u64init
Paul Eggert [Sat, 9 May 2026 05:57:46 +0000 (22:57 -0700)] 
u64: go back to casts for u64init

* lib/u64.h (u64init) [INT_MAX < UINT64_MAX]: Don’t use a compound
literal here, as u64init is intended for use in static
initializers.  Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2026-05/msg00063.html

7 weeks agoregex-tests: pacify -Wshadow
Paul Eggert [Sat, 9 May 2026 01:46:02 +0000 (18:46 -0700)] 
regex-tests: pacify -Wshadow

* tests/test-regex-en.c (main): Remove unused local.
Nest one of the tests, to avoid shadowing the local ‘pat’.

7 weeks agoGnulib is now safe for -Wuseless-cast
Paul Eggert [Fri, 8 May 2026 22:37:23 +0000 (15:37 -0700)] 
Gnulib is now safe for -Wuseless-cast

* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS):
Remove -Wno-useless-cast.

7 weeks agoAvoid string literal type confusion
Paul Eggert [Fri, 8 May 2026 22:35:18 +0000 (15:35 -0700)] 
Avoid string literal type confusion

Instead of ‘... (char *) "abc" ...’, which is a bit confusing as
"abc" is already of type char *, use ‘static char const s[] =
"abc"; ... (char *) s ....  This pacifices -Wuseless-cast.
* lib/boot-time.c (get_boot_time_uncached):
* lib/time_rz.c (save_abbr):
* tests/test-posix_spawn-chdir.c (test):
* tests/test-posix_spawn-fchdir.c (test):
* tests/test-unsetenv.c (main):
Redo with named string as described above.

7 weeks agotimes-tests: pacify -Wuseless-cast
Paul Eggert [Fri, 8 May 2026 22:17:06 +0000 (15:17 -0700)] 
times-tests: pacify -Wuseless-cast

* tests/test-times.c (tms2ms): New function.
(main): Use it to simplify printing and avoid need for casts.
Pacify -Wuseless-cast via compound literals.

7 weeks agostrncat-tests: omit confusing casts
Paul Eggert [Fri, 8 May 2026 22:15:31 +0000 (15:15 -0700)] 
strncat-tests: omit confusing casts

* tests/test-strncpy.c (check): Omit no-op cast.
* tests/unistr/test-strncat.h (check): Use better type for
page_boundary, removing the need for a cast.

7 weeks agolimits-h-tests: suppress -Wuseless-cast
Paul Eggert [Fri, 8 May 2026 21:34:54 +0000 (14:34 -0700)] 
limits-h-tests: suppress -Wuseless-cast

* tests/test-limits-h.c: Also borrow the suppression of
-Wuseless-cast from intprops.h.

7 weeks agoIn tests, prefer %zu to %lu+cast
Paul Eggert [Fri, 8 May 2026 21:33:33 +0000 (14:33 -0700)] 
In tests, prefer %zu to %lu+cast

* tests/test-dirname.c (main):
* tests/test-gc-pbkdf2-sha1.c (main):
* tests/test-gc-pbkdf2.c (main):
* tests/test-nonblocking-reader.h (full_read)
* tests/test-nonblocking-writer.h (main_writer_loop):
(full_read_from_nonblocking_fd):
* tests/test-read-file.c (test_read_file):
Prefer %zu to %lu plus a cast to unsigned long.
* tests/test-nonblocking-reader.h (full_read)
* tests/test-nonblocking-writer.h (main_writer_loop):
(full_read_from_nonblocking_fd):
Pacify -Wuseless-cast via compound literals.

7 weeks agoAvoid useless casts in m4/*.m4.
Paul Eggert [Fri, 8 May 2026 21:28:51 +0000 (14:28 -0700)] 
Avoid useless casts in m4/*.m4.

This is mostly for consistency. In theory it could help
if someone mistakenly configures with -Wuseless-cast in CFLAGS.
* m4/c32rtomb.m4 (gl_C32RTOMB_SANITYCHECK):
* m4/iswdigit.m4 (gl_FUNC_ISWDIGIT):
* m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT):
* m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK):
* m4/mbrtowc.m4 (gl_MBRTOWC_NULL_ARG1)
(gl_MBRTOWC_STORES_INCOMPLETE):
* m4/mbsnrtowcs.m4 (gl_MBSNRTOWCS_WORKS_IN_TRADITIONAL_LOCALE):
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB):
Do not cast to wchar_t when the context is already wchar_t.

7 weeks agoSuppress -Wuseless-cast when calling mmap
Paul Eggert [Fri, 8 May 2026 21:22:56 +0000 (14:22 -0700)] 
Suppress -Wuseless-cast when calling mmap

I assume the void * casts for mmap are for ancient systems
where mmap returned char *, though Gnulib no longer ports to those.
For now, simply suppress the warning in the few places that use
mmap directly.
* lib/stackvma.c, lib/vma-iter.c, tests/mmap-anon-util.h:
Ignore -Wuseless-cast.

7 weeks agosigsegv: pacify -Wuseless-cast
Paul Eggert [Fri, 8 May 2026 21:19:03 +0000 (14:19 -0700)] 
sigsegv: pacify -Wuseless-cast

This also makes the code a bit less confusing.
* lib/sigsegv.c (SIGSEGV_FAULT_ADDRESS): Now of type void *.
Change the Hurd implementation to guarantee this.
(sigsegv_handler): Omit no-longer needed cast to void *.
Omit function pointer cast when SIGSEGV_FAULT_ADDRESS_FROM_SIGINFO,
as it’s not needed in that case.

7 weeks agojit/cache-tests: omit confusing cast.
Paul Eggert [Fri, 8 May 2026 20:09:44 +0000 (13:09 -0700)] 
jit/cache-tests: omit confusing cast.

* tests/jit/test-cache.c (SET_CODE): Omit cast of char * to char *.

7 weeks agowait-process: omit confusing cast
Paul Eggert [Fri, 8 May 2026 20:08:18 +0000 (13:08 -0700)] 
wait-process: omit confusing cast

* lib/wait-process.c (wait_subprocess): Omit confusing cast.

7 weeks agomd2: omit confusing casts
Paul Eggert [Fri, 8 May 2026 20:07:19 +0000 (13:07 -0700)] 
md2: omit confusing casts

* lib/md2.c (md2_process_bytes):
Use size_t, not unsigned long, for size.
Although the code was correct it was unclear.
(md2_update_chksum, md2_compress): Omit confusing casts.

7 weeks agoPacify -Wuseless-cast for pthread_self
Paul Eggert [Fri, 8 May 2026 19:54:37 +0000 (12:54 -0700)] 
Pacify -Wuseless-cast for pthread_self

* lib/glthread/thread.h (gl_thread_self_pointer):
* tests/test-pthread-mutex.c, tests/test-pthread-once2.c:
* tests/test-pthread-rwlock.c, tests/test-pthread-spin.c:
* tests/test-pthread-tss.c: Be consistent about casting
pthread_self to void *, by always casting via intptr_t first.
This pacifies -Wuseless-cast on GNU/Linux.

7 weeks agoPacify -Wuseless-cast via compound literals in tests
Paul Eggert [Fri, 8 May 2026 19:48:04 +0000 (12:48 -0700)] 
Pacify -Wuseless-cast via compound literals in tests

* tests/from-glibc/tst-stdbit.h (TEST_STDBIT_T):
* tests/jit/test-cache.c, tests/test-boot-time.c:
* tests/test-ceilf2.c, tests/test-fflush.c, tests/test-floorf2.c:
* tests/test-mbrtoc32-regular.c, tests/test-mbrtoc32.c:
* tests/test-mbrtowc-w32utf8.c, tests/test-mbrtowc.c:
* tests/test-mbsnrtoc32s.c, tests/test-mbsnrtowcs.c:
* tests/test-mbsrtoc32s.c, tests/test-mbsrtowcs.c:
* tests/test-mbstoc32s.c, tests/test-mbstowcs.c:
* tests/test-sameacls.c, tests/test-towctrans.c:
* tests/test-truncf2.c, tests/test-wcscmp.c, tests/test-wcsncmp.c:
* tests/test-wmemcmp.c:
(main)
* tests/test-c32isalnum.c, tests/test-c32isalpha.c:
* tests/test-c32isblank.c, tests/test-c32iscntrl.c:
* tests/test-c32isdigit.c, tests/test-c32isgraph.c:
* tests/test-c32islower.c, tests/test-c32isprint.c:
* tests/test-c32ispunct.c, tests/test-c32isspace.c:
* tests/test-c32isupper.c, tests/test-c32isxdigit.c:
* tests/test-c32tolower.c, tests/test-c32toupper.c:
* tests/test-iswdigit.c, tests/test-iswpunct.c, tests/test-iswxdigit.c:
(for_character):
* tests/test-c32rtomb.c, tests/test-wcrtomb.c:
(check_character):
* tests/test-mbrtoc32-w32.c, tests/test-mbrtowc-w32.c:
(test_one_locale):
* tests/test-snprintf-posix.h, tests/test-sprintf-posix.h:
* tests/test-vasnprintf-posix.c, tests/test-vasnwprintf-posix.c:
* tests/test-vasprintf-posix.c:
(test_function):
* tests/test-stat-time.c (initialize_filenames):
* tests/uniwidth/test-uc_width2.c (finish_interval):
Use compound literal when it is safer than a cast and it pacifies
-Wuseless-cast.  Also, omit unnecessary casts to a type when the
context is already that type and omitting pacifies -Wuseless-cast.

7 weeks agoPacify -Wuseless-cast via compound literals in lib
Paul Eggert [Fri, 8 May 2026 19:12:07 +0000 (12:12 -0700)] 
Pacify -Wuseless-cast via compound literals in lib

* lib/bitset.c (bitset_print):
* lib/bitset/list.c (LBITSET_ELT_BITS, debug_lbitset):
* lib/bitset/table.c (TBITSET_ELT_BITS):
* lib/bitsetv.c (bitsetv_dump, debug_bitsetv)
(bitsetv_matrix_dump):
* lib/gettext.h (gettext, ngettext, textdomain, bindtextdomain)
(bind_textdomain_codeset):
* lib/gl_anyavltree_list2.h (gl_tree_nx_add_first)
(gl_tree_nx_add_last, gl_tree_nx_add_before)
(gl_tree_nx_add_after):
* lib/gl_anylinked_list2.h (gl_linked_nx_create)
(gl_linked_node_nx_set_value, gl_linked_nx_set_at)
(gl_linked_search_from_to, gl_linked_indexof_from_to)
(gl_linked_nx_add_first, gl_linked_nx_add_last)
(gl_linked_nx_add_before, gl_linked_nx_add_after)
(gl_linked_nx_add_at):
* lib/gl_anyrbtree_list2.h (gl_tree_nx_add_first)
(gl_tree_nx_add_last, gl_tree_nx_add_before)
(gl_tree_nx_add_after):
* lib/gl_anytree_list2.h (gl_tree_node_nx_set_value)
(gl_tree_nx_set_at):
* lib/gl_anytreehash_list1.h (add_nodes_to_buckets):
* lib/gl_anytreehash_list2.h (gl_tree_search_from_to):
* lib/gl_array_list.c, lib/gl_carray_list.c, lib/gl_sublist.c:
(INDEX_TO_NODE):
* lib/gl_hash_map.c (gl_hash_search, gl_hash_nx_getput)
(gl_hash_getremove):
* lib/gl_hash_set.c (gl_hash_search, gl_hash_nx_add)
(gl_hash_remove):
* lib/gl_linkedhash_map.c (gl_linkedhash_search)
(gl_linkedhash_nx_getput, gl_linkedhash_getremove):
* lib/gl_linkedhash_set.c (gl_linkedhash_search)
(gl_linkedhash_nx_add, gl_linkedhash_remove):
* lib/isnand-nolibm.h (isnand):
* lib/isnanf-nolibm.h (isnanf):
* lib/isnanl-nolibm.h (isnanl):
* lib/math.in.h (isnand, _gl_isnand, isnan):
* lib/md4.c, lib/sha1.c:
(rol):
* lib/pagealign_alloc.c (pagealign_alloc, pagealign_free):
* lib/ssfmalloc.h (allocate_block_from_pool):
* lib/u64.h (u64hilo, u64lo, u64getlo) [INT_MAX < UINT64_MAX]:
Use compound literal when it is safer than a cast
and it pacifies -Wuseless-cast.
* lib/fsusage.c (PROPAGATE_ALL_ONES):
* lib/glthread/thread.h (glthread_atfork, glthread_sigmask):
Parenthesize more.
* lib/gettext.h (dgettext, dcgettext, dngettext, dcngettext)
(bindtextdomain, bind_textdomain_codeset):
Check types of unused args.

7 weeks agofstrcmp: pacify -Wuseless-cast
Paul Eggert [Fri, 8 May 2026 17:49:06 +0000 (10:49 -0700)] 
fstrcmp: pacify -Wuseless-cast

* lib/fstrcmp.c (fstrcmp_bounded): Omit unnecessary cast
of uintptr_t to uintptr_t.

7 weeks agoargp: pacify -Wuseless-cast
Paul Eggert [Fri, 8 May 2026 17:42:39 +0000 (10:42 -0700)] 
argp: pacify -Wuseless-cast

* lib/argp-help.c (argp_doc): Omit unnecessary cast
of const char * to const char *.

7 weeks agomanywarnings: avoid -Wuseless-cast warnings on GCC <= 13
Pádraig Brady [Fri, 8 May 2026 14:17:53 +0000 (15:17 +0100)] 
manywarnings: avoid -Wuseless-cast warnings on GCC <= 13

* m4/manywarnings.m4: Only consider -Wuseless-cast on GCC >= 14
Fix suggested by Bruno Haible.

7 weeks agoRevisit some -Wuseless-cast changes.
Bruno Haible [Fri, 8 May 2026 08:11:09 +0000 (10:11 +0200)] 
Revisit some -Wuseless-cast changes.

* lib/xsize.h (xtimes): Use a compound literal instead of sizeof "".

7 weeks agoRevisit some -Wuseless-cast changes.
Bruno Haible [Fri, 8 May 2026 07:55:01 +0000 (09:55 +0200)] 
Revisit some -Wuseless-cast changes.

* lib/intprops-internal.h: Ignore -Wuseless-cast also with gcc 14, 15.
* lib/vasnprintf.c: Likewise. Also, fix a clang warning.

7 weeks agoRevisit some -Wuseless-cast changes.
Bruno Haible [Fri, 8 May 2026 07:38:15 +0000 (09:38 +0200)] 
Revisit some -Wuseless-cast changes.

* lib/obstack.in.h (obstack_free): Restore parentheses around macro
argument.
* lib/printf-args.c (PRINTF_FETCHARGS): Do use wchar_t-typed constants.
* lib/vma-iter.c (rof_open): Revert last change. Warning now silenced
through gl_CC_GNULIB_WARNINGS.

7 weeks agoSilence -Wuseless-cast in all Gnulib compilation units.
Bruno Haible [Fri, 8 May 2026 05:02:26 +0000 (07:02 +0200)] 
Silence -Wuseless-cast in all Gnulib compilation units.

* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Add -Wno-useless-cast.

7 weeks agoxsize: pacify -Wuseless-cast by ‘1 *’
Paul Eggert [Fri, 8 May 2026 02:18:19 +0000 (19:18 -0700)] 
xsize: pacify -Wuseless-cast by ‘1 *’

* lib/xsize.h (xtimes): Instead of casting N to size_t,
widen it to size_t if it isn’t already wide enough.

7 weeks agoPacify -Wuseless cast with a pragma
Paul Eggert [Fri, 8 May 2026 01:51:15 +0000 (18:51 -0700)] 
Pacify -Wuseless cast with a pragma

* lib/intprops-internal.h: Ignore -Wuseless-cast.
* lib/vasnprintf.c: Ignore -Wuseless-cast.

7 weeks agoPacify GCC 16 -Wuseless-cast by omitting casts
Paul Eggert [Fri, 8 May 2026 00:11:44 +0000 (17:11 -0700)] 
Pacify GCC 16 -Wuseless-cast by omitting casts

* lib/obstack.in.h (obstack_free): Omit unnecessary cast.
* lib/printf-args.c (PRINTF_FETCHARGS): Omit unnecessary casts.
* lib/vma-iter.c (rof_open): Omit unnecessary casts.

7 weeks agofull-write: pacify GCC 16 -Wkeyword-macro
Paul Eggert [Fri, 8 May 2026 00:09:26 +0000 (17:09 -0700)] 
full-write: pacify GCC 16 -Wkeyword-macro

* lib/full-write.c (const): Do not #define.  Instead, use CONST.
(CONST): New macro.
(full_rw): Omit unnecessary cast.

7 weeks agofts: pacify GCC 16 -Wfree-labels
Paul Eggert [Fri, 8 May 2026 00:07:43 +0000 (17:07 -0700)] 
fts: pacify GCC 16 -Wfree-labels

Evidently those FALLTHROUGHs were put in to pacify an old
version of GCC, but that’s no longer needed and nowadays
is even counterproductive.
* lib/fts.c (FALLTHROUGH): Remove; no longer used.
(leaf_optimization): Remove the FALLTHROUGHs.
* modules/fts (Depends-on): Remove ‘attribute’.

7 weeks agomaint: pacify -Wuseless-cast via compound literals
Paul Eggert [Fri, 8 May 2026 00:03:53 +0000 (17:03 -0700)] 
maint: pacify -Wuseless-cast via compound literals

* lib/fsusage.c (PROPAGATE_ALL_ONES):
* lib/fts-cycle.c (AD_hash):
* lib/hash.c (hash_print_statistics, hash_print):
* lib/malloca.h (nmalloca):
* lib/readutmp.c (add_utmp):
* lib/xsize.h (xtimes):
When ((t) (E)) might provoke a -Wuseless-cast diagnostic in GCC 16,
use ((t) {E}) when that’s easy, i.e., when the expression is not
intended for use as a constant expression.

7 weeks agofpucw: pacify -Wuseless-cast
Paul Eggert [Thu, 7 May 2026 23:53:07 +0000 (16:53 -0700)] 
fpucw: pacify -Wuseless-cast

* lib/fpucw.h (SET_FPUCW, BEGIN_LONG_DOUBLE_ROUNDING): Pacify gcc
16 -Wuseless-cast by avoiding casts of void expressions to void.

7 weeks agoregex-tests: work with wchar-single
Paul Eggert [Thu, 7 May 2026 18:25:37 +0000 (11:25 -0700)] 
regex-tests: work with wchar-single

* tests/test-regex-el.c, tests/test-regex-en.c, tests/test-regex-tr.c:
New files, containing the locale-specific parts of the old
tests/test-regex.c.
* modules/regex-tests (Files): Add them.  Add m4/locale-en.m4.
(configure.ac): Add gt_LOCALE_EN_UTF8.
(TESTS, check_PROGRAMS):
Add test-regex-el, test-regex-en, test-regex-tr.
(TESTS_ENVIRONMENT, test_regex_el_LDADD, test_regex_en_LDADD)
(test_regex_tr_LDADD): New macros.
* tests/test-regex.c: Do not include <locale.h>, <wctype.h>,
"localcharset.h".
(really_utf8): Remove.
(main):  Remove the parts assuming specific locales;
they are now moved to the abovementioned new files.

7 weeks agobench-tests: work with wchar-single
Paul Eggert [Thu, 7 May 2026 18:24:22 +0000 (11:24 -0700)] 
bench-tests: work with wchar-single

* modules/mbiter-bench-tests, modules/mbiterf-bench-tests:
* modules/mbswidth-bench-tests, modules/mbuiter-bench-tests:
* modules/mbuiterf-bench-tests, modules/mcel-bench-tests:
(Depends-on): Add streq.
* tests/bench-mbiter.c, tests/bench-mbiterf.c, tests/bench-mbswidth.c:
* tests/bench-mbuiter.c, tests/bench-mbuiterf.c, tests/bench-mcel.c:
If GNULIB_WCHAR_SINGLE_LOCALE, don’t call setlocale with different
locales.

7 weeks agoregex-tests: fix usage of fastmap API
Paul Eggert [Thu, 7 May 2026 18:23:18 +0000 (11:23 -0700)] 
regex-tests: fix usage of fastmap API

* tests/test-regex.c (main): Use documented fastmap API
rather than relying on undocumented behavior.

7 weeks agomanywarnings: no ‘s’ at end of ‘-Wuseless-cast’
Paul Eggert [Thu, 7 May 2026 01:44:17 +0000 (18:44 -0700)] 
manywarnings: no ‘s’ at end of ‘-Wuseless-cast’

* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC): Fix typo in spelling
of ‘-Wuseless-cast’.  Found by gcc 16.1.1 20260501 (Red Hat 16.1.1-1).

7 weeks agostdckdint-h, stdcountof-h, uchar-h: Simplify for when C++ is not used.
Bruno Haible [Wed, 6 May 2026 18:20:46 +0000 (20:20 +0200)] 
stdckdint-h, stdcountof-h, uchar-h: Simplify for when C++ is not used.

Reported by Pádraig Brady in
<https://lists.gnu.org/archive/html/bug-gnulib/2026-05/msg00032.html>.

* m4/stdckdint_h.m4 (gl_STDCKDINT_H): When $CXX is empty, don't run C++
specific tests.
* m4/stdcountof_h.m4 (gl_STDCOUNTOF_H): Likewise.
* m4/uchar_h.m4 (gl_UCHAR_H): Likewise.

7 weeks agoregex-tests: minor memory cleanup
Paul Eggert [Wed, 6 May 2026 17:18:48 +0000 (10:18 -0700)] 
regex-tests: minor memory cleanup

* tests/test-regex.c (main): No need for regex to be static,
and making it auto is more likely to catch memory leaks in
debugging platforms.  Clean up after its last use.
Omit unnecessary setting/freeing of regs that doesn’t test anything.

7 weeks agopthread-h: Fix compilation error in C++ mode on mingw.
Bruno Haible [Wed, 6 May 2026 09:52:06 +0000 (11:52 +0200)] 
pthread-h: Fix compilation error in C++ mode on mingw.

7 weeks agopthread-h: Fix compilation error in C++ mode.
Bruno Haible [Wed, 6 May 2026 09:43:59 +0000 (11:43 +0200)] 
pthread-h: Fix compilation error in C++ mode.

Reported by Daiki Ueno.

* lib/pthread.in.h: Disable the 'using GNULIB_NAMESPACE::pthread_*'
directives for which the corresponding Gnulib module is not present.

7 weeks agoregex: Fix compilation error with MSVC 2022.
Bruno Haible [Wed, 6 May 2026 08:50:49 +0000 (10:50 +0200)] 
regex: Fix compilation error with MSVC 2022.

* lib/cdefs.h (__restrict_arr): On MSVC, ignore __STDC_VERSION__.
* lib/regex.h (_Restrict_arr_): Likewise.

7 weeks agolocaleinfo: now LGPLv2+
Bruno Haible [Wed, 6 May 2026 07:53:40 +0000 (09:53 +0200)] 
localeinfo: now LGPLv2+

* lib/localeinfo.h: Update license notice.
* lib/localeinfo.c: Likewise.

7 weeks agolocaleinfo: now LGPLv2+
Paul Eggert [Wed, 6 May 2026 06:32:57 +0000 (23:32 -0700)] 
localeinfo: now LGPLv2+

* modules/localeinfo (License): Change from GPL,
since regex depends on it.

7 weeks agoregex: fix glibc bug 20381
Paul Eggert [Wed, 6 May 2026 01:11:07 +0000 (18:11 -0700)] 
regex: fix glibc bug 20381

* lib/regcomp.c [!_LIBC]: Include localeinfo.h.
(re_set_fastmap): Remove icase arg, since it was not right
for initial bytes in multibyte locales.  Change ch arg to
be unsigned char so that callers need not cast.  All callers changed.
(re_set_fastmap_icase): New function.
(re_compile_fastmap_iter): Use it.
* modules/regex (Depends-on): Add localeinfo.
* tests/test-regex.c (main): Test for the bug.

7 weeks agolocaleinfo: port to single-byte non-__STDC_ISO_10646__
Paul Eggert [Wed, 6 May 2026 01:11:07 +0000 (18:11 -0700)] 
localeinfo: port to single-byte non-__STDC_ISO_10646__

* lib/localeinfo.c (CHAR32_T_IS_UNICODE): New macro.
(case_folded_counterparts): In single-byte locales where
char32_t is not known to be Unicode, check all 255 possibilities
instead of hoping that char32_t is Unicode.
* lib/localeinfo.h (CASE_FOLDED_BUFSIZE): Increase to 255.
* modules/localeinfo (Depends-on): Add btoc32.

7 weeks agolocaleinfo: don’t check U+03F2 in newer glibc
Paul Eggert [Wed, 6 May 2026 01:11:07 +0000 (18:11 -0700)] 
localeinfo: don’t check U+03F2 in newer glibc

* lib/localeinfo.c (lonesome_lower): Omit U+03F2 in recent Unicode.

7 weeks agolocaleinfo: add U+1C80 through U+1C88
Paul Eggert [Wed, 6 May 2026 01:11:07 +0000 (18:11 -0700)] 
localeinfo: add U+1C80 through U+1C88

* lib/localeinfo.c (lonesome_lower): Add U+1C80 through U+1C88,
which all have this property in Unicode 17.0.0.  For example,
U+1C80 CYRILLIC SMALL LETTER ROUNDED VE upcases to U+0412 CYRILLIC
CAPITAL LETTER VE which in turn downcases to U+0432 CYRILLIC SMALL
LETTER VE.

7 weeks agowchar-h: doc wchar_t limitations
Paul Eggert [Wed, 6 May 2026 01:11:07 +0000 (18:11 -0700)] 
wchar-h: doc wchar_t limitations

* doc/posix-headers/wchar.texi: Mention which platforms don’t
use Unicode for wchar_t.