]> git.ipfire.org Git - thirdparty/gnulib.git/log
thirdparty/gnulib.git
6 months agogit-merge-changelog: Remove module.
Bruno Haible [Tue, 5 Aug 2025 21:16:15 +0000 (23:16 +0200)] 
git-merge-changelog: Remove module.

It is now available through
$ git clone https://git.savannah.gnu.org/git/vc-changelog.git
see https://gitweb.git.savannah.gnu.org/gitweb/?p=vc-changelog.git .

* lib/git-merge-changelog.c: Remove file.
* modules/git-merge-changelog: Remove file.
* NEWS: Mention the change.

6 months agonlcanon tests: Fix last commit.
Bruno Haible [Mon, 4 Aug 2025 23:20:58 +0000 (01:20 +0200)] 
nlcanon tests: Fix last commit.

* tests/init.sh (setup_): Revert last change.
* modules/test-framework-sh (Makefile.am): Augment TESTS_ENVIRONMENT
here.
* modules/nlcanon-tests (Makefile.am): Don't augment TESTS_ENVIRONMENT
here.

6 months agovma-iter: pacify Coverity Scan
Paul Eggert [Mon, 4 Aug 2025 20:21:29 +0000 (13:21 -0700)] 
vma-iter: pacify Coverity Scan

* lib/vma-iter.c (vma_iterate_procmap_query):
Define only if it could be useful.

6 months agodfa: pacify Coverity Scan
Paul Eggert [Mon, 4 Aug 2025 18:46:34 +0000 (11:46 -0700)] 
dfa: pacify Coverity Scan

* lib/dfa.c (parse_bracket_exp): Omit unnecessary assignments.

6 months ago* lib/copy-file-range.c: Fix indentation.
Paul Eggert [Mon, 4 Aug 2025 18:42:36 +0000 (11:42 -0700)] 
* lib/copy-file-range.c: Fix indentation.

6 months agonlcanon: Add tests.
Bruno Haible [Mon, 4 Aug 2025 11:23:54 +0000 (13:23 +0200)] 
nlcanon: Add tests.

* tests/test-nlcanon.sh: New file.
* modules/nlcanon-tests: New file.
* tests/init.sh (setup_): Adjust also top_builddir, if set.

6 months agonlcanon: New module.
Bruno Haible [Mon, 4 Aug 2025 10:44:14 +0000 (12:44 +0200)] 
nlcanon: New module.

* build-aux/nlcanon.sh.in: New file, with a function func_tmpdir taken
from build-aux/csharpexec.sh.in.
* modules/nlcanon: New file.

6 months agoShorten GCC bug URLs
Paul Eggert [Sat, 2 Aug 2025 17:25:13 +0000 (10:25 -0700)] 
Shorten GCC bug URLs

6 months agoShorten glibc bug URLs
Paul Eggert [Sat, 2 Aug 2025 17:21:36 +0000 (10:21 -0700)] 
Shorten glibc bug URLs

6 months agoMore copy_file_range commentary
Paul Eggert [Sat, 2 Aug 2025 15:52:29 +0000 (08:52 -0700)] 
More copy_file_range commentary

6 months agodoc: Mention the copy_file_range bug.
Collin Funk [Sat, 2 Aug 2025 04:34:37 +0000 (21:34 -0700)] 
doc: Mention the copy_file_range bug.

* doc/glibc-functions/copy_file_range.texi: Mention glibc bug 33245 in
version 2.41 and 2.42.

6 months agocopy-file-range: work around glibc bug 33245
Paul Eggert [Fri, 1 Aug 2025 23:01:13 +0000 (16:01 -0700)] 
copy-file-range: work around glibc bug 33245

Problem reported by Leah Neukirchen <https://bugs.gnu.org/79139>.
* lib/copy-file-range.c: Include sys-limits.h.
(copy_file_range) [glibc 2.42 and earlier]:
Copy at most SYS_BUFSIZE_MAX bytes.
* m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
Replace on glibc platforms, as well as on Linux platforms.
* modules/copy-file-range (Files): Add lib/sys-limits.h.

6 months agocopy-file-range: tune for more-modern kernels
Paul Eggert [Fri, 1 Aug 2025 21:46:51 +0000 (14:46 -0700)] 
copy-file-range: tune for more-modern kernels

* lib/copy-file-range.c [__linux__ && HAVE_COPY_FILE_RANGE]:
Include <linux/version.h>.  Include <sys/utsname.h>
only for kernel 5.2 and earlier.
(CHECK_LINUX_KERNEL_VERSION): New macro.
(copy_file_range) [__linux__ && HAVE_COPY_FILE_RANGE]:
Call utsname only when built for kernel 5.2 and earlier.
(copy_file_range) [!__linux__ && HAVE_COPY_FILE_RANGE]:
Use underlying copy_file_range.  This doesn’t change
behavior since the code is not compiled in this case,
but it makes the code a bit cleaner.
* modules/copy-file-range (Depends-on): Add bool.

6 months agosigsegv: Use new ioctl available in Linux >= 6.11.
Bruno Haible [Fri, 1 Aug 2025 20:44:39 +0000 (22:44 +0200)] 
sigsegv: Use new ioctl available in Linux >= 6.11.

* lib/stackvma.c: On Linux, include <sys/ioctl.h>, <linux/fs.h>.
(vma_iterate_procmap_query): New function.
(vma_iterate): Try vma_iterate_procmap_query first.

6 months agovma-iter: Use new ioctl available in Linux >= 6.11.
Bruno Haible [Fri, 1 Aug 2025 20:38:44 +0000 (22:38 +0200)] 
vma-iter: Use new ioctl available in Linux >= 6.11.

