ChangeLog

Branch


Log

Author Commit Date CI Message
Bruno Haible e1d73817 2025-10-23T16:14:15 stdioext: Add support for OpenBSD >= 7.8. * lib/stdio-impl.h (fp_): Separate definitions for OpenBSD from those for Android. Add definition for OpenBSD >= 7.8. * lib/fflush.c (clear_ungetc_buffer, disable_seek_optimization, update_fpos_cache, rpl_fflush): Don't test for __OpenBSD__, since OpenBSD <= 7.7 is covered by the __sferror test and OpenBSD >= 7.8 does not need the workarounds. * lib/fseeko.c (fseeko): Likewise. * lib/fpurge.c (fpurge): Likewise.
Bruno Haible 3813b2c4 2025-10-23T16:06:22 stdioext: Revert unneeded changes in 2025-07-20 commit. * lib/fpending.c (__fpending): Don't test for __OpenBSD__, since OpenBSD >= 7.6 already has __fpending. * lib/freadahead.c (freadahead): Don't test for __OpenBSD__, since OpenBSD >= 7.6 already has __freadahead. * lib/freading.c (freading): Don't test for __OpenBSD__, since OpenBSD >= 7.6 already has __freading. * lib/freadptr.c (freadptr): Don't test for __OpenBSD__, since OpenBSD >= 7.6 already has __freadptr. * lib/freadseek.c (freadptrinc): Don't test for __OpenBSD__, since OpenBSD >= 7.6 already has __freadptrinc. * lib/fseterr.c (fseterr): Don't test for __OpenBSD__, since OpenBSD >= 7.6 already has __fseterr. * lib/fwriting.c (fwriting): Don't test for __OpenBSD__, since OpenBSD >= 7.6 already has __fwriting.
Collin Funk 9bb08f51 2025-10-22T12:15:16 doc: Update gmtime_r documentation for OpenBSD 7.8. * doc/posix-functions/gmtime_r.texi: Mention that only OpenBSD 7.7 and earlier use GMT instead of UTC.
Collin Funk a0d10f43 2025-10-20T20:50:21 fenv-rounding tests: Avoid test failure on Android. * tests/test-fenv-round.c (test_towardzero, test_upward) (test_downward): Disable tests that are known to fail. * doc/posix-functions/fesetround.texi: Update list of platforms.
Collin Funk 32ab90fa 2025-10-20T19:49:45 snan tests: Avoid test failure on Android. * tests/test-snan-1.c (main): Disable test that is known to fail.
Bruno Haible 3e61e314 2025-10-21T09:47:13 fts: Attempt to silence Coverity Scan. * lib/fts.c (fts_safe_changedir): Add an assertion.
Bruno Haible 2c58a43a 2025-10-21T09:40:46 glob: Fix a memory leak. Found by Coverity. * lib/glob.c (__glob): Add scratch_buffer_free invocation, to match scratch_buffer_init invocation.
Bruno Haible 19141077 2025-10-20T21:13:39 glob: Add support for Android. Reported by Collin Funk in <https://lists.gnu.org/archive/html/bug-gnulib/2025-10/msg00054.html>. * m4/glob.m4 (gl_GLOB): On Android, skip a test that assumes that /bin/sh exists. Update cross-compilation guess. * tests/test-glob.c (main): On Android, skip a test that assumes that /bin/sh exists. * doc/posix-functions/glob.texi: Mention also Android.
Bruno Haible 6c99ec37 2025-10-20T04:08:11 gnulib-tool.sh: Trivial simplification. * gnulib-tool.sh (func_exists_local_module): Remove redundant semicolon.
Collin Funk bc638bf0 2025-10-17T20:04:59 savedir tests: Check the length of the file names. Suggested by Bruno Haible in <https://lists.gnu.org/archive/html/bug-gnulib/2025-10/msg00049.html>. * tests/test-savedir.c (test_savedir_sort_none) (test_savedir_sort_name): Check that the file names are only one character long.
Collin Funk abd86e80 2025-10-17T16:45:30 savedir: Add tests. * tests/test-savedir.c: New file. * modules/savedir-tests: Likewise.
Bruno Haible 19ef6a04 2025-10-15T16:30:10 glob tests: Avoid a test failure on native Windows. * tests/test-glob.c (main): Disable the new test cases on native Windows.
Bruno Haible edaba33e 2025-10-15T15:16:59 glob: Fix test failure on Cygwin. * m4/glob.m4 (gl_GLOB): Add a second test case. * doc/posix-functions/glob.texi: Mention Cygwin.
Bruno Haible 00f989aa 2025-10-15T15:01:55 glob tests: Improve maintainability. * tests/test-glob.c (main): Make the second added test independent from the first one.
Collin Funk 9be0da9b 2025-10-14T18:30:47 getdelim: Avoid the symbol __getdelim with ASAN (regr. 2025-10-13). * lib/stdio.in.h (rpl_getdelim) [__GLIBC__ >= 2 && !__ADDRESS_SANITIZER__]: Don't define to __getdelim so that ___interceptor_getdelim doesn't override our symbol.
Collin Funk 0acb69c4 2025-10-14T18:10:48 glob: Ensure --enable-cross-guesses is obeyed (regr. yesterday). Reported by Bruno Haible in <https://lists.gnu.org/archive/html/bug-gnulib/2025-10/msg00041.html>. * m4/glob.m4 (gl_GLOB): Set gl_cv_glob_overflows_stack on platforms other than glibc.
Collin Funk bc3bb043 2025-10-13T20:39:25 glob tests: Add a test for the glibc bug. * tests/test-glob.c (main): Add a test case for all slash characters and a test case for many slash characters following a wildcard character.
Collin Funk f1a18f6f 2025-10-10T22:34:19 glob: Prevent a stack overflow with many slashes. * lib/glob.c (__glob): Strip trailing slashes before making the recursive call. * m4/glob.m4 (gl_GLOB): Check for the glibc bug. * doc/posix-functions/glob.texi: Mention the bug.
Bruno Haible b028dcc8 2025-10-13T12:41:39 getline: Fix compilation error in C++ mode (regression 2025-10-10). * lib/stdio.in.h (getdelim): On glibc, define __getdelim instead of rpl_getdelim. (getline): In C++ mode, define getline as an inline function instead of as a macro. * lib/getdelim.c (getdelim): On glibc, don't test whether fp is NULL.
Bruno Haible 94dcab94 2025-10-12T13:31:49 stdcountof-h tests: Fix link error on MSVC 14 (regression 2025-06-07). * tests/test-stdcountof-h.c (a, b, c): Define as variables on MSVC.
Collin Funk 55e6cae9 2025-10-09T20:42:05 getline tests: Add a test for the glibc bug. * tests/test-getline.c (main): Check that the buffer is terminated with a NUL character when the first character read is EOF.
Collin Funk 3ac88aeb 2025-10-09T20:41:09 getline: Work around a glibc bug. * m4/getline.m4 (gl_FUNC_GETLINE): Check that the buffer is terminated with a NUL character when the first character read is EOF. Guess that the function does not work on glibc. * doc/posix-functions/getline.texi: Mention the bug.
Collin Funk e2632ca0 2025-10-09T20:40:05 getdelim tests: Add a test for the glibc bug. * tests/test-getdelim.c (main): Check that the buffer is terminated with a NUL character when the first character read is EOF.
Collin Funk c06522b1 2025-10-09T20:36:15 getdelim: Work around a glibc bug. * m4/getdelim.m4 (gl_FUNC_GETDELIM): Check that the buffer is terminated with a NUL character when the first character read is EOF. Guess that the function does not work on glibc. * doc/posix-functions/getdelim.texi: Mention the bug.
Bruno Haible 7b46a281 2025-10-08T14:12:51 stdcountof-h tests: Test more kinds of string literals. * tests/test-stdcountof-h.c (test_func): Test also wide string literals and Unicode string literals.
Alejandro Colomar 13cb0c83 2025-10-08T11:40:58 stdcountof-h tests: Test a string literal. * tests/test-stdcountof-h.c (test_func): Test a string literal. Copyright-paperwork-exempt: Yes
Bruno Haible 5124e917 2025-10-08T14:10:13 stdcountof-h: Add support for string literal arguments in C++ mode. Reported by Alejandro Colomar <alx@kernel.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2025-10/msg00010.html>. * lib/stdcountof.in.h (_gl_array_type_test): Add a partial instantiation for string literals.
Bruno Haible 6d64a315 2025-10-04T04:21:50 localename-unsafe: Fix handling of yue-Hans locale on macOS. Reported by Grisha Levit <grishalevit@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2025-10/msg00002.html>. * lib/localename-unsafe.c (langtag_entry): Adjust array dimensions of elements.
Bruno Haible e0bcc7d6 2025-10-03T21:51:11 unimetadata/base: Add tests. * tests/unimetadata/test-unimetadata-h.c: New file. * modules/unimetadata/base-tests: New file. * tests/unimetadata/test-unimetadata-h-c++.cc: New file. * modules/unimetadata/base-c++-tests: New file.
Bruno Haible 268c44d1 2025-10-03T21:51:08 unicase/base: Add tests. * tests/unicase/test-unicase-h.c: New file. * modules/unicase/base-tests: New file. * tests/unicase/test-unicase-h-c++.cc: New file. * modules/unicase/base-c++-tests: New file.
Bruno Haible fde8832a 2025-10-03T21:51:05 uninorm/base: Add tests. * tests/uninorm/test-uninorm-h.c: New file. * modules/uninorm/base-tests: New file. * tests/uninorm/test-uninorm-h-c++.cc: New file. * modules/uninorm/base-c++-tests: New file.
Bruno Haible 69db3cfd 2025-10-03T21:51:01 unilbrk/base: Add tests. * tests/unilbrk/test-unilbrk-h.c: New file. * modules/unilbrk/base-tests: New file. * tests/unilbrk/test-unilbrk-h-c++.cc: New file. * modules/unilbrk/base-c++-tests: New file.
Bruno Haible 3cd44d44 2025-10-03T21:50:59 uniwbrk/base: Add tests. * tests/uniwbrk/test-uniwbrk-h.c: New file. * modules/uniwbrk/base-tests: New file. * tests/uniwbrk/test-uniwbrk-h-c++.cc: New file. * modules/uniwbrk/base-c++-tests: New file.
Bruno Haible c3551bca 2025-10-03T21:50:56 unigbrk/base: Add tests. * tests/unigbrk/test-unigbrk-h.c: New file. * modules/unigbrk/base-tests: New file. * tests/unigbrk/test-unigbrk-h-c++.cc: New file. * modules/unigbrk/base-c++-tests: New file.
Bruno Haible 65b2a8ba 2025-10-03T21:50:53 uniwidth/base: Add tests. * tests/uniwidth/test-uniwidth-h.c: New file. * modules/uniwidth/base-tests: New file. * tests/uniwidth/test-uniwidth-h-c++.cc: New file. * modules/uniwidth/base-c++-tests: New file.
Bruno Haible b2ad9004 2025-10-03T21:50:51 unictype/base: Add tests. * tests/unictype/test-unictype-h.c: New file. * modules/unictype/base-tests: New file. * tests/unictype/test-unictype-h-c++.cc: New file. * modules/unictype/base-c++-tests: New file.
Bruno Haible 1d10a395 2025-10-03T21:50:48 uniname/base: Add tests. * tests/uniname/test-uniname-h.c: New file. * modules/uniname/base-tests: New file. * tests/uniname/test-uniname-h-c++.cc: New file. * modules/uniname/base-c++-tests: New file.
Bruno Haible 82c4f2b9 2025-10-03T21:50:46 unistdio/base: Add tests. * tests/unistdio/test-unistdio-h.c: New file. * modules/unistdio/base-tests: New file. * tests/unistdio/test-unistdio-h-c++.cc: New file. * modules/unistdio/base-c++-tests: New file.
Bruno Haible 068652f6 2025-10-03T21:50:42 uniconv/base: Add tests. * tests/uniconv/test-uniconv-h.c: New file. * modules/uniconv/base-tests: New file. * tests/uniconv/test-uniconv-h-c++.cc: New file. * modules/uniconv/base-c++-tests: New file.
Bruno Haible 8077cba5 2025-10-03T21:50:29 unistr/base: Add tests. * tests/unistr/test-unistr-h.c: New file. * modules/unistr/base-tests: New file. * tests/unistr/test-unistr-h-c++.cc: New file. * modules/unistr/base-c++-tests: New file.
Bruno Haible 3f2b934a 2025-10-03T21:50:13 unistr, unigbrk: Fix compilation error in C++ mode (regr. 2025-02-09). Reported by Ryan Carsten Schmidt <gnulib@ryandesign.com> at <https://savannah.gnu.org/bugs/?67576>. * lib/unistr.in.h (u*_check, u*_chr, u*_next, u*_prev, u*_strchr, u*_strrchr, u*_strpbrk, u*_strstr): Define C++ templates outside of 'extern "C"' block. * lib/unigbrk.in.h (u*_grapheme_next, u*_grapheme_prev): Likewise.
Collin Funk a3e20644 2025-09-28T13:30:15 xsetenv: Revert the previous change. * modules/xsetenv (Description): Restore the description of unsetenv.
Collin Funk 6f5df54e 2025-09-28T11:51:48 xsetenv: Remove unnecessary text from module description. * modules/xsetenv (Description): Remove mention of the unsetenv function which is not provided by this module.
Bruno Haible c63a0c67 2025-09-24T23:28:18 Update to Unicode 17.0.0. * lib/gen-uni-tables.c (is_property_alphabetic): Add three YANGQIN SIGNs. (UC_JOINING_GROUP_THIN_NOON): New enum item. (fill_arabicshaping, joining_group_as_c_identifier): Handle UC_JOINING_GROUP_THIN_NOON. (LBP_*): Split LBP_SA into LBP_SA1 and LBP_SA2. (LBP_HH, LBP_SA): New enum items. (get_lbp): Use them. Update such that unilbrk/lbrkprop.txt comes out as expected. (debug_output_lbp): Handle LBP_HH. Print either LBP_SA1, LBP_SA2 as LBP_SA. (fill_org_lbp, debug_output_org_lbp): Handle LBP_HH. (lbp_value_to_string): Handle LBP_HH. Handle LBP_SA1, LBP_SA2 instead of LBP_SA. (output_lbrk_rules_as_tables): Update for LBP_HH change. Update rules LBP12a, LB21 as specified by https://www.unicode.org/reports/tr14/tr14-55.html. (get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected. * lib/unictype.in.h (UC_JOINING_GROUP_THIN_NOON): New enum item. * lib/unictype/joininggroup_byname.gperf: Handle it. * lib/unictype/joininggroup_name.h: Likewise. * lib/unilbrk/lbrktables.h (LBP_*): Split LBP_SA into LBP_SA1 and LBP_SA2. (LBP_HH): New enum item. (unilbrk_table): Update bounds. * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop): Use LBP_HL_HY instead of LBP_HL_BA. Use LBP_SA1 instead of LBP_SA. Treat LBP_SA2 like LBP_CM. Update rules LB20a and LB21a, as specified by https://www.unicode.org/reports/tr14/tr14-55.html. * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop): Likewise. * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop): Likewise. * tests/unigbrk/test-u8-grapheme-breaks.c (main): Use U+2B50 instead of U+2605, because U+2605 no longer is an Extended_Pictographic character. * tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise. * tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise. * tests/unigbrk/test-u8-grapheme-next.c (main): Likewise. * tests/unigbrk/test-u16-grapheme-next.c (main): Likewise. * tests/unigbrk/test-u32-grapheme-next.c (main): Likewise. * tests/unigbrk/test-u8-grapheme-prev.c (main): Likewise. * tests/unigbrk/test-u16-grapheme-prev.c (main): Likewise. * tests/unigbrk/test-u32-grapheme-prev.c (main): Likewise. * 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.
Bruno Haible 5cb21152 2025-09-24T23:28:14 unilbrk: Fix handling of future emojis in rule LB30b. * lib/unilbrk/lbrktables.h (LBP_ID): Renamed from LBP_ID1. (LBP_EBF): Renamed from LBP_ID2. * lib/gen-uni-tables.c (LBP_ID): Renamed from LBP_ID1. (LBP_EBF): Renamed from LBP_ID2. (get_lbp): Update. Move is_property_extended_pictographic invocation. (debug_output_org_lbp): Augment the information from the LineBreak.txt file with the Extended_Pictographic property. Print the LBP_ID and LBP_EBF values distinctly. (fill_org_lbp): Assign value LBP_EBF to all unassigned Extended_Pictographic characters. (debug_output_org_lbp): Handle LBP_EBF. (lbp_value_to_string): Update. (output_lbrk_rules_as_tables): Treat LBP_EBF like LBP_EB instead of like LBP_ID. * lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop): Update. * lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop): Likewise. * lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop): Likewise. * lib/unilbrk/lbrkprop2.h: Regenerated. * lib/unilbrk/lbrktables.c: Regenerated. * tests/unilbrk/test-uc-possible-linebreaks.c (main): Skip test cases that contain the U+1F8FF character. * modules/unilbrk/*-linebreaks: Bump required libunistring version.
Bruno Haible e3fb6645 2025-09-23T21:44:46 gen-uni-tables: Fix compilation error (regression 2025-09-17). * lib/gen-uni-tables.c (streq, memeq): Move definitions before their first use.
Bruno Haible 18255ab2 2025-09-23T10:22:38 Clarify link dependency towards libgcrypt or OpenSSL's libcrypto. * modules/crypto/gc-arcfour (Link): New section. * modules/crypto/gc-arctwo (Link): Likewise. * modules/crypto/gc-camellia (Link): Likewise. * modules/crypto/gc-des (Link): Likewise. * modules/crypto/gc-hmac-md5 (Link): Likewise. * modules/crypto/gc-hmac-sha1 (Link): Likewise. * modules/crypto/gc-hmac-sha256 (Link): Likewise. * modules/crypto/gc-hmac-sha512 (Link): Likewise. * modules/crypto/gc-md2 (Link): Likewise. * modules/crypto/gc-md4 (Link): Likewise. * modules/crypto/gc-md5 (Link): Likewise. * modules/crypto/gc-pbkdf2 (Link): Likewise. * modules/crypto/gc-pbkdf2-sha1 (Link): Likewise. * modules/crypto/gc-rijndael (Link): Likewise. * modules/crypto/gc-sha1 (Link): Likewise. * modules/crypto/gc-sha256 (Link): Likewise. * modules/crypto/gc-sha512 (Link): Likewise. * modules/crypto/gc-sm3 (Link): Likewise. * modules/crypto/gc-random (Link): Add $(LIB_CRYPTO).
Collin Funk 4e77b6d1 2025-09-22T21:27:13 crypto/gc-arctwo-tests: Fix link error when OpenSSL is enabled. * modules/crypto/gc (Link): Add $(LIB_CRYPTO). * modules/crypto/gc-arctwo-tests (Makefile.am): Link the test program to @LIB_CRYPTO@.
Bruno Haible d08b322e 2025-09-23T02:21:58 fchownat: Revert my earlier change today entirely. * doc/posix-functions/fchownat.texi: Revert last change.
Paul Eggert f657c55c 2025-09-22T16:41:41 fchownat: improve on test failure fix * lib/fchownat.c (rpl_fchownat): Clear the flag only if the trailing slash check needs to be made. Do this before checking for the nofollow bug, to avoid the need for the fork+chdir+lchown dance in that case. Move the empty-filename check earlier, so that its file[0] check can more easily be combined with the trailing slash check. * m4/chown.m4, m4/fchownat.m4, modules/fchownat: Revert most recent change.
Bruno Haible 4e944641 2025-09-22T13:44:06 fchownat: Fix test failure on OpenBSD and Cygwin 2.9 (regr. 2025-09-20). * doc/posix-functions/fchownat.texi: Document that the dereferencing bug also affects OpenBSD and Cygwin 2.9. * m4/chown.m4 (gl_FUNC_CHOWN_CTIME): New macro, extracted from gl_FUNC_CHOWN. (gl_FUNC_CHOWN): Invoke it. * m4/fchownat.m4 (gl_FUNC_FCHOWNAT_DEREF_BUG): Guess that a platform that has the chown ctime bug also has the fchownat AT_SYMLINK_NOFOLLOW bug. * modules/fchownat (Files): Add m4/chown.m4.
Paul Eggert 0b099a20 2025-09-21T18:56:18 fchownat: fix recently introduced flag typo Problem reported by Bruno Haible in: https://lists.gnu.org/r/bug-gnulib/2025-09/msg00282.html * lib/fchownat.c (rpl_fchownat): Fix typo by passing our flag to fstatat.
Bruno Haible d947a2d9 2025-09-22T00:00:40 pthread-once: Improve configuration. * m4/pthread-once.m4 (gl_PTHREAD_ONCE): Use a configure test to determine whether linking with $(LIBPMULTITHREAD) is necessary.
Paul Eggert e4c911bb 2025-09-21T13:49:18 tests: avoid grep in init.sh * tests/init.sh (warn_, gl_shell_test_script_): Avoid the use of grep, as that introduces an unwanted dependency. On older systems like Solaris there can be many greps and they can be buggy, so it’s better to not rely on them in a central part of the test harness.
Paul Eggert 8ac8a9b4 2025-09-21T13:43:01 tests: avoid test failure due to rmdir race * tests/init.sh (remove_tmp_): If the rm -rf fails, wait a second and try again. This works around a problem I observed on Solaris 10 on a circa 2001 Sun Fire 280R with a single 750 MHz UltraSPARC III, where a subprocess had not yet exited by the time the test script attempted to remove the subprocess’s working directory. This can happen, for example, if the process A in the shell command ‘A | B’ closes stdout, checks that the close succeeded -- a necessary check if stdout is NFS, on Solaris anyway -- and uses that check to affect its exit status. In this situation, B can read end-of-file from its standard input and exit before A exits, and then the shell, which waits only for B, can then attempt to remove A’s working directory during cleanup. This is not a problem on GNU/Linux where one can remove a process’s working directory, but it is a problem on Solaris 10 which does not allow this. POSIX allows the Solaris 10 behavior.
Bruno Haible 1f8f8f77 2025-09-21T21:30:58 doc: Update for Android API level 37. * doc/glibc-functions/sched_getattr.texi: Document that the function is missing on Android API level <= 36. * doc/glibc-functions/sched_setattr.texi: Likewise.
Bruno Haible b5401616 2025-09-21T21:28:33 doc: Update for Android API level 36. * doc/glibc-functions/pthread_getaffinity_np.texi: Document that the function is missing on Android API level <= 35. * doc/glibc-functions/pthread_setaffinity_np.texi: Likewise.
Bruno Haible eb2c639c 2025-09-21T20:59:20 chown, lchown: Fix regression on Cygwin 2.9.0 (regression today). * m4/chown.m4 (AC_FUNC_CHOWN): Restore the previous configure-time test on OpenBSD and Cygwin platforms. * doc/posix-functions/chown.texi: Update platforms list.
Bruno Haible 7b85c2a8 2025-09-21T20:40:43 lchown: Fix compilation error on macOS (regression today). * lib/lchown.c: Include stat-time.h.
Paul Eggert 12171837 2025-09-21T09:28:00 chown: simplify CHOWN_CHANGE_TIME_BUG checking * m4/chown.m4 (AC_FUNC_CHOWN): Just use $host_os when checking for CHOWN_CHANGE_TIME_BUG. This should be good enough for currently supported Gnulib targets.
Paul Eggert 162ce0b7 2025-09-21T07:55:00 fchownat: fix security races and other bugs This fixes some unlikely security races, where our “no-op” chmod undid some other process’s chmod. Ironically this bug occurred on OpenBSD, our most paranoid target. This patch also fixes some EOVERFLOW bugs, along with a performance bug and a CHOWN_CHANGE_TIME_BUG with fchownat. * lib/chown.c, lib/fchownat.c, lib/lchown.c: Remove unnecessary inconsistencies. Include stat-time.h. (CHOWN_CHANGE_TIME_BUG, CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE) (CHOWN_MODIFIES_SYMLINK, CHOWN_TRAILING_SLASH_BUG): Default to 0, and prefer ‘if (...)’ to ‘#ifdef ...’. (utimensat) [!HAVE_UTIMENSAT]: Default to a no-op. (rpl_chown, rpl_fchownat, rpl_lchown): Prefer ‘if (...)’ to ‘#ifdef ...’. Statically, call the stat-like and chown-like functions just once. Do not fail if the stat-like function fails with EOVERFLOW, if existence is all we care about. Use utimensat to update ctime, instead of a chmod-like function. * lib/fchownat.c (rpl_fchownat): Defend against OpenBSD’s CHOWN_CHANGE_TIME_BUG. This bug in rpl_fchownat was exposed by yesterday’s fix that caused rpl_fchownat to call fchownat instead of using the tricky old fork/chdir business. * m4/chown.m4 (gl_FUNC_CHOWN): Check for utimensat if the ctime bug is present. * modules/chown, modules/lchown, modules/fchownat: (Depends-on): Add stat-time.
Bruno Haible f7b84b35 2025-09-21T08:24:38 pthread-once: Fix link error on glibc < 2.34 systems (regr. yesterday). * m4/pthread-once.m4 (gl_PTHREAD_ONCE): Use $LIBPMULTITHREAD also on glibc systems.
Collin Funk cfef893b 2025-09-20T22:45:29 sig2str: Port to Android API level 36. * m4/sig2str.m4 (gl_FUNC_SIG2STR): Use gl_CHECK_FUNCS_ANDROID to check for sig2str and str2sig instead of AC_CHECK_FUNCS. * doc/posix-functions/sig2str.texi: Document that the function is missing on Android API 35 and lower. * doc/posix-functions/str2sig.texi: Likewise.
Collin Funk c751b471 2025-09-20T22:41:16 qsort_r: Port to Android API level 36. * m4/qsort_r.m4 (gl_FUNC_QSORT_R): Use gl_CHECK_FUNCS_ANDROID to check for qsort_r instead of AC_CHECK_FUNCS_ONCE. * doc/glibc-functions/qsort_r.texi: Document that the function is missing on Android API 35 and lower.
Collin Funk 4bdd70e3 2025-09-20T22:36:22 lchmod: Port to Android API level 36. * m4/lchmod.m4 (gl_FUNC_LCHMOD): Use gl_CHECK_FUNCS_ANDROID to check for lchmod instead of AC_CHECK_FUNCS_ONCE. * m4/lchown.m4 (gl_FUNC_LCHOWN): Likewise. * doc/glibc-functions/lchmod.texi (lchmod): Document that the function is missing on Android API 35 and lower.
Bruno Haible d941c98d 2025-09-21T02:11:03 pthread-once: Reduce link dependencies. Linking with -lpthread is not needed on musl libc, macOS, NetBSD, Solaris, Cygwin, Haiku, Android. Reported by Michael Osipov <michael.osipov@innomotics.com> and Tijl Coosemans <tijl@FreeBSD.org> in <https://lists.gnu.org/archive/html/bug-gettext/2025-09/msg00019.html>. * m4/pthread-once.m4 (gl_PTHREAD_ONCE): Require gl_PTHREADLIB. Set PTHREAD_ONCE_LIB. * modules/pthread-once (Link): Link with $(PTHREAD_ONCE_LIB) instead of $(LIBPMULTITHREAD). * modules/pthread-once-tests (Makefile.am): Update accordingly.
Bruno Haible 8ebd5a9a 2025-09-20T15:49:50 nl_langinfo: Work around nl_langinfo multithread-safety bug on macOS 26. * m4/nl_langinfo.m4 (gl_FUNC_NL_LANGINFO): Set NL_LANGINFO_MTSAFE to 0 on macOS. * lib/nl_langinfo.c (ITEMS): Define appropriately on macOS. * doc/posix-functions/nl_langinfo.texi: Document the macOS bug.
Paul Eggert ad4d97cb 2025-09-20T00:31:08 fchownat: fix unlikely EOVERFLOW bug * lib/fchownat.c (rpl_fchownat) [CHOWN_TRAILING_SLASH_BUG]: Do the right thing if fstatat fails with EOVERFLOW. This matters only on obsolete platforms like Solaris 9, but it’s easy to do it right. Simplify neighboring code.
Paul Eggert c48ee317 2025-09-20T00:25:52 fchownat: fix missing HAVE_FCHOWNAT * m4/fchownat.m4 (gl_FUNC_FCHOWNAT): Use AC_CHECK_FUNCS instead of AC_CHECK_FUNC, so that we define HAVE_FCHOWNAT if fchownat exists. lib/fchownat.c uses HAVE_FCHOWNAT in some cases.
Paul Eggert 92e7a7b1 2025-09-19T23:53:47 fchownat: depend on fstatat * modules/fchownat (Depends-on): Add fstatat. This fixes a dependency bug I introduced on 2022-03-09 when I made the statat module obsolute.
Bruno Haible dc1dc563 2025-09-20T00:03:51 stringeq: Fix use in C++ mode. * lib/string.in.h (memeq, streq): Define with "C" linkage.
Bruno Haible ba34a934 2025-09-19T16:26:52 map-c++-tests: Fix compilation error (regression 2025-09-17). * tests/test-map-c++.cc (streq): Remove function. * modules/map-c++-tests (Depends-on): Add stringeq.
Bruno Haible 153cf1ab 2025-09-18T20:57:26 stack-trace: Add support for Oracle DeveloperStudio cc. * m4/stack-trace.m4 (gl_STACK_TRACE_EARLY): Use option '-Wl,-export-dynamic' instead of '-rdynamic'.
Pádraig Brady 9d7a6e01 2025-09-18T14:33:49 localcharset: fix macOS build * lib/localcharset.c: s/ostreq/streq/ typo.
Bruno Haible 8c4f03e9 2025-09-17T22:11:16 threadlib: Improve support for HP-UX. * m4/threadlib.m4 (gl_ANYTHREADLIB_EARLY): Define _REENTRANT also on HP-UX.
Bruno Haible b9f48580 2025-09-17T22:05:22 stringeq: Make use of Autoconf more reliable. * m4/stringeq.m4: New file. * modules/stringeq (Files): Add it. (configure.ac): Don't set HAVE_DECL_MEMEQ, HAVE_DECL_STREQ. Instead, invoke gl_FUNC_STREQ and gl_FUNC_MEMEQ.
Pádraig Brady 395bd7a7 2025-09-17T19:09:54 cpu-supports: support checks on any architecture * lib/cpu-supports.h (gcc_feature_to_glibc_hwcap): Define the map for all architectures, because for example one can build and detect and run x86_64 intrinsics in code built with -m32. This should not add runtime overhead, as mentioned previously the map resolves at compile time with standard optimizations.
Pádraig Brady df414ade 2025-09-17T16:51:52 tests: support -ftrivial-auto-var-init Tested with gcc 15 and clang 20. Note clang didn't need the adjustment, but it was applied for clang also, to be defensive. * tests/test-memset_explicit.c (do_secret_stuff): Mark stack variable as not to be initialized with either zero or pattern on each invocation. tests/test-explicit_bzero.c (do_secret_stuff): Likewise.
Paul Eggert 6b7a9996 2025-09-17T10:11:02 stringeq: port to platforms declaring memeq, streq Work even if the system <string.h> declares memeq and streq. Current standards allow systems to do that, and we hope future systems will do it. * lib/string.in.h (memeq) [HAVE_DECL_MEMEQ]: Do not define. (streq) [HAVE_DECL_STREQ]: Do not define. * m4/string_h.m4 (gl_STRING_H_DEFAULTS): Default HAVE_DECL_MEMEQ, HAVE_DECL_STREQ. * modules/string-h (string-h): Substitute HAVE_DECL_MEMEQ, HAVE_DECL_STREQ. * modules/stringeq (configure.ac): Define HAVE_DECL_MEMEQ, HAVE_DECL_STREQ.
Bruno Haible 055d5f02 2025-09-17T18:33:18 gen-uni-tables: Fix module description (left-over from 2025-05-11). Reported by Paul Eggert in <https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00223.html>. * modules/gen-uni-tables (Depends-on): Remove str_startswith, str_endswith.
Bruno Haible 9bc29cb1 2025-09-17T18:28:35 Add copyright notices. * lib/string.c: Add copyright notice. Use <string.h>, not "string.h".
Paul Eggert b95da5f7 2025-09-16T23:09:25 stringeq: diagnose for streq instead of STREQ * top/maint.mk (sc_prohibit_strcmp): In diagnostic, suggest streq instead of STREQ/STRNEQ.
Paul Eggert 26fd3545 2025-09-16T23:08:01 stringeq: prefer streq to strcmp in other modules * lib/acl-internal.c, lib/argmatch.c, lib/argp-help.c: * lib/argp-parse.c, lib/bcp47.c, lib/c32_get_mapping.c: * lib/c32_get_type_test.c, lib/concat-filename.c: * lib/cpu-supports.h, lib/dfa.c, lib/duplocale.c, lib/exclude.c: * lib/findprog-in.c, lib/findprog.c, lib/fopen.c, lib/freopen.c: * lib/fts.c, lib/gen-uni-tables.c, lib/getfilecon.c: * lib/getlogin.c, lib/getugroups.c, lib/hard-locale.c: * lib/hashcode-named-file.c, lib/hashkey-string.c: * lib/iconv_open.c, lib/idcache.c, lib/lc-charset-unicode.c: * lib/localcharset.c, lib/localename-environ.c: * lib/localename-unsafe.c, lib/mbs_endswith.c, lib/mountlist.c: * lib/newlocale.c, lib/nl_langinfo.c, lib/nproc.c, lib/open.c: * lib/os2-spawn.c, lib/parse-datetime.y, lib/popen.c: * lib/progreloc.c, lib/propername.c, lib/pt_chown.c, lib/putenv.c: * lib/qcopy-acl.c, lib/readutmp.c, lib/rpmatch.c: * lib/setlocale-fixes.c, lib/setlocale.c, lib/sig2str.c: * lib/spawni.c, lib/stat.c, lib/str_endswith.c, lib/streq.h: * lib/striconveha.c, lib/struniq.h, lib/supersede.c: * lib/time_rz.c, lib/unicodeio.c, lib/vasnprintf.c: * lib/vc-mtime.c, lib/wctrans-impl.h, lib/wctype-impl.h: Prefer streq to strcmp when either will do. Do not make this change to files shared with glibc. Do not make the change to test files, at least not for now. * lib/gen-uni-tables.c (streq): New static function, in same style. * modules/acl-permissions, modules/argp, modules/c32_get_mapping: * modules/c32_get_type_test, modules/concat-filename: * modules/cpu-supports, modules/dfa, modules/duplocale: * modules/exclude, modules/findprog, modules/findprog-in: * modules/fopen, modules/fopen-gnu, modules/freopen, modules/fts: * modules/getlocalename_l-simple, modules/getlocalename_l-unsafe: * modules/getlogin, modules/getugroups, modules/hard-locale: * modules/hashcode-named-file, modules/hashkey-string: * modules/iconv_open, modules/idcache, modules/localcharset: * modules/localename, modules/localename-unsafe: * modules/mbs_endswith, modules/mountlist, modules/newlocale: * modules/nl_langinfo, modules/nproc, modules/open: * modules/parse-datetime, modules/popen: * modules/posix_spawn-internal, modules/propername: * modules/pt_chown, modules/putenv-gnu, modules/qcopy-acl: * modules/rpmatch, modules/selinux-h, modules/setenv: * modules/setlocale, modules/setlocale-fixes, modules/sig2str: * modules/spawn-pipe, modules/stat, modules/str_endswith: * modules/streq, modules/striconveha, modules/supersede: * modules/time_rz, modules/uchar-h, modules/unicodeio: * modules/uniconv/base, modules/wctrans, modules/wctype: (Depends-on): Add stringeq.
Paul Eggert 6ca831b0 2025-09-16T18:57:41 stringeq: prefer memeq to memcmp in other modules * lib/argmatch.c, lib/argmatch.h, lib/backupfile.c, lib/bcp47.c: * lib/boot-time.c, lib/csharpcomp.c, lib/csharpexec.c: * lib/file-has-acl.c, lib/gen-uni-tables.c, lib/get_ppid_of.c: * lib/get_progname_of.c, lib/getlogin_r.c, lib/getprogname.c: * lib/getumask.c, lib/isnan.c, lib/mbchar.h, lib/mem-hash-map.c: * lib/memcoll.c, lib/progname.c, lib/progreloc.c: * lib/pthread_sigmask.c, lib/quotearg.c, lib/readutmp.c: * lib/same.c, lib/signbitd.c, lib/signbitf.c, lib/signbitl.c: * lib/string-desc.c, lib/string.c, lib/string.in.h: * lib/unictype/3level.h, lib/unictype/3levelbit.h: * lib/uniname/uniname.c, lib/vc-mtime.c: Prefer memeq to memcmp when either will do. Do not make this change to files shared with glibc. Do not make the change to test files, at least not for now. * lib/gen-uni-tables.c (memeq): New static function, in same style. * modules/argmatch, modules/backupfile, modules/bcp47: * modules/boot-time, modules/csharpcomp, modules/csharpexec: * modules/file-has-acl: * modules/get_ppid_of, modules/get_progname_of: * modules/getlogin_r, modules/getprogname, modules/getumask: * modules/isnan, modules/mbchar, modules/mem-hash-map: * modules/memcoll, modules/progname, modules/pthread_sigmask: * modules/quotearg, modules/readutmp, modules/relocatable-prog: * modules/relocatable-prog-wrapper, modules/same, modules/signbit: * modules/string-desc, modules/stringeq, modules/uniname/uniname: * modules/vc-mtime: (Depends-on): Add stringeq.
Paul Eggert 60b0949c 2025-09-16T14:34:11 stringeq: new module * MODULES.html.sh (func_all_modules): Add stringeq. * lib/string.c, modules/stringeq: New files. * lib/string.in.h: Use _GL_INLINE-related macros. (memeq, streq): New functions, if stringeq module is in use. * m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): New var GNULIB_STRINGEQ. * modules/string-h (string.h): Substitute GNULIB_STRINGEQ.
Pádraig Brady 093de609 2025-09-17T15:56:07 doc: MODULES.html.sh: add missing cpu-supports entry * MODULES.html.sh: Add "cpu-supports" to Misc section.
Bruno Haible 84d76cdd 2025-09-17T09:31:31 stdio-h: Work around [v][f]printf bugs in mingw with msvcrt. Reported by 松延 英樹 <maznobu@gmail.com> in <https://github.com/mlocati/gettext-iconv-windows/issues/52>. * lib/stdio.in.h (gl_consolesafe_fprintf, gl_consolesafe_printf, gl_consolesafe_vfprintf, gl_consolesafe_vprintf): New declarations. (fprintf): When msvcrt is in use, use gl_consolesafe_fprintf. (printf): When msvcrt is in use, use gl_consolesafe_printf. (vfprintf): When msvcrt is in use, use gl_consolesafe_vfprintf. (vprintf): When msvcrt is in use, use gl_consolesafe_vprintf. * lib/stdio-consolesafe.c: Include fseterr.h. (gl_consolesafe_fprintf, gl_consolesafe_printf, gl_consolesafe_vfprintf, gl_consolesafe_vprintf): New functions. * lib/stdio-write.c (vfprintf): When msvcrt is in use, use gl_consolesafe_vfprintf. * modules/stdio-h (Depends-on): Add fseterr. * doc/posix-functions/fprintf.texi: Document the mingw bug. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise.
Bruno Haible dc8590b1 2025-09-17T08:38:14 stdio-h: Work around fwrite bug in msvcrt. Reported by 松延 英樹 <maznobu@gmail.com> in <https://github.com/mlocati/gettext-iconv-windows/issues/52>. * lib/stdio.in.h (gl_consolesafe_fwrite): New declaration. (fwrite): When msvcrt is in use, use gl_consolesafe_fwrite. * lib/stdio-consolesafe.c: New file. * lib/stdio-write.c (fwrite): When msvcrt is in use, use gl_consolesafe_fwrite. * modules/stdio.h (Files): Add lib/stdio-consolesafe.c. (Depends-on): Add stdckdint-h. (configure.ac): Define condition GL_COND_OBJ_STDIO_CONSOLESAFE. (Makefile.am): Arrange to compile stdio-consolesafe.c. * doc/posix-functions/fwrite.texi: Document the workaround.
Bruno Haible c172e838 2025-09-16T22:04:46 strerror_r-posix: Fix truncation code (regression today). * lib/strerror_r.c (strerror_r): Fix use of snprintf again.
Bruno Haible a9a1a8cd 2025-09-16T21:35:12 inttypes-h tests: Avoid compilation error on mingw. Reported by Michele Locati in <https://lists.gnu.org/archive/html/bug-gettext/2024-09/msg00015.html>. * tests/test-inttypes-h.c (l): On mingw without __USE_MINGW_ANSI_STDIO, don't test for the presence of SCN*8, SCN*LEAST8, SCN*FAST8}. * doc/posix-headers/inttypes.texi: Mention the mingw bug.
Pádraig Brady c0184d73 2025-09-16T17:38:57 cpu-supports: remove assert dependency Avoid LGPL incompatibility issues by removing assert. * lib/cpu-supports.c (hwcaps_allowed): Replace assert()s with defensive returns allowing the passed hwcap. * modules/cpu-supports: Remove the dependency.
Bruno Haible 901563ae 2025-09-16T17:08:44 Document msvcrt (native Windows) bugs regarding console output. * doc/posix-functions/fputc.texi: Document a bug found in msvcrt. * doc/posix-functions/putc.texi: Likewise. * doc/posix-functions/fwrite.texi: Document another bug found in msvcrt.
Bruno Haible bbd69592 2025-09-16T16:51:55 strerror_r: Ensure a trailing NUL when truncating. * lib/strerror_r.c (strerror_r): Fix use of snprintf.
Bruno Haible 51aa7ef1 2025-09-16T16:30:38 strtof: Work around mingw bug with overflow. * lib/strtod.c (STRTOD): Recognize overflow. * modules/strtof (Depends-on): Add isinf. * modules/strtod (Depends-on): Likewise. * modules/strtold (Depends-on): Likewise. * doc/posix-functions/strtof.texi: Update mingw version.
Bruno Haible c663bd17 2025-09-16T15:07:55 pagealign_alloc tests: Fix link error. * modules/pagealign_alloc-tests (Makefile.am): Link bench-pagealign_alloc with $(LIBINTL).
Pádraig Brady b26ea307 2025-09-15T14:43:16 tests: avoid infinite loop in init.sh This was noticed when building expr in coreutils with -fsanitize=memory, which induced false failures resulting in an infinite loop. * tests/init.sh: Break from the loop if there's an issue with expr(1).
Pádraig Brady 2bad49a5 2025-09-15T12:44:49 cpu-supports: relicense under LGPL * modules/cpu-supports: Relicense under LGPL to match the crc-x86_64 module.
Bruno Haible 8d868202 2025-09-15T18:09:03 threadlib: Omit unsupported configure option. Reported by Michael Osipov <michael.osipov@innomotics.com> in <https://lists.gnu.org/archive/html/bug-gettext/2025-09/msg00009.html>. * m4/threadlib.m4 (gl_THREADLIB_EARLY_BODY): If libtool is in use, don't display the --disable-threads option.
Bruno Haible 06f481da 2025-09-15T08:32:29 pagealign_alloc tests: Fix link error. * modules/pagealign_alloc-tests (Makefile.am): Link test-pagealign_alloc with $(LIBINTL).
Bruno Haible d3bcecb9 2025-09-14T18:29:29 gettext-h: Avoid warning with gcc < 4.2. Reported by Orgad Shaneh <orgads@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2025-09/msg00183.html>. * lib/gettext.h (gettext, dgettext, dcgettext): Don't use attribute __gnu_inline__ with gcc < 4.2.