|
39540147
|
2025-10-23T23:10:44
|
|
doc: allow for _FORTIFY_SOURCE = 3
Problem reported by Basil L. Contovounesios in:
https://lists.gnu.org/r/bug-gnulib/2025-10/msg00068.html
|
|
a0d10f43
|
2025-10-20T20:50:21
|
|
fenv-rounding tests: Avoid test failure on Android.
* tests/test-fenv-round.c (test_towardzero, test_upward)
(test_downward): Disable tests that are known to fail.
* doc/posix-functions/fesetround.texi: Update list of platforms.
|
|
32ab90fa
|
2025-10-20T19:49:45
|
|
snan tests: Avoid test failure on Android.
* tests/test-snan-1.c (main): Disable test that is known to fail.
|
|
19141077
|
2025-10-20T21:13:39
|
|
glob: Add support for Android.
Reported by Collin Funk in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-10/msg00054.html>.
* m4/glob.m4 (gl_GLOB): On Android, skip a test that assumes that
/bin/sh exists. Update cross-compilation guess.
* tests/test-glob.c (main): On Android, skip a test that assumes that
/bin/sh exists.
* doc/posix-functions/glob.texi: Mention also Android.
|
|
bc638bf0
|
2025-10-17T20:04:59
|
|
savedir tests: Check the length of the file names.
Suggested by Bruno Haible in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-10/msg00049.html>.
* tests/test-savedir.c (test_savedir_sort_none)
(test_savedir_sort_name): Check that the file names are only one
character long.
|
|
abd86e80
|
2025-10-17T16:45:30
|
|
savedir: Add tests.
* tests/test-savedir.c: New file.
* modules/savedir-tests: Likewise.
|
|
19ef6a04
|
2025-10-15T16:30:10
|
|
glob tests: Avoid a test failure on native Windows.
* tests/test-glob.c (main): Disable the new test cases on native
Windows.
|
|
00f989aa
|
2025-10-15T15:01:55
|
|
glob tests: Improve maintainability.
* tests/test-glob.c (main): Make the second added test independent from
the first one.
|
|
bc3bb043
|
2025-10-13T20:39:25
|
|
glob tests: Add a test for the glibc bug.
* tests/test-glob.c (main): Add a test case for all slash characters and
a test case for many slash characters following a wildcard character.
|
|
94dcab94
|
2025-10-12T13:31:49
|
|
stdcountof-h tests: Fix link error on MSVC 14 (regression 2025-06-07).
* tests/test-stdcountof-h.c (a, b, c): Define as variables on MSVC.
|
|
55e6cae9
|
2025-10-09T20:42:05
|
|
getline tests: Add a test for the glibc bug.
* tests/test-getline.c (main): Check that the buffer is terminated with
a NUL character when the first character read is EOF.
|
|
e2632ca0
|
2025-10-09T20:40:05
|
|
getdelim tests: Add a test for the glibc bug.
* tests/test-getdelim.c (main): Check that the buffer is terminated with
a NUL character when the first character read is EOF.
|
|
7b46a281
|
2025-10-08T14:12:51
|
|
stdcountof-h tests: Test more kinds of string literals.
* tests/test-stdcountof-h.c (test_func): Test also wide string literals
and Unicode string literals.
|
|
13cb0c83
|
2025-10-08T11:40:58
|
|
stdcountof-h tests: Test a string literal.
* tests/test-stdcountof-h.c (test_func): Test a string literal.
Copyright-paperwork-exempt: Yes
|
|
e0bcc7d6
|
2025-10-03T21:51:11
|
|
unimetadata/base: Add tests.
* tests/unimetadata/test-unimetadata-h.c: New file.
* modules/unimetadata/base-tests: New file.
* tests/unimetadata/test-unimetadata-h-c++.cc: New file.
* modules/unimetadata/base-c++-tests: New file.
|
|
268c44d1
|
2025-10-03T21:51:08
|
|
unicase/base: Add tests.
* tests/unicase/test-unicase-h.c: New file.
* modules/unicase/base-tests: New file.
* tests/unicase/test-unicase-h-c++.cc: New file.
* modules/unicase/base-c++-tests: New file.
|
|
fde8832a
|
2025-10-03T21:51:05
|
|
uninorm/base: Add tests.
* tests/uninorm/test-uninorm-h.c: New file.
* modules/uninorm/base-tests: New file.
* tests/uninorm/test-uninorm-h-c++.cc: New file.
* modules/uninorm/base-c++-tests: New file.
|
|
69db3cfd
|
2025-10-03T21:51:01
|
|
unilbrk/base: Add tests.
* tests/unilbrk/test-unilbrk-h.c: New file.
* modules/unilbrk/base-tests: New file.
* tests/unilbrk/test-unilbrk-h-c++.cc: New file.
* modules/unilbrk/base-c++-tests: New file.
|
|
3cd44d44
|
2025-10-03T21:50:59
|
|
uniwbrk/base: Add tests.
* tests/uniwbrk/test-uniwbrk-h.c: New file.
* modules/uniwbrk/base-tests: New file.
* tests/uniwbrk/test-uniwbrk-h-c++.cc: New file.
* modules/uniwbrk/base-c++-tests: New file.
|
|
c3551bca
|
2025-10-03T21:50:56
|
|
unigbrk/base: Add tests.
* tests/unigbrk/test-unigbrk-h.c: New file.
* modules/unigbrk/base-tests: New file.
* tests/unigbrk/test-unigbrk-h-c++.cc: New file.
* modules/unigbrk/base-c++-tests: New file.
|
|
65b2a8ba
|
2025-10-03T21:50:53
|
|
uniwidth/base: Add tests.
* tests/uniwidth/test-uniwidth-h.c: New file.
* modules/uniwidth/base-tests: New file.
* tests/uniwidth/test-uniwidth-h-c++.cc: New file.
* modules/uniwidth/base-c++-tests: New file.
|
|
b2ad9004
|
2025-10-03T21:50:51
|
|
unictype/base: Add tests.
* tests/unictype/test-unictype-h.c: New file.
* modules/unictype/base-tests: New file.
* tests/unictype/test-unictype-h-c++.cc: New file.
* modules/unictype/base-c++-tests: New file.
|
|
1d10a395
|
2025-10-03T21:50:48
|
|
uniname/base: Add tests.
* tests/uniname/test-uniname-h.c: New file.
* modules/uniname/base-tests: New file.
* tests/uniname/test-uniname-h-c++.cc: New file.
* modules/uniname/base-c++-tests: New file.
|
|
82c4f2b9
|
2025-10-03T21:50:46
|
|
unistdio/base: Add tests.
* tests/unistdio/test-unistdio-h.c: New file.
* modules/unistdio/base-tests: New file.
* tests/unistdio/test-unistdio-h-c++.cc: New file.
* modules/unistdio/base-c++-tests: New file.
|
|
068652f6
|
2025-10-03T21:50:42
|
|
uniconv/base: Add tests.
* tests/uniconv/test-uniconv-h.c: New file.
* modules/uniconv/base-tests: New file.
* tests/uniconv/test-uniconv-h-c++.cc: New file.
* modules/uniconv/base-c++-tests: New file.
|
|
8077cba5
|
2025-10-03T21:50:29
|
|
unistr/base: Add tests.
* tests/unistr/test-unistr-h.c: New file.
* modules/unistr/base-tests: New file.
* tests/unistr/test-unistr-h-c++.cc: New file.
* modules/unistr/base-c++-tests: New file.
|
|
c63a0c67
|
2025-09-24T23:28:18
|
|
Update to Unicode 17.0.0.
* lib/gen-uni-tables.c (is_property_alphabetic): Add three
YANGQIN SIGNs.
(UC_JOINING_GROUP_THIN_NOON): New enum item.
(fill_arabicshaping, joining_group_as_c_identifier): Handle
UC_JOINING_GROUP_THIN_NOON.
(LBP_*): Split LBP_SA into LBP_SA1 and LBP_SA2.
(LBP_HH, LBP_SA): New enum items.
(get_lbp): Use them. Update such that unilbrk/lbrkprop.txt comes out as
expected.
(debug_output_lbp): Handle LBP_HH. Print either LBP_SA1, LBP_SA2 as
LBP_SA.
(fill_org_lbp, debug_output_org_lbp): Handle LBP_HH.
(lbp_value_to_string): Handle LBP_HH. Handle LBP_SA1, LBP_SA2 instead of
LBP_SA.
(output_lbrk_rules_as_tables): Update for LBP_HH change. Update rules
LBP12a, LB21 as specified by
https://www.unicode.org/reports/tr14/tr14-55.html.
(get_wbp): Update such that uniwbrk/wbrkprop.txt comes out as expected.
* lib/unictype.in.h (UC_JOINING_GROUP_THIN_NOON): New enum item.
* lib/unictype/joininggroup_byname.gperf: Handle it.
* lib/unictype/joininggroup_name.h: Likewise.
* lib/unilbrk/lbrktables.h (LBP_*): Split LBP_SA into LBP_SA1 and
LBP_SA2.
(LBP_HH): New enum item.
(unilbrk_table): Update bounds.
* lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
Use LBP_HL_HY instead of LBP_HL_BA. Use LBP_SA1 instead of LBP_SA. Treat
LBP_SA2 like LBP_CM. Update rules LB20a and LB21a, as specified by
https://www.unicode.org/reports/tr14/tr14-55.html.
* lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
Likewise.
* lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
Likewise.
* tests/unigbrk/test-u8-grapheme-breaks.c (main): Use U+2B50 instead of
U+2605, because U+2605 no longer is an Extended_Pictographic character.
* tests/unigbrk/test-u16-grapheme-breaks.c (main): Likewise.
* tests/unigbrk/test-u32-grapheme-breaks.c (main): Likewise.
* tests/unigbrk/test-u8-grapheme-next.c (main): Likewise.
* tests/unigbrk/test-u16-grapheme-next.c (main): Likewise.
* tests/unigbrk/test-u32-grapheme-next.c (main): Likewise.
* tests/unigbrk/test-u8-grapheme-prev.c (main): Likewise.
* tests/unigbrk/test-u16-grapheme-prev.c (main): Likewise.
* tests/unigbrk/test-u32-grapheme-prev.c (main): Likewise.
* tests/uniwidth/test-uc_width2.sh: Update expected test result.
* All generated files under lib/uni* and tests/uni*: Regenerate.
* tests/uniname/NameAliases.txt: Update.
* tests/uniname/UnicodeData.txt: Update.
* tests/uninorm/NormalizationTest.txt: Update.
* tests/unigbrk/GraphemeBreakTest.txt: Update.
* tests/uniwbrk/WordBreakTest.txt: Update.
* tests/unilbrk/LineBreakTest.txt: Update.
* All the affected modules: Bump required libunistring version.
|
|
5cb21152
|
2025-09-24T23:28:14
|
|
unilbrk: Fix handling of future emojis in rule LB30b.
* lib/unilbrk/lbrktables.h (LBP_ID): Renamed from LBP_ID1.
(LBP_EBF): Renamed from LBP_ID2.
* lib/gen-uni-tables.c (LBP_ID): Renamed from LBP_ID1.
(LBP_EBF): Renamed from LBP_ID2.
(get_lbp): Update. Move is_property_extended_pictographic invocation.
(debug_output_org_lbp): Augment the information from the LineBreak.txt
file with the Extended_Pictographic property. Print the LBP_ID and
LBP_EBF values distinctly.
(fill_org_lbp): Assign value LBP_EBF to all unassigned
Extended_Pictographic characters.
(debug_output_org_lbp): Handle LBP_EBF.
(lbp_value_to_string): Update.
(output_lbrk_rules_as_tables): Treat LBP_EBF like LBP_EB instead of like
LBP_ID.
* lib/unilbrk/u8-possible-linebreaks.c (u8_possible_linebreaks_loop):
Update.
* lib/unilbrk/u16-possible-linebreaks.c (u16_possible_linebreaks_loop):
Likewise.
* lib/unilbrk/u32-possible-linebreaks.c (u32_possible_linebreaks_loop):
Likewise.
* lib/unilbrk/lbrkprop2.h: Regenerated.
* lib/unilbrk/lbrktables.c: Regenerated.
* tests/unilbrk/test-uc-possible-linebreaks.c (main): Skip test cases
that contain the U+1F8FF character.
* modules/unilbrk/*-linebreaks: Bump required libunistring version.
|
|
e4c911bb
|
2025-09-21T13:49:18
|
|
tests: avoid grep in init.sh
* tests/init.sh (warn_, gl_shell_test_script_):
Avoid the use of grep, as that introduces an unwanted dependency.
On older systems like Solaris there can be many greps and they
can be buggy, so it’s better to not rely on them in a central
part of the test harness.
|
|
8ac8a9b4
|
2025-09-21T13:43:01
|
|
tests: avoid test failure due to rmdir race
* tests/init.sh (remove_tmp_): If the rm -rf fails, wait a second
and try again. This works around a problem I observed on Solaris
10 on a circa 2001 Sun Fire 280R with a single 750 MHz UltraSPARC
III, where a subprocess had not yet exited by the time the test
script attempted to remove the subprocess’s working directory.
This can happen, for example, if the process A in the shell
command ‘A | B’ closes stdout, checks that the close succeeded
-- a necessary check if stdout is NFS, on Solaris anyway --
and uses that check to affect its exit status.
In this situation, B can read end-of-file from its standard input
and exit before A exits, and then the shell, which waits only for B,
can then attempt to remove A’s working directory during cleanup.
This is not a problem on GNU/Linux where one can remove a
process’s working directory, but it is a problem on Solaris 10
which does not allow this. POSIX allows the Solaris 10 behavior.
|
|
ba34a934
|
2025-09-19T16:26:52
|
|
map-c++-tests: Fix compilation error (regression 2025-09-17).
* tests/test-map-c++.cc (streq): Remove function.
* modules/map-c++-tests (Depends-on): Add stringeq.
|
|
df414ade
|
2025-09-17T16:51:52
|
|
tests: support -ftrivial-auto-var-init
Tested with gcc 15 and clang 20.
Note clang didn't need the adjustment,
but it was applied for clang also, to be defensive.
* tests/test-memset_explicit.c (do_secret_stuff): Mark stack variable
as not to be initialized with either zero or pattern on each invocation.
tests/test-explicit_bzero.c (do_secret_stuff): Likewise.
|
|
a9a1a8cd
|
2025-09-16T21:35:12
|
|
inttypes-h tests: Avoid compilation error on mingw.
Reported by Michele Locati in
<https://lists.gnu.org/archive/html/bug-gettext/2024-09/msg00015.html>.
* tests/test-inttypes-h.c (l): On mingw without __USE_MINGW_ANSI_STDIO,
don't test for the presence of SCN*8, SCN*LEAST8, SCN*FAST8}.
* doc/posix-headers/inttypes.texi: Mention the mingw bug.
|
|
b26ea307
|
2025-09-15T14:43:16
|
|
tests: avoid infinite loop in init.sh
This was noticed when building expr in coreutils
with -fsanitize=memory, which induced false failures
resulting in an infinite loop.
* tests/init.sh: Break from the loop if there's an issue with expr(1).
|
|
16deb62f
|
2025-09-12T16:55:45
|
|
cpu-supports: a module to honor GLIBC_TUNABLES=glibc.cpu.hwcaps
This functionality is useful to allow better test coverage at least,
and may be useful for users to tune their environment,
avoiding CPU throttling for example.
* lib/cpu-supports.h (cpu_supports): A new wrapper that
checks that the GLIBC_TUNABLES environment variable allows
the hardware feature, before checking with __builtin_cpu_supports().
(cpu_may_support): Only perform the GLIBC_TUNABLES check,
which is useful if using other interfaces like getauxval().
(gcc_feature_to_glibc_hwcap): An internal helper that will resolve
at compile time with standard optimizations enabled.
* lib/cpu-supports.c (hwcap_allowed): Query the GLIBC_TUNABLES
environment variable (read once per process), to see if the
passed GLIBC_HWCAP is allowed.
* modules/cpu-supports: New module definition.
* modules/cpu-supports-tests: New test module definition.
* tests/test-cpu-supports.c: New tests.
|
|
93a0da5d
|
2025-09-14T01:17:38
|
|
pagealign_alloc: Don't waste large amounts of memory (regr. 2025-09-10).
* tests/bench-pagealign_alloc.c: Update results.
|
|
7f4d4edc
|
2025-09-14T00:25:12
|
|
pagealign_alloc: Add unit test for scalability.
* tests/test-pagealign_alloc.c: New file.
* modules/pagealign_alloc-tests (Files): Add it.
(Depends-on): Add xalloc.
(configure.ac): Check for alarm().
(Makefile.am): Arrange to compile and run test-pagealign_alloc.
|
|
96a905cd
|
2025-09-13T01:46:42
|
|
pagealign_alloc: Tweak the benchmark.
* tests/bench-pagealign_alloc.c (show_stats): Reformat.
(main): Fix usage message.
|
|
b4866d29
|
2025-09-11T16:59:54
|
|
pagealign_alloc: Add benchmark for comparing different implementations.
* lib/pagealign_alloc.h (pagealign_impl_t): New type.
(pagealign_impl): New declaration.
* lib/pagealign_alloc.c: On native Windows, include <malloc.h> and
<windows.h>.
(pagealign_impl): New variable.
(info_t): Change to a union type.
(get_default_impl): New function.
(pagealign_alloc, pagealign_free): Dispatch according to pagealign_impl.
* tests/bench-pagealign_alloc.c: New file.
* modules/pagealign_alloc-tests: New file.
|
|
ef6d228c
|
2025-09-11T14:38:39
|
|
pagealign_alloc, vma-prot tests: Fix use of HAVE_MMAP (regr. yesterday).
* m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Test for sys/mman.h. Use
ac_cv_header_sys_mman_h instead of gl_have_mmap.
* lib/pagealign_alloc.c: Test HAVE_SYS_MMAN_H instead of HAVE_MMAP.
* tests/test-vma-prot.c: Likewise.
|
|
b1fcec6d
|
2025-09-10T23:22:53
|
|
Remove support for IRIX.
* all-modules: Update comments.
* build-aux/install-reloc: Likewise.
* build-aux/reloc-ldflags: Likewise.
* gnulib-tool: Likewise.
* gnulib-tool.py: Likewise.
* gnulib-tool.sh: Likewise.
* lib/aligned-malloc.h: Likewise.
* lib/boot-time.c: Likewise.
* lib/c32is-impl.h: Likewise.
* lib/c32srtombs-state.c: Likewise.
* lib/c32to-impl.h: Likewise.
* lib/c32width.c: Likewise.
* lib/errno.in.h: Likewise.
* lib/euidaccess.c: Likewise.
* lib/fbufmode.c: Likewise.
* lib/fenv-except-state-get.c: Likewise.
* lib/fenv-except-state-set.c: Likewise.
* lib/fenv-except-tracking-clear.c: Likewise.
* lib/fenv-except-tracking-set.c: Likewise.
* lib/fenv-except-tracking-test.c: Likewise.
* lib/fenv-except-trapping.c: Likewise.
* lib/fenv-round.c: Likewise.
* lib/fflush.c: Likewise.
* lib/fileblocks.c: Likewise.
* lib/forkpty.c: Likewise.
* lib/fpending.c: Likewise.
* lib/fpurge.c: Likewise.
* lib/freadable.c: Likewise.
* lib/freadahead.c: Likewise.
* lib/freading.c: Likewise.
* lib/freadptr.c: Likewise.
* lib/freadseek.c: Likewise.
* lib/fseeko.c: Likewise.
* lib/fseterr.c: Likewise.
* lib/fsusage.c: Likewise.
* lib/fwritable.c: Likewise.
* lib/fwriting.c: Likewise.
* lib/getdomainname.c: Likewise.
* lib/idpriv-drop.c: Likewise.
* lib/idpriv-droptemp.c: Likewise.
* lib/limits.in.h: Likewise.
* lib/mbrtoc16.c: Likewise.
* lib/mbrtoc32.c: Likewise.
* lib/mbsrtoc32s-state.c: Likewise.
* lib/mbsrtowcs-state.c: Likewise.
* lib/mbtowc-lock.h: Likewise.
* lib/minmax.h: Likewise.
* lib/netdb.in.h: Likewise.
* lib/pipe-filter-ii.c: Likewise.
* lib/posix_openpt.c: Likewise.
* lib/ptsname_r.c: Likewise.
* lib/readutmp.c: Likewise.
* lib/readutmp.h: Likewise.
* lib/resource-ext.h: Likewise.
* lib/safe-read.h: Likewise.
* lib/safe-write.h: Likewise.
* lib/save-cwd.c: Likewise.
* lib/stdbool.in.h: Likewise.
* lib/striconv.c: Likewise.
* lib/striconveh.c: Likewise.
* lib/termcap.h: Likewise.
* lib/terminfo.h: Likewise.
* lib/unistd.in.h: Likewise.
* lib/vasnprintf.c: Likewise.
* lib/wcrtomb.c: Likewise.
* lib/wcsrtombs-state.c: Likewise.
* m4/fenv-environment.m4: Likewise.
* m4/fenv-exceptions-state.m4: Likewise.
* m4/fenv-exceptions-tracking.m4: Likewise.
* m4/fenv-rounding.m4: Likewise.
* m4/fmod.m4: Likewise.
* m4/getdomainname.m4: Likewise.
* m4/getloadavg.m4: Likewise.
* m4/getopt.m4: Likewise.
* m4/hypot.m4: Likewise.
* m4/hypotf.m4: Likewise.
* m4/hypotl.m4: Likewise.
* m4/iconv.m4: Likewise.
* m4/intl-thread-locale.m4: Likewise.
* m4/largefile.m4: Likewise.
* m4/libdl.m4: Likewise.
* m4/locale-ja.m4: Likewise.
* m4/locale_h.m4: Likewise.
* m4/log.m4: Likewise.
* m4/log10.m4: Likewise.
* m4/log10f.m4: Likewise.
* m4/logf.m4: Likewise.
* m4/modf.m4: Likewise.
* m4/modff.m4: Likewise.
* m4/modfl.m4: Likewise.
* m4/pthread-rwlock.m4: Likewise.
* m4/semaphore.m4: Likewise.
* m4/socklen.m4: Likewise.
* m4/stdint.m4: Likewise.
* m4/strtod.m4: Likewise.
* m4/strtof.m4: Likewise.
* m4/strtold.m4: Likewise.
* modules/sigsegv: Likewise.
* posix-modules: Likewise.
* pygnulib/GLImport.py: Likewise.
* tests/init.sh: Likewise.
* tests/test-echo.sh: Likewise.
* tests/test-isatty.c: Likewise.
* tests/test-math-h.c: Likewise.
* tests/test-nonblocking-pipe.h: Likewise.
* tests/test-nonblocking-socket.h: Likewise.
* tests/test-strtod.h: Likewise.
* tests/test-strtof.h: Likewise.
* tests/test-strtold.h: Likewise.
* tests/test-vasnprintf.c: Likewise.
* tests/test-vasnwprintf.c: Likewise.
|
|
4ecbad17
|
2025-09-10T23:19:32
|
|
tests: Remove support for IRIX.
* tests/minus-zero.h (compute_minus_zerof, compute_minus_zerod,
compute_minus_zerol): Remove code for IRIX.
* tests/test-c32isgraph.c (main): Likewise.
* tests/test-c32isprint.c (main): Likewise.
* tests/test-getaddrinfo.c (simple): Likewise.
* tests/test-isgraph_l.c (main): Likewise.
* tests/test-isprint_l.c (main): Likewise.
* tests/test-localeconv-mt.c (ENCODING): Likewise.
* tests/test-nl_langinfo-mt.c (ENCODING): Likewise.
* tests/test-setlocale_null-mt-all.c (ENCODING): Likewise.
* tests/test-setlocale_null-mt-one.c (ENCODING): Likewise.
* tests/test-sethostname1.c: Likewise.
* tests/test-striconveha.c (main): Likewise.
* tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
* tests/test-frexpl.c (MIN_NORMAL_EXP): Likewise.
* tests/test-ilogbl.c (MIN_NORMAL_EXP): Likewise.
* tests/test-logbl.c (MIN_NORMAL_EXP): Likewise.
* tests/test-printf-frexpl.c (MIN_NORMAL_EXP, MIN_SUBNORMAL_EXP):
Likewise.
* tests/test-fma2.h (MIN_SUBNORMAL_EXP): Remove macro.
(test_function): Inline its value.
* tests/test-lseek.c (main): Update comments.
* tests/test-sigabbrev_np.c (main): Remove cases for SIGCKPT, SIGPTINTR,
SIGPTRESCHED, SIGRESTART, SIGUME.
* tests/test-sigdescr_np.c (main): Likewise.
* modules/math-h-c++-tests (Makefile.am): Don't link test-math-h-c++
with extra libraries.
|
|
abe5d60f
|
2025-09-10T23:03:55
|
|
Remove support for IRIX and Solaris <= 7 regarding old mmap.
* m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Don't define HAVE_MAP_ANONYMOUS.
* m4/memchr.m4 (gl_FUNC_MEMCHR): Assume that mmap supports MAP_ANONYMOUS
or MAP_ANON.
* m4/strncat.m4 (gl_FUNC_STRNCAT): Likewise.
* lib/get-rusage-as.c (MAP_FILE): Remove macro.
(get_rusage_as_via_setrlimit): Assume that mmap supports MAP_ANONYMOUS
or MAP_ANON.
* modules/get-rusage-as (Depends-on): Remove 'open'.
* lib/pagealign_alloc.c (MAP_FILE): Remove macro.
(pagealign_alloc): Assume that mmap supports MAP_ANONYMOUS or MAP_ANON.
* modules/pagealign_alloc (Depends-on): Remove 'open'.
* lib/vma-iter.c: Remove code for IRIX.
(vma_iterate): Assume that mmap supports MAP_ANONYMOUS or MAP_ANON.
* lib/vma-iter.h: Remove code for IRIX.
* lib/stackvma.c: Remove code for IRIX.
(vma_iterate): Assume that mmap supports MAP_ANONYMOUS or MAP_ANON.
* lib/stackvma.h: Remove code for IRIX.
* tests/mmap-anon-util.h: (zero_fd, map_flags, MAP_FILE): Remove macros.
(mmap_zeromap): Assume that mmap supports MAP_ANONYMOUS or MAP_ANON.
* tests/zerosize-ptr.h (MAP_FILE): Remove macro.
(zerosize_ptr): Assume that mmap supports MAP_ANONYMOUS or MAP_ANON.
* tests/jit/test-cache.c (main): Assume that mmap supports MAP_ANONYMOUS
or MAP_ANON.
* tests/test-sigsegv-catch-segv1.c (main): Assume that mmap supports
MAP_ANONYMOUS or MAP_ANON.
* tests/test-sigsegv-catch-segv2.c (main): Likewise.
* tests/test-sigsegv-catch-stackoverflow2.c (main): Likewise.
* tests/test-vma-prot.c: Test HAVE_MMAP instead of HAVE_MAP_ANONYMOUS.
|
|
72a55752
|
2025-09-10T22:53:20
|
|
errno-iter, strerrorname_np: Remove support for IRIX.
* lib/errno-iter.c (errno_iterate): Remove cases for EBADFILT,
EBADRSPEC, EBADTSPEC, EBDHDL, EBUFSIZE, ECANTEXTENT, ECELLDOWN, ECKPT,
ECLOCKCPU, ECONTROLLER, EDELAY, EDESTROYED, EDIRCORRUPTED, EDISJOINT,
EEMPTY, EENDOFMINOR, EENQUEUED, EFSCORRUPTED, EGROUPLOOP, EINIT,
EINVALMODE, EINVALSTATE, EINVALTIME, EIORESID, EJOINED, ELOGINLIM,
EMEMRETRY, EMIGRATED, EMIGRATING, EMUSTRUN, ENFSREMOTE, ENOATTACH,
ENOBWD, ENOEXIST, ENOINTRGROUP, ENOLIMFILE, ENOLOGIN, ENOMESSAGE,
ENOPROC, ENOSERVICE, ENOTCONTROLLER, ENOTENQUEUED, ENOTJOINED,
ENOTSTOPPED, EREMDEV, EWRONGFS.
* lib/strerrorname_np.c (strerrorname_np): Likewise.
* tests/test-strerrorname_np.c (main): Likewise.
|
|
7ea19a7a
|
2025-09-10T22:52:12
|
|
acl, file-has-acl, copy-file tests: Remove support for IRIX.
* tests/test-file-has-acl.sh: Remove code for IRIX ACLs.
* tests/test-set-mode-acl.sh: Likewise.
* tests/test-copy-acl.sh: Likewise.
* tests/test-copy-file.sh: Likewise.
* tests/test-sameacls.c: Update comment.
|
|
19adc7a2
|
2025-09-09T12:50:18
|
|
Remove support for OSF/1.
* all-modules: Update comments.
* build-aux/install-reloc: Likewise.
* gnulib-tool: Likewise.
* gnulib-tool.py: Likewise.
* gnulib-tool.sh: Likewise.
* lib/calloc.c: Likewise.
* lib/euidaccess.c: Likewise.
* lib/fbufmode.c: Likewise.
* lib/fflush.c: Likewise.
* lib/fpending.c: Likewise.
* lib/fpurge.c: Likewise.
* lib/freadable.c: Likewise.
* lib/freadahead.c: Likewise.
* lib/freading.c: Likewise.
* lib/freadptr.c: Likewise.
* lib/freadseek.c: Likewise.
* lib/fseeko.c: Likewise.
* lib/fseterr.c: Likewise.
* lib/fwritable.c: Likewise.
* lib/fwriting.c: Likewise.
* lib/get-permissions.c: Likewise.
* lib/get-rusage-as.c: Likewise.
* lib/getdomainname.c: Likewise.
* lib/getpass.c: Likewise.
* lib/glthread/spin.c: Likewise.
* lib/idpriv-drop.c: Likewise.
* lib/idpriv-droptemp.c: Likewise.
* lib/log10l.c: Likewise.
* lib/login_tty.c: Likewise.
* lib/minmax.h: Likewise.
* lib/mountlist.c: Likewise.
* lib/netdb.in.h: Likewise.
* lib/nproc.c: Likewise.
* lib/passfd.c: Likewise.
* lib/posix_openpt.c: Likewise.
* lib/resource-ext.h: Likewise.
* lib/safe-read.h: Likewise.
* lib/safe-write.h: Likewise.
* lib/stdint.in.h: Likewise.
* lib/stdio.in.h: Likewise.
* lib/string.in.h: Likewise.
* lib/sys-limits.h: Likewise.
* lib/termcap.h: Likewise.
* lib/terminfo.h: Likewise.
* lib/ttyname_r.c: Likewise.
* lib/vasnprintf.c: Likewise.
* lib/wait-process.c: Likewise.
* m4/fmal.m4: Likewise.
* m4/getdomainname.m4: Likewise.
* m4/getopt.m4: Likewise.
* m4/hypot.m4: Likewise.
* m4/hypotf.m4: Likewise.
* m4/hypotl.m4: Likewise.
* m4/iconv.m4: Likewise.
* m4/iconv_open-utf.m4: Likewise.
* m4/imaxabs.m4: Likewise.
* m4/imaxdiv.m4: Likewise.
* m4/largefile.m4: Likewise.
* m4/link-follow.m4: Likewise.
* m4/locale-fr.m4: Likewise.
* m4/locale-ja.m4: Likewise.
* m4/locale_h.m4: Likewise.
* m4/lock.m4: Likewise.
* m4/log10l.m4: Likewise.
* m4/mkstemp.m4: Likewise.
* m4/mmap-anon.m4: Likewise.
* m4/modf.m4: Likewise.
* m4/modff.m4: Likewise.
* m4/modfl.m4: Likewise.
* m4/semaphore.m4: Likewise.
* m4/socklen.m4: Likewise.
* m4/strerror_r.m4: Likewise.
* m4/terminfo.m4: Likewise.
* m4/wcwidth.m4: Likewise.
* posix-modules: Likewise.
* tests/havelib/README: Likewise.
* tests/init.sh: Likewise.
* tests/socket-client.h: Likewise.
* tests/socket-server.h: Likewise.
* tests/test-echo.sh: Likewise.
* tests/test-nonblocking-socket.h: Likewise.
* tests/test-strtod.h: Likewise.
* tests/test-strtof.h: Likewise.
|
|
5c0efc93
|
2025-09-09T12:49:41
|
|
tests: Remove support for OSF/1.
* tests/test-mbmemcasecmp.h (test_iso_8859_1): Remove code for OSF/1.
* tests/test-nonblocking-pipe.h (PIPE_DATA_BLOCK_SIZE): Likewise.
* tests/test-select.h (test_bad_fd): Likewise.
* tests/test-striconveha.c (main): Likewise.
* tests/uniconv/test-u8-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u8-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u16-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u16-strconv-from-enc.c (main): Likewise.
* tests/uniconv/test-u32-conv-from-enc.c (main): Likewise.
* tests/uniconv/test-u32-strconv-from-enc.c (main): Likewise.
|
|
39dc93a3
|
2025-09-09T12:40:36
|
|
errno-iter, strerrorname_np: Remove support for OSF/1.
* lib/errno-iter.c (errno_iterate): Remove cases for EAIO, ECLONEME,
EDIRTY, EDUPPKG, EEMULATE, EFAIL, EINPROG, EMTIMERS, ERELOCATED,
ESUCCESS, EVERSION.
* lib/strerrorname_np.c (strerrorname_np): Likewise.
* tests/test-strerrorname_np.c (main): Likewise.
|
|
dd560c93
|
2025-09-09T12:37:03
|
|
acl, file-has-acl, copy-file tests: Remove support for OSF/1.
* tests/test-file-has-acl.sh: Remove code for OSF/1 ACLs.
* tests/test-set-mode-acl.sh: Likewise.
* tests/test-copy-acl.sh: Likewise.
* tests/test-copy-file.sh: Likewise.
* tests/test-sameacls.c: Update comment.
|
|
49c5d4bc
|
2025-09-08T13:42:54
|
|
stdcountof-h tests: Fix compilation error with clang 21.
* tests/test-stdcountof-h.c (test_func): Don't use _gl_verify_is_array
if it's not defined.
|
|
a82f1b76
|
2025-09-06T16:38:08
|
|
crypto/sha3-buffer, crypto/sha3: Protect against double frees (regr. today).
* lib/sha3.c (sha3_free_ctx): Only free the EVP_MD_CTX if it is not
NULL, and set it to NULL after freeing.
(DEFINE_SHA3_INIT_CTX, sha3_finish_ctx, sha3_process_bytes): Leave
freeing memory to the caller.
* lib/sha3-stream.c (sha3_xxx_stream): Call sha3_free_ctx on success and
if sha3_init_ctx fails.
* tests/test-sha3-224-buffer.c (main): Add a test that would otherwise
segfault without this patch.
* tests/test-sha3-256-buffer.c (main): Likewise.
* tests/test-sha3-384-buffer.c (main): Likewise.
* tests/test-sha3-512-buffer.c (main): Likewise.
|
|
d5dcc6c9
|
2025-09-01T14:26:59
|
|
Fix the previous two commits.
The issue occurs on alpha not hppa. Also add the glibc bug report link
in comments.
|
|
282ea164
|
2025-09-01T14:01:36
|
|
sys_types-h tests: Fix a static_assert failure on glibc/hppa.
* tests/test-sys_types-h.c [__GLIBC__ && __hppa]: Don't check that
blksize_t and blkcnt_t are signed.
* doc/posix-headers/sys_types.texi: Mention that these types are
unsigned on this platform.
|
|
1087a157
|
2025-09-01T14:00:00
|
|
sys_stat-h tests: Fix a static_assert failure on glibc/hppa.
Reported by Santiago Vila <sanvila@debian.org> in:
<https://lists.gnu.org/archive/html/bug-m4/2025-09/msg00000.html>.
* tests/test-sys_stat-h.c [__GLIBC__ && __hppa]: Don't check that
blksize_t and blkcnt_t are signed.
* doc/posix-headers/sys_stat.texi: Mention that these types are
unsigned on this platform.
|
|
8ba0c4da
|
2025-09-01T13:04:21
|
|
tests: adapt AT_FDCWD fix for more tests
* tests/test-areadlinkat-with-size.c (main):
* tests/test-areadlinkat.c (main):
* tests/test-faccessat.c (main):
* tests/test-fchmodat.c (main):
* tests/test-fchownat.c (main):
* tests/test-fstatat.c (main):
* tests/test-linkat.c (main):
* tests/test-mkdirat.c (main):
* tests/test-mkfifoat.c (main):
* tests/test-openat-safer.c (main):
* tests/test-readlinkat.c (main):
* tests/test-renameat.c (main):
* tests/test-renameatu.c (main):
* tests/test-symlinkat.c (main):
* tests/test-unlinkat.c (main):
* tests/test-utimensat.c (main):
Work even if AT_FDCWD == -1.
|
|
e30c1556
|
2025-09-01T11:25:00
|
|
openat2-tests: fix AT_FDCWD portability
* tests/test-openat.c (main): Work even if AT_FDCWD == -1.
|
|
ec500f50
|
2025-08-31T12:51:14
|
|
crypto/sha3-buffer: Add tests.
* modules/crypto/sha3-buffer-tests: New file.
* tests/test-sha3-224-buffer.c: Likewise.
* tests/test-sha3-256-buffer.c: Likewise.
* tests/test-sha3-384-buffer.c: Likewise.
* tests/test-sha3-512-buffer.c: Likewise.
* tests/bench-sha3-224.c: Likewise.
* tests/bench-sha3-256.c: Likewise.
* tests/bench-sha3-384.c: Likewise.
* tests/bench-sha3-512.c: Likewise.
|
|
3d4a8bff
|
2025-08-26T00:02:22
|
|
nstrftime tests: Test in the UTF-8 environment on native Windows.
Prompted by <https://debbugs.gnu.org/79296>.
* tests/test-nstrftime-w32utf8.sh: New file.
* tests/test-nstrftime-w32utf8.c: New file.
* modules/nstrftime-tests (Files): Add them. Add windows-utf8.rc,
windows-utf8.manifest, m4/windows-rc.m4.
(configure.ac): Invoke gl_WINDOWS_RC.
(Makeile.am): Arrange to build test-nstrftime-w32utf8 and
run test-nstrftime-w32utf8.sh.
|
|
9b07115f
|
2025-08-18T15:34:59
|
|
nproc: honor cgroupv2 CPU quotas
cgroupv1 CPU quotas are not considered,
as those are now legacy (RHEL7 era),
and are more complex/inefficient to parse.
Tested in coreutils on Fedora 42
as detailed in tests/test-nproc.c
* lib/nproc.c (cgroup2_mount): Identify the cgroup2 mount point,
first at the common location for efficiency,
resorting to searching mount points otherwise.
(get_cgroup2_cpu_quota): Walk cgroup2 quotas for the current process,
returning the lowest integer number of CPUs configured.
(cpu_quota): On Linux return the cgroupv2 CPU quota if the
currrent scheduler honors it. Otherwise return ULONG_MAX.
(num_processors): Clamp the return to <= quota.
* m4/nproc.m4: Add a check for mntent.h.
* tests/test-nproc.c: Document how cgroup CPU quotas were tested.
|
|
b65a8d11
|
2025-08-11T12:04:17
|
|
nlcanon tests: Fix test failure on Solaris.
* tests/test-nlcanon.sh: Handle the --no-reexec option (from init.sh).
|
|
7e5312be
|
2025-08-05T01:20:58
|
|
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.
|
|
c7fd1990
|
2025-08-04T13:23:54
|
|
nlcanon: Add tests.
* tests/test-nlcanon.sh: New file.
* modules/nlcanon-tests: New file.
* tests/init.sh (setup_): Adjust also top_builddir, if set.
|
|
2410984b
|
2025-08-02T10:25:13
|
|
Shorten GCC bug URLs
|
|
98704937
|
2025-08-02T10:21:36
|
|
Shorten glibc bug URLs
|
|
1ce8849f
|
2025-07-28T17:50:30
|
|
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.
|
|
114d91d7
|
2025-07-23T20:54:50
|
|
posixtm tests: Avoid test failure on Haiku.
* tests/test-posixtm.c (T): On Haiku, disable test cases that would
fail.
|
|
e936bfd8
|
2025-07-23T19:55:41
|
|
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.
|
|
b5eb8780
|
2025-07-19T21:38:57
|
|
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.
|
|
2b426863
|
2025-07-17T11:33:39
|
|
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.
|
|
4393ea5a
|
2025-07-15T11:19:10
|
|
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.
|
|
091a73f5
|
2025-07-15T10:34:01
|
|
next-prime tests: Update unit test after last change.
* tests/test-next-prime.c (main): Allow either behaviour.
|
|
e94aad0c
|
2025-07-13T00:43:36
|
|
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.
|
|
6164b4cb
|
2025-07-08T17:34:25
|
|
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.
|
|
65ed9d3b
|
2025-07-06T16:22:05
|
|
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.
|
|
55a366a0
|
2025-07-06T12:33:06
|
|
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.
|
|
2140e5c5
|
2025-06-27T15:30:23
|
|
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.
|
|
84f19f05
|
2025-06-25T15:52:40
|
|
kwset: Add tests.
* lib/kwset.c (kwsexec): Correct documentation.
* tests/test-kwset.c: New file.
* modules/kwset-tests: New file.
|
|
f3684e41
|
2025-06-15T17:25:22
|
|
fenv-environment tests: Fix compilation errors on Linux/sh4.
Reported by Collin Funk in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-06/msg00124.html>.
* tests/test-fenv-env-2.c (FE_UPWARD, FE_DOWNWARD): Define as aliases.
* tests/test-fenv-env-3.c: Likewise.
* tests/test-fenv-env-4.c: Likewise.
* tests/test-fenv-env-5.c: Likewise.
|
|
e8712cc1
|
2025-06-13T12:27:44
|
|
stat: Support the file name "/dev/null" on native Windows.
Reported by Collin Funk in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-06/msg00119.html>.
* lib/stat.c (rpl_stat): On native Windows, map "/dev/null" to "NUL".
* tests/test-fstat.c (main): Test /dev/null also on native Windows.
* tests/test-stat.h (test_stat_func): Likewise.
* tests/test-lstat.h (test_lstat_func): Likewise.
* doc/posix-functions/stat.texi: Mention problem of null device name.
* doc/posix-functions/lstat.texi: Likewise.
|
|
470a4f51
|
2025-06-13T03:58:46
|
|
lstat tests: Avoid test failure on Solaris.
* tests/test-lstat.h (test_lstat_func): Reduce assumption about
/dev/null on Solaris.
|
|
fab07841
|
2025-06-12T19:45:19
|
|
stat, lstat, fstat tests: Enhance tests regarding /dev/null or NUL.
* tests/test-fstat.c: Include <fcntl.h>.
(main): Check that fstat reports /dev/null or NUL as a character device.
* tests/test-stat.h (test_stat_func): Likewise for stat.
* tests/test-lstat.h (test_lstat_func): Likewise for lstat.
|
|
c731f331
|
2025-06-09T12:51:14
|
|
file-has-acl tests: Avoid test failure on Cygwin.
* modules/file-has-acl-tests (Makefile.am): Add host_os to the
TESTS_ENVIRONMENT.
* tests/test-file-has-acl-2.sh: On Cygwin, skip this test.
|
|
dd6bd646
|
2025-06-08T02:58:21
|
|
stdcountof-h: Work around a clang bug.
Reported by Basil L. Contovounesios <basil@contovou.net> in
<https://lists.gnu.org/archive/html/bug-gnulib/2025-06/msg00073.html>.
* lib/stdcountof.in.h (_gl_verify_is_array): Disable the checking on
clang.
* tests/test-stdcountof-h.c (test_func): Add another test case.
|
|
18ebf185
|
2025-06-03T14:15:39
|
|
stdcountof-h tests: Fix compilation error with gcc versions < 15.
* tests/test-stdcountof-h.c (HAVE___TYPEOF__): Remove macro.
(test_func): Remove __typeof__ invocations.
|
|
883c26a0
|
2025-06-03T11:26:45
|
|
stdcountof-h: Always return size_t, in a better way.
* lib/stdcountof.in.h: Revert last change. Include <stddef.h>
unconditionally.
(countof): Cast value to size_t.
* tests/test-stdcountof-h.c (HAVE___TYPEOF__, HAVE__GENERIC): New
macros.
(test_func): Check the return type of countof.
|
|
3b239ab5
|
2025-06-02T23:44:55
|
|
stdcountof-h: Add tests.
* tests/test-stdcountof-h.c: New file.
* tests/test-stdcountof-h-c++.cc: New file.
* modules/stdcountof-h-tests: New file.
* modules/stdcountof-h-c++-tests: New file.
|
|
df7978ac
|
2025-06-02T18:32:26
|
|
stddef-h: Fix compilation errors in C++ mode (regression 2025-05-27).
* m4/stddef_h.m4 (gl_STDDEF_H): Set and substitute HAVE_C_UNREACHABLE.
Don't test for unreachable in <stddef.h> in C++. Set
GL_GENERATE_STDDEF_H to true always.
* lib/stddef.in.h (gl_unreachable): Renamed from _gl_unreachable. Test
HAVE_C_UNREACHABLE.
(unreachable): Don't define in C++ mode. Don't define if
HAVE_C_UNREACHABLE is 1.
* modules/stddef-h (Makefile.am): Substitute HAVE_C_UNREACHABLE.
* tests/test-stddef-h.c (test_unreachable_optimization,
test_unreachable_noreturn): Don't define in C++ mode.
(test_gl_unreachable_optimization, test_gl_unreachable_noreturn): New
functions.
* tests/test-stddef-h-c++3.cc (test_cxx_unreachable_1): Test
gl_unreachable instead of unreachable.
* lib/error.in.h (__gl_error_call1): Use gl_unreachable instead of
unreachable.
|
|
1619b78c
|
2025-06-02T12:51:55
|
|
open, openat: Fix test failure on native Windows.
* tests/test-open.h (test_open): Expect a different error code for
"/dev/null/" on native Windows.
|
|
c384a44f
|
2025-05-31T23:43:24
|
|
stat-time tests: Add C++ tests.
* tests/test-stat-time-c++.cc: New file.
* modules/stat-time-c++-tests: New file.
* modules/stat-time-tests (Depends-on): Add stat-time-c++-tests.
|
|
0a12fa9d
|
2025-05-28T12:31:45
|
|
fcntl-safer-tests: also update this for fifos
* modules/fcntl-safer-tests (Depends-on): Add mkfifo.
(configure.ac) Check for alarm decl.
* tests/test-fcntl-safer.c:
Include sys/stat.h, for mkfifo.
[HAVE_DECL_ALARM]: Include signal.h, for alarm.
|
|
87555a59
|
2025-05-28T10:40:21
|
|
open, openat: handle O_DIRECTORY on special files
On deficient platforms where we must check for directories
ourselves when opening files, check before opening as well as after.
This prevents a hang when trying to open a special file like a
fifo in a context where a directory is required. Although there
is still a race so we could still hang in a perverse situation,
it’s the best we can do and it is better than hanging in the
more-common case.
* lib/open.c (lstatif): New static function.
(open) [REPLACE_FCHDIR]: Also inspect O_CREAT.
* lib/open.c (open), lib/openat.c (rpl_openat):
When checking for directories, also do this before opening.
Also, respect O_NOFOLLOW when checking for directories.
* lib/openat.c: Remove a few more unnecessary differences from open.c.
* modules/open (Depends-on): Depend on lstat.
* modules/openat (Depends-on): Add fstatat.
* modules/open-tests, modules/openat-tests:
(configure.ac) Check for alarm decl.
* tests/test-open.c, tests/test-openat.c:
Include sys/stat.h, for mkfifo.
[HAVE_DECL_ALARM]: Include signal.h, for alarm.
* tests/test-open.h (test_open): Fail if test takes too long
because we tried to open a fifo. Test opening /dev/null,
/dev/tty and a fifo, with a trailing "/" and with O_DIRECTORY.
|
|
d19a73d0
|
2025-05-28T01:59:05
|
|
stddef-h: Make 'unreachable' usable in C++ mode.
Reported by Pierre Ossman <ossman@cendio.se>
at <https://savannah.gnu.org/bugs/?67152>.
* m4/stddef_h.m4 (gl_STDDEF_H): Also test whether unreachable is defined
by <stddef.h> in C++ mode.
* lib/stddef.in.h: In C++ mode, include <utility> and either import
'unreachable' from the std namespace or define it as an inline function.
* tests/test-stddef-h.c: Disable some tests in C++ mode.
* tests/test-stddef-h-c++.cc: Perform nearly the same tests in C++ mode
as in C mode.
* tests/test-stddef-h-c++2.cc: Rename some variables. Disable the NULL
test with clang on Windows.
* tests/test-stddef-h-c++3.cc: New file.
* modules/stddef-h-c++-tests (Files): Include it.
(Makefile.am): Link test-stddef-h-c++ with test-stddef-h-c++3.o.
|
|
bc1bf2fc
|
2025-05-26T18:30:18
|
|
fcntl-h: support O_DIRECTORY
It is relatively easy to support O_DIRECTORY on platforms that
lack it, so let’s do that instead of having to work around bugs
like <https://bugs.gnu.org/78509#95>.
* lib/fcntl.in.h (O_DIRECTORY): Default to 0x20000000 not 0,
since Gnulib now supports it.
* lib/open.c, lib/openat.c (OPEN_TRAILING_SLASH_BUG):
Default to false, so that this can be used outside #if.
(open, openat): Add support for O_DIRECTORY on platforms that lack it.
If fstat fails, fail instead of assuming the file is a directory,
since failure can occur due to EOVERFLOW, etc.
Rearrange code to minimize differences between open.c and openat.c.
* m4/fcntl-o.m4 (gl_FCNTL_O_FLAGS): Also test O_DIRECTORY,
and define HAVE_WORKING_O_DIRECTORY if needed.
Prefer AS_CASE for Emacs’s benefit.
* m4/open.m4 (gl_FUNC_OPEN):
* m4/openat.m4 (gl_FUNC_OPENAT):
Require gl_FCNTL_O_FLAGS and replace the function
if O_DIRECTORY does not work.
* tests/test-open.h: Test O_DIRECTORY.
|
|
5da9ed4c
|
2025-05-25T21:50:12
|
|
stddef-h tests: Add more C++ tests.
* tests/test-stddef-h-c++2.cc: Test the expected contents of <cstddef>.
|
|
5948807b
|
2025-05-19T21:23:56
|
|
stdckdint-h C++ tests: Verify the ckd_* functions can be invoked.
* tests/test-stdckdint-h-c++.cc (main): Invoke ckd_add, ckd_sub, and
ckd_mul.
|
|
6907c115
|
2025-05-18T23:16:15
|
|
tests: simplify test_exit_status decl
* tests/macros.h (test_exit_status) [!NO_MAIN_HERE]:
Declare test_exit_status too, as this is simpler
and we might as well check definition vs declaration.
|
|
0a319fd5
|
2025-05-19T02:01:32
|
|
unigbrk/u*-grapheme-prev: Support Indic, Emojis, regional indicators.
Reported by Kang-Che Sung <explorer09@gmail.com> in
<https://lists.gnu.org/archive/html/bug-libunistring/2025-03/msg00000.html>.
* lib/unigbrk/u-grapheme-prev.h: New file, based on
lib/unigbrk/u-grapheme-breaks.h.
* lib/unigbrk/u8-grapheme-prev.c: Include unictype.h and
u-grapheme-prev.h.
(u8_grapheme_prev): Remove function.
* lib/unigbrk/u16-grapheme-prev.c: Include unictype.h and
u-grapheme-prev.h.
(u16_grapheme_prev): Remove function.
* lib/unigbrk/u32-grapheme-prev.c: Include unictype.h and
u-grapheme-prev.h.
(u32_grapheme_prev): Remove function.
* modules/unigbrk/u8-grapheme-prev (Files): Add
lib/unigbrk/u-grapheme-prev.h.
(Depends-on): Remove unigbrk/uc-is-grapheme-break. Add unigbrk/base,
unigbrk/uc-gbrk-prop, unictype/incb-of,
unictype/property-extended-pictographic, bool.
(configure.ac): Bump required libunistring version.
* modules/unigbrk/u16-grapheme-prev (Files): Add
lib/unigbrk/u-grapheme-prev.h.
(Depends-on): Remove unigbrk/uc-is-grapheme-break. Add unigbrk/base,
unigbrk/uc-gbrk-prop, unictype/incb-of,
unictype/property-extended-pictographic, bool.
(configure.ac): Bump required libunistring version.
* modules/unigbrk/u32-grapheme-prev (Files): Add
lib/unigbrk/u-grapheme-prev.h.
(Depends-on): Remove unigbrk/uc-is-grapheme-break. Add unigbrk/base,
unigbrk/uc-gbrk-prop, unictype/incb-of,
unictype/property-extended-pictographic, bool.
(configure.ac): Bump required libunistring version.
* tests/unigbrk/test-u8-grapheme-prev.c (main): Add more test cases,
from tests/unigbrk/test-u8-grapheme-breaks.c.
* tests/unigbrk/test-u16-grapheme-prev.c (main): Add more test cases,
from tests/unigbrk/test-u16-grapheme-breaks.c.
* tests/unigbrk/test-u32-grapheme-prev.c (main): Add more test cases,
from tests/unigbrk/test-u32-grapheme-breaks.c.
|
|
f783bbc7
|
2025-05-19T01:53:23
|
|
unigbrk/u*-grapheme-next: Support Indic, Emojis, regional indicators.
Reported by Kang-Che Sung <explorer09@gmail.com> in
<https://lists.gnu.org/archive/html/bug-libunistring/2025-03/msg00000.html>
and by Lich <author@lch361.net> in
<https://lists.gnu.org/archive/html/bug-libunistring/2025-05/msg00000.html>.
* lib/unigbrk/u-grapheme-next.h: New file, based on
lib/unigbrk/u-grapheme-breaks.h.
* lib/unigbrk/u8-grapheme-next.c: Include unictype.h and
u-grapheme-next.h.
(u8_grapheme_next): Remove function.
* lib/unigbrk/u16-grapheme-next.c: Include unictype.h and
u-grapheme-next.h.
(u16_grapheme_next): Remove function.
* lib/unigbrk/u32-grapheme-next.c: Include unictype.h and
u-grapheme-next.h.
(u32_grapheme_next): Remove function.
* modules/unigbrk/u8-grapheme-next (Files): Add
lib/unigbrk/u-grapheme-next.h.
(Depends-on): Remove unigbrk/uc-is-grapheme-break. Add unigbrk/base,
unigbrk/uc-gbrk-prop, unictype/incb-of,
unictype/property-extended-pictographic, bool.
(configure.ac): Bump required libunistring version.
* modules/unigbrk/u16-grapheme-next (Files): Add
lib/unigbrk/u-grapheme-next.h.
(Depends-on): Remove unigbrk/uc-is-grapheme-break. Add unigbrk/base,
unigbrk/uc-gbrk-prop, unictype/incb-of,
unictype/property-extended-pictographic, bool.
(configure.ac): Bump required libunistring version.
* modules/unigbrk/u32-grapheme-next (Files): Add
lib/unigbrk/u-grapheme-next.h.
(Depends-on): Remove unigbrk/uc-is-grapheme-break. Add unigbrk/base,
unigbrk/uc-gbrk-prop, unictype/incb-of,
unictype/property-extended-pictographic, bool.
(configure.ac): Bump required libunistring version.
* tests/unigbrk/test-u8-grapheme-next.c (main): Add more test cases,
from tests/unigbrk/test-u8-grapheme-breaks.c.
* tests/unigbrk/test-u16-grapheme-next.c (main): Add more test cases,
from tests/unigbrk/test-u16-grapheme-breaks.c.
* tests/unigbrk/test-u32-grapheme-next.c (main): Add more test cases,
from tests/unigbrk/test-u32-grapheme-breaks.c.
|
|
7a952c54
|
2025-05-17T14:19:24
|
|
cosh: Add more tests.
* tests/test-cosh.c: Include <stdio.h>, <string.h>.
(main): Add another test case.
|
|
bf5e55b8
|
2025-05-17T14:18:45
|
|
sinh: Add more tests.
* tests/test-sinh.c: Include <stdio.h>, <string.h>.
(main): Add another test case.
|