* lib/vma-iter.c: On Linux, include <sys/ioctl.h>, <linux/fs.h>.
(vma_iterate_procmap_query): New function.
(vma_iterate): Try vma_iterate_procmap_query first.

6 months agoautoupdate
Karl Berry [Fri, 1 Aug 2025 15:11:28 +0000 (08:11 -0700)] 
autoupdate

6 months agodoc: Improvements for gnulib git bundle.
Simon Josefsson [Thu, 31 Jul 2025 14:21:30 +0000 (16:21 +0200)] 
doc: Improvements for gnulib git bundle.

* doc/gnulib-git-bundle.texi (Gnulib Git Bundle): Add 20250729 release.
Improve reproducibility instructions.

6 months agoannounce-gen: Support all non-deprecated Automake dist formats.
Collin Funk [Wed, 30 Jul 2025 01:49:42 +0000 (18:49 -0700)] 
announce-gen: Support all non-deprecated Automake dist formats.

* build-aux/announce-gen (@archive_suffixes): Add tar.bz3, tar.zst, and
zip.

6 months agonstrftime: Handle non-Gregorian calendars the same way on all platforms.
Bruno Haible [Tue, 29 Jul 2025 20:31:13 +0000 (22:31 +0200)] 
nstrftime: Handle non-Gregorian calendars the same way on all platforms.

Suggested by Collin Funk.

* modules/nstrftime-limited: New file, based on modules/nstrftime.
* modules/nstrftime (Depends-on): Add nstrftime-limited.
Add localename-unsafe. Remove localename-unsafe-limited.
(configure.ac): Invoke gl_MODULE_INDICATOR.
(Makefile.am): Don't add nstrftime.c to lib_SOURCES; this would conflict
with modules/nstrftime-limited.
(Link): Add $(LIBTHREAD).
* lib/strftime.c (SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME): Don't force
to false if GNULIB_NSTRFTIME is defined.
* modules/nstrftime-tests (Makefile.am): Link test-nstrftime,
test-nstrftime-?? with $(LIBTHREAD).

6 months agogit-merge-changelog: Fix upstream/downstream heuristic for "git pull".
Bruno Haible [Tue, 29 Jul 2025 14:28:48 +0000 (16:28 +0200)] 
git-merge-changelog: Fix upstream/downstream heuristic for "git pull".

* lib/git-merge-changelog.c: Suggest to pass %Y as 4th parameter.
Include <errno.h>, spawn-pipe.h, wait-process.h, xvasprintf.h,
c-ctype.h.
(_): New macro.
(execute_and_read_line): New function, from lib/javacomp.c.
(is_all_hex_digits): New function.
(long_options): Moved into 'main'.
(usage): Document the --debug option.
(main): Accept a --debug option and turn on debugging at runtime instead
of compile-time. Accept an optional other_conflict_label parameter.
Improve 'downstream' determination using two heuristics.
* modules/git-merge-changelog (Depends-on): Add spawn-pipe,
wait-process, xvasprintf, c-ctype.

6 months agojavacomp: Fix memory leak.
Bruno Haible [Tue, 29 Jul 2025 12:29:19 +0000 (14:29 +0200)] 
javacomp: Fix memory leak.

* lib/javacomp.c (execute_and_read_line): Free the line after getline()
failed.

6 months agogit-merge-changelog: Fix essential functionality (regr. 2023-05-21).
Bruno Haible [Tue, 29 Jul 2025 07:11:40 +0000 (09:11 +0200)] 
git-merge-changelog: Fix essential functionality (regr. 2023-05-21).

Fixes two mistakes in commit a8921605af342b9061e04e18fc952d386e5a071c.

Reported by Patrice Dumas <pertusus@free.fr> in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00181.html>.

* lib/git-merge-changelog.c (main): Fix off-by-one mistakes in crucial
places.

6 months agofloat-h: change IBM long double to match GCC 15
Paul Eggert [Tue, 29 Jul 2025 00:50:30 +0000 (17:50 -0700)] 
float-h: change IBM long double to match GCC 15

This is in response to the GCC developers;
see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120993>.
* lib/float.c (gl_LDBL_MAX): Remove the implementation for PowerPC,
as it should no longer be needed.
* lib/float.in.h (LDBL_MIN_EXP, LDBL_MIN_10_EXP, LDBL_MIN)
(LDBL_MAX, LDBL_EPSILON, LDBL_NORM_MAX): On PowerPC with IBM long
double, simplify by using the GCC 15 values unconditionally.
These are the correct values according to the GCC developers
and there seems little point to disagreeing with current GCC
about obsolescent arithmetic that is so problematic in practice.
* tests/test-float-h.c (test_long_double): Relax tests of LDBL_MAX
when !LDBL_IS_IEC_60559, as the tests would now fail on PowerPC and
they were not portable in that case anyway.

6 months agoposixtm tests: Avoid test failure on Haiku.
Collin Funk [Thu, 24 Jul 2025 03:54:50 +0000 (20:54 -0700)] 
posixtm tests: Avoid test failure on Haiku.

* tests/test-posixtm.c (T): On Haiku, disable test cases that would
fail.

6 months agosethostname tests: Avoid test failure on Haiku.
Collin Funk [Thu, 24 Jul 2025 02:55:41 +0000 (19:55 -0700)] 
sethostname tests: Avoid test failure on Haiku.

* tests/test-sethostname2.c (main): On Haiku, skip the "too long
hostname" test.
* doc/glibc-functions/sethostname.texi: Mention the Haiku problem.

6 months agorun-test: Suggest a more reliable way of invoking valgrind.
Bruno Haible [Wed, 23 Jul 2025 07:32:25 +0000 (09:32 +0200)] 
run-test: Suggest a more reliable way of invoking valgrind.

* build-aux/run-test (func_usage): Suggest to use the --error-exitcode
option.

