1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-05-13 15:13:36 +00:00
Commit Graph

27557 Commits

Author SHA1 Message Date
Bruno Haible
b48c4f8a18 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.
2026-03-13 07:57:41 +01:00
Bruno Haible
b95d0eb8bb 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.
2026-03-12 20:38:27 +01:00
Bruno Haible
dc3770cc98 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.
2026-03-12 20:37:13 +01:00
Bruno Haible
f8e0085058 stdc_load8_aligned: Add tests.
* tests/test-stdc_load8_aligned.c: New file.
* modules/stdc_load8_aligned-tests: New file.
2026-03-12 20:26:07 +01:00
Bruno Haible
b4c0796671 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.
2026-03-12 15:31:41 +01:00
Bruno Haible
1247bdcc22 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.
2026-03-12 14:12:16 +01:00
Collin Funk
e232a308b4 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
2026-03-12 12:21:44 +01:00
Bruno Haible
be6fca7b7f vaprintf: Add tests.
* tests/test-vaprintf.c: New file, based on tests/test-xvasprintf.c.
* modules/vaprintf-tests: New file.
2026-03-11 18:28:53 +01:00
Bruno Haible
68143964a3 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.
2026-03-11 18:22:19 +01:00
Bruno Haible
a55ad16c9e xvasprintf-tests: Fix typo.
* tests/test-xvasprintf.c (test_xasprintf): Test xasprintf, not
my_xasprintf.
2026-03-11 18:15:58 +01:00
Bruno Haible
d5f683434d doc: Fix documentation that was added today.
* doc/posix-functions/stdc_*.texi: Reflect current state of gnulib.
2026-03-09 20:35:43 +01:00
Bruno Haible
ce596a4aa5 c32tolower, c32toupper: Fix for Turkish locale in Cygwin 3.6.7.
* lib/c32to-impl.h (FUNC): Move _GL_SMALL_WCHAR_T case up.
2026-03-09 14:11:54 +01:00
Bruno Haible
a65f999035 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.
2026-03-09 12:15:09 +01:00
Collin Funk
3a2e1b528b parse-datetime: Fix typo.
* lib/parse-datetime.y: Fix typo.
2026-03-08 21:02:23 -07:00
Collin Funk
dbc80047d2 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.
2026-03-08 12:51:41 -07:00
Bruno Haible
6e5dfec649 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.
2026-03-08 15:33:53 +01:00
Bruno Haible
a1f9e9d405 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.
2026-03-08 15:30:20 +01:00
Bruno Haible
3210d2f2c6 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.
2026-03-08 15:27:28 +01:00
Bruno Haible
244366039a 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.
2026-03-08 15:24:28 +01:00
Bruno Haible
4ebbba1f1f 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.
2026-03-08 15:05:45 +01:00
Bruno Haible
11d02ecc71 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.
2026-03-06 09:47:50 +01:00
Collin Funk
ddea1a41eb 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.
2026-03-05 22:22:41 -08:00
Bruno Haible
611d6fd593 Don't use 'typeof' built-in with -std=c99 or -std=c11.
Reported by Alexander Sosedkin <asosedkin@redhat.com> in
<https://lists.gnu.org/archive/html/bug-gnulib/2026-03/msg00019.html>.

* lib/stdcountof.in.h (_gl_verify_is_array): Don't use the definition
with typeof in strict C99 or C11 modes.
* lib/string-desc.h (HAVE_TYPEOF): Don't define in strict C99 or C11
modes.
2026-03-03 11:33:11 +01:00
Bruno Haible
662cd6f0f4 manywarnings: Eliminate some never-useful clang warnings.
* m4/manywarnings.m4 (gl_MANYWARN_ALL_GCC(C)): Disable the
-Wgnu-include-next, -Wstring-plus-int, -Wstring-plus-char warnings.
2026-03-03 08:52:34 +01:00
Bruno Haible
f1d55e9f84 Use countof, part 2.
Done through  sed -e 's/SIZEOF \([(][^()]*[)]\)/countof \1/g'

