modules


Log

Author Commit Date CI Message
Bruno Haible 3f13a7ef 2023-08-21T15:58:16 wcsstr-simple: Relicense under LGPLv2+. * modules/wcsstr-simple (License): Change to LGPLv2+. * lib/wcsstr.c: Update license notice. * lib/wcsstr-impl.h: Update license notice. The code added here on 2023-03-27 was under LGPLv2+.
Bruno Haible acfc83b9 2023-08-21T15:50:35 wmemcmp: Relicense under LGPLv2+. * modules/wmemcmp (License): Change to LGPLv2+. * lib/wmemcmp.c: Update license notice. * lib/wmemcmp-impl.h: Likewise.
Bruno Haible 567b7fe9 2023-08-21T15:46:02 wcschr: Relicense under LGPLv2+. * modules/wcschr (License): Change to LGPLv2+. * lib/wcschr.c: Update license notice. * lib/wcschr-impl.h: Likewise.
Bruno Haible 6d1d68ae 2023-08-21T15:08:54 isnanl: Relicense under LGPLv2+. * modules/isnanl (License): Change to LGPLv2+.
Paul Eggert 9c7ca2ba 2023-08-20T13:23:11 ldexp: fix INT_MIN infloop * lib/ldexp.c (FUNC): Instead of converting EXP to unsigned, work on it directly. This simplifies the code and avoids an infinite loop when EXP == INT_MIN. * modules/ldexp, modules/ldexpl: Depend on stdbool. * tests/test-ldexp.h: Include <limits.h> for INT_MIN. (test_function): Test for infloop.
Bruno Haible fed956a8 2023-08-20T02:43:01 ldexp: Work around OpenBSD/mips64 bug. * lib/math.in.h (ldexp): New declaration. * lib/ldexp.c: New file, based on lib/ldexpl.c. * lib/ldexpl.c: Moved the implementation to lib/ldexp.c. Just include it. * m4/math_h.m4 (gl_MATH_H_REQUIRE_DEFAULTS): Initialize GNULIB_LDEXP. (gl_MATH_H_DEFAULTS): Initialize REPLACE_LDEXP. * m4/ldexp.m4 (gl_FUNC_LDEXP): Require gl_MATH_H_DEFAULTS and gl_FUNC_ISNAND. Invoke gl_FUNC_LDEXP_WORKS. Set REPLACE_LDEXP. Consider it when setting LDEXP_LIBM. (gl_FUNC_LDEXP_WORKS): New macro. * modules/math (Makefile.am): Substitute GNULIB_LDEXP, REPLACE_LDEXP. * modules/ldexp (Files): Add lib/ldexp.c. (Depends-on): Add math, isnand. (configure.ac): Set GL_COND_OBJ_LDEXP. Invoke gl_MATH_MODULE_INDICATOR. (Makefile.am): Conditionally compile ldexp.c. * modules/ldexpl (Files): Add lib/ldexp.c. * doc/posix-functions/ldexp.texi: Mention the OpenBSD bug.
Bruno Haible e9633a2b 2023-08-20T03:10:00 ldexpl: Relicense under LGPLv2+. * modules/ldexpl (License): Change to LGPLv2+. * lib/ldexpl.c: Update license notice.
Bruno Haible 271d79f3 2023-08-20T02:19:04 isnand: Relicense under LGPLv2+. * modules/isnand (License): Change to LGPLv2+.
Bruno Haible 2d963d69 2023-08-18T22:38:04 thrd: Work around thrd_join bug on AIX 7.3.1. * m4/threads_h.m4 (gl_THREADS_H): Test against AIX 7 thrd_join bug. Set BROKEN_THRD_JOIN. (gl_THREADS_H_DEFAULTS): Initialize BROKEN_THRD_JOIN. * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set REPLACE_THRD_* to 1 also if BROKEN_THRD_JOIN is 1. Define BROKEN_THRD_START_T_OR_JOIN instead of BROKEN_THRD_START_T. * modules/threads-h (Makefile.am): Substitute BROKEN_THRD_JOIN. * lib/threads.in.h (rpl_thrd_t, thrd_t): Define also if BROKEN_THRD_JOIN is 1. * lib/thrd.c: Test BROKEN_THRD_START_T_OR_JOIN instead of BROKEN_THRD_START_T. * doc/posix-functions/thrd_join.texi: Update. * doc/posix-functions/thrd_exit.texi: Likewise.
Bruno Haible ae27b197 2023-08-18T19:39:03 thrd tests: Add unit test for thrd_exit. * tests/test-thrd_exit.c: New file, based on tests/test-thrd_create.c. * modules/thrd-tests (Files): Add it. (Makefile.am): Compile and run it.
Bruno Haible cdf08214 2023-08-18T20:52:08 thrd: On AIX 7.1 and 7.2, override also thrd_exit. * lib/threads.in.h (thrd_exit): Consider REPLACE_THRD_EXIT. * lib/thrd.c (rpl_thrd_exit): New function. * m4/threads_h.m4 (gl_THREADS_H_DEFAULTS): Initialize REPLACE_THRD_EXIT. * m4/thrd.m4 (gl_FUNC_THRD_JOIN): Set also REPLACE_THRD_EXIT and adjust LIBSTDTHREAD. * modules/threads-h (Makefile.am): Substitute REPLACE_THRD_EXIT. * doc/posix-functions/thrd_exit.texi: Mention the AIX thrd_join problem also here.
Bruno Haible 21e0236f 2023-08-18T13:18:04 uptime: Deprecate. Suggested by Paul Eggert in <https://lists.gnu.org/archive/html/bug-coreutils/2023-08/msg00070.html>. * modules/uptime (Status, Notice): New sections.
Bruno Haible cefb3e21 2023-08-17T15:04:43 Recognize the *-*-windows* config triplets introduced on 2023-06-26. * m4/*.m4: Treat windows* as equivalent to mingw*. * modules/*: Likewise.
Bruno Haible ab1ff585 2023-08-14T02:02:31 Fix some test module descriptions. * modules/boot-time-tests (Files): Add tests/macros.h. * modules/dprintf-gnu-tests (Files): Likewise. * modules/fclose-tests (Files): Likewise. * modules/getcwd-tests (Files): Likewise. * modules/lock-tests (Files): Likewise. * modules/nullptr-c++-tests (Files): Likewise. * modules/posix_spawn-tests (Files): Likewise. * modules/posix_spawnp-tests (Files): Likewise. * modules/readutmp-tests (Files): Likewise. * modules/sh-quote-tests (Files): Likewise. * modules/unigbrk/u16-grapheme-breaks-tests (Files): Likewise. * modules/unigbrk/u16-grapheme-next-tests (Files): Likewise. * modules/unigbrk/u16-grapheme-prev-tests (Files): Likewise. * modules/unigbrk/u32-grapheme-breaks-tests (Files): Likewise. * modules/unigbrk/u32-grapheme-next-tests (Files): Likewise. * modules/unigbrk/u32-grapheme-prev-tests (Files): Likewise. * modules/unigbrk/u8-grapheme-breaks-tests (Files): Likewise. * modules/unigbrk/u8-grapheme-next-tests (Files): Likewise. * modules/unigbrk/u8-grapheme-prev-tests (Files): Likewise. * modules/unigbrk/uc-grapheme-breaks-tests (Files): Likewise.
Bruno Haible edd9de93 2023-08-14T00:49:25 physmem: Add tests. * tests/test-physmem.c: New file. * modules/physmem-tests: New file.
Paul Eggert 5f4d15e6 2023-08-13T09:46:47 fts: improve memory-allocation errno handling * lib/fts.c (fts_read, fts_build): When enter_dir or setup_dir fails, report its errno value back to the user. (internal_function): Preserve errno. * modules/fts (Depends-on): Add calloc-posix, free-posix, malloc-posix, and realloc-posix, for better errno handling on allocation failures.
Paul Eggert 957b8cd4 2023-08-13T08:34:44 hash: set errno on failure * lib/hash.c: Include errno.h. (compute_bucket_size, hash_initialize, hash_rehash) (hash_insert_if_absent): Set errno reliably on failure. (hash_free): Preserve errno, like plain 'free'. * modules/hash (Depends-on): Depend on calloc-posix, free-posix, malloc-posix, so that errno is set reliably.
Paul Eggert 5528e726 2023-08-12T16:54:51 boot-time,readutmp: do not depend on c-strtod * lib/boot-time-aux.h (get_linux_uptime): Compute struct timespec using integer arithmetic rather than double. * lib/boot-time.c, lib/readutmp.c: Don’t include c-strtod.h. * modules/boot-time, modules/readutmp (Depends-on): Remove c-strtod.
Paul Eggert 32d729b6 2023-08-12T16:45:30 boot-time,readutmp: remove -lrt usage This code uses clock-relevant functions only on platforms that do not need -lrt. * m4/readutmp.m4 (gl_READUTMP): Do not require gl_CLOCK_TIME or add CLOCK_TIME_LIB to READUTMP_LIB. * modules/boot-time (Link): No need to link with CLOCK_TIME_LIB.
Paul Eggert a6dd3a4c 2023-08-12T16:05:22 boot-time,readutmp: do not depend on fopen-gnu These modules should work well enough even if fopen is not fixed to conform to fopen-gnu standards. The only gotcha I can see is older fopen implementations that lack support for "e", and a potential O_CLOEXEC leak is not worth worrying about. * modules/boot-time (Depends-on): * modules/readutmp (Depends-on): Remove fopen-gnu.
Paul Eggert cfc90a04 2023-08-12T15:57:35 readutmp: do not depend on timespec_get boot-time code no longer needs it. * modules/readutmp (Depends-on): Remove timespec_get.
Paul Eggert 19cb99e3 2023-08-12T15:46:43 boot-time: do not depend on timespec_get This is for Emacs, which does not use timespec_get now and which likes to minimize dependencies. Also, treat musl libc like recent glibc, and fix a timespec_get return value typo. * lib/boot-time-aux.h (get_linux_uptime): Assume musl libc supports CLOCK_BOOTTIME. (get_linux_boot_time_final_fallback): Likewise for musl libc and CLOCK_REALTIME. Do not rely on the timespec_get module, to break the dependency. Consider 0 to be a failure return from timespec_get. Fall back on gettimeofday if timespec_get does not exist. * modules/boot-time (Depends-on): Remove timespec_get.
Bruno Haible 8501d38f 2023-08-13T00:09:06 readutmp, boot-time: Fix parsing of /proc/uptime. * lib/boot-time-aux.h (get_linux_uptime): Use c_strtod, not strtod. * lib/readutmp.c: Include c-strtod.h. * lib/boot-time.c: Likewise. * modules/readutmp (Depends-on): Add c-strtod. * modules/boot-time (Depends-on): Likewise.
Paul Eggert 46decc1c 2023-08-12T09:54:08 c-file-type: new module * lib/c-file-type.c: New file, containing all of the old file-type except for the gettext call. * lib/file-type.c (_): Remove; no longer used. (file_type): Call c_file_type for most of the work. * modules/c-file-type: New module. * modules/file-type (Depends-on): Add c-file-type.
Bruno Haible bea15dd1 2023-08-11T23:30:01 boot-time: Simplify execution. * lib/boot-time.c: Include <stdio.h>, <string.h>, <sys/types.h>, <sys/stat.h>, <sys/sysinfo.h>, <time.h>, stat-time.h, unlocked-io.h, boot-time-aux.h. (UT_USER): New macro, from lib/readutmp.c. (getutent): New declaration. (get_boot_time_uncached): New function, containing a simplified code from lib/readutmp.c. (get_boot_time): Don't invoke read_utmp. Instead, invoke get_boot_time_uncached and cache the result. * modules/boot-time (Files): Add lib/boot-time-aux.h, lib/readutmp.h, m4/readutmp.m4. (Depends-on): Remove readutmp. Add extensions, fopen-gnu, stat-time, stdbool, time-h, timespec_get, unlocked-io-internal. (configure.ac): Invoke gl_PREREQ_READUTMP_H. (Link): Remove $(READUTMP_LIB). Add $(CLOCK_TIME_LIB). * modules/boot-time-tests (Makefile.am): Link test-boot-time with $(CLOCK_TIME_LIB), not with $(READUTMP_LIB).
Bruno Haible 1657e67f 2023-08-11T23:20:44 readutmp: Refactor boot time determination code. * lib/boot-time-aux.h: New file, extracted from lib/readutmp.c. * lib/readutmp.c: On Linux, include <sys/sysinfo.h> even if !READUTMP_USE_SYSTEMD. Include boot-time-aux.h. (SIZEOF): Remove macro, moved to boot-time-aux.h. (get_linux_uptime): Remove function, moved to boot-time-aux.h. (read_utmp_from_file): Invoke get_linux_boot_time_fallback, get_android_boot_time, get_openbsd_boot_time, get_windows_boot_time. Code moved to boot-time-aux.h. (get_boot_time_uncached: Invoke get_linux_boot_time_final_fallback. Code moved to boot-time-aux.h. * m4/readutmp.m4 (gl_PREREQ_READUTMP_H): New macro, extracted from gl_READUTMP. (gl_READUTMP): Invoke it. * modules/readutmp (Files): Add lib/boot-time-aux.h.
Bruno Haible 87f7ad5b 2023-08-11T22:02:02 readutmp tests: Fix link error. * modules/readutmp-tests (Makefile.am): Link test-readutmp with $(LIBINTL).
Bruno Haible c1a42249 2023-08-10T13:08:48 boot-time: Add tests. * tests/test-boot-time.c: New file. * modules/boot-time-tests: New file.
Bruno Haible 4dcef257 2023-08-10T13:08:19 boot-time: New module. * lib/boot-time.h: New file. * lib/boot-time.c: New file. * modules/boot-time: New file.
Bruno Haible 51f5c004 2023-08-09T22:27:16 readutmp: Return a boot time also on Alpine Linux. * lib/readutmp.c: Include stat-time.h. (SIZEOF): New macro. (read_utmp_from_file) [__linux__]: Fake a BOOT_TIME entry by looking at the time stamp of a specific file. * modules/readutmp (Depends-on): Add stat-time.
Bruno Haible 269da69e 2023-08-05T02:40:03 unistr/{u8-mbtouc,u8-mbsnlen}: Fix test failures (regr. 2023-07-25). * modules/unistr/u8-mbtouc (configure.ac): Compile this code if the preinstalled libunistring version is >= 0.9.4, < 1.2. * modules/unistr/u8-mbsnlen (configure.ac): Likewise.
Bruno Haible 64270e99 2023-08-04T23:44:27 unistr/*-pcpy: Fix compilation errors (regression 2023-07-21). * modules/unistr/base (configure.ac): Generate unistr.h if the preinstalled libunistring version is >= 0.9.11, < 1.2.
Paul Eggert c0a858b2 2023-08-03T16:01:50 readutmp: switch new struct to struct timespec * lib/readutmp.c (get_boot_time_uncached, get_boot_time) (add_utmp, read_utmp): Use struct timespec, not struct timeval. * lib/readutmp.h: Always include <time.h>, for struct timespec. Simplify when utmp.h and utmpx.h are included. (struct gl_utmp): Use the same struct for both the systemd and the dummy version. Reorder members, and use proper pid_t type for ut_session. Rename ut_tv to ut_ts and make it a struct timespec. All uses changed. (HAVE_GL_UTMP): New macro. Use it where appropriate, instead of READUTMP_USE_SYSTEMD. (UT_USER, HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID) (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_HOST): Simplify. * modules/readutmp (Depends-on): Add time-h, timespec_get. Remove sys_type. Sort.
Paul Eggert db1645dd 2023-08-03T15:53:30 readutmp: fix idx_t FIXME in API * lib/readutmp.c (read_utmp): 2nd arg is now idx_t *, not size_t *. * lib/readutmp.h: Include idx.h, for idx_t. * modules/readutmp (Depends-on): Add idx.
Paul Eggert 39a4cb0a 2023-08-03T15:31:48 readutmp: simplify extract_trimmed_name via ximemdup0 * lib/readutmp.c (extract_trimmed_name): Simplify. * modules/readutmp (Depends-on): Add strnlen, which was a missing dependency. * lib/readutmp.c: Include xmemdup0. (extract_trimmed_name): Simplify. * modules/readutmp (Depends-on): Add xmemdup0. Add strnlen, which was a missing dependency already.
Bruno Haible 0b71ff37 2023-08-01T21:44:07 readutmp: For year-2038 safety on Linux/{x86,arm}, use systemd APIs. Suggested by Thorsten Kukuk <kukuk@suse.com> in <https://www.thkukuk.de/blog/Y2038_glibc_utmp_64bit/> and <https://github.com/thkukuk/utmpx/blob/main/utmp-to-logind.md>. * m4/systemd.m4: New file. * m4/readutmp.m4 (gl_READUTMP): Require gl_SYSTEMD_CHOICE. Set READUTMP_LIB. Conditionally define READUTMP_USE_SYSTEMD. * lib/readutmp.h: For READUTMP_USE_SYSTEMD, include <sys/time.h> and <utmpx.h>. (struct gl_utmp): New type. (UTMP_STRUCT_NAME, UT_TIME_MEMBER, UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT, UT_USER, HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID, HAVE_STRUCT_XTMP_UT_PID): Define differently for READUTMP_USE_SYSTEMD. (UT_USER_SIZE): Don't define for READUTMP_USE_SYSTEMD. (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, READ_UTMP_SUPPORTED): Define also for READUTMP_USE_SYSTEMD. (free_utmp): New declaration. * lib/readutmp.c: Add new includes for READUTMP_USE_SYSTEMD. (extract_trimmed_name): Adapt to READUTMP_USE_SYSTEMD. (get_boot_time_uncached, get_boot_time, guess_pty_name): New functions. (read_utmp): New implementation for READUTMP_USE_SYSTEMD. (free_utmp): New function. * tests/test-readutmp.c (main): At the end, invoke free_utmp. * modules/readutmp (Files): Add m4/systemd.m4. (Link): New section. * modules/readutmp-tests (Makefile.am): Link test-readutmp with READUTMP_LIB. * NEWS: Mention the free_utmp function and the READUTMP_LIB link requirement.
Bruno Haible 906e4b18 2023-07-31T16:13:11 readutmp: Make the header file and function usable on all platforms. * lib/readutmp.h (struct gl_utmp, UTMP_STRUCT_NAME, UT_TIME_MEMBER, UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT, UT_USER): Provide fallback definitions. (READ_UTMP_SUPPORTED): New macro. * lib/readutmp.c (read_utmp) [!READ_UTMP_SUPPORTED]: Provide a dummy definition. * modules/readutmp (Depends-on): Add sys_time. (configure.ac): Remove conditional. (Makefile.am): Compile readutmp.c on all platforms. (Include): Include readutmp.h on all platforms. * tests/test-readutmp.c: Include readutmp.h on all platforms. (main): Invoke read_utmp on all platforms.
Bruno Haible b3e2e26f 2023-07-30T15:11:08 readutmp: Add tests. * tests/test-readutmp.c: New file. * modules/readutmp-tests: New file.
Bruno Haible 78c3dc2a 2023-07-30T15:08:59 readutmp: Improve comments. Fix module description. * lib/readutmp.h (extract_trimmed_name): Add specification comment. (read_utmp): Move specification comment from lib/readutmp.c to here. Mention also UTMP_FILE and READ_UTMP_USER_PROCESS. * lib/readutmp.c (extract_trimmed_name): Fix comment. * modules/readutmp (Include): Only include the .h file if HAVE_UTMPX_H || HAVE_UTMP_H.
Bruno Haible 1e209b30 2023-07-30T00:56:31 wcsrtombs tests: Renumber tests. * tests/test-wcsrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5. * tests/test-wcsrtombs.c: Update. * modules/wcsrtombs-tests: Update.
Bruno Haible 81fc28cd 2023-07-30T00:52:24 wcsnrtombs tests: Renumber tests. * tests/test-wcsnrtombs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5. * tests/test-wcsnrtombs.c: Update. * modules/wcsnrtombs-tests: Update.
Bruno Haible b5ac427c 2023-07-30T00:48:14 wcrtomb tests: Renumber tests. * tests/test-wcrtomb.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1. * tests/test-wcrtomb.c: Update. * tests/test-wcrtomb-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6 -> 8. * tests/test-wcrtomb-w32.c: Update. * modules/wcrtomb-tests: Update.
Bruno Haible d776b583 2023-07-30T00:29:19 mbstowcs tests: Renumber tests. * tests/test-mbstowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1. * tests/test-mbstowcs.c: Update. * modules/mbstowcs-tests: Update.
Bruno Haible ef2d2d35 2023-07-30T00:25:57 mbsrtowcs tests: Renumber tests. * tests/test-mbsrtowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1. * tests/test-mbsrtowcs.c: Update. * modules/mbsrtowcs-tests: Update.
Bruno Haible 7e25077b 2023-07-30T00:21:41 mbsnrtowcs tests: Renumber tests. * tests/test-mbsnrtowcs*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1. * tests/test-mbsnrtowcs.c: Update. * modules/mbsnrtowcs-tests: Update.
Bruno Haible 561e9958 2023-07-30T00:16:24 mbrtoc16 tests: Renumber tests. * tests/test-mbrtoc16-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1. * tests/test-mbrtoc16.c: Update. * tests/test-mbrtoc16-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6 -> 8. * tests/test-mbrtoc16-w32.c: Update. * modules/mbrtoc16-tests: Update.
Bruno Haible deba1fa4 2023-07-30T00:10:44 mbrtoc32 tests: Renumber tests. * tests/test-mbrtoc32-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1. * tests/test-mbrtoc32.c: Update. * tests/test-mbrtoc32-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6 -> 8. * tests/test-mbrtoc32-w32.c: Update. * modules/mbrtoc32-tests: Update.
Bruno Haible 89376163 2023-07-30T00:03:01 mbrtowc tests: Renumber tests. * tests/test-mbrtowc*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1. * tests/test-mbrtowc.c: Update. * tests/test-mbrtowc-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6 -> 8. * tests/test-mbrtowc-w32.c: Update. * modules/mbrtowc-tests: Update.
Bruno Haible 6646bf2e 2023-07-29T23:18:42 mbrlen tests: Renumber tests. * tests/test-mbrlen*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1. * tests/test-mbrlen.c: Update. * tests/test-mbrlen-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6 -> 8. * tests/test-mbrlen-w32.c: Update. * modules/mbrlen-tests: Update.
Bruno Haible 646c9288 2023-07-29T23:04:32 mbmemcasecoll tests: Renumber tests. * tests/test-mbmemcasecoll*.sh: Renamed 1 -> 2 -> 3 -> 4. * tests/test-mbmemcasecoll.c: Update. * modules/mbmemcasecoll-tests: Update.
Bruno Haible c67e12ab 2023-07-29T23:02:01 mbmemcasecmp tests: Renumber tests. * tests/test-mbmemcasecmp*.sh: Renamed 1 -> 2 -> 3 -> 4. * tests/test-mbmemcasecmp.c: Update. * modules/mbmemcasecmp-tests: Update.
Bruno Haible 957d4b3c 2023-07-29T22:50:44 fnmatch tests: Renumber tests. * tests/test-fnmatch-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6 -> 8. * tests/test-fnmatch-w32.c: Update. * modules/fnmatch-tests: Update.
Bruno Haible 76ad1471 2023-07-29T22:42:13 c32stombs tests: Renumber tests. * tests/test-c32stombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5. * tests/test-c32stombs.c: Update. * modules/c32stombs-tests: Update.
Bruno Haible 1e6d0a88 2023-07-29T22:35:24 c32srtombs tests: Renumber tests. * tests/test-c32srtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5. * tests/test-c32srtombs.c: Update. * modules/c32srtombs-tests: Update.
Bruno Haible 4ecb85c8 2023-07-29T22:13:41 c32snrtombs tests: Renumber tests. * tests/test-c32snrtombs-*.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5. * tests/test-c32snrtombs.c: Update. * modules/c32snrtombs-tests: Update.
Bruno Haible b7cf2e89 2023-07-29T22:02:54 c32rtomb tests: Renumber tests. * tests/test-c32rtomb.sh: Renamed 1 -> 2 -> 3 -> 4 -> 5 -> 1. * tests/test-c32rtomb.c: Update. * tests/test-c32rtomb-w32-*.sh: Renamed 1 -> 2 -> 3 -> 5 -> 7 -> 4 -> 6 -> 8. * tests/test-c32rtomb-w32.c: Update. * modules/c32rtomb-tests: Update.
Bruno Haible 051b6050 2023-07-29T21:39:02 btowc tests: Renumber tests. * tests/test-btowc*.sh: Renamed 1 -> 2 -> 3 -> 1. * tests/test-btowc.c: Update. * modules/btowc-tests: Update.
Bruno Haible 5d3cae82 2023-07-28T15:18:34 posixcheck: Fix dependencies. * modules/posixcheck (Depends-on): Add malloc-h, pthread-h, sched, sys_random, threads-h, uchar, utmp.
Bruno Haible 57049b22 2023-07-28T15:15:26 uchar: Include the necessary snippets. * lib/uchar.in.h: Add insertion points for _GL_ARG_NONNULL and _GL_WARN_ON_USE. * modules/uchar (Depends-on): Add snippet/arg-nonnull, snippet/warn-on-use. (Makefile.am): In uchar.h, include the ARG_NONNULL_H and WARN_ON_USE_H snippets.
Bruno Haible 0b8b7c90 2023-07-28T13:56:15 mbmemcasecmp, mbmemcasecoll: Avoid test failure on MSVC. * tests/test-mbmemcasecmp.h (test_utf_8): Disable two tests on platforms that don't have the upper/lower mappings for 'ü'/'Ü'. * tests/test-mbmemcasecmp.c: Include <wchar.h>, <wctype.h>. * tests/test-mbmemcasecoll.c: Likewise. * modules/mbmemcasecmp-tests (Depends-on): Add mbrtowc, wctype-h. * modules/mbmemcasecoll-tests (Depends-on): Likewise.
Bruno Haible b3bf1cf9 2023-07-27T22:19:08 fnmatch-h, glob-h tests: Fix link errors (regression 2023-07-24). * modules/fnmatch-h-c++-tests (Makefile.am): Link test-fnmatch-h-c++ with $(LIBUNISTRING). * modules/glob-h-c++-tests (Makefile.am): Link test-glob-h-c++ with $(LIBUNISTRING).
Bruno Haible d0dcfa5c 2023-07-27T20:52:36 fnmatch, glob tests: Fix link errors (regression 2023-07-24). * modules/fnmatch-tests (Makefile.am): Link test-fnmatch-w32 with the same libraries as test-fnmatch. * modules/glob (Link): Add $(LIBUNISTRING). * modules/glob-tests (Makefile.am): Link test-glob with $(LIBUNISTRING).
Bruno Haible 042a7042 2023-07-26T16:32:48 wctrans: Work around bug on NetBSD. * lib/wctype.in.h (rpl_wctrans_t, wctrans_t, GNULIB_defined_wctrans_t): Define if REPLACE_WCTRANS is 1. (wctrans): Consider REPLACE_WCTRANS. (towctrans): Override if REPLACE_WCTRANS is 1. * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTRANS. * m4/wctrans.m4 (gl_FUNC_WCTRANS): Define through AC_DEFUN_ONCE. Test whether wctrans supports the "tolower" character mapping. Set REPLACE_WCTRANS if not. * m4/towctrans.m4 (gl_FUNC_TOWCTRANS): Require gl_FUNC_WCTRANS. * modules/wctrans (Depends-on): Add towctrans. (configure.ac): Consider REPLACE_WCTRANS. * modules/towctrans (Files): Add m4/wctrans.m4. (configure.ac): Override also if REPLACE_WCTRANS is 1. * modules/wctype-h (Makefile.am): Substitute REPLACE_WCTRANS. * doc/posix-functions/wctrans.texi: Mention the NetBSD bug.
Bruno Haible fdedbfda 2023-07-26T15:26:21 towctrans: Add tests. * tests/test-towctrans.c: New file, based on tests/test-c32_apply_mapping.c. * modules/towctrans-tests: New file.
Bruno Haible e96e8875 2023-07-26T15:25:35 wctrans: Add tests. * tests/test-wctrans.c: New file, based on tests/test-c32_get_mapping.c. * modules/wctrans-tests: New file.
Bruno Haible 2a210c4b 2023-07-26T14:57:26 fnmatch: Update dependencies. * modules/fnmatch (Depends-on): Add wctype.
Bruno Haible f4ad51ee 2023-07-26T14:50:00 wctype: Work around wctype bug on mingw. * lib/wctype.in.h (rpl_wctype_t, wctype_t, GNULIB_defined_wctype_t): Define if REPLACE_WCTYPE is 1. (wctype): Consider REPLACE_WCTYPE. (iswctype): Override also if REPLACE_WCTYPE is 1. * lib/iswctype.c: If GNULIB_defined_wctype_t is defined, use the function-pointer based implementation. * m4/wctype_h.m4 (gl_WCTYPE_H_DEFAULTS): Initialize REPLACE_WCTYPE. * m4/wctype.m4 (gl_FUNC_WCTYPE): Define through AC_DEFUN_ONCE. Test whether wctype supports the "blank" character class. Set REPLACE_WCTYPE if not. * m4/iswctype.m4 (gl_FUNC_ISWCTYPE): Require gl_FUNC_WCTYPE. * modules/wctype (Status, Notice): Remove. (Depends-on): Add iswctype. Consider REPLACE_WCTYPE. (configure.ac): Consider REPLACE_WCTYPE. * modules/iswctype (Status, Notice): Remove. (Files): Add m4/wctype.m4. (configure.ac): Override also if REPLACE_WCTYPE is 1. * modules/wctype-h (Makefile.am): Substitute REPLACE_WCTYPE. * doc/posix-functions/wctype.texi: Mention the mingw bug.
Bruno Haible 97978417 2023-07-26T13:40:06 wctype, wctrans: Require a non-NULL argument. * lib/wctype.in.h: Add placeholder for definition of _GL_ARG_NONNULL. (wctype, wctrans): Mark with _GL_ARG_NONNULL ((1)). * modules/wctype-h (Depends-on): Add snippet/arg-nonnull. (Makefile.am): Substitute $(ARG_NONNULL_H) into wctype.h.
Bruno Haible cdfcc6d3 2023-07-25T23:39:15 iswctype: Add tests. * tests/test-iswctype.c: New file, based on tests/test-c32_apply_type_test.c. * tests/test-c32_apply_type_test.c (main): Update accordingly. * modules/iswctype-tests: New file.
Bruno Haible 546ee248 2023-07-25T23:38:03 wctype: Add tests. * tests/test-wctype.c: New file, based on tests/test-c32_get_type_test.c. * modules/wctype-tests: New file.
Bruno Haible e3f3b825 2023-07-25T22:56:19 Compile benchmark programs without assertions. * modules/mbiter-bench-tests (Makefile.am): Compile bench-mbiter with -DNDEBUG. * modules/mbiterf-bench-tests (Makefile.am): Compile bench-mbiterf with -DNDEBUG. * modules/mbuiter-bench-tests (Makefile.am): Compile bench-mbuiter with -DNDEBUG. * modules/mbuiterf-bench-tests (Makefile.am): Compile bench-mbuiterf with -DNDEBUG. * modules/mbswidth-bench-tests (Makefile.am): Compile bench-mbswidth with -DNDEBUG. * modules/crypto/md5-buffer-tests (Makefile.am): Compile bench-md5 with -DNDEBUG. * modules/crypto/sha1-buffer-tests (Makefile.am): Compile bench-sha1 with -DNDEBUG. * modules/crypto/sha256-buffer-tests (Makefile.am): Compile bench-sha224 and bench-sha256 with -DNDEBUG. * modules/crypto/sha512-buffer-tests (Makefile.am): Compile bench-sha384 and bench-sha512 with -DNDEBUG.
Bruno Haible d1db7ef2 2023-07-24T12:08:23 fnmatch: Overcome wchar_t limitations. * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Set REPLACE_FNMATCH to 1 on AIX in 32-bit mode. * lib/fnmatch.c: Include <uchar.h>. Conditionally include unistr.h. (UCHAR_TO_WCHAR): Renamed from BTOWC. (WCHAR_T, WINT_T, BTOWC, MBSRTOWCS, WCSLEN, WCSCAT, WMEMPCPY, WMEMCHR, TOWLOWER, WCTYPE_T, WCTYPE, ISWCTYPE): New macros. (IS_CHAR_CLASS): Use WCTYPE instead of wctype. (UCHAR_TO_WCHAR): Use BTOWC instead of btowc. (FOLD): Use TOWLOWER instead of towlower. (CHAR): Use WCHAR_T instead of wchar_t. (UCHAR, INT): Use WINT_T instead of wint_t. (STRLEN): Use WCSLEN instead of wcslen. (STRCAT): Use WCSCAT instead of wcscat. (MEMPCPY): Use WMEMPCPY instead of wmempcpy. (MEMCHR): Use WMEMCHR instead of wmemchr. (is_char_class): Use WCTYPE_T instead of wctype_t, WCHAR_T instead of wchar_t, WCTYPE instead of wctype. (fnmatch): Use WCHAR_T instead of wchar_t, MBSRTOWCS instead of mbsrtowcs. * lib/fnmatch_loop.c (FCT): Use WCTYPE_T instead of wctype_t, ISWCTYPE instead of iswctype. Update for renamed BTOWC. * modules/fnmatch (Depends-on): Add btoc32, c32tolower, c32_get_type_test, c32_apply_type_test, mbsrtoc32s, unistr/u32-chr, unistr/u32-pcpy, unistr/u32-strcat, unistr/u32-strlen. (Link): Add $(LIBUNISTRING). * modules/fnmatch-tests (Makefile.am): Link test-fnmatch with $(LIBUNISTRING). * doc/posix-functions/fnmatch.texi: Move the Cygwin, mingw, MSVC, AIX bug descriptions to the "fixed by Gnulib" section.
Bruno Haible 6b508d70 2023-07-24T02:00:42 unistr/u32-strcat: Relicense under LGPLv2+. * modules/unistr/u32-strcat (License): Change to LGPLv2+. * lib/unistr/u32-strcat.c: Update license notice. * lib/unistr/u-strcat.h: Likewise.
Bruno Haible 80f7a65f 2023-07-24T02:00:37 unistr/u32-strlen: Relicense under LGPLv2+. * modules/unistr/u32-strlen (License): Change to LGPLv2+. * lib/unistr/u32-strlen.c: Update license notice.
Bruno Haible c084710c 2023-07-24T02:00:13 unistr/u32-chr: Relicense under LGPLv2+. * modules/unistr/u32-chr (License): Change to LGPLv2+. * lib/unistr/u32-chr.c: Update license notice.
Bruno Haible d690d055 2023-07-23T01:43:43 fnmatch tests: Add many more test cases. * lib/fnmatch.in.h (GNULIB_defined_fnmatch_function): New macro. * tests/test-fnmatch.c: Add many more test cases. * tests/test-fnmatch-1.sh: New file, based on tests/test-mbrtoc32-5.sh. * tests/test-fnmatch-2.sh: New file, based on tests/test-mbrtoc32-1.sh. * tests/test-fnmatch-3.sh: New file, based on tests/test-mbrtoc32-2.sh. * tests/test-fnmatch-4.sh: New file, based on tests/test-mbrtoc32-3.sh. * tests/test-fnmatch-5.sh: New file, based on tests/test-mbrtoc32-4.sh. * tests/test-fnmatch-w32.c: New file, based on tests/test-mbrtoc32-w32.c and tests/test-fnmatch.c. * tests/test-fnmatch-w32-1.sh: New file, based on tests/test-mbrtoc32-w32-1.sh. * tests/test-fnmatch-w32-2.sh: New file, based on tests/test-mbrtoc32-w32-2.sh. * tests/test-fnmatch-w32-3.sh: New file, based on tests/test-mbrtoc32-w32-3.sh. * tests/test-fnmatch-w32-4.sh: New file, based on tests/test-mbrtoc32-w32-4.sh. * tests/test-fnmatch-w32-5.sh: New file, based on tests/test-mbrtoc32-w32-5.sh. * tests/test-fnmatch-w32-6.sh: New file, based on tests/test-mbrtoc32-w32-6.sh. * tests/test-fnmatch-w32-7.sh: New file, based on tests/test-mbrtoc32-w32-7.sh. * modules/fnmatch-tests: Add the new program and shell scripts.
Bruno Haible bb8dc843 2023-07-21T11:22:27 unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: Add tests. * tests/unistr/test-pcpy.h: New file, based on tests/unistr/test-cpy.h. * tests/unistr/test-u8-pcpy.c: New file, based on tests/unistr/test-u8-cpy.c. * tests/unistr/test-u16-pcpy.c: New file, based on tests/unistr/test-u16-cpy.c. * tests/unistr/test-u32-pcpy.c: New file, based on tests/unistr/test-u32-cpy.c. * modules/unistr/u8-pcpy-tests: New file, based on modules/unistr/u8-cpy-tests. * modules/unistr/u16-pcpy-tests: New file, based on modules/unistr/u16-cpy-tests. * modules/unistr/u32-pcpy-tests: New file, based on modules/unistr/u32-cpy-tests.
Bruno Haible 07258bd5 2023-07-21T11:16:04 unistr/u8-pcpy, unistr/u16-pcpy, unistr/u32-pcpy: New modules. * lib/unistr.in.h (u8_pcpy, u16_pcpy, u32_pcpy): New declarations. * lib/unistr/u-pcpy.h: New file, based on lib/wmempcpy.c. * lib/unistr/u8-pcpy.c: New file, based on lib/unistr/u8-cpy.c. * lib/unistr/u16-pcpy.c: New file, based on lib/unistr/u16-cpy.c. * lib/unistr/u32-pcpy.c: New file, based on lib/unistr/u32-cpy.c. * modules/unistr/u8-pcpy: New file, based on modules/unistr/u8-cpy. * modules/unistr/u16-pcpy: New file, based on modules/unistr/u16-cpy. * modules/unistr/u32-pcpy: New file, based on modules/unistr/u32-cpy.
Bruno Haible 8bd1c7b0 2023-07-20T16:33:31 error-h: Fix dependencies. Reported by <cbh34680@gmail.com> in <https://lists.gnu.org/archive/html/bug-gnulib/2023-07/msg00111.html>. * modules/error-h (Depends-on): Add include_next.
Bruno Haible 46d57b5a 2023-07-19T22:43:50 c32swidth, mbszero: Fix file list. * modules/c32swidth (Files): Add locale-ja.m4, locale-zh.m4, codeset.m4. * modules/mbszero (Files): Likewise.
Bruno Haible 8dfe0534 2023-07-19T22:25:30 wcsnrtombs: Fix file list. * modules/wcsnrtombs (Files): Add locale-fr.m4.
Bruno Haible 02437a5d 2023-07-19T22:24:27 mbsnrtowcs: Fix file list. * modules/mbsnrtowcs (Files): Add locale-fr.m4, codeset.m4.
Bruno Haible 00e3e2c5 2023-07-19T22:23:23 mbrtoc16: Fix file list. * modules/mbrtoc16 (Files): Add locale-zh.m4.
Bruno Haible cbdf152d 2023-07-19T22:21:47 mbrlen: Fix file list. * modules/mbrlen (Files): Add locale-fr.m4, locale-ja.m4, locale-zh.m4, codeset.m4.
Bruno Haible 3c76b587 2023-07-18T13:46:29 mbsspn: Optimize. * lib/mbsspn.c: Include mbuiterf.h instead of mbuiter.h. (mbsspn): Use mbuif_* macros instead of mbui_* macros. * modules/mbsspn (Depends-on): Add mbuiterf. Remove mbuiter.
Bruno Haible eaa7397e 2023-07-18T13:44:39 mbscspn: Optimize. * lib/mbscspn.c: Include mbuiterf.h instead of mbuiter.h. (mbscspn): Use mbuif_* macros instead of mbui_* macros. * modules/mbscspn (Depends-on): Add mbuiterf. Remove mbuiter.
Bruno Haible 8d9d6ad8 2023-07-18T13:43:38 mbspbrk: Optimize. * lib/mbspbrk.c: Include mbuiterf.h instead of mbuiter.h. (mbspbrk): Use mbuif_* macros instead of mbui_* macros. * modules/mbspbrk (Depends-on): Add mbuiterf. Remove mbuiter.
Bruno Haible 056967ba 2023-07-18T13:40:11 mbspcasecmp: Optimize. * lib/mbspcasecmp.c: Include mbuiterf.h instead of mbuiter.h. (mbspcasecmp): Use mbuif_* macros instead of mbui_* macros. * modules/mbspcasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
Bruno Haible d2865eb4 2023-07-18T13:36:00 mbsncasecmp: Optimize. * lib/mbsncasecmp.c: Include mbuiterf.h instead of mbuiter.h. (mbsncasecmp): Use mbuif_* macros instead of mbui_* macros. * modules/mbsncasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
Bruno Haible 1ed13c54 2023-07-18T13:35:10 mbscasecmp: Optimize. * lib/mbscasecmp.c: Include mbuiterf.h instead of mbuiter.h. (mbscasecmp): Use mbuif_* macros instead of mbui_* macros. * modules/mbscasecmp (Depends-on): Add mbuiterf. Remove mbuiter.
Bruno Haible 51c2f5ac 2023-07-18T13:33:08 mbssep: Optimize. * lib/mbssep.c: Include mbuiterf.h instead of mbuiter.h. (mbssep): Use mbuif_* macros instead of mbui_* macros. * modules/mbssep (Depends-on): Add mbuiterf. Remove mbuiter.
Bruno Haible 727a6fd3 2023-07-18T13:30:18 mbsrchr: Optimize. * lib/mbsrchr.c: Include mbuiterf.h instead of mbuiter.h. (mbsrchr): Use mbuif_* macros instead of mbui_* macros. * modules/mbsrchr (Depends-on): Add mbuiterf. Remove mbuiter.
Bruno Haible f0c22a20 2023-07-18T13:29:14 mbschr: Optimize. * lib/mbschr.c: Include mbuiterf.h instead of mbuiter.h. (mbschr): Use mbuif_* macros instead of mbui_* macros. * modules/mbschr (Depends-on): Add mbuiterf. Remove mbuiter.
Bruno Haible 1a81b69f 2023-07-18T13:27:44 mbslen: Optimize. * lib/mbslen.c: Include mbuiterf.h instead of mbuiter.h. (mbslen): Use mbuif_* macros instead of mbui_* macros. * modules/mbslen (Depends-on): Add mbuiterf. Remove mbuiter.
Bruno Haible 00b03b7a 2023-07-18T13:25:43 mbuiterf: Add a benchmark. * tests/bench-mbuiterf.c: New file, based on tests/bench-mbuiter.c. * modules/mbuiterf-bench-tests: New file, based on modules/mbuiter-bench-tests.
Bruno Haible a271a43e 2023-07-18T13:24:35 mbuiterf: New module. * lib/mbuiterf.h: New file, based on lib/mbuiter.h. * lib/mbuiterf.c: New file, based on lib/mbuiter.c. * modules/mbuiterf: New file, based on modules/mbuiter.
Bruno Haible 201b1e7b 2023-07-18T12:23:12 trim: Optimize. * lib/trim.c: Include mbiterf.h instead of mbiter.h. (trim2): Use mbif_* macros instead of mbi_* macros. * modules/trim (Depends-on): Add mbiterf. Remove mbiter.
Bruno Haible cf7c3e9b 2023-07-18T12:21:46 mbmemcasecmp: Optimize. * lib/mbmemcasecmp.c: Include mbiterf.h instead of mbiter.h. (mbmemcasecmp): Use mbif_* macros instead of mbi_* macros. * modules/mbmemcasecmp (Depends-on): Add mbiterf. Remove mbiter.
Bruno Haible cb55e214 2023-07-18T12:19:58 mbsnlen: Optimize. * lib/mbsnlen.c: Include mbiterf.h instead of mbiter.h. (mbsnlen): Use mbif_* macros instead of mbi_* macros. * modules/mbsnlen (Depends-on): Add mbiterf. Remove mbiter.
Bruno Haible 43b4207d 2023-07-18T12:15:59 mbiterf: Add a benchmark. * tests/bench-mbiterf.c: New file, based on tests/bench-mbiter.c. * modules/mbiterf-bench-tests: New file, based on modules/mbiter-bench-tests.