6 months agothrd: Avoid conversion between different function pointer types.
Bruno Haible [Wed, 23 Jul 2025 07:12:55 +0000 (09:12 +0200)] 
thrd: Avoid conversion between different function pointer types.

Reported by Collin Funk in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00170.html>.

* m4/thrd.m4 (gl_FUNC_THRD_JOIN): Define BROKEN_THRD_START_T or
BROKEN_THRD_JOIN. Don't define BROKEN_THRD_START_T_OR_JOIN.
* lib/thrd.c (thrd_main_func): Define with the right return type,
depending on BROKEN_THRD_START_T.

6 months agofsync, fdatasync: generalize fsync write access doc
Paul Eggert [Tue, 22 Jul 2025 22:37:22 +0000 (15:37 -0700)] 
fsync, fdatasync: generalize fsync write access doc

6 months agodoc: Document that fsync doesn't work on directories on AIX 7.3.
Collin Funk [Tue, 22 Jul 2025 21:40:50 +0000 (14:40 -0700)] 
doc: Document that fsync doesn't work on directories on AIX 7.3.

Reported by Lakshmi-Surekha <Lakshmi.Kovvuri@ibm.com> in:
<https://github.com/tukaani-project/xz/issues/188>.

* doc/posix-functions/fsync.texi: Document the behavior.

6 months agomkdir-p: ENOENT/ENOTDIR safety and consistency
Paul Eggert [Tue, 22 Jul 2025 19:12:22 +0000 (12:12 -0700)] 
mkdir-p: ENOENT/ENOTDIR safety and consistency

* lib/mkdir-p.c (make_dir_parents): If mkdir fails with ENOENT or
ENOTDIR, do not attempt anything else since the file does not exist.
Treat ENOENT and ENOTDIR consistently later, too.

6 months agomkdir-p: better diagnostics
Paul Eggert [Tue, 22 Jul 2025 19:09:28 +0000 (12:09 -0700)] 
mkdir-p: better diagnostics

Problem reported by Lauri Tirkkonen <https://bugs.gnu.org/79072>.
* lib/mkdir-p.c (make_dir_parents):
If savewd_chdir fails due to anything other than EACCES, do
not attempt to preserve permissions; instead, fail with mkdir’s
errno if nonzero, and with savewd_chdir’s errno otherwise.

6 months agosys_un-h: Make sure that the 'sys' subdirectory is created.
Collin Funk [Tue, 22 Jul 2025 02:04:09 +0000 (19:04 -0700)] 
sys_un-h: Make sure that the 'sys' subdirectory is created.

* modules/sys_un-h (Makefile.am): Make the 'sys' subdirectory. Remove
@NMD@ that is not applicable to subdirectories.

6 months agoFix typos.
Bruno Haible [Mon, 21 Jul 2025 13:35:01 +0000 (15:35 +0200)] 
Fix typos.

Reported by <Jens.Schleusener@fossies.org>.

* lib/mbiterf.h: Fix typo in comment.
* lib/mbuiterf.h: Likewise.

6 months agostdioext: Adjust some comments.
Collin Funk [Mon, 21 Jul 2025 06:47:42 +0000 (23:47 -0700)] 
stdioext: Adjust some comments.

Suggested by Bruno Haible in:
<https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00161.html>.

* lib/stdio-impl.h: In comments use a comma instead of an ampersand to
separate items.

6 months agostdioext: Port to recent OpenBSD snapshots with an incomplete FILE type.
Collin Funk [Mon, 21 Jul 2025 04:14:37 +0000 (21:14 -0700)] 
stdioext: Port to recent OpenBSD snapshots with an incomplete FILE type.

* lib/fbufmode.c (fbufmode): Check for __OpenBSD__ definition since
__sferror is no longer defined publicly on this platform.
* lib/fflush.c (clear_ungetc_buffer, update_fpos_cache, rpl_fflush):
Likewise.
* lib/fpending.c (__fpending): Likewise.
* lib/fpurge.c (fpurge): Likewise.
* lib/freadable.c (freadable): Likewise.
* lib/freadahead.c (freadahead): Likewise.
* lib/freading.c (freading): Likewise.
* lib/freadptr.c (freadptr): Likewise.
* lib/freadseek.c (freadptrinc): Likewise.
* lib/fseeko.c (fseeko): Likewise.
* lib/fseterr.c (fseterr): Likewise.
* lib/fwritable.c (fwritable): Likewise.
* lib/fwriting.c (fwriting): Likewise.
* lib/stdio-impl.h: Likewise.
(_gl_flags_file_t): Define to 'short'.
(_gl_file_offset_t): Define to 'fpos_t'.
(fp_): Define this macro using the one already written for Android.
(struct __sfileext): Define the same way as Android which does not rely
on a public 'struct __sbuf' definition.
(__SLBF, __SNBF, __SRD, __SWR, __SRW, __SEOF, __SERR, __SOFF): Define
macros to the same value as on Android.

6 months agoautoupdate
Karl Berry [Sun, 20 Jul 2025 14:09:22 +0000 (07:09 -0700)] 
autoupdate

6 months agodoc: Document resilience against supply chain attacks.
Bruno Haible [Sun, 20 Jul 2025 11:42:46 +0000 (13:42 +0200)] 
doc: Document resilience against supply chain attacks.

* doc/gnulib-intro.texi (Other source code libraries): New subsection.

6 months agoreadme-release: Remove link to Hydra autobuilder.
Collin Funk [Sun, 20 Jul 2025 01:08:57 +0000 (18:08 -0700)] 
readme-release: Remove link to Hydra autobuilder.

* top/README-release: Remove link to Hydra autobuilder since the recipes
have not been updated in years.

