]> git.ipfire.org Git - thirdparty/gnulib.git/log
thirdparty/gnulib.git
3 weeks agosigprocmask: Allow single-thread optimization in a more reliable way.
Bruno Haible [Wed, 1 Apr 2026 20:45:55 +0000 (22:45 +0200)] 
sigprocmask: Allow single-thread optimization in a more reliable way.

* modules/sigprocmask: Revert last change.
* lib/sigprocmask.c: Test GNULIB_SIGPROCMASK_SINGLE_THREAD before
including glthread/lock.h.
* doc/multithread.texi: Document GNULIB_SIGPROCMASK_SINGLE_THREAD.

3 weeks agolock: Document backward-incompatible change from yesterday.
Bruno Haible [Wed, 1 Apr 2026 20:33:56 +0000 (22:33 +0200)] 
lock: Document backward-incompatible change from yesterday.

* NEWS: Add note about 'lock' module.

3 weeks agogettext-h: Revert most of last change.
Bruno Haible [Wed, 1 Apr 2026 20:20:21 +0000 (22:20 +0200)] 
gettext-h: Revert most of last change.

* m4/gettext_h.m4 (gl_GETTEXT_H): Revert last change.
* lib/gettext.h: Revert last change.
(LC_MESSAGES): Define fallback like in locale.in.h.

3 weeks agombs_endswith, mbs_startswith: port to mcel-prefer
Paul Eggert [Wed, 1 Apr 2026 18:41:53 +0000 (11:41 -0700)] 
mbs_endswith, mbs_startswith: port to mcel-prefer

* lib/mbs_endswith.c (mbs_endswith):
* lib/mbs_startswith.c (mbs_startswith):
If GNULIB_MCEL_PREFER, prefer the mcel.h API and semantics.

3 weeks agoyesno: treat unlocking similarly if !ENABLE_NLS
Paul Eggert [Wed, 1 Apr 2026 18:34:42 +0000 (11:34 -0700)] 
yesno: treat unlocking similarly if !ENABLE_NLS

If the application is using unlocked-io, do that in the
!ENABLE_NLS case too.  This is more for consistency than for
performance in the typical case.
* lib/yesno.c [USE_UNLOCKED_IO]: Include unlocked-io.h.

3 weeks agoautoupdate
Karl Berry [Wed, 1 Apr 2026 14:12:55 +0000 (07:12 -0700)] 
autoupdate

3 weeks agosigprocmask: allow --avoid=lock
Paul Eggert [Wed, 1 Apr 2026 02:54:46 +0000 (19:54 -0700)] 
sigprocmask: allow --avoid=lock

* modules/sigprocmask (Files): Add lib/glthread/lock.h,
so that this module works even if the lock module is avoided.
This is useful for gzip, which does not use multithreading.

3 weeks agothread: lessen glthread namespace pollution
Paul Eggert [Wed, 1 Apr 2026 02:51:36 +0000 (19:51 -0700)] 
thread: lessen glthread namespace pollution