* lib/boot-time.c: Include <stdcountof.h>.
* lib/readutmp.c: Include <stdcountof.h>.
* lib/boot-time-aux.h (get_linux_boot_time_fallback,
get_openbsd_boot_time, get_windows_boot_time): Use countof.
* lib/duplocale.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
(duplocale): Use countof instead.
* lib/fatal-signal.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
(num_fatal_signals, actions_allocated): Use countof instead.
* lib/iconv_open.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
(rpl_iconv_open): Use countof instead.
* lib/term-style-control.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
(num_job_control_signals): Use countof instead.
* lib/uniconv/u16-conv-to-enc.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
* lib/uniconv/u32-conv-to-enc.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
* lib/uniconv/u-conv-to-enc.h (FUNC): Use countof instead.
* lib/uniconv/u16-strconv-to-enc.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
* lib/uniconv/u32-strconv-to-enc.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
* lib/uniconv/u-strconv-to-enc.h (FUNC): Use countof instead.
* lib/uniname/uniname.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
(unicode_name_word, unicode_name_word_lookup, unicode_code_to_index,
unicode_index_to_code, unicode_character_name, unicode_name_character):
Use countof instead.
* lib/uniwidth/width.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
(uc_width): Use countof instead.
* lib/wait-process.c: Include <stdcountof.h>.
(SIZEOF): Remove macro.
(slaves_allocated): Use countof instead.
* lib/gen-uni-tables.c (countof): Renamed from SIZEOF.
* modules/boot-time (Depends-on): Add stdcountof-h.
* modules/readutmp (Depends-on): Likewise.
* modules/duplocale (Depends-on): Likewise.
* modules/fatal-signal (Depends-on): Likewise.
* modules/iconv_open (Depends-on): Likewise.
* modules/term-style-control (Depends-on): Likewise.
* modules/uniconv/u16-conv-to-enc (Depends-on): Likewise.
* modules/uniconv/u32-conv-to-enc (Depends-on): Likewise.
* modules/uniconv/u16-strconv-to-enc (Depends-on): Likewise.
* modules/uniconv/u32-strconv-to-enc (Depends-on): Likewise.
* modules/uniname/uniname (Depends-on): Likewise.
* modules/uniwidth/width (Depends-on): Likewise.
* modules/wait-process (Depends-on): Likewise.
* tests/macros.h (SIZEOF): Remove macro.
* tests/**/*.[hc]: Use countof instead of SIZEOF. Include <stdcountof.h>
as needed.
* modules/**/*-tests (Depends-on): Add stdcountof-h if needed.
2026-03-02 14:35:26 +01:00
Bruno Haible
8e2078774f Use countof, part 1.
* lib/argmatch.h: Include <stdcountof.h>.
(ARRAY_CARDINALITY): Remove macro.
(ARGMATCH_VERIFY): Use countof instead.
* tests/test-argv-iter.c: Include <stdcountof.h>.
(ARRAY_CARDINALITY): Remove macro.
(main): Use countof instead.
* tests/test-hash.c: Include <stdcountof.h>.
(ARRAY_CARDINALITY): Remove macro.
(main): Use countof instead.
* tests/test-userspec.c: Include <stdcountof.h>.
(ARRAY_CARDINALITY): Remove macro.
(main): Use countof instead.
* modules/argmatch (Depends-on): Add stdcountof-h.
* modules/argv-iter-tests (Depends-on): Likewise.
* modules/hash-tests (Depends-on): Likewise.
* modules/userspec-tests (Depends-on): Likewise.
2026-03-02 13:01:30 +01:00
Bruno Haible
eeff8cae98 stdcountof-h: Improve comment.
* lib/stdcountof.in.h (countof): Improve comment.
2026-03-02 13:01:29 +01:00
Bruno Haible
764b986be5 Silence clang's -Wstring-plus-int warnings in Gnulib code.
* m4/gnulib-common.m4 (gl_CC_GNULIB_WARNINGS): Add -Wno-string-plus-int.
2026-03-02 10:11:25 +01:00
Bruno Haible
ad4bc5cbab tests: Use streq, part 5.
* tests/test-execute-child.c: Revert last change.
* modules/execute-tests (Depends-on): Remove streq.
2026-03-02 09:59:03 +01:00
Bruno Haible
1cc0125a28 stdcountof-h tests: Avoid a clang warning.
* tests/test-stdcountof-h.c (call_count, do_call): Don't define in C++
mode.
2026-03-01 19:55:55 +01:00
Bruno Haible
0e7b8e00e0 float-h: Ensure ISO C23 compliance with clang 22.
* m4/float_h.m4 (gl_FLOAT_H): Test also whether the provided <float.h>
defines {FLT,DBL,LDBL}_IS_IEC_60559.
2026-03-01 19:28:45 +01:00
Paul Eggert
891af12c32 strftime: pacify clang -Wstring-plus-int
This pacifies a warning from default clang 21, and saves a byte.
Problem reported by Badli Al Rashid <https://bugs.gnu.org/80514>.
* lib/strftime.c (c_ampm_letters): New static constant, if
!defined _NL_CURRENT && (HAVE_ONLY_C_LOCALE || (USE_C_LOCALE &&
!HAVE_STRFTIME_L)).
(ampm): Use it if needed.
2026-03-01 10:15:41 -08:00
Bruno Haible
8947cd3972 tests: Use strnul.
* tests/test-dfa-match-aux.c (main): Use strnul.
* tests/test-pthread-rwlock-waitqueue.c (reader_func, writer_func):
Likewise.
* tests/test-strtold.h (test_function): Likewise.
* tests/test-xstrtold.c (main): Likewise.
* modules/dfa-tests (Depends-on): Add strnul.
* modules/pthread-rwlock-extra-tests (Depends-on): Likewise.
* modules/c-strtold-tests (Depends-on): Likewise.
* modules/strtold-tests (Depends-on): Likewise.
* modules/xstrtold-tests (Depends-on): Likewise.
2026-03-01 14:44:32 +01:00
Bruno Haible
f45f79845c Fix last few ChangeLog entries. 2026-03-01 14:44:13 +01:00
Bruno Haible
6003a49f09 tests: Use memeq, part 3.
* tests/**/*.[hc]: Use memeq instead of memcmp.
* modules/*-tests (Dependencies): Add memeq.
2026-03-01 12:37:49 +01:00
Bruno Haible
0e0dc90965 tests: Use memeq, part 2.
Done through
  sed -e 's/memcmp \([(][^()]*[)]\) != 0/!memeq \1/g' \
      -e 's/memcmp \([(][^()]*[(][^()]*[)][^()]*[)]\) != 0/!memeq \1/g'

* tests/**/*.[hc]: Use !memeq instead of memcmp ... != 0.
* modules/*-tests (Dependencies): Add memeq.
2026-03-01 12:37:26 +01:00
Bruno Haible
b2a583ead5 tests: Use memeq, part 1.
Done through
  sed -e 's/memcmp \([(][^()]*[)]\) == 0/memeq \1/g' \
      -e 's/memcmp \([(][^()]*[(][^()]*[)][^()]*[)]\) == 0/memeq \1/g'

* tests/**/*.[hc]: Use memeq instead of memcmp ... == 0.
* modules/*-tests (Dependencies): Add memeq.
2026-03-01 12:36:28 +01:00
Bruno Haible
8f88d159d4 tests: Use streq, part 4.
* tests/**/*.[hc]: Use streq instead of STREQ.
* tests/macros.h (STREQ): Remove macro.
* modules/*-tests (Dependencies): Add streq.
2026-03-01 10:50:12 +01:00
Bruno Haible
1def33e0d8 tests: Use streq, part 3.
* tests/**/*.[hc]: Use streq instead of strcmp.
* modules/*-tests (Dependencies): Add streq.
2026-03-01 10:41:24 +01:00
Bruno Haible
69297aa373 tests: Use streq, part 2.
Done through sed -e 's/strcmp \([(][^()]*[)]\) != 0/!streq \1/'

* tests/**/*.[hc]: Use !streq instead of strcmp ... != 0.
* modules/*-tests (Dependencies): Add streq.
2026-03-01 10:04:06 +01:00
Bruno Haible
64e78e4467 tests: Use streq, part 1.
Done through sed -e 's/strcmp \([(][^()]*[)]\) == 0/streq \1/'

* tests/**/*.[hc]: Use streq instead of strcmp ... == 0.
* modules/*-tests (Dependencies): Add streq.
2026-03-01 09:44:40 +01:00
Bruno Haible
2a893de047 filesystem-remote: New module.
* lib/filesystem-remote.h: New file, based on lib/file-remote.h.
* lib/filesystem-remote.c: New file, based on lib/file-remote.c.
* lib/file-remote.h (is_remote_fs_type_name): Remove declaration.
* lib/file-remote.c (is_remote_fs_type_name): Remove function.
* modules/filesystem-remote: New file.
* lib/mountlist.c: Include filesystem-remote.h instead of file-remote.h.
* modules/mountlist (Depends-on): Add filesystem-remote. Remove
file-remote.
2026-02-28 22:21:58 +01:00
Collin Funk
ac93382385 cygpath: Use _GL_ATTRIBUTE_MALLOC and _GL_ATTRIBUTE_DEALLOC_FREE.
* lib/cygpath.h: Include stdlib.h for free declaration.
(cygpath_w): Mark function with _GL_ATTRIBUTE_MALLOC and
_GL_ATTRIBUTE_DEALLOC_FREE since it will always return a malloc'ed
pointer or NULL.
2026-02-28 12:59:50 -08:00
Bruno Haible
8b80a20b6a file-remote: Use streq.
* lib/file-remote.c (is_remote_fs_type_name, file_is_remote): Use streq
instead of strcmp.
* modules/file-remote (Depends-on): Add streq.
2026-02-28 21:45:08 +01:00
Bruno Haible
df9aa7f7ad Straighten dependencies to streq or memeq.
* modules/argmatch (Dependencies): Add memeq, streq. Remove stringeq.
* modules/bcp47 (Dependencies): Likewise.
* modules/readutmp (Dependencies): Likewise.
* modules/relocatable-prog (Dependencies): Likewise.
* modules/relocatable-prog-wrapper (Dependencies): Likewise.
* modules/vc-mtime (Dependencies): Likewise.
* modules/backup-rename (Dependencies): Add memeq. Remove stringeq.
* modules/backupfile (Dependencies): Likewise.
* modules/boot-time (Dependencies): Likewise.
* modules/csharpcomp (Dependencies): Likewise.
* modules/csharpexec (Dependencies): Likewise.
* modules/file-has-acl (Dependencies): Likewise.
* modules/get_ppid_of (Dependencies): Likewise.
* modules/get_progname_of (Dependencies): Likewise.
* modules/getlogin_r (Dependencies): Likewise.
* modules/getprogname (Dependencies): Likewise.
* modules/getumask (Dependencies): Likewise.
* modules/isnan-no-c++ (Dependencies): Likewise.
* modules/isnanf (Dependencies): Likewise.
* modules/isnanf-nolibm (Dependencies): Likewise.
* modules/isnand (Dependencies): Likewise.
* modules/isnand-nolibm (Dependencies): Likewise.
* modules/isnanl (Dependencies): Likewise.
* modules/isnanl-nolibm (Dependencies): Likewise.
* modules/mbchar (Dependencies): Likewise.
* modules/mem-hash-map (Dependencies): Likewise.
* modules/memcoll (Dependencies): Likewise.
* modules/progname (Dependencies): Likewise.
* modules/pthread_sigmask (Dependencies): Likewise.
* modules/quotearg (Dependencies): Likewise.
* modules/same (Dependencies): Likewise.
* modules/signbit-no-c++ (Dependencies): Likewise.
* modules/string-desc (Dependencies): Likewise.
* modules/uniname/uniname (Dependencies): Likewise.
* modules/acl-permissions (Dependencies): Add streq. Remove stringeq.
* modules/argp (Dependencies): Likewise.
* modules/c-vasnprintf (Dependencies): Likewise.
* modules/c32_get_mapping (Dependencies): Likewise.
* modules/c32_get_type_test (Dependencies): Likewise.
* modules/concat-filename (Dependencies): Likewise.
* modules/cpu-supports (Dependencies): Likewise.
* modules/dfa (Dependencies): Likewise.
* modules/duplocale (Dependencies): Likewise.
* modules/exclude (Dependencies): Likewise.
* modules/findprog (Dependencies): Likewise.
* modules/findprog-in (Dependencies): Likewise.
* modules/findprog-lgpl (Dependencies): Likewise.
* modules/fopen (Dependencies): Likewise.
* modules/fopen-gnu (Dependencies): Likewise.
* modules/freopen (Dependencies): Likewise.
* modules/fts (Dependencies): Likewise.
* modules/getlocalename_l-simple (Dependencies): Likewise.
* modules/getlocalename_l-unsafe (Dependencies): Likewise.
* modules/getlogin (Dependencies): Likewise.
* modules/getugroups (Dependencies): Likewise.
* modules/hard-locale (Dependencies): Likewise.
* modules/hashcode-named-file (Dependencies): Likewise.
* modules/hashkey-string (Dependencies): Likewise.
* modules/iconv_open (Dependencies): Likewise.
* modules/idcache (Dependencies): Likewise.
* modules/localcharset (Dependencies): Likewise.
* modules/localename (Dependencies): Likewise.
* modules/localename-environ (Dependencies): Likewise.
* modules/localename-unsafe (Dependencies): Likewise.
* modules/localename-unsafe-limited (Dependencies): Likewise.
* modules/map-c++-tests (Dependencies): Likewise.
* modules/mbs_endswith (Dependencies): Likewise.
* modules/mountlist (Dependencies): Likewise.
* modules/newlocale (Dependencies): Likewise.
* modules/nl_langinfo (Dependencies): Likewise.
* modules/nproc (Dependencies): Likewise.
* modules/open (Dependencies): Likewise.
* modules/parse-datetime (Dependencies): Likewise.
* modules/popen (Dependencies): Likewise.
* modules/posix_spawn-internal (Dependencies): Likewise.
* modules/propername (Dependencies): Likewise.
* modules/pt_chown (Dependencies): Likewise.
* modules/putenv-gnu (Dependencies): Likewise.
* modules/qcopy-acl (Dependencies): Likewise.
* modules/rpmatch (Dependencies): Likewise.
* modules/selinux-h (Dependencies): Likewise.
* modules/setlocale (Dependencies): Likewise.
* modules/setlocale-fixes (Dependencies): Likewise.
* modules/sig2str (Dependencies): Likewise.
* modules/spawn-pipe (Dependencies): Likewise.
* modules/stat (Dependencies): Likewise.
* modules/str_endswith (Dependencies): Likewise.
* modules/streq-opt (Dependencies): Likewise.
* modules/striconveha (Dependencies): Likewise.
* modules/supersede (Dependencies): Likewise.
* modules/time_rz (Dependencies): Likewise.
* modules/unicodeio (Dependencies): Likewise.
* modules/unistdio/u16-u16-vasnprintf (Dependencies): Likewise.
* modules/unistdio/u16-vasnprintf (Dependencies): Likewise.
* modules/unistdio/u32-u32-vasnprintf (Dependencies): Likewise.
* modules/unistdio/u32-vasnprintf (Dependencies): Likewise.
* modules/unistdio/u8-u8-vasnprintf (Dependencies): Likewise.
* modules/unistdio/u8-vasnprintf (Dependencies): Likewise.
* modules/unistdio/ulc-vasnprintf (Dependencies): Likewise.
* modules/vasnprintf (Dependencies): Likewise.
* modules/vasnwprintf (Dependencies): Likewise.
* modules/wctrans (Dependencies): Likewise.
* modules/wctype (Dependencies): Likewise.
* modules/c-nstrftime (Dependencies): Add streq.
* modules/fprintftime (Dependencies): Likewise.
* modules/nstrftime (Dependencies): Likewise.
* modules/nstrftime-limited (Dependencies): Likewise.
2026-02-28 21:17:44 +01:00
Bruno Haible
875d01ba0d streq, memeq: New modules.
* lib/string.in.h (_GL_STRING_INLINE): Remove macro.
(_GL_MEMEQ_INLINE): New macro.
(memeq): Use it instead of _GL_STRING_INLINE. Test GNULIB_MEMEQ.
(_GL_STREQ_INLINE): New macro.
(streq): Use it instead of _GL_STRING_INLINE. Test GNULIB_STREQ.
* lib/memeq.c: New file.
* lib/streq.c: New file.
* lib/string.c: Remove file.
* m4/memeq.m4: New file, based on m4/stringeq.m4.
* m4/streq.m4: New file, based on m4/stringeq.m4.
* m4/stringeq.m4: Remove file.
* m4/string_h.m4 (gl_STRING_H_REQUIRE_DEFAULTS): Initialize
GNULIB_MEMEQ, GNULIB_STREQ. Don't initialize GNULIB_STRINGEQ.
* modules/string-h (Makefile.am): Substitute GNULIB_MEMEQ, GNULIB_STREQ.
Don't substitute GNULIB_STRINGEQ.
* modules/memeq: New file.
* modules/streq: New file.
* modules/stringeq: Change to just be the union of streq and memeq.
* MODULES.html.sh (func_all_modules): Add memeq, streq.
2026-02-28 21:17:44 +01:00
Bruno Haible
5f1f075cc0 Fix module dependencies after 2025-09-17 "stringeq: prefer streq to strcmp in other modules".
* modules/c-vasnprintf (Dependencies): Add stringeq.
* modules/findprog-lgpl (Dependendies): Likewise.
* modules/localename-environ (Dependendies): Likewise.
* modules/localename-unsafe-limited (Dependendies): Likewise.
* modules/uchar-h-c23 (Dependendies): Likewise.
* modules/unistdio/u16-u16-vasnprintf (Dependendies): Likewise.
* modules/unistdio/u16-vasnprintf (Dependendies): Likewise.
* modules/unistdio/u32-u32-vasnprintf (Dependendies): Likewise.
* modules/unistdio/u32-vasnprintf (Dependendies): Likewise.
* modules/unistdio/u8-u8-vasnprintf (Dependendies): Likewise.
* modules/unistdio/u8-vasnprintf (Dependendies): Likewise.
* modules/unistdio/ulc-vasnprintf (Dependendies): Likewise.
* modules/vasnprintf (Dependendies): Likewise.
* modules/vasnwprintf (Dependendies): Likewise.
* modules/setenv (Dependendies): Remove stringeq.
* modules/uchar-h (Dependendies): Likewise.
* modules/uniconv/base (Dependendies): Likewise.
2026-02-28 21:17:43 +01:00
Bruno Haible
2d7b63af90 Fix module dependencies after 2025-09-17 "stringeq: prefer memeq to memcmp in other modules".
* modules/backup-rename (Dependencies): Add stringeq.
* modules/isnanf (Dependendies): Likewise.
* modules/isnanf-nolibm (Dependendies): Likewise.
* modules/isnand (Dependendies): Likewise.
* modules/isnand-nolibm (Dependendies): Likewise.
* modules/isnanl (Dependendies): Likewise.
* modules/isnanl-nolibm (Dependendies): Likewise.
2026-02-28 21:17:43 +01:00
Pádraig Brady
0a12ab6c85 mountlist: use file-remote module to determine remoteness
* lib/file-remote.c (is_remote_fs_type_name): A new function
that matches file system _names_ as being remote.  The list is
an amalgamation of those names already referenced in file-remote,
names referenced in ME_REMOTE, and IDs referenced in file-remote.
* lib/file-remote.h: Declare new function.
* lib/mountlist.c (ME_REMOTE): Use is_remote_fs_type_name()
to determine if the name is remote.
* modules/mountlist: Depend on file-remote.
2026-02-28 11:00:20 +00:00
Bruno Haible
bc0f1a4f42 strnul: Fix link-time error.
* lib/string.in.h (_GL_STRNUL_INLINE): New macro.
(gl_strnul): Use it instead of _GL_STRING_INLINE.
* lib/strnul.c: New file.
* lib/string.c: Update comment.
* modules/strnul (Files): Add strnul.c. Remove string.c.
(Makefile.am): Update accordingly.
2026-02-28 09:04:14 +01:00