6 months agonext-prime: Tweaks for GNU gettext.
Bruno Haible [Sat, 19 Jul 2025 19:38:57 +0000 (21:38 +0200)] 
next-prime: Tweaks for GNU gettext.

* lib/next-prime.c (is_prime): Change so that is_prime (3) returns true.
* tests/test-next-prime.c (main): Allow next_prime (1) to be 1.

6 months agodoc: Mention GNU/Hurd is missing sync_file_range.
Collin Funk [Sat, 19 Jul 2025 03:35:29 +0000 (20:35 -0700)] 
doc: Mention GNU/Hurd is missing sync_file_range.

* doc/glibc-functions/sync_file_range.texi: Add GNU/Hurd to the list of
platforms missing sync_file_range.

6 months agoparse-datetime: Update documentation regarding non-Gregorian calendars.
Bruno Haible [Thu, 17 Jul 2025 14:43:42 +0000 (16:43 +0200)] 
parse-datetime: Update documentation regarding non-Gregorian calendars.

* doc/parse-datetime.texi (General date syntax): Mention that date
syntax should use the Gregorian calendar. Change examples that use %Y
to use LC_ALL=C, so that they work even for users in Thailand, Iran, or
Ethiopia.

6 months agoFix sb_dupfree(), sbr_dupfree() on an empty buffer.
Bruno Haible [Thu, 17 Jul 2025 09:33:39 +0000 (11:33 +0200)] 
Fix sb_dupfree(), sbr_dupfree() on an empty buffer.

Reported by Marc Nieper-Wißkirchen <marc.nieper+gnu@gmail.com> at
<https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00119.html>.

* lib/string-desc.c (_sd_new_addr, _rwsd_new_addr): Don't canonicalize
(0, non-NULL) to (0, NULL).
* lib/string-buffer.h (sb_dupfree): Fix description.
* lib/string-buffer-reversed.h (sbr_dupfree): Likewise.
* tests/test-string-buffer.c (main): Test sb_dupfree on an empty buffer.
* tests/test-string-buffer-reversed.c (main): Test sbr_dupfree on an
empty buffer.

6 months agodoc: Use @code around errno constants.
Collin Funk [Wed, 16 Jul 2025 23:57:06 +0000 (16:57 -0700)] 
doc: Use @code around errno constants.

* doc/posix-functions/mkfifoat.texi: Use @code for errno constants
instead of @samp.
* doc/posix-functions/mknodat.texi: Likewise.
* doc/posix-functions/setenv.texi: Likewise.
* doc/posix-functions/symlinkat.texi: Likewise.
* doc/posix-functions/unsetenv.texi: Likewise.
* doc/glibc-functions/sethostname.texi: Use @code around errno
constants.
* doc/posix-functions/chmod.texi: Likewise.
* doc/posix-functions/posix_fallocate.texi: Likewise.
* doc/posix-functions/ptsname_r.texi: Likewise.

6 months agoautoupdate
Karl Berry [Wed, 16 Jul 2025 14:54:15 +0000 (07:54 -0700)] 
autoupdate

6 months agodoc: Mention copy_file_range stub on GNU/Hurd.
Collin Funk [Wed, 16 Jul 2025 03:16:46 +0000 (20:16 -0700)] 
doc: Mention copy_file_range stub on GNU/Hurd.

* doc/glibc-functions/copy_file_range.texi: Use @code around errno
constants. Mention that the GNU/Hurd version of this function is just a
stub.

6 months agonstrftime: Add support for non-Gregorian calendars.
Bruno Haible [Tue, 15 Jul 2025 09:19:10 +0000 (11:19 +0200)] 
nstrftime: Add support for non-Gregorian calendars.

* lib/calendars.h: New file.
* lib/calendar-thai.h: New file.
* lib/calendar-persian.h: New file.
* lib/calendar-ethiopian.h: New file.
* lib/strftime.h (nstrftime): Document which directives don't work with
non-Gregorian calendars.
* lib/strftime.c (SUPPORT_NON_GREG_CALENDARS_IN_STRFTIME): New macro.
Include localcharset.h, localename.h, calendars.h.
(CAL_ARGS): New macro.
(my_strftime): Recognize locales with non-Gregorian calendars. Pass cal
and caldate down to __strftime_internal.
(__strftime_internal): Accept additional parameters cal, caldate.
Remove rejection of modifier 'O' for directive 'Y' and allow a non-ASCII
alternate digits base. Produce calendar-aware output for the directives
'b', 'h', 'B', 'x', 'd', 'e', 'm', 'Y'.
* modules/nstrftime (Files): Add the calendar files.
(Depends-on): Add localcharset.
(Link): New section.
* modules/fprintftime (Link): New section.
* tests/test-nstrftime-DE.c: New file.
* tests/test-nstrftime-TH.c: New file.
* tests/test-nstrftime-IR.c: New file.
* tests/test-nstrftime-ET.c: New file.
* modules/nstrftime-tests (Files): Add them.
(Depends-on): Add localcharset, setenv.
(Makefile.am): Link test-nstrftime with $(INTL_MACOSX_LIBS). Arrange to
compile and run test-nstrftime-DE, test-nstrftime-TH, test-nstrftime-IR,
test-nstrftime-ET.

6 months agonstrftime: Remove old comment about OSF/1.
Bruno Haible [Tue, 15 Jul 2025 09:15:58 +0000 (11:15 +0200)] 
nstrftime: Remove old comment about OSF/1.

* lib/strftime.c (MULTIBYTE_IS_FORMAT_SAFE): Define to 1 always.

6 months agolocalename-unsafe-limited: Extend to more platforms.
Bruno Haible [Tue, 15 Jul 2025 09:08:01 +0000 (11:08 +0200)] 
localename-unsafe-limited: Extend to more platforms.

