* lib/gen-uni-tables.c (is_property_alphabetic): Add more CUNEIFORM
NUMERIC SIGNs.
(UC_JOINING_GROUP_CROWN_*): New enum items.
(fill_arabicshaping, joining_group_as_c_identifier): Handle
UC_JOINING_GROUP_CROWN_*.
(get_lbp): Update such that unilbrk/lbrkprop.txt comes out as expected.
(output_lbrk_rules_as_tables): Update rule LBP12a as specified by
https://www.unicode.org/reports/tr14/tr14-57.html.
(get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
(output_casing_rules): Allow codes up to 0xFFFFF. Allow all 32-bit
mapping values.
* lib/unictype.in.h (UC_JOINING_GROUP_CROWN_*): New enum items.
* lib/unictype/joininggroup_byname.gperf: Handle them.
* lib/unictype/joininggroup_name.h: Likewise.
* lib/unicase/special-casing.in.h (struct special_casing_rule): Change
element type of upper, lower, title, casefold to 'unsigned int'.
* lib/unicase/u-casemap.h (FUNC): Implement lookup for 20-bit code
values. Update for changed element type.
* lib/unicase/u-ct-totitle.h (FUNC): Likewise.
* lib/unigbrk/u-grapheme-breaks.h (FUNC): Update for changed rule GB9c.
* lib/unigbrk/u-grapheme-next.h (FUNC): Likewise.
* lib/unigbrk/u-grapheme-prev.h (ends_with_incb_linker_extended):
Renamed from ends_with_incb_consonant_extended_linker_extended. Update
for changed rule GB9c.
(FUNC): Update.
* tests/unigbrk/test-uc-is-grapheme-break.c (main): Update for changed
rule GB9c.
* tests/uniwidth/test-uc_width2.sh: Update expected test result.
* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.
* tests/unilbrk/LineBreakTest.txt: Update.
* All the affected modules: Bump required libunistring version.
Problem reported by Arno Onken in:
https://lists.gnu.org/r/bug-gnulib/2026-10/msg00029.html
* lib/regcomp.c (re_compile_fastmap_iter): For SIMPLE_BRACKET,
also set fastmap for leading bytes of case folded counterparts
of each character.
* tests/test-regex-el.c (main): Test [C] as well as C,
for each problematic character C.
* tests/test-localtime_r-w32.c: New file.
* modules/time_r-tests (Files): Add it.
(Depends-on): Add test-xfail.
(Makefile.am): Arrange to build and run test-localtime_r-w32.
Reported by Brian Foster in:
<https://bugs.launchpad.net/ubuntu/+source/coreutils/+bug/2161155>
* lib/canonicalize.c: Include min-eloop-threshold.h.
(canonicalize_filename_mode_stk): Set errno to ELOOP and exit if we see
MIN_ELOOP_THRESHOLD links.
* modules/canonicalize (Depends-on): Add eloop-threshold.
* tests/test-canonicalize.c (main): Add a test case that would
previously loop until the system ran out of memory. Clean up the created
sylink.
* tests/test-malloc-posix.c (__has_feature): New macro.
(main): Skip the test if an address sanitizer is in use.
* tests/test-calloc-posix.c (__has_feature): New macro.
(main): Skip the test if an address sanitizer is in use.
* tests/test-reallocarray.c (__has_feature): New macro.
(main): Skip the test if an address sanitizer is in use.
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Require gl_MBRTOWC_C_LOCALE and, if
needed, set REPLACE_WCRTOMB and define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ.
* lib/mbrtowc.c (rpl_mbrtowc) [MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ]: In the
C locale, map 0x80..0xFF to 0xDF80..0xDFFF instead of 0x0080..0x00FF.
* lib/wcrtomb.c: Include hard-locale.h, <locale.h>.
(wcrtomb) [MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ]: In the C locale, map
0xDF80..0xDFFF to 0x80..0xFF.
* modules/wcrtomb (Depends-on): Add hard-locale.
* tests/test-wcrtomb.c (main): Check that wcrtomb does the inverse of
mbrtowc in the C locale.
Suggested by Paul Eggert.
* m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Require gl_MBRTOC32_C_LOCALE,
gl_MBRTOC32_C_LOCALE_LIKE_ISO_8859. When mbrtoc32 gets overridden due to
the C locale, set also REPLACE_C32RTOMB to 1.
* lib/c32rtomb.c: Include hard-locale.h, <locale.h>.
(c32rtomb): On OpenBSD, NetBSD ≥ 11, glibc, Cygwin, mingw, MSVC, do
special handling of non-ASCII characters in the C locale.
* modules/c32rtomb (Depends-on): Add hard-locale.
* tests/test-c32rtomb.c (main): Check that c32rtomb does the inverse of
mbrtoc32 in the C locale.
I ran into some problems with GNU sed on NetBSD and
endeavored to fix some of them by altering the mbrtoc32 replacement,
so that in the C locale it always converts bytes with the top
bit set to 0xDFxx, instead of doing it only sometimes.
This patch also updates commentary to match current POSIX standards
and some newer OS releases.
* lib/mbrtoc32.c (mbrtoc32): Also convert (e.g.) 0xED to 0xDFED
when !GNULIB_defined_mbstate_t && HAVE_WORKING_MBRTOC32 &&
HAVE_WORKING_C32RTOMB && !MBRTOC32_MULTIBYTE_LOCALE_BUG &&
MBRTOC32_IN_C_LOCALE_MAYBE_EILSEQ.
* tests/test-mbrtoc16.c (main):
* tests/test-mbrtoc32.c (main):
Simplify, now that we always do that conversion.
On NetBSD 10.0 at least, since commit e4c911bb4, warn_() would
issue a warning like "local: set-up: bad variable name".
This is due to how its shell handles "local" with initialization.
* tests/init.sh: Avoid initializing on the same line as "local".
$ date-before -d '1-2-3' "+[%_D]"
[02/03/ 1]
$ date-after -d '1-2-3' "+[%_D]"
[02/03/01]
* lib/strftime.c: Only propagate flags to %F as that has the
year at the start so our current "yearish" based flag propagation
produces consistent results. Specifically this avoids glibc
'_' and '-' flags propagating to year sub specifiers of %D,
producing inconsistent year and month/date formatting.
* tests/test-nstrftime.h: Add test cases.
* tests/test-sd-dlopen.c: New file.
* tests/test-sd-dlopen-disabled.c: New file.
* tests/test-sd-dlopen.sh: New file.
* modules/sd-dlopen-tests: New file.
Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2026-08/msg00288.html
* lib/gettext.h (textdomain, bindtextdomain, bind_textdomain_codeset)
[!ENABLE_NLS && __GNUC__ && !__clang__ && !__cplusplus]:
Define to no-ops in this case too.
Move the definition of _LIBGETTEXT_FUNCAST up one level of
ifdeffery so that it is defined for this case.
* tests/test-gettext-h.c (main) [!ENABLE_NLS]: Call textdomain,
reverting the previous change to this file.
* tests/test-wmemcpy.c (null_wmemcpy, main): Move the #if and comment
from null_wmemcpy to main to avoid invoking undefined behavior.
* tests/test-wmemmove.c (null_wmemmove, main): Likewise.
From a suggestion by Sergey Poznyakoff in:
https://lists.gnu.org/r/bug-gnulib/2026-08/msg00217.html
* lib/exclude.c (EXCLUDE_INLINE): New macro.
(excluded_file_name_status): New function, extending
excluded_file_name which is now in exclude.h.
* lib/exclude.h (EXCLUDE_INLINE, EXCLUDED_EXCLUDED, EXCLUDED_MATCHED):
New macros.
(excluded_file_name): New function.
* tests/test-exclude.c (main): Test new function too.
All test scripts changed.
* tests/test-sameacls.c (main): AIX 7.3’s aclx_* APIs want char *
parameters, not char const *. Change arguments accordingly. This
pacifies IBM Open XL C/C++ for AIX 17.1.1 (5725-C72, 5765-J18),
version 17.1.1.2, clang version 15.0.0 (build 3948f09) with
-Wincompatible-pointer-types-discards-qualifiers.
Reported by Lasse Collin in
<https://lists.gnu.org/archive/html/bug-gnulib/2026-08/msg00190.html>.
* tests/test-array_map.c (string_compare): New function.
(main): Use instead of casting strcmp to a different function prototype.
* tests/test-array_omap.c (string_compare): New function.
(main): Use instead of casting strcmp to a different function prototype.
* tests/test-avltree_omap.c (string_compare): New function.
(main): Use instead of casting strcmp to a different function prototype.
* tests/test-rbtree_omap.c (string_compare): New function.
(main): Use instead of casting strcmp to a different function prototype.
* tests/test-array_set.c (string_compare): New function.
(main): Use instead of casting strcmp to a different function prototype.
* tests/test-array_oset.c (string_compare): New function.
(main): Use instead of casting strcmp to a different function prototype.
* tests/test-avltree_oset.c (string_compare): New function.
(main): Use instead of casting strcmp to a different function prototype.
* tests/test-rbtree_oset.c (string_compare): New function.
(main): Use instead of casting strcmp to a different function prototype.
* tests/test-oset-update.h (test_update): Likewise.
* tests/from-glibc/tst-stdc_rotate_left.c: New file, based on
tests/test-stdc_rotate_left.c with changes to also work with the glibc
test framework. Relicense to LGPLv2.1+.
* tests/from-glibc/tst-stdc_rotate_right.c: New file, based on
tests/test-stdc_rotate_right.c with changes to also work with the glibc
test framework. Relicense to LGPLv2.1+.
* modules/stdc_rotate_left-tests (Files): List the new file.
(Depends-on): Add the new file as a source for the test program. Define
GNULIB_TEST_STDBIT when compiling.
* modules/stdc_rotate_right-tests (Files): List the new file.
(Depends-on): Add the new file as a source for the test program. Define
GNULIB_TEST_STDBIT when compiling.
Problem found with gcc 16.1.1 20260515 (Red Hat 16.1.1-2) on i686.
* tests/test-stdc_rotate_left.c (test_stdc_rotate_left_ul):
* tests/test-stdc_rotate_right.c (test_stdc_rotate_right_ul): Use
preprocessor-time check, not a potentially runtime check, to see
whether to use 32- or 64-bit tests. This pacifies gcc -Woverflow.
Include <limits.h> to get ULONG_MAX.
Test that the compiler doesn't optimize a NULL check away when it sees
the prototypes in the headers <string.h>, <wchar.h>, and <stdlib.h>.
The existing tests explicitly avoided the effects of the attributes
in the function prototypes.
Exclude GCC < 15 and glibc which are known to be problematic.
Use 2.99 as a placeholder for a fixed glibc version. It should
be updated once the glibc headers have been changed.
* tests/test-bsearch.c: Add the test null_bsearch.
* tests/test-memccpy.c: Add the test null_memccpy.
* tests/test-memchr.c: Add the test null_memchr.
* tests/test-memcmp.c: Add the test null_memcmp.
* tests/test-memcpy.c: Add the test null_memcpy.
* tests/test-memmove.c: Add the test null_memmove.
* tests/test-memset.c: Add the test null_memset.
* tests/test-memset_explicit.c: Add the test null_memset_explicit.
* tests/test-qsort.c: Add the test null_qsort.
* tests/test-strncat.c: Add the test null_strncat.
* tests/test-strncmp.c: Add the test null_strncmp.
* tests/test-strncpy.c: Add the test null_strncpy.
* tests/test-strndup.c: Add the test null_strndup.
* tests/test-wcsncat.c: Add the test null_wcsncat.
* tests/test-wcsncmp.c: Add the test null_wcsncmp.
* tests/test-wcsncpy.c: Add the test null_wcsncpy.
* tests/test-wmemchr.c: Add the test null_wmemchr.
* tests/test-wmemcmp.c: Add the test null_wmemcmp.
* tests/test-wmemcpy.c: Add the test null_wmemcpy.
* tests/test-wmemmove.c: Add the test null_wmemmove.
* tests/test-wmemset.c: Add the test null_wmemset.