In lib/glthread/*.h, avoid including files if it’s easy, and if
the files are not needed in the .h file to implement the module.
* lib/glthread/cond.h: Include glthread/lock.h only if needed.
* lib/glthread/lock.c, lib/glthread/once.c: Include <errno.h> here ...
* lib/glthread/lock.h, lib/glthread/once.h: ... instead of here.
* lib/glthread/lock.h: Include glthread/once.h only if needed.
* lib/glthread/yield.h: Don’t include <errno.h>.

3 weeks agogettext-h: don’t depend on locale-h
Paul Eggert [Tue, 31 Mar 2026 23:38:47 +0000 (16:38 -0700)] 
gettext-h: don’t depend on locale-h

This is useful for apps like gzip.h that stay in the C locale
and don’t need all the the locale-h machinery.
* lib/gettext.h: Include <locale.h> only if !ENABLE_NLS && __sun.
(pgettext, dpgettext, npgettext, dnpgettext, pgettext_expr)
(npgettext_expr): Use _GL_LC_MESSAGES, not LC_MESSAGES.
* m4/gettext_h.m4 (gl_GETTEXT_H): Define _GL_LC_MESSAGES.
* modules/gettext-h (Depends-on): Remove locale-h.

4 weeks agofenv-exceptions-trapping: Work around mingw 14.0.0 bug.
Bruno Haible [Tue, 31 Mar 2026 06:44:44 +0000 (08:44 +0200)] 
fenv-exceptions-trapping: Work around mingw 14.0.0 bug.

* doc/glibc-functions/feenableexcept.texi: Mention the mingw 14.0.0 bug.

4 weeks agofenv-exceptions-trapping: Work around mingw 14.0.0 bug.
Bruno Haible [Mon, 30 Mar 2026 20:12:50 +0000 (22:12 +0200)] 
fenv-exceptions-trapping: Work around mingw 14.0.0 bug.

* m4/fenv-exceptions-trapping.m4 (gl_FENV_EXCEPTIONS_TRAPPING): Override
feenableexcept, fedisableexcept also on mingw.

4 weeks agorenameatu tests: Enhance test of the RENAME_* macros.
Bruno Haible [Mon, 30 Mar 2026 10:19:35 +0000 (12:19 +0200)] 
renameatu tests: Enhance test of the RENAME_* macros.

* tests/test-renameatu.c (main): Test that the RENAME_* macro values are
disjoint.

4 weeks agorenameatu tests: Test that the RENAME_* macros are defined.
Collin Funk [Mon, 30 Mar 2026 03:29:48 +0000 (20:29 -0700)] 
renameatu tests: Test that the RENAME_* macros are defined.

* tests/test-renameatu.c (main): Test that the RENAME_* macros are
defined and unique.

4 weeks agorenameatu: Ensure all RENAME_* macros are defined.
Collin Funk [Mon, 30 Mar 2026 03:27:33 +0000 (20:27 -0700)] 
renameatu: Ensure all RENAME_* macros are defined.

* lib/renameatu.h (RENAME_EXCHANGE) [!RENAME_EXCHANGE]: Define macro.
(RENAME_WHITEOUT) [!RENAME_WHITEOUT]: Likewise.

4 weeks agognu-web-doc-update: Add an environment variable for the CVS username
Collin Funk [Fri, 27 Mar 2026 02:59:19 +0000 (19:59 -0700)] 
gnu-web-doc-update: Add an environment variable for the CVS username

* build-aux/gnu-web-doc-update (help): Mention the SAVANNAH_CVS_USER
environment variable.
($cvs_user): Use the SAVANNAH_CVS_USER environment variable and fallback
to USER if it is unset or empty.

4 weeks agodoc: Mention a Solaris 11.4 bug.
Collin Funk [Wed, 25 Mar 2026 03:11:36 +0000 (20:11 -0700)] 
doc: Mention a Solaris 11.4 bug.

* doc/posix-functions/open.texi: Mention that Solaris 11.4 sets errno to
EINVAL instead of EISDIR when open is called on a directory with
O_CREAT.
* doc/posix-functions/openat.texi: Likewise.

5 weeks agoFix typos in recent ChangeLog entry.
Bruno Haible [Sat, 21 Mar 2026 10:40:36 +0000 (11:40 +0100)] 
Fix typos in recent ChangeLog entry.

5 weeks agovasprintf-posix, vasprintf, stdio-windows: Prefer AC_CHECK_FUNCS_ONCE.
Collin Funk [Sat, 21 Mar 2026 01:43:34 +0000 (18:43 -0700)] 
vasprintf-posix, vasprintf, stdio-windows: Prefer AC_CHECK_FUNCS_ONCE.

* m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Use
AC_CHECK_FUNCS_ONCE instead of AC_CHECK_FUNCS.
* m4/vasprintf.m4 (gl_FUNC_VASPRINTF): Likewise.
* modules/stdio-windows: Likewise.

5 weeks agonstrftime: revert size typo non-fix
Paul Eggert [Fri, 20 Mar 2026 23:24:48 +0000 (16:24 -0700)] 
nstrftime: revert size typo non-fix

(Thanks to Bruno Haible.)

5 weeks agobyteswap: depend on stdbit-h, not stdint-h
Paul Eggert [Fri, 20 Mar 2026 22:31:37 +0000 (15:31 -0700)] 
byteswap: depend on stdbit-h, not stdint-h

* lib/byteswap.in.h: Do not include stdint.h, as stdbit.h suffices.
* modules/byteswap (Depends-on): Depend on stdbit-h, not stdint-h.

5 weeks agocountof-h: use countof, part 3
Paul Eggert [Fri, 20 Mar 2026 21:41:55 +0000 (14:41 -0700)] 
countof-h: use countof, part 3

* lib/nproc.c, lib/regex_internal.h, lib/set-permissions.c:
* lib/strftime.c:
Include <stdcountof.h>.
* lib/nproc.c (ARRAY_SIZE):
* lib/sig2str.c (NUNNAME_ENTRIES):
Remove.  All uses replaced with countof.
* lib/regcomp.c (regerror):
* lib/set-permissions.c (set_acls_from_mode):
* lib/strftime.c (__strftime_internal):
Use countof instead of doing it by hand.
* modules/acl-permissions, modules/c-nstrftime, modules/fprintftime:
* modules/nproc, modules/regex, modules/nstrftime:
* modules/nstrftime-limited, modules/sig2str:
Depend on stdcountof-h.

5 weeks agoboot-time: remove SIZEOF
Paul Eggert [Fri, 20 Mar 2026 21:30:53 +0000 (14:30 -0700)] 
boot-time: remove SIZEOF

* lib/boot-time-aux.h (SIZEOF): Remove; no longer used,
now that the code uses countof.

5 weeks agonstrftime: fix size typo when compiling for glibc
Paul Eggert [Fri, 20 Mar 2026 20:56:29 +0000 (13:56 -0700)] 
nstrftime: fix size typo when compiling for glibc

* lib/strftime.c (c_weekday_names, c_month_names) [COMPILE_WIDE]:
Fix size typo.

6 weeks agostdbit-h: don’t generate some dummy .o files
Paul Eggert [Mon, 16 Mar 2026 22:17:26 +0000 (15:17 -0700)] 
stdbit-h: don’t generate some dummy .o files

On recent GNU and other C23ish platforms, do not compile files
like lib/stdc_bit_ceil.c, as the corresponding .o files contain
nothing useful.
* m4/stdbit_h.m4 (gl_STDBIT_H):
Define the Automake condition GL_HAVE_STDBIT_H.
Quote cache variables in case the cache is bad.
* modules/stdc_bit_ceil, modules/stdc_bit_floor:
* modules/stdc_bit_width, modules/stdc_count_ones:
* modules/stdc_count_zeros, modules/stdc_first_leading_one:
* modules/stdc_first_leading_zero:
* modules/stdc_first_trailing_one:
* modules/stdc_first_trailing_zero, modules/stdc_has_single_bit:
* modules/stdc_leading_ones, modules/stdc_leading_zeros:
* modules/stdc_trailing_ones, modules/stdc_trailing_zeros:
Generate if !GL_HAVE_STDBIT_H, not if GL_GENERATE_STDBIT_H.

6 weeks agocygpath: Add reminder to include <config.h>.
Collin Funk [Mon, 16 Mar 2026 19:25:28 +0000 (12:25 -0700)] 
cygpath: Add reminder to include <config.h>.

* lib/cygpath.h: Check that config.h was already included so
_GL_ATTRIBUTE_MALLOC and _GL_ATTRIBUTE_DEALLOC_FREE are defined.

6 weeks agostdc_memrevers8u: Add comment.
Bruno Haible [Mon, 16 Mar 2026 19:42:58 +0000 (20:42 +0100)] 
stdc_memrevers8u: Add comment.

* lib/stdbit.in.h (stdc_memreverse8u*): Add comment regarding
uint_leastN_t.

6 weeks agostdbit-h: Make code more readable and typo-proof.
Bruno Haible [Mon, 16 Mar 2026 19:30:13 +0000 (20:30 +0100)] 
stdbit-h: Make code more readable and typo-proof.

* lib/stdbit.in.h (stdc_load8_beu16, stdc_load8_beu32, stdc_load8_beu64,
stdc_load8_leu16, stdc_load8_leu32, stdc_load8_leu64): Avoid declaring
multiple variables in one declaration.

6 weeks agostdbit-h: don’t memcpy on oddball hosts
Paul Eggert [Mon, 16 Mar 2026 19:18:23 +0000 (12:18 -0700)] 
stdbit-h: don’t memcpy on oddball hosts

Mostly-theoretical problem reported by Lasse Collin in:
https://lists.gnu.org/r/bug-gnulib/2026-03/msg00135.html
* lib/stdbit.in.h (_GL_STDBIT_OPTIMIZE_VIA_MEMCPY):
Do not define to 1 on oddball hosts.

6 weeks agostdbit-h: be clearer about castless conversion
Paul Eggert [Mon, 16 Mar 2026 16:10:00 +0000 (09:10 -0700)] 
stdbit-h: be clearer about castless conversion

* lib/stdbit.in.h (stdc_load8_beu16, stdc_load8_beu32)
(stdc_load8_beu64, stdc_load8_leu16, stdc_load8_leu32)
(stdc_load8_leu64): Assign to temporaries rather than ORing to zero.

6 weeks agostdc_rotate_left, stdc_rotate_right: Update documentation.
Bruno Haible [Mon, 16 Mar 2026 12:31:59 +0000 (13:31 +0100)] 
stdc_rotate_left, stdc_rotate_right: Update documentation.

* doc/posix-functions/stdc_rotate_left.texi: Document the effects of the
new module.
* doc/posix-functions/stdc_rotate_right.texi: Likewise.

6 weeks agostdbit-h: Reorder definitions.
Bruno Haible [Mon, 16 Mar 2026 09:12:46 +0000 (10:12 +0100)] 
stdbit-h: Reorder definitions.

* lib/stdbit.in.h: Move private helper macros and functions to the
section conditionalized by @GNULIB_STDC_LEADING_ZEROS@,
@GNULIB_STDC_TRAILING_ZEROS@, @GNULIB_STDC_COUNT_ONES@, respectively.

6 weeks agostdbit-h: Fix syntax error in C++ mode (regression 2026-03-12).
Bruno Haible [Mon, 16 Mar 2026 08:45:45 +0000 (09:45 +0100)] 
stdbit-h: Fix syntax error in C++ mode (regression 2026-03-12).

* lib/stdbit.in.h: Move the 'extern "C" {' outside of the
'#if !@HAVE_STDBIT_H@'.

6 weeks agostdbit-h: remove stdbit.c
Paul Eggert [Mon, 16 Mar 2026 06:54:59 +0000 (23:54 -0700)] 
stdbit-h: remove stdbit.c

lib/stdbit.c was present only to define private helper functions.
Move them into lib/stdc_leading_zeros.c and
lib/stdc_trailing_zeros.c, depending on what they help.
The latter now might use the former, since the
_gl_stdbit_ctz family calls the _gl_stdbit_clz family
when !defined _GL_STDBIT_HAS_BUILTIN_CTZ && !defined _MSC_VER,
so stdc_trailing_zeros now depends on stdc_leading_zeros.
* lib/stdbit.c: Remove file.
* lib/stdbit.in.h (_GL_STDBIT_INLINE): Remove.
All uses replaced by _GL_STDC_LEADING_ZEROS_INLINE
or _GL_STDC_TRAILING_ZEROS_INLINE.
* modules/stdbit-h (Files, lib_SOURCES): Remove lib/stdbit.c.
* modules/stdc_trailing_zeros (Depends-on): Add stdc_leading_zeros.

6 weeks agostdbit-h: test without <stdint.h>
Paul Eggert [Mon, 16 Mar 2026 06:54:58 +0000 (23:54 -0700)] 
stdbit-h: test without <stdint.h>

Improve the <stdbit.h> tests so that they check
that <stdbit.h> works even if <stdint.h> is not included.
* modules/stdc_bit_ceil-tests, modules/stdc_bit_floor-tests:
* modules/stdc_bit_width-tests, modules/stdc_count_ones-tests:
* modules/stdc_count_zeros-tests:
* modules/stdc_first_leading_one-tests:
* modules/stdc_first_leading_zero-tests:
* modules/stdc_first_trailing_one-tests:
* modules/stdc_first_trailing_zero-tests:
* modules/stdc_has_single_bit-tests:
* modules/stdc_leading_ones-tests:
* modules/stdc_leading_zeros-tests:
* modules/stdc_trailing_ones-tests:
* modules/stdc_trailing_zeros-tests:
(Depends-on): Remove stdint-h.
* tests/from-glibc/tst-stdbit.h [GNULIB_TEST_STDBIT]:
Do not include <stdint.h>.

6 weeks agostdbit-h: don’t depend on stdint-h
Paul Eggert [Mon, 16 Mar 2026 06:54:58 +0000 (23:54 -0700)] 
stdbit-h: don’t depend on stdint-h

* modules/stdc_load8, modules/stdc_load8_aligned:
* modules/stdc_store8, modules/stdc_store8_aligned:
* modules/stdc_memreverse8u:
(Depends-on): Remove stdint-h, as Gnulib should be able to assume
the small subset of C99 <stdint.h> that stdbit.in.h uses.

6 weeks agostdbit-h: namespace cleanup on recent GNU
Paul Eggert [Mon, 16 Mar 2026 06:54:58 +0000 (23:54 -0700)] 
stdbit-h: namespace cleanup on recent GNU

* lib/stdbit.in.h: Include <stddef.h> if !@HAVE_STDBIT_H@, good on
all known Gnulib targets, not if @GNULIB_STDC_MEMREVERSE8@, which
is not quite right because C23 requires that stdbit.h define
size_t even if stdc_memreverse8 is not used.
Do not include <stdint.h> if @HAVE_STDBIT_H@ && defined
__UINT_FAST64_TYPE__, as it is no longer needed.
(_GL_STDBIT_UINT_FAST16, _GL_STDBIT_UINT_FAST32)
(_GL_STDBIT_UINT_FAST64): New macros.  Use them instead of
uint_fast16_t etc., to avoid namespace pollution.
(stdc_load8_beu16, stdc_load8_beu32, stdc_load8_beu64)
(stdc_load8_leu16, stdc_load8_leu32, stdc_load8_leu64):
Use them instead of casting to the relevant types,
to avoid the need for casts.

6 weeks agotest-stdc_rotate_right tests: Fix whitespace.
Collin Funk [Mon, 16 Mar 2026 05:29:25 +0000 (22:29 -0700)] 
test-stdc_rotate_right tests: Fix whitespace.

* tests/test-stdc_rotate_right.c (TEST_CASE): Remove extra space
character.

6 weeks agodoc: add missing module indexes.
Collin Funk [Mon, 16 Mar 2026 05:27:18 +0000 (22:27 -0700)] 
doc: add missing module indexes.

Reported by Bruno Haible in
<https://lists.gnu.org/r/bug-gnulib/2026-03/msg00124.html>.

* doc/posix-functions/stdc_rotate_left.texi: Add missing module index.
* doc/posix-functions/stdc_rotate_right.texi: Likewise.

6 weeks agostdc_rotate_right: Add tests.
Collin Funk [Mon, 16 Mar 2026 00:01:40 +0000 (17:01 -0700)] 
stdc_rotate_right: Add tests.

* modules/stdc_rotate_right-tests: New file.
* tests/test-stdc_rotate_right.c: Likewise.

6 weeks agostdc_rotate_right: New module.
Collin Funk [Mon, 16 Mar 2026 00:00:38 +0000 (17:00 -0700)] 
stdc_rotate_right: New module.

* lib/stdbit.in.h (_GL_STDC_ROTATE_RIGHT_INLINE, _gl_stdc_rotate_right)
(stdc_rotate_right): New macros.
(stdc_rotate_right_uc, stdc_rotate_right_us, stdc_rotate_right_ui)
(stdc_rotate_right_ul, stdc_rotate_right_ull): New functions.
* lib/stdc_rotate_right.c: New file.
* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STDC_ROTATE_RIGHT.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_ROTATE_RIGHT.
* modules/stdc_rotate_right: New file.
* doc/posix-functions/stdc_rotate_right.texi: Mention the new module.

6 weeks agostdc_rotate_left: Add tests.
Collin Funk [Sun, 15 Mar 2026 23:53:26 +0000 (16:53 -0700)] 
stdc_rotate_left: Add tests.

* modules/stdc_rotate_left-tests: New file.
* tests/test-stdc_rotate_left.c: Likewise.

6 weeks agostdc_rotate_left: New module.
Collin Funk [Sun, 15 Mar 2026 23:48:45 +0000 (16:48 -0700)] 
stdc_rotate_left: New module.

* lib/stdbit.in.h (_GL_STDC_ROTATE_LEFT_INLINE, _gl_stdc_rotate_left)
(stdc_rotate_left): New macros.
(stdc_rotate_left_uc, stdc_rotate_left_us, stdc_rotate_left_ui)
(stdc_rotate_left_ul, stdc_rotate_left_ull): New functions.
* lib/stdc_rotate_left.c: New file.
* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STDC_ROTATE_LEFT.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_ROTATE_LEFT.
* modules/stdc_rotate_left: New file.
* doc/posix-functions/stdc_rotate_left.texi: Mention the new module.

6 weeks agoposix_spawn-internal: Move private Gnulib functions to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 20:58:34 +0000 (21:58 +0100)] 
posix_spawn-internal: Move private Gnulib functions to _gl_* namespace.

* lib/spawn_int.h (_gl_posix_spawn_file_actions_realloc): Renamed from
gl_posix_spawn_file_actions_realloc.
(_gl_posix_spawn_internal): Renamed from gl_posix_spawn_internal.

6 weeks agolocale-h: Move private Gnulib functions to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 20:55:10 +0000 (21:55 +0100)] 
locale-h: Move private Gnulib functions to _gl_* namespace.

* lib/locale.in.h (_gl_log2_lc_mask): Renamed from gl_log2_lc_mask.
(_gl_log2_lcmask_to_index): Renamed from gl_log2_lcmask_to_index.
(_gl_index_to_log2_lcmask): Renamed from gl_index_to_log2_lcmask.
* lib/duplocale.c: Update.
* lib/freelocale.c: Update.
* lib/newlocale.c: Update.
* lib/getlocalename_l-unsafe.c: Update.
* lib/is_l-impl.h: Update.
* lib/to_l-impl.h: Update.
* lib/strcasecmp_l.c: Update.
* lib/strncasecmp_l.c: Update.
* lib/strerror_l.c: Update.

6 weeks agostrnul: Move private Gnulib functions to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 20:43:30 +0000 (21:43 +0100)] 
strnul: Move private Gnulib functions to _gl_* namespace.

* lib/string.in.h (_gl_strnul): Renamed from gl_strnul.
* lib/strnul.c: Update.

6 weeks agostdlib-h: Move private Gnulib functions to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 20:41:06 +0000 (21:41 +0100)] 
stdlib-h: Move private Gnulib functions to _gl_* namespace.

* lib/stdlib.in.h (_gl_MB_CUR_MAX): Renamed from gl_MB_CUR_MAX.

6 weeks agostdio-h, stdio-windows: Move private Gnulib functions to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 20:38:32 +0000 (21:38 +0100)] 
stdio-h, stdio-windows: Move private Gnulib functions to _gl_* namespace.

* lib/stdio.in.h (_gl_consolesafe_fwrite): Renamed from
gl_consolesafe_fwrite.
(_gl_consolesafe_fprintf): Renamed from gl_consolesafe_fprintf.
(_gl_consolesafe_printf): Renamed from gl_consolesafe_printf.
(_gl_consolesafe_vfprintf): Renamed from gl_consolesafe_vfprintf.
(_gl_consolesafe_vprintf): Renamed from gl_consolesafe_vprintf.
* lib/stdio-consolesafe.c: Update.
* lib/stdio-write.c: Update.

6 weeks agomath-h: Move private Gnulib functions to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 20:33:08 +0000 (21:33 +0100)] 
math-h: Move private Gnulib functions to _gl_* namespace.

* lib/math.in.h (_gl_isfinitef): Renamed from gl_isfinitef.
(_gl_isfinited): Renamed from gl_isfinited.
(_gl_isfinitel): Renamed from gl_isfinitel.
(_gl_isinff): Renamed from gl_isinff.
(_gl_isinfd): Renamed from gl_isinfd.
(_gl_isinfl): Renamed from gl_isinfl.
(_gl_isnanf): Renamed from gl_isnan_f.
(_gl_isnand): Renamed from gl_isnan_d.
(_gl_isnanl): Renamed from gl_isnan_l.
(_gl_signbitf): Renamed from gl_signbitf.
(_gl_signbitf_OPTIMIZED_MACRO): Renamed from
gl_signbitf_OPTIMIZED_MACRO.
(_gl_signbitd): Renamed from gl_signbitd.
(_gl_signbitd_OPTIMIZED_MACRO): Renamed from
gl_signbitd_OPTIMIZED_MACRO.
(_gl_signbitl): Renamed from gl_signbitl.
(_gl_signbitl_OPTIMIZED_MACRO): Renamed from
gl_signbitl_OPTIMIZED_MACRO.
* lib/isfinite.c: Update.
* lib/isinf.c: Update.
* lib/signbitf.c: Update.
* lib/signbitd.c: Update.
* lib/signbitl.c: Update.

6 weeks agofloat-h: Move private Gnulib data to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 18:42:36 +0000 (19:42 +0100)] 
float-h: Move private Gnulib data to _gl_* namespace.

* lib/float.in.h (_gl_LDBL_MAX): Renamed from gl_LDBL_MAX.
(_gl_LDBL_TRUE_MIN): Renamed from gl_LDBL_TRUE_MIN.
(_gl_FLT_SNAN): Renamed from gl_FLT_SNAN.
(_gl_DBL_SNAN): Renamed from gl_DBL_SNAN.
(_gl_LDBL_SNAN): Renamed from gl_LDBL_SNAN.
* lib/float.c: Update.

6 weeks agoexpl, exp2l: Move private Gnulib data to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 18:36:31 +0000 (19:36 +0100)] 
expl, exp2l: Move private Gnulib data to _gl_* namespace.

* lib/expl-table.c (_gl_expl_table): Renamed from gl_expl_table.
* lib/expl.c: Update.
* lib/exp2l.c: Update.

6 weeks agomsvc-inval: Move private Gnulib functions to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 18:32:44 +0000 (19:32 +0100)] 
msvc-inval: Move private Gnulib functions to _gl_* namespace.

* lib/msvc-inval.h (_gl_msvc_inval_current): Renamed from
gl_msvc_inval_current.
* lib/msvc-inval.c: Update.

6 weeks agoglibc-internal/scratch_buffer: Move private Gnulib functions to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 17:50:24 +0000 (18:50 +0100)] 
glibc-internal/scratch_buffer: Move private Gnulib functions to _gl_* namespace.

* lib/scratch_buffer.h (__libc_scratch_buffer_*): Define to symbols in
the _gl_* namespace.

6 weeks agoglibc-internal/dynarray: Move private Gnulib functions to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 17:45:07 +0000 (18:45 +0100)] 
glibc-internal/dynarray: Move private Gnulib functions to _gl_* namespace.

* lib/dynarray.h (__libc_dynarray_*): Define to symbols in the _gl_*
namespace.

6 weeks agoat-init: Move private Gnulib functions to _gl_* namespace.
Bruno Haible [Sun, 15 Mar 2026 17:38:48 +0000 (18:38 +0100)] 
at-init: Move private Gnulib functions to _gl_* namespace.

* lib/at-init.h (_gl_at_init_dummy): Renamed from gl_at_init_dummy.
* lib/at-init.c: Update.

6 weeks agostdc_memreverse8: Add tests.
Bruno Haible [Sun, 15 Mar 2026 13:48:43 +0000 (14:48 +0100)] 
stdc_memreverse8: Add tests.

* tests/test-stdc_memreverse8.c: New file.
* modules/stdc_memreverse8-tests: New file.

6 weeks agostdc_memreverse8: New module.
Bruno Haible [Sun, 15 Mar 2026 13:35:48 +0000 (14:35 +0100)] 
stdc_memreverse8: New module.

* lib/stdbit.in.h: Include <stddef.h>.
(_GL_STDC_MEMREVERSE8_INLINE): New macro.
(stdc_memreverse8): New function.
* lib/stdc_memreverse8.c: New file.
* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STDC_MEMREVERSE8.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_MEMREVERSE8.
* modules/stdc_memreverse8: New file.
* doc/posix-functions/stdc_memreverse8.texi: Mention the new module.

6 weeks agobyteswap: Rely on <stdbit.h>.
Bruno Haible [Sun, 15 Mar 2026 12:30:37 +0000 (13:30 +0100)] 
byteswap: Rely on <stdbit.h>.

* lib/byteswap.in.h: Include <stdbit.h>.
(_GL_BYTESWAP_HAS_BUILTIN_BSWAP16, _GL_BYTESWAP_HAS_BUILTIN_BSWAP32,
_GL_BYTESWAP_HAS_BUILTIN_BSWAP64): Remove macros.
(bswap_16): Just call stdc_memreverse8u16.
(bswap_32): Just call stdc_memreverse8u32.
(bswap_64): Just call stdc_memreverse8u64.
* modules/byteswap (Depends-on): Add stdc_memreverse8u. Remove bool.

6 weeks agostdc_load8_aligned, stdc_store8_aligned: Don't use <byteswap.h>.
Bruno Haible [Sun, 15 Mar 2026 12:24:24 +0000 (13:24 +0100)] 
stdc_load8_aligned, stdc_store8_aligned: Don't use <byteswap.h>.

* lib/stdbit.in.h: Don't include <byteswap.h>.
(_GL_STDBIT_BSWAP16, _GL_STDBIT_BSWAP32, _GL_STDBIT_BSWAP64): Remove
macros.
(stdc_memreverse8u8, stdc_memreverse8u16, stdc_memreverse8u32,
stdc_memreverse8u64): Generalize: Take uint_least* parameter.
(stdc_load8_aligned_*, stdc_store8_aligned_*): Use stdc_memreverse8u16,
stdc_memreverse8u32, stdc_memreverse8u64 instead of _GL_STDBIT_BSWAP16,
_GL_STDBIT_BSWAP32, _GL_STDBIT_BSWAP64.

6 weeks agostdc_memreverse8u: Add tests.
Bruno Haible [Sun, 15 Mar 2026 12:05:20 +0000 (13:05 +0100)] 
stdc_memreverse8u: Add tests.

* tests/test-stdc_memreverse8u.c: New file, based on
tests/test-byteswap.c.
* modules/stdc_memreverse8u-tests: New file.

6 weeks agostdc_memreverse8u: New module.
Bruno Haible [Sun, 15 Mar 2026 12:01:49 +0000 (13:01 +0100)] 
stdc_memreverse8u: New module.

* lib/stdbit.in.h (_GL_STDC_MEMREVERSE8U_INLINE): New macro.
(stdc_memreverse8u8, stdc_memreverse8u16, stdc_memreverse8u32,
stdc_memreverse8u64): New functions, based on lib/byteswap.in.h.
* lib/stdc_memreverse8u.c: New file.
* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STDC_MEMREVERSE8U.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_MEMREVERSE8U.
* modules/stdc_memreverse8u: New file.
* doc/posix-functions/stdc_memreverse8u8.texi: Mention the new module.
* doc/posix-functions/stdc_memreverse8u16.texi: Likewise.
* doc/posix-functions/stdc_memreverse8u32.texi: Likewise.
* doc/posix-functions/stdc_memreverse8u64.texi: Likewise.

6 weeks agohamt: Don't use deprecated module.
Bruno Haible [Sun, 15 Mar 2026 09:13:52 +0000 (10:13 +0100)] 
hamt: Don't use deprecated module.

* lib/hamt.c: Include <stdbit.h> instead of count-one-bits.h.
(trienode_count, subtrie_lookup, subtrie_insert, subtrie_remove): Call
stdc_count_ones instead of count_one_bits.
* modules/hamt (Depends-on): Add stdc_count_ones. Remove count-one-bits.

6 weeks agocount-*: Fix module status (regression yesterday).
Bruno Haible [Sun, 15 Mar 2026 09:01:57 +0000 (10:01 +0100)] 
count-*: Fix module status (regression yesterday).

* modules/count-leading-zeros: Mark as deprecated, not obsolete.
Recommend module 'stdc_leading_zeros' instead of 'stdbit'.
* modules/count-trailing-zeros: Mark as deprecated, not obsolete.
Recommend module 'stdc_trailing_zeros' instead of 'stdbit'.
* modules/count-one-bits: Mark as deprecated, not obsolete. Recommend
module 'stdc_count_ones' instead of 'stdbit'.
* NEWS: Update.

6 weeks agostdbit: obsolete older count-* modules
Paul Eggert [Sun, 15 Mar 2026 01:54:36 +0000 (18:54 -0700)] 
stdbit: obsolete older count-* modules

* modules/count-leading-zeros:
* modules/count-one-bits:
* modules/count-trailing-zeros: Now obsolete,
as the stdbit module is now mature enough.

6 weeks agostdbit-h: avoid <byteswap.h> namespace pollution
Paul Eggert [Sat, 14 Mar 2026 22:15:50 +0000 (15:15 -0700)] 
stdbit-h: avoid <byteswap.h> namespace pollution

* lib/stdbit.in.h (_GL_STDBIT_HAS_BUILTIN_BSWAP16)
(_GL_STDBIT_HAS_BUILTIN_BSWAP32, _GL_STDBIT_HAS_BUILTIN_BSWAP64)
(_GL_STDBIT_BSWAP16, _GL_STDBIT_BSWAP32, _GL_STDBIT_BSWAP64):
New macros.  All uses of bswap_16, bswap_32, bswap_64 changed.

6 weeks agostdbit-h: avoid <string.h> namespace pollution
Paul Eggert [Sat, 14 Mar 2026 21:27:18 +0000 (14:27 -0700)] 
stdbit-h: avoid <string.h> namespace pollution

* lib/stdbit.in.h (_GL_STDBIT_MEMCPY): New macro.
All uses of memcpy changed.

6 weeks agostdbit-h: __has_builtin (__builtin_assume_aligned)
Paul Eggert [Sat, 14 Mar 2026 20:07:54 +0000 (13:07 -0700)] 
stdbit-h: __has_builtin (__builtin_assume_aligned)

Prefer the usual pattern for checking for builtins:
allow __has_builtin for compilers that are not Clang or GCC
where we already have something.
* lib/stdbit.in.h (_GL_HAS_BUILTIN_ASSUME_ALIGNED): New macro.
(_GL_STDBIT_ASSUME_ALIGNED): Use it.

6 weeks agodoc: assume copy to int preserves low order bits
Paul Eggert [Sat, 14 Mar 2026 19:23:13 +0000 (12:23 -0700)] 
doc: assume copy to int preserves low order bits

6 weeks agodoc: fix typos re Unisys ClearPath Libra
Paul Eggert [Sat, 14 Mar 2026 19:21:55 +0000 (12:21 -0700)] 
doc: fix typos re Unisys ClearPath Libra

6 weeks agostdbit-h: adjust comments to match code
Paul Eggert [Sat, 14 Mar 2026 18:30:35 +0000 (11:30 -0700)] 
stdbit-h: adjust comments to match code

* lib/stdbit.in.h: Adjust commentary to match code’s types
and use of if rather than #if.

6 weeks agostdbit-h: restore optimization for RISC-V etc
Paul Eggert [Sat, 14 Mar 2026 00:44:06 +0000 (17:44 -0700)] 
stdbit-h: restore optimization for RISC-V etc

Problem reported by Bruno Haible in:
https://lists.gnu.org/r/bug-gnulib/2026-03/msg00098.html
This patch does the optimization in a different way,
preferring plain ‘if’ to ‘#if’ if either will do.
* lib/stdbit.in.h: Bring back includes for byteswap.h, string.h.
(_GL_STDBIT_OPTIMIZE_VIA_MEMCPY, _GL_STDBIT_ASSUME_ALIGNED)
(_GL_STDBIT_BIGENDIAN): New macros.
(stdc_load8_beu16, stdc_load8_leu16):
Bring back casts to uint_fast16_t.
(stdc_load8_aligned_beu16, stdc_load8_aligned_beu32)
(stdc_load8_aligned_beu64, stdc_load8_aligned_leu16)
(stdc_load8_aligned_leu32, stdc_load8_aligned_leu64)
(stdc_load8_aligned_bes8, stdc_load8_aligned_bes16)
(stdc_load8_aligned_bes32, stdc_load8_aligned_bes64)
(stdc_load8_aligned_les8, stdc_load8_aligned_les16)
(stdc_load8_aligned_les32, stdc_load8_aligned_les64)
(stdc_store8_aligned_beu16, stdc_store8_aligned_beu32)
(stdc_store8_aligned_beu64, stdc_store8_aligned_leu16)
(stdc_store8_aligned_leu32, stdc_store8_aligned_leu64)
(stdc_store8_aligned_bes8, stdc_store8_aligned_bes16)
(stdc_store8_aligned_bes32, stdc_store8_aligned_bes64)
(stdc_store8_aligned_les8, stdc_store8_aligned_les16)
(stdc_store8_aligned_les32, stdc_store8_aligned_les64):
Bring back the memcpy optimization if _GL_STDBIT_OPTIMIZE_VIA_MEMCPY.
* modules/stdc_load8_aligned (Depends-on):
* modules/stdc_store8_aligned (Depends-on):
Go back to depending on byteswap.

6 weeks agostdbit-h: fewer casts
Paul Eggert [Fri, 13 Mar 2026 19:29:50 +0000 (12:29 -0700)] 
stdbit-h: fewer casts

* lib/stdbit.in.h (stdc_load8_beu16, stdc_load8_leu16)
(stdc_store8_beu16, stdc_store8_beu32, stdc_store8_beu64)
(stdc_store8_leu16, stdc_store8_leu32, stdc_store8_leu64):
Avoid unnecessary and sometimes-confusing casts.

6 weeks agostdbit-h: simplify stdc_{load,store)_[bl]e[s]*
Paul Eggert [Fri, 13 Mar 2026 19:25:11 +0000 (12:25 -0700)] 
stdbit-h: simplify stdc_{load,store)_[bl]e[s]*

* lib/stdbit.in.h (stdc_load8_bes8, stdc_load8_bes16)
(stdc_load8_bes32, stdc_load8_bes64, stdc_load8_les8)
(stdc_load8_les16, stdc_load8_les32, stdc_load8_les64)
(stdc_store8_bes8, stdc_store8_bes16, stdc_store8_bes32)
(stdc_store8_bes64, stdc_store8_les8, stdc_store8_les16)
(stdc_store8_les32, stdc_store8_les64):
Simplify by deferring to the unsigned counterpart.

6 weeks agostdbit-h: simpler fix for -fno-strict-aliasing
Paul Eggert [Fri, 13 Mar 2026 18:53:13 +0000 (11:53 -0700)] 
stdbit-h: simpler fix for -fno-strict-aliasing

* lib/stdbit.in.h: Do not include byteswap.h.
(_GL_LOADSTORE8_VARIANT_A, _GL_LOADSTORE8_VARIANT_E)
(_GL_LOADSTORE8_VARIANT_F): Remove.
(stdc_load8_aligned_beu8, stdc_load8_aligned_beu16)
(stdc_load8_aligned_beu32, stdc_load8_aligned_beu64)
(stdc_load8_aligned_leu8, stdc_load8_aligned_leu16)
(stdc_load8_aligned_leu32, stdc_load8_aligned_leu64)
(stdc_load8_aligned_bes8, stdc_load8_aligned_bes16)
(stdc_load8_aligned_bes32, stdc_load8_aligned_bes64)
(stdc_load8_aligned_les8, stdc_load8_aligned_les16)
(stdc_load8_aligned_les32, stdc_load8_aligned_les64)
(stdc_store8_aligned_beu8, stdc_store8_aligned_beu16)
(stdc_store8_aligned_beu32, stdc_store8_aligned_beu64)
(stdc_store8_aligned_leu8, stdc_store8_aligned_leu16)
(stdc_store8_aligned_leu32, stdc_store8_aligned_leu64)
(stdc_store8_aligned_bes8, stdc_store8_aligned_bes16)
(stdc_store8_aligned_bes32, stdc_store8_aligned_bes64)
(stdc_store8_aligned_les8, stdc_store8_aligned_les16)
(stdc_store8_aligned_les32, stdc_store8_aligned_les64):
Simplifly by deferring to their unaligned counterparts.
* modules/stdc_load8_aligned (Depends-on):
Depend on stdc_load8, not byteswap.
* modules/stdc_store8_aligned (Depends-on):
Depend on stdc_store8, not byteswap.

6 weeks agostdbit-h: add test for recent aligned issue.
Paul Eggert [Fri, 13 Mar 2026 18:43:49 +0000 (11:43 -0700)] 
stdbit-h: add test for recent aligned issue.

Adapted from test by Lasse Collin <lasse.collin@tukaani.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2026-03/msg00094.html>.
* modules/stdc_store8_aligned-tests (Depends-on):
Depend on stdc_load8_aligned.
* tests/test-stdc_store8_aligned.c (test_strict_aliasing): New test.
(main): Use it.

6 weeks agostdc_load8_aligned, stdc_store8_aligned: Fix strict aliasing violations.
Bruno Haible [Fri, 13 Mar 2026 17:53:39 +0000 (18:53 +0100)] 
stdc_load8_aligned, stdc_store8_aligned: Fix strict aliasing violations.

Reported by Lasse Collin <lasse.collin@tukaani.org> in
<https://lists.gnu.org/archive/html/bug-gnulib/2026-03/msg00094.html>.

* lib/stdbit.in.h: Include <string.h>.
(_GL_LOADSTORE8_VARIANT_A, _GL_LOADSTORE8_VARIANT_E,
_GL_LOADSTORE8_VARIANT_F): New macros.
(stdc_load8_aligned_beu16, stdc_load8_aligned_beu32,
stdc_load8_aligned_beu64, stdc_load8_aligned_leu16,
stdc_load8_aligned_leu32, stdc_load8_aligned_leu64,
stdc_load8_aligned_bes8, stdc_load8_aligned_bes16,
stdc_load8_aligned_bes32, stdc_load8_aligned_bes64,
stdc_load8_aligned_les8, stdc_load8_aligned_les16,
stdc_load8_aligned_les32, stdc_load8_aligned_les64,
stdc_load8_bes8, stdc_load8_les8, stdc_store8_aligned_beu16,
stdc_store8_aligned_beu32, stdc_store8_aligned_beu64,
stdc_store8_aligned_leu16, stdc_store8_aligned_leu32,
stdc_store8_aligned_leu64, stdc_store8_aligned_bes8,
stdc_store8_aligned_bes16, stdc_store8_aligned_bes32,
stdc_store8_aligned_bes64, stdc_store8_aligned_les8,
stdc_store8_aligned_les16, stdc_store8_aligned_les32,
stdc_store8_aligned_les64): Don't cast a pointer to a pointer to a
different element type.

6 weeks agostdc_store8: Add tests.
Bruno Haible [Fri, 13 Mar 2026 08:07:17 +0000 (09:07 +0100)] 
stdc_store8: Add tests.

* tests/test-stdc_store8.c: New file, based on
tests/test-stdc_store8_aligned.c.
* modules/stdc_store8-tests: New file.

6 weeks agostdc_store8: New module.
Bruno Haible [Fri, 13 Mar 2026 07:48:11 +0000 (08:48 +0100)] 
stdc_store8: New module.

* lib/stdbit.in.h (_GL_STDC_STORE8_INLINE): New macro.
(stdc_store8_beu{8,16,32,64}, stdc_store8_leu{8,16,32,64},
stdc_store8_bes{8,16,32,64}, stdc_store8_les{8,16,32,64}): New
functions.
* lib/stdc_store8.c: New file.
* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STDC_STORE8.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_STORE8.
* modules/stdc_store8: New file.
* doc/posix-functions/stdc_store8_beu8.texi: Mention the new module.
* doc/posix-functions/stdc_store8_beu16.texi: Likewise.
* doc/posix-functions/stdc_store8_beu32.texi: Likewise.
* doc/posix-functions/stdc_store8_beu64.texi: Likewise.
* doc/posix-functions/stdc_store8_leu8.texi: Likewise.
* doc/posix-functions/stdc_store8_leu16.texi: Likewise.
* doc/posix-functions/stdc_store8_leu32.texi: Likewise.
* doc/posix-functions/stdc_store8_leu64.texi: Likewise.
* doc/posix-functions/stdc_store8_bes8.texi: Likewise.
* doc/posix-functions/stdc_store8_bes16.texi: Likewise.
* doc/posix-functions/stdc_store8_bes32.texi: Likewise.
* doc/posix-functions/stdc_store8_bes64.texi: Likewise.
* doc/posix-functions/stdc_store8_les8.texi: Likewise.
* doc/posix-functions/stdc_store8_les16.texi: Likewise.
* doc/posix-functions/stdc_store8_les32.texi: Likewise.
* doc/posix-functions/stdc_store8_les64.texi: Likewise.

6 weeks agostdc_store8_aligned: Add tests.
Bruno Haible [Fri, 13 Mar 2026 07:13:57 +0000 (08:13 +0100)] 
stdc_store8_aligned: Add tests.

* tests/test-stdc_store8_aligned.c: New file.
* modules/stdc_store8_aligned-tests: New file.

6 weeks agostdc_store8_aligned: New module.
Bruno Haible [Fri, 13 Mar 2026 06:57:41 +0000 (07:57 +0100)] 
stdc_store8_aligned: New module.

* lib/stdbit.in.h (_GL_STDC_STORE8_ALIGNED_INLINE): New macro.
(stdc_store8_aligned_beu{8,16,32,64},
stdc_store8_aligned_leu{8,16,32,64},
stdc_store8_aligned_bes{8,16,32,64},
stdc_store8_aligned_les{8,16,32,64}): New functions.
* lib/stdc_store8_aligned.c: New file.
* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STDC_STORE8_ALIGNED.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_STORE8_ALIGNED.
* modules/stdc_store8_aligned: New file.
* doc/posix-functions/stdc_store8_aligned_beu8.texi: Mention the new
module.
* doc/posix-functions/stdc_store8_aligned_beu16.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_beu32.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_beu64.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_leu8.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_leu16.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_leu32.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_leu64.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_bes8.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_bes16.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_bes32.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_bes64.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_les8.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_les16.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_les32.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_les64.texi: Likewise.

6 weeks agostdc_load8: Add tests.
Bruno Haible [Thu, 12 Mar 2026 19:38:27 +0000 (20:38 +0100)] 
stdc_load8: Add tests.

* tests/test-stdc_load8.c: New file, based on
tests/test-stdc_load8_aligned.c.
* modules/stdc_load8-tests: New file.

6 weeks agostdc_load8: New module.
Bruno Haible [Thu, 12 Mar 2026 19:37:13 +0000 (20:37 +0100)] 
stdc_load8: New module.

* lib/stdbit.in.h (_GL_STDC_LOAD8_INLINE): New macro.
(stdc_load8_beu{8,16,32,64}, stdc_load8_leu{8,16,32,64},
stdc_load8_bes{8,16,32,64}, stdc_load8_les{8,16,32,64}): New functions.
* lib/stdc_load8.c: New file.
* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STDC_LOAD8.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_LOAD8.
* modules/stdc_load8: New file.
* doc/posix-functions/stdc_load8_beu8.texi: Mention the new module.
* doc/posix-functions/stdc_load8_beu16.texi: Likewise.
* doc/posix-functions/stdc_load8_beu32.texi: Likewise.
* doc/posix-functions/stdc_load8_beu64.texi: Likewise.
* doc/posix-functions/stdc_load8_leu8.texi: Likewise.
* doc/posix-functions/stdc_load8_leu16.texi: Likewise.
* doc/posix-functions/stdc_load8_leu32.texi: Likewise.
* doc/posix-functions/stdc_load8_leu64.texi: Likewise.
* doc/posix-functions/stdc_load8_bes8.texi: Likewise.
* doc/posix-functions/stdc_load8_bes16.texi: Likewise.
* doc/posix-functions/stdc_load8_bes32.texi: Likewise.
* doc/posix-functions/stdc_load8_bes64.texi: Likewise.
* doc/posix-functions/stdc_load8_les8.texi: Likewise.
* doc/posix-functions/stdc_load8_les16.texi: Likewise.
* doc/posix-functions/stdc_load8_les32.texi: Likewise.
* doc/posix-functions/stdc_load8_les64.texi: Likewise.

6 weeks agostdc_load8_aligned: Add tests.
Bruno Haible [Thu, 12 Mar 2026 18:37:52 +0000 (19:37 +0100)] 
stdc_load8_aligned: Add tests.

* tests/test-stdc_load8_aligned.c: New file.
* modules/stdc_load8_aligned-tests: New file.

6 weeks agostdc_load8_aligned: New module.
Bruno Haible [Thu, 12 Mar 2026 14:31:41 +0000 (15:31 +0100)] 
stdc_load8_aligned: New module.

* lib/stdbit.in.h: Include <stdint.h>, <byteswap.h>.
(_GL_STDC_LOAD8_ALIGNED_INLINE): New macro.
(stdc_load8_aligned_beu{8,16,32,64}, stdc_load8_aligned_leu{8,16,32,64},
stdc_load8_aligned_bes{8,16,32,64}, stdc_load8_aligned_les{8,16,32,64}):
New functions.
* lib/stdc_load8_aligned.c: New file.
* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STDC_LOAD8_ALIGNED.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_LOAD8_ALIGNED.
* modules/stdc_load8_aligned: New file.
* doc/posix-functions/stdc_load8_aligned_beu8.texi: Mention the new
module.
* doc/posix-functions/stdc_load8_aligned_beu16.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_beu32.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_beu64.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_leu8.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_leu16.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_leu32.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_leu64.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_bes8.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_bes16.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_bes32.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_bes64.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_les8.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_les16.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_les32.texi: Likewise.
* doc/posix-functions/stdc_load8_aligned_les64.texi: Likewise.

6 weeks agodoc: Document C2y stdc_* <stdbit.h> functions, part 2.
Bruno Haible [Thu, 12 Mar 2026 12:06:23 +0000 (13:06 +0100)] 
doc: Document C2y stdc_* <stdbit.h> functions, part 2.

* doc/posix-functions/stdc_load8_aligned_bes8.texi: New file.
* doc/posix-functions/stdc_load8_aligned_bes16.texi: New file.
* doc/posix-functions/stdc_load8_aligned_bes32.texi: New file.
* doc/posix-functions/stdc_load8_aligned_bes64.texi: New file.
* doc/posix-functions/stdc_load8_aligned_beu8.texi: New file.
* doc/posix-functions/stdc_load8_aligned_beu16.texi: New file.
* doc/posix-functions/stdc_load8_aligned_beu32.texi: New file.
* doc/posix-functions/stdc_load8_aligned_beu64.texi: New file.
* doc/posix-functions/stdc_load8_bes8.texi: New file.
* doc/posix-functions/stdc_load8_bes16.texi: New file.
* doc/posix-functions/stdc_load8_bes32.texi: New file.
* doc/posix-functions/stdc_load8_bes64.texi: New file.
* doc/posix-functions/stdc_load8_beu8.texi: New file.
* doc/posix-functions/stdc_load8_beu16.texi: New file.
* doc/posix-functions/stdc_load8_beu32.texi: New file.
* doc/posix-functions/stdc_load8_beu64.texi: New file.
* doc/posix-functions/stdc_store8_aligned_bes8.texi: New file.
* doc/posix-functions/stdc_store8_aligned_bes16.texi: New file.
* doc/posix-functions/stdc_store8_aligned_bes32.texi: New file.
* doc/posix-functions/stdc_store8_aligned_bes64.texi: New file.
* doc/posix-functions/stdc_store8_aligned_beu8.texi: New file.
* doc/posix-functions/stdc_store8_aligned_beu16.texi: New file.
* doc/posix-functions/stdc_store8_aligned_beu32.texi: New file.
* doc/posix-functions/stdc_store8_aligned_beu64.texi: New file.
* doc/posix-functions/stdc_store8_bes8.texi: New file.
* doc/posix-functions/stdc_store8_bes16.texi: New file.
* doc/posix-functions/stdc_store8_bes32.texi: New file.
* doc/posix-functions/stdc_store8_bes64.texi: New file.
* doc/posix-functions/stdc_store8_beu8.texi: New file.
* doc/posix-functions/stdc_store8_beu16.texi: New file.
* doc/posix-functions/stdc_store8_beu32.texi: New file.
* doc/posix-functions/stdc_store8_beu64.texi: New file.
* doc/gnulib.texi (Functions in <stdbit.h>): Include these new files.
* doc/posix-functions/stdc_load8_aligned_les16.texi: No module yet.
* doc/posix-functions/stdc_load8_aligned_les32.texi: No module yet.
* doc/posix-functions/stdc_load8_aligned_les64.texi: No module yet.
* doc/posix-functions/stdc_load8_aligned_les8.texi: No module yet.
* doc/posix-functions/stdc_load8_aligned_leu16.texi: No module yet.
* doc/posix-functions/stdc_load8_aligned_leu32.texi: No module yet.
* doc/posix-functions/stdc_load8_aligned_leu64.texi: No module yet.
* doc/posix-functions/stdc_load8_aligned_leu8.texi: No module yet.
* doc/posix-functions/stdc_load8_les16.texi: No module yet.
* doc/posix-functions/stdc_load8_les32.texi: No module yet.
* doc/posix-functions/stdc_load8_les64.texi: No module yet.
* doc/posix-functions/stdc_load8_les8.texi: No module yet.
* doc/posix-functions/stdc_load8_leu16.texi: No module yet.
* doc/posix-functions/stdc_load8_leu32.texi: No module yet.
* doc/posix-functions/stdc_load8_leu64.texi: No module yet.
* doc/posix-functions/stdc_load8_leu8.texi: No module yet.
* doc/posix-functions/stdc_memreverse8.texi: No module yet.
* doc/posix-functions/stdc_memreverse8u16.texi: No module yet.
* doc/posix-functions/stdc_memreverse8u32.texi: No module yet.
* doc/posix-functions/stdc_memreverse8u64.texi: No module yet.
* doc/posix-functions/stdc_memreverse8u8.texi: No module yet.
* doc/posix-functions/stdc_rotate_left.texi: No module yet.
* doc/posix-functions/stdc_rotate_right.texi: No module yet.
* doc/posix-functions/stdc_store8_aligned_les16.texi: No module yet.
* doc/posix-functions/stdc_store8_aligned_les32.texi: No module yet.
* doc/posix-functions/stdc_store8_aligned_les64.texi: No module yet.
* doc/posix-functions/stdc_store8_aligned_les8.texi: No module yet.
* doc/posix-functions/stdc_store8_aligned_leu16.texi: No module yet.
* doc/posix-functions/stdc_store8_aligned_leu32.texi: No module yet.
* doc/posix-functions/stdc_store8_aligned_leu64.texi: No module yet.
* doc/posix-functions/stdc_store8_aligned_leu8.texi: No module yet.
* doc/posix-functions/stdc_store8_les16.texi: No module yet.
* doc/posix-functions/stdc_store8_les32.texi: No module yet.
* doc/posix-functions/stdc_store8_les64.texi: No module yet.
* doc/posix-functions/stdc_store8_les8.texi: No module yet.
* doc/posix-functions/stdc_store8_leu16.texi: No module yet.
* doc/posix-functions/stdc_store8_leu32.texi: No module yet.
* doc/posix-functions/stdc_store8_leu64.texi: No module yet.
* doc/posix-functions/stdc_store8_leu8.texi: No module yet.

6 weeks agostdbit-h: Finish handling multiple gnulib-tool invocations.
Collin Funk [Thu, 12 Mar 2026 11:21:44 +0000 (12:21 +0100)] 
stdbit-h: Finish handling multiple gnulib-tool invocations.

* lib/stdbit.in.h: Setup #include_next for the system stdbit.h. Don't
declare C23 functions if the system has stdbit.h.
* m4/stdbit_h.m4 (gl_STDBIT_H): Define HAVE_STDBIT_H. Check for
stdc_rotate_left_uc to see if the system header is missing C2y features.
* modules/stdbit-h (Depends-on): Add include_next.
(Makefile.am): Substitute @HAVE_STDBIT_H@ and some variables needed for

6 weeks agovaprintf: Add tests.
Bruno Haible [Wed, 11 Mar 2026 17:23:43 +0000 (18:23 +0100)] 
vaprintf: Add tests.

* tests/test-vaprintf.c: New file, based on tests/test-xvasprintf.c.
* modules/vaprintf-tests: New file.

6 weeks agovaprintf: New module.
Bruno Haible [Wed, 11 Mar 2026 17:22:19 +0000 (18:22 +0100)] 
vaprintf: New module.

* lib/stdio.in.h (_GL_ATTRIBUTE_DEALLOC_FREE): New macro, copied from
lib/string.in.h.
(free, rpl_free): Define as in lib/string.in.h.
(aprintf, vaprintf): New declarations.
* lib/vaprintf.c: New file, based on lib/xvasprintf.c.
* lib/aprintf.c: New file, based on lib/xasprintf.c.
* m4/stdio_h.m4 (gl_STDIO_H_REQUIRE_DEFAULTS): Initialize
GNULIB_VAPRINTF. Require gl_STDLIB_H_REQUIRE_DEFAULTS.
* modules/stdio-h (Depends-on): Add stdlib-h.
(Makefile.am): Substitute GNULIB_VAPRINTF, GNULIB_FREE_POSIX,
REPLACE_FREE.
* modules/vaprintf: New file.

6 weeks agoxvasprintf-tests: Fix typo.
Bruno Haible [Wed, 11 Mar 2026 17:15:58 +0000 (18:15 +0100)] 
xvasprintf-tests: Fix typo.

* tests/test-xvasprintf.c (test_xasprintf): Test xasprintf, not
my_xasprintf.

7 weeks agodoc: Fix documentation that was added today.
Bruno Haible [Mon, 9 Mar 2026 19:35:43 +0000 (20:35 +0100)] 
doc: Fix documentation that was added today.

* doc/posix-functions/stdc_*.texi: Reflect current state of gnulib.

7 weeks agoc32tolower, c32toupper: Fix for Turkish locale in Cygwin 3.6.7.
Bruno Haible [Mon, 9 Mar 2026 13:10:43 +0000 (14:10 +0100)] 
c32tolower, c32toupper: Fix for Turkish locale in Cygwin 3.6.7.

* lib/c32to-impl.h (FUNC): Move _GL_SMALL_WCHAR_T case up.

7 weeks agodoc: Document C2y stdc_* <stdbit.h> functions.
Bruno Haible [Mon, 9 Mar 2026 11:15:09 +0000 (12:15 +0100)] 
doc: Document C2y stdc_* <stdbit.h> functions.

* doc/posix-functions/stdc_load8_aligned_les16.texi: New file.
* doc/posix-functions/stdc_load8_aligned_les32.texi: New file.
* doc/posix-functions/stdc_load8_aligned_les64.texi: New file.
* doc/posix-functions/stdc_load8_aligned_les8.texi: New file.
* doc/posix-functions/stdc_load8_aligned_leu16.texi: New file.
* doc/posix-functions/stdc_load8_aligned_leu32.texi: New file.
* doc/posix-functions/stdc_load8_aligned_leu64.texi: New file.
* doc/posix-functions/stdc_load8_aligned_leu8.texi: New file.
* doc/posix-functions/stdc_load8_les16.texi: New file.
* doc/posix-functions/stdc_load8_les32.texi: New file.
* doc/posix-functions/stdc_load8_les64.texi: New file.
* doc/posix-functions/stdc_load8_les8.texi: New file.
* doc/posix-functions/stdc_load8_leu16.texi: New file.
* doc/posix-functions/stdc_load8_leu32.texi: New file.
* doc/posix-functions/stdc_load8_leu64.texi: New file.
* doc/posix-functions/stdc_load8_leu8.texi: New file.
* doc/posix-functions/stdc_memreverse8.texi: New file.
* doc/posix-functions/stdc_memreverse8u16.texi: New file.
* doc/posix-functions/stdc_memreverse8u32.texi: New file.
* doc/posix-functions/stdc_memreverse8u64.texi: New file.
* doc/posix-functions/stdc_memreverse8u8.texi: New file.
* doc/posix-functions/stdc_rotate_left.texi: New file.
* doc/posix-functions/stdc_rotate_right.texi: New file.
* doc/posix-functions/stdc_store8_aligned_les16.texi: New file.
* doc/posix-functions/stdc_store8_aligned_les32.texi: New file.
* doc/posix-functions/stdc_store8_aligned_les64.texi: New file.
* doc/posix-functions/stdc_store8_aligned_les8.texi: New file.
* doc/posix-functions/stdc_store8_aligned_leu16.texi: New file.
* doc/posix-functions/stdc_store8_aligned_leu32.texi: New file.
* doc/posix-functions/stdc_store8_aligned_leu64.texi: New file.
* doc/posix-functions/stdc_store8_aligned_leu8.texi: New file.
* doc/posix-functions/stdc_store8_les16.texi: New file.
* doc/posix-functions/stdc_store8_les32.texi: New file.
* doc/posix-functions/stdc_store8_les64.texi: New file.
* doc/posix-functions/stdc_store8_les8.texi: New file.
* doc/posix-functions/stdc_store8_leu16.texi: New file.
* doc/posix-functions/stdc_store8_leu32.texi: New file.
* doc/posix-functions/stdc_store8_leu64.texi: New file.
* doc/posix-functions/stdc_store8_leu8.texi: New file.
* doc/gnulib.texi (Functions in <stdbit.h>): Change section title.
Include these new files.

7 weeks agoparse-datetime: Fix typo.
Collin Funk [Mon, 9 Mar 2026 04:02:23 +0000 (21:02 -0700)] 
parse-datetime: Fix typo.

* lib/parse-datetime.y: Fix typo.

7 weeks agostdbit-h: Fix generated header substitutions (regr. today).
Collin Funk [Sun, 8 Mar 2026 19:51:41 +0000 (12:51 -0700)] 
stdbit-h: Fix generated header substitutions (regr. today).

* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Adjust the variable
names with 's/_GL_/_/' as expected by the Makefile.am snippet.

7 weeks agoacl-permissions: Don't stump on the system namespace.
Bruno Haible [Sun, 8 Mar 2026 14:33:53 +0000 (15:33 +0100)] 
acl-permissions: Don't stump on the system namespace.

* lib/acl.h (struct aclinfo): Rename field __gl_acl_ch to _gl_acl_ch.
* lib/file-has-acl.c (get_aclinfo, aclinfo_free, fdfile_has_aclinfo):
Update.

7 weeks agobinary-io: Don't stump on the system namespace.
Bruno Haible [Sun, 8 Mar 2026 14:30:20 +0000 (15:30 +0100)] 
binary-io: Don't stump on the system namespace.

* lib/binary-io.h (_gl_set_fd_mode): Renamed from __gl_setmode.
* lib/binary-io.c (set_binary_mode): Update.

7 weeks agoerror-h: Don't stump on the system namespace.
Bruno Haible [Sun, 8 Mar 2026 14:27:28 +0000 (15:27 +0100)] 
error-h: Don't stump on the system namespace.

* lib/error.in.h (_gl_error_call1): Renamed from __gl_error_call1.
(_gl_error_call): Renamed from __gl_error_call.

7 weeks agostdbit-h: Don't stump on the system namespace.
Bruno Haible [Sun, 8 Mar 2026 14:24:28 +0000 (15:24 +0100)] 
stdbit-h: Don't stump on the system namespace.

* lib/stdbit.in.h (_gl_stdbit_clz): Renamed from __gl_stdbit_clz.
(_gl_stdbit_clzl): Renamed from __gl_stdbit_clzl.
(_gl_stdbit_clzll): Renamed from __gl_stdbit_clzll.
(_gl_stdbit_ctz): Renamed from __gl_stdbit_ctz.
(_gl_stdbit_ctzl): Renamed from __gl_stdbit_ctzl.
(_gl_stdbit_ctzll): Renamed from __gl_stdbit_ctzll.
(_gl_stdbit_popcount): Renamed from __gl_stdbit_popcount.
(_gl_stdbit_popcountl): Renamed from __gl_stdbit_popcountl.
(_gl_stdbit_popcountll): Renamed from __gl_stdbit_popcountll.
(_gl_stdbit_popcount_wide): Renamed from __gl_stdbit_popcount_wide.
(_gl_stdbit_popcount_support): Renamed from
__gl_stdbit_popcount_support.
(_gl_stdbit_popcount_supported): Renamed from
_gl_stdbit_popcount_supported.
* lib/stdc_count_ones.c: Update.

7 weeks agostdbit-h: Use idioms for handling multiple gnulib-tool invocations.
Bruno Haible [Sun, 8 Mar 2026 14:05:45 +0000 (15:05 +0100)] 
stdbit-h: Use idioms for handling multiple gnulib-tool invocations.

* lib/stdbit.in.h: Use @GNULIB_...@ instead of @GL_...@.
* m4/stdbit_h.m4 (gl_STDBIT_H): Don't initialize GL_* variables.
(gl_STDBIT_MODULE_INDICATOR, gl_STDBIT_H_REQUIRE_DEFAULTS,
gl_STDBIT_H_DEFAULTS): New macros.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_* instead of GL_*
variables.
* modules/stdc_bit_ceil (configure.ac): Use gl_STDBIT_MODULE_INDICATOR.
* modules/stdc_bit_floor (configure.ac): Likewise.
* modules/stdc_bit_width (configure.ac): Likewise.
* modules/stdc_count_ones (configure.ac): Likewise.
* modules/stdc_count_zeros (configure.ac): Likewise.
* modules/stdc_first_leading_one (configure.ac): Likewise.
* modules/stdc_first_leading_zero (configure.ac): Likewise.
* modules/stdc_first_trailing_one (configure.ac): Likewise.
* modules/stdc_first_trailing_zero (configure.ac): Likewise.
* modules/stdc_has_single_bit (configure.ac): Likewise.
* modules/stdc_leading_ones (configure.ac): Likewise.
* modules/stdc_leading_zeros (configure.ac): Likewise.
* modules/stdc_trailing_ones (configure.ac): Likewise.
* modules/stdc_trailing_zeros (configure.ac): Likewise.

7 weeks agognulib-tool.py: Fix default handling for --local-{symlink,hardlink}.
Bruno Haible [Fri, 6 Mar 2026 08:47:50 +0000 (09:47 +0100)] 
gnulib-tool.py: Fix default handling for --local-{symlink,hardlink}.

* pygnulib/GLConfig.py (GLConfig.__init__): Allow lcopymode to remain
None.
(GLConfig.default): Change lcopymode's default to be None.
(GLConfig.checkLCopyMode): Update signature.
(GLConfig.resetLCopyMode): Change default value to None.
* pygnulib/GLFileSystem.py (GLFileSystem.shouldLink): Update.

7 weeks agognulib-tool.py: Use --symlink or --hardlink for local modules.
Collin Funk [Fri, 6 Mar 2026 06:22:41 +0000 (22:22 -0800)] 
gnulib-tool.py: Use --symlink or --hardlink for local modules.

Reported by Pádraig Brady in
<https://lists.gnu.org/r/coreutils/2026-03/msg00015.html>.

* pygnulib/GLConfig.py (__init__): If --local-symlink or
--local-hardlink are not specified, use the value specified by --symlink
or --hardlink for local modules instead of copying.