* modules/localename-unsafe-limited (Description): Update platforms
list.
(Files): Add m4/intlmacosx.m4, m4/musl.m4.
(Depends-on): Add localename-environ, strdup, windows-mutex.
(configure.ac): Invoke gl_MUSL_LIBC.
(Link): Add $(INTL_MACOSX_LIBS).
* m4/localename.m4 (gl_LOCALENAME_UNSAFE): Don't require
gl_LOCALE_H_DEFAULTS.
(gl_LOCALENAME_UNSAFE_LIMITED): Require gt_INTL_MACOSX.

6 months agogetlocalename_l-unsafe-limited: Extend to more platforms.
Bruno Haible [Tue, 15 Jul 2025 08:56:38 +0000 (10:56 +0200)] 
getlocalename_l-unsafe-limited: Extend to more platforms.

* modules/getlocalename_l-unsafe-limited (Description): Update platforms
list.
(Files): Add m4/intl-thread-locale.m4.
(Depends-on): Add setlocale-fixes.
(configure.ac): Invoke gl_FUNC_GETLOCALENAME_L_UNSAFE and
gl_PREREQ_GETLOCALENAME_L_UNSAFE. Update platforms list.

6 months agogetlocalename_l-unsafe: Make configuration more robust.
Bruno Haible [Tue, 15 Jul 2025 08:52:14 +0000 (10:52 +0200)] 
getlocalename_l-unsafe: Make configuration more robust.

* m4/getlocalename_l.m4 (gl_FUNC_GETLOCALENAME_L_UNSAFE): Require
gl_LOCALE_H_DEFAULTS.

6 months agolocalename-unsafe: Reduce dependencies.
Bruno Haible [Tue, 15 Jul 2025 08:39:37 +0000 (10:39 +0200)] 
localename-unsafe: Reduce dependencies.

* lib/localename-unsafe.c: Include windows-mutex.h instead of
glthread/lock.h.
(get_lcid_lock): Change type to glwthread_mutex_t.
(get_lcid): Use glwthread_mutex_* functions.
* modules/localename-unsafe (Depends-on): Add  windows-mutex. Remove
lock.

6 months agonext-prime tests: Update unit test after last change.
Bruno Haible [Tue, 15 Jul 2025 08:34:01 +0000 (10:34 +0200)] 
next-prime tests: Update unit test after last change.

* tests/test-next-prime.c (main): Allow either behaviour.

6 months agosync epsf.tex
Karl Berry [Mon, 14 Jul 2025 22:13:51 +0000 (15:13 -0700)] 
sync epsf.tex

6 months agoepsf.tex: New file.
Bruno Haible [Mon, 14 Jul 2025 03:07:58 +0000 (05:07 +0200)] 
epsf.tex: New file.

* build-aux/epsf.tex: New file, from
texlive/texmf-dist/tex/generic/epsf/epsf.tex.

6 months agoautoupdate
Karl Berry [Sun, 13 Jul 2025 14:40:54 +0000 (07:40 -0700)] 
autoupdate

6 months agojavacomp-script, javacomp: Remove support for javac versions < 1.8.
Bruno Haible [Sun, 13 Jul 2025 05:36:50 +0000 (07:36 +0200)] 
javacomp-script, javacomp: Remove support for javac versions < 1.8.

* m4/javacomp.m4 (gt_JAVACOMP): State that the minimum source_version
and the minimum target_version are 1.8. Map smaller values to 1.8.
Complain if the java version is < 1.8. Use 1.8 as default, instead of
1.6.
* lib/javacomp.h (compile_java_class): State that the minimum
source_version and the minimum target_version are 1.8.
* lib/javacomp.c (default_target_version): Complain if the java version
is < 1.8. Use 1.8 as default, instead of 1.6.
(SOURCE_VERSION_BOUND, source_version_index): Adjust to the new minimum
source_version = 1.8.
(TARGET_VERSION_BOUND, target_version_index): Adjust to the new minimum
target_version = 1.8.
(get_compiler_version): Update comment.
(is_envjavac_usable, is_javac_usable): Update.
(compile_java_class): Map source_version < 1.8 to 1.8. Map
target_version < 1.8 to 1.8.

6 months agosafe-alloc: make obsolete and remove REALLOC_N
Paul Eggert [Sun, 13 Jul 2025 07:43:36 +0000 (00:43 -0700)] 
safe-alloc: make obsolete and remove REALLOC_N

Problem reported by Vivien Kraus in:
https://lists.gnu.org/r/bug-gnulib/2025-07/msg00073.html
This module never caught on.
* lib/safe-alloc.h (REALLOC_N): Remove.
* modules/safe-alloc: Now obsolete.
* tests/test-safe-alloc.c (main): Remove REALLOC_N test.

6 months agoautoupdate
Karl Berry [Sat, 12 Jul 2025 14:36:07 +0000 (07:36 -0700)] 
autoupdate

6 months agonext-prime: Revert to original behaviour in GNU gettext.
Bruno Haible [Sat, 12 Jul 2025 11:54:00 +0000 (13:54 +0200)] 
next-prime: Revert to original behaviour in GNU gettext.

Reported by Rocket Aaron <i@rocka.me> at
<https://savannah.gnu.org/bugs/?67305>.

* lib/next-prime.c (next_prime): In GNU gettext, don't skip small
primes.

6 months agoobstack-printf: Fix memory overrun on glibc systems.
Bruno Haible [Sat, 12 Jul 2025 11:50:24 +0000 (13:50 +0200)] 
obstack-printf: Fix memory overrun on glibc systems.

* m4/obstack.m4 (gl_FUNC_OBSTACK): Define through AC_DEFUN_ONCE.
* m4/obstack-printf.m4 (gl_FUNC_OBSTACK_PRINTF): Require
gl_FUNC_OBSTACK. Invoke gl_REPLACE_OBSTACK_PRINTF when using the
'obstack' replacement code.

6 months agoftoastr: suggest a better algorithm
Paul Eggert [Sat, 12 Jul 2025 05:09:00 +0000 (22:09 -0700)] 
ftoastr: suggest a better algorithm

* lib/ftoastr.c: Also mention Dragonbox.

7 months agoftoastr: suggest a better algorithm
Paul Eggert [Thu, 10 Jul 2025 16:44:48 +0000 (09:44 -0700)] 
ftoastr: suggest a better algorithm

* lib/ftoastr.c: In comment, suggest Ryū instead of Errol.

7 months agostring-h: Fix compilation error on macOS with fortify.
Bruno Haible [Thu, 10 Jul 2025 09:04:50 +0000 (11:04 +0200)] 
string-h: Fix compilation error on macOS with fortify.

Reported by Pierre Ossman <ossman@cendio.se> at
<https://savannah.gnu.org/bugs/?67300>.

* lib/string.in.h (memcpy etc.): Don't redeclare functions that are
declared as macros.

7 months agoregexprops-generic: update from regex.h
Bernhard Voelker [Wed, 9 Jul 2025 19:06:12 +0000 (21:06 +0200)] 
regexprops-generic: update from regex.h

* doc/regexprops-generic.texi: Re-generate by running the 'regexprops'
binary from GNU findutils:
  ./regexprops "Regular Expressions" generic
At least the recent(ish) change (efd5c380ff) to regex.h aligning
gnulib with Emacs behavior had made this document out-of-date.
Reported by Collin Funk in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00037.html>.
Additionally, today's findutils commit c9c2c51175 fixed the sort order
of the Texinfo nodes.

7 months agofloat-h: work around GCC bug 120993
Paul Eggert [Wed, 9 Jul 2025 00:34:25 +0000 (17:34 -0700)] 
float-h: work around GCC bug 120993

Also, fix a too-low LDBL_MAX on this platform, a problem that
contributed to LDBL_NORM_MAX test failures with C23 PowerPC GCC
with ibmlongdouble.
* lib/float.c (gl_LDBL_MAX): On PowerPC with ibmlongdouble, the
correct value is 2**1024 - 2**918, not 2**1024 - 2**971.  Also,
use C99 hex double notation for the divisor, as it’s clearer and
should work nowadays.
* lib/float.in.h: Simplify by not worring whether it’s AIX or
GNU/Linux when redefining LDBL_* macros on PowerPC GCC with
ibmlongdouble, as the problem seems to be universal then.
(LDBL_NORM_MAX): On PowerPC GCC with ibmlongdouble, define to be
LDBL_MAX, so that it’s 2**1024 - 2**918, doubling GCC’s value
if supplied.
* modules/float-h-tests (Depends-on): Remove floorl, ldexpl.
Add truncl.
(test_float_h_LDADD): Likewise for libraries.
* tests/test-float-h.c (test_isfinitel): New static function,
so that we need not rely on isfinitel.
(normalize_long_double): Work even if X is negative or not finite.
Do not rely on frexpl or ldexpl.  Use truncl instead of floorl
so that the negative results are consistent with positive.
Defend against fritzy PowerPC long double arithmetic.

7 months agooptions: Add reminder to include <config.h>.
Collin Funk [Tue, 8 Jul 2025 22:59:08 +0000 (15:59 -0700)] 
options: Add reminder to include <config.h>.

* lib/options.h: Check that config.h was already included.

7 months agostdcountof-h: Add reminder to include <config.h>.
Collin Funk [Tue, 8 Jul 2025 22:57:36 +0000 (15:57 -0700)] 
stdcountof-h: Add reminder to include <config.h>.

* lib/stdcountof.in.h: Check that config.h was already included.

7 months agofloat-h: Enforce the ISO C 23 compliant value for LDBL_EPSILON.
Bruno Haible [Mon, 7 Jul 2025 15:02:45 +0000 (17:02 +0200)] 
float-h: Enforce the ISO C 23 compliant value for LDBL_EPSILON.

Reported by Cosima Neidahl <opna2608@protonmail.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00021.html>.

* lib/float.in.h (LDBL_EPSILON): Override on all PowerPC platforms.

7 months agovasnprintf: Fix -Wswitch-unreachable warning.
Bruno Haible [Mon, 7 Jul 2025 05:59:02 +0000 (07:59 +0200)] 
vasnprintf: Fix -Wswitch-unreachable warning.

Reported by Collin Funk in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00026.html>.

* lib/vasnprintf.c (VASNPRINTF): Put a #if around a potentially
unreachable switch case.

7 months agofloat-h: port to C23 PowerPC GCC
Paul Eggert [Sun, 6 Jul 2025 23:22:05 +0000 (16:22 -0700)] 
float-h: port to C23 PowerPC GCC

* lib/float.in.h (LDBL_MAX) [__LDBL_NORM_MAX__]: Do not override, as
GCC versions defining __LDBL_NORM_MAX__ surely have LDBL_MAX right.
(LDBL_NORM_MAX): Prefer __LDBL_NORM_MAX__ if defined.
Otherwise, hardcode PowerPC value if applicable.
* tests/test-float-h.c (normalize_long_double):
Fix typo that broke this function when given large numbers.
(test_long_double): Normalize LDBL_MAX before comparing it
to LDBL_NORM_MAX.

7 months agofloat-h-tests: port to C23 PowerPC GCC
Paul Eggert [Sun, 6 Jul 2025 19:33:06 +0000 (12:33 -0700)] 
float-h-tests: port to C23 PowerPC GCC

Problem reported by C. Neidhal
<https://lists.gnu.org/r/bug-gnulib/2025-07/msg00021.html>.
* modules/float-h-tests (Depends-on): Add floorl, frexpl, ldexpl.
(test_float_h_LDADD): Link the resulting libms too.
* tests/test-float-h.c: Include math.h.
(normalize_long_double): New function.
(test_long_double): Use it.

7 months agopagealign_alloc: Don't assume pointers fit in 'unsigned long'.
Collin Funk [Sun, 6 Jul 2025 17:07:35 +0000 (10:07 -0700)] 
pagealign_alloc: Don't assume pointers fit in 'unsigned long'.

* modules/pagealign_alloc (Depends-on): Add stdint-h.
* lib/pagealign_alloc.c: Include stdint.h.
(pagealign_alloc): Cast pointers to 'uintptr_t' instead of 'unsigned
long'.

7 months agostrptime: Convert K&R definitions to ANSI C.
Collin Funk [Sun, 6 Jul 2025 02:34:51 +0000 (19:34 -0700)] 
strptime: Convert K&R definitions to ANSI C.

* lib/strptime.c (LOCALE_PARAM) [_LIBC]: Adjust to match glibc, not
relevant for Gnulib.
(LOCALE_PARAM_PROTO, LOCALE_PARAM_DECL): Remove definitions.
(__strptime_internal, strptime): Convert K&R definition to ANSI C.

7 months agoautoupdate
Karl Berry [Sat, 5 Jul 2025 14:33:49 +0000 (07:33 -0700)] 
autoupdate

7 months agostrncasecmp_l: Fix previous change.
Collin Funk [Sat, 5 Jul 2025 04:29:25 +0000 (21:29 -0700)] 
strncasecmp_l: Fix previous change.

Suggested by Bruno Haible in:
<https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00009.html>.

* lib/strncasecmp_l.c: Include c-strcase.h unconditionally. Use
#include "c-strcase.h" instead of #include <c-strcase.h>.

7 months agostrcasecmp_l: Fix previous change.
Collin Funk [Sat, 5 Jul 2025 04:23:19 +0000 (21:23 -0700)] 
strcasecmp_l: Fix previous change.

Suggested by Bruno Haible in:
<https://lists.gnu.org/archive/html/bug-gnulib/2025-07/msg00009.html>.

* lib/strcasecmp_l.c: Include c-strcase.h unconditionally. Use
#include "c-strcase.h" instead of #include <c-strcase.h>.

7 months agoFix recent ChangeLog entries.
Collin Funk [Sat, 5 Jul 2025 04:19:39 +0000 (21:19 -0700)] 
Fix recent ChangeLog entries.

7 months agostrncasecmp_l: Fix missing declaration of c_strncasecmp (regr. 2025-02-16).
Collin Funk [Sat, 5 Jul 2025 02:36:50 +0000 (19:36 -0700)] 
strncasecmp_l: Fix missing declaration of c_strncasecmp (regr. 2025-02-16).

* lib/strncasecmp_l.c [GNULIB_defined_locale_t]: Include c-strcase.h.

7 months agostrcasecmp_l: Fix missing declaration of c_strcasecmp (regr. 2025-02-16).
Collin Funk [Sat, 5 Jul 2025 02:34:06 +0000 (19:34 -0700)] 
strcasecmp_l: Fix missing declaration of c_strcasecmp (regr. 2025-02-16).

* lib/strcasecmp_l.c [GNULIB_defined_locale_t]: Include c-strcase.h.

7 months agoforkpty: Adjust misleading comment.
Collin Funk [Sat, 5 Jul 2025 01:33:08 +0000 (18:33 -0700)] 
forkpty: Adjust misleading comment.

* lib/forkpty.c: Remove comment about mingw where it does not build.

7 months agodoc: Update regarding stable branches.
Bruno Haible [Tue, 1 Jul 2025 06:03:42 +0000 (08:03 +0200)] 
doc: Update regarding stable branches.

* doc/gnulib-readme.texi (Stable Branches): Mention new branch
stable-202507. Mention that stable-202407 is no longer updated.

7 months agoopenat-die: revert recent changes
Paul Eggert [Tue, 1 Jul 2025 00:50:58 +0000 (17:50 -0700)] 
openat-die: revert recent changes

* lib/openat.die: Revert recent changes as per email in:
https://lists.gnu.org/r/bug-gnulib/2025-06/msg00325.html

7 months agoopenat-die: also change openat_restore_fail
Paul Eggert [Mon, 30 Jun 2025 22:07:24 +0000 (15:07 -0700)] 
openat-die: also change openat_restore_fail

7 months agoopenat-die: pacify Apple clang-1400.0.29.202
Paul Eggert [Mon, 30 Jun 2025 22:01:03 +0000 (15:01 -0700)] 
openat-die: pacify Apple clang-1400.0.29.202

* lib/openat-die.c (openat_save_fail):
Pacify-Wformat-security on this platform.

7 months agooptions tests: Fix link error.
Bruno Haible [Mon, 30 Jun 2025 09:22:40 +0000 (11:22 +0200)] 
options tests: Fix link error.

* modules/options (Link): New section.
* modules/options-tests (Makefile.am): Link test-options and
test-options-prog with LIBINTL.

7 months ago_Noreturn: Fix compilation in C++ mode on Solaris (regr. 2025-06-27).
Bruno Haible [Mon, 30 Jun 2025 07:55:06 +0000 (09:55 +0200)] 
_Noreturn: Fix compilation in C++ mode on Solaris (regr. 2025-06-27).

* lib/_Noreturn.h (_Noreturn): Restore C++ mode handling.
* m4/gnulib-common.m4 (gl_COMMON_BODY): Likewise.

7 months agokwset tests: Fix link error.
Bruno Haible [Mon, 30 Jun 2025 06:45:50 +0000 (08:45 +0200)] 
kwset tests: Fix link error.

* modules/kwset-tests (Makefile.am): Link test-kwset with LIBINTL.

7 months agooptions: Support use in a shared library on mingw, part 2.
Bruno Haible [Mon, 30 Jun 2025 00:49:51 +0000 (02:49 +0200)] 
options: Support use in a shared library on mingw, part 2.

* lib/options.c (_gl_get_next_option): Copy the optind value also as an input
parameter.

7 months agooptions: Support use in a shared library on mingw.
Bruno Haible [Sun, 29 Jun 2025 15:45:24 +0000 (17:45 +0200)] 
options: Support use in a shared library on mingw.

* lib/options.h (_gl_get_next_option): New declaration.
(get_next_option): On mingw, define in terms of _gl_get_next_option.
* lib/options.c (_gl_get_next_option): On mingw, define this function
instead of get_next_option.

7 months agoopen, openat: port O_DIRECTORY changes to OS X
Paul Eggert [Sun, 29 Jun 2025 12:59:32 +0000 (05:59 -0700)] 
open, openat: port O_DIRECTORY changes to OS X

Problem reported by Liam Stitt <https://bugs.gnu.org/78924>.
* lib/open.c, lib/openat.c (HAVE_WORKING_O_DIRECTORY):
Default to false, fixing a typo.

7 months agooptions: Avoid -Wmissing-field-initializers warnings.
Bruno Haible [Sat, 28 Jun 2025 21:30:10 +0000 (23:30 +0200)] 
options: Avoid -Wmissing-field-initializers warnings.

* lib/options.h (BEGIN_ALLOW_OMITTING_FIELD_INITIALIZERS,
END_ALLOW_OMITTING_FIELD_INITIALIZERS): New macros.

7 months agognupload: adjust commentary regarding gnupg versions
Collin Funk [Sat, 28 Jun 2025 19:04:50 +0000 (12:04 -0700)] 
gnupload: adjust commentary regarding gnupg versions

Suggested by Bruno Haible in:
<https://lists.gnu.org/archive/html/bug-gnulib/2025-06/msg00310.html>.

* build-aux/gnupload: Remove misleading year comment.  Mention that
Slackware requires 'gpg2' instead of 'gpg' instead of Ubuntu where they
are now the same.

7 months ago_Noreturn: pacify gcc -std=gnu99 -Wpedantic
Paul Eggert [Sat, 28 Jun 2025 01:56:28 +0000 (18:56 -0700)] 
_Noreturn: pacify gcc -std=gnu99 -Wpedantic

Problem reported by Helmut Eller <https://bugs.gnu.org/78903>.
* lib/_Noreturn.h (_Noreturn):
* m4/gnulib-common.m4 (gl_COMMON_BODY): Prefer __attribute__
((__noreturn__)) to _Noreturn if __STDC_VERSION__ < 201112, to
pacify gcc -std=gnu99 -Wpedantic.  Simplify.  Do not bother
suggesting -D_GL_WORK_AROUND_LLVM_BUG_59792; suggest the
equivalent -D_Noreturn= instead, and remove the test on
_GL_WORK_AROUND_LLVM_BUG_59792.

7 months agooptions: Fix typo in comment.
Bruno Haible [Fri, 27 Jun 2025 16:52:10 +0000 (18:52 +0200)] 
options: Fix typo in comment.

Patch by Antonio Diaz Diaz <antonio@gnu.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-06/msg00300.html>.

* lib/options.h: Fix typo in comment.

7 months agooptions: Add tests.
Bruno Haible [Fri, 27 Jun 2025 13:30:23 +0000 (15:30 +0200)] 
options: Add tests.

* tests/test-options.c: New file, based on tests/test-getopt_long.h.
* tests/test-options-prog.c: New file.
* modules/options-tests: New file.

7 months agooptions: New module.
Bruno Haible [Fri, 27 Jun 2025 13:27:24 +0000 (15:27 +0200)] 
options: New module.

* lib/options.h: New file.
* lib/options.c: New file.
* modules/options: New file.
* doc/glibc-functions/getopt_long.texi: Mention the new module.

7 months agokwset: Improve header file.
Bruno Haible [Thu, 26 Jun 2025 20:59:02 +0000 (22:59 +0200)] 
kwset: Improve header file.

* lib/kwset.h (kwsalloc): Clarify size of trans parameter. Add
_GL_ATTRIBUTE_RETURNS_NONNULL attribute.
(kwswords): Add specification comment.
(kwsincr, kwswords, kwsprep, kwsexec, kwsfree): Add _GL_ARG_NONNULL
attribute.

7 months agokwset: Add specification comments in .h file.
Bruno Haible [Thu, 26 Jun 2025 20:46:40 +0000 (22:46 +0200)] 
kwset: Add specification comments in .h file.

* lib/kwset.h (kwsalloc, kwsincr, kwsprep, kwsexec, kwsfree): Move
specification to here...
* lib/kwset.c (kwsalloc, kwsincr, kwsprep, kwsexec, kwsfree): ...from
here.

7 months agoregex: fix parse_bracket_exp double-free
Paul Eggert [Thu, 26 Jun 2025 17:54:14 +0000 (10:54 -0700)] 
regex: fix parse_bracket_exp double-free

Problem reported by Anastasia Belova in:
https://sourceware.org/pipermail/libc-alpha/2025-June/168231.html
* lib/regcomp.c (parse_bracket_exp): Avoid double-free
when storage allocation fails in create_token_tree.

7 months agoautoupdate
Karl Berry [Thu, 26 Jun 2025 14:40:04 +0000 (07:40 -0700)] 
autoupdate