summaryrefslogtreecommitdiff
path: root/modules
Commit message (Collapse)AuthorAgeFilesLines
...
* flexmember: Fix module description (regression 2016-09-07).Bruno Haible2023-04-131-0/+1
| | | | * modules/flexmember (Include): Add "flexmember.h".
* largefile: sync from Autoconf masterPaul Eggert2023-04-092-0/+54
| | | | | | | | | | | * modules/largefile-required, modules/year2038-required: New modules. * MODULES.html.sh, doc/largefile.texi, doc/posix-headers/time.texi: * doc/year2038.texi: Document this. * m4/largefile.m4: Sync from Autoconf master. Conditionalize the workaround on AC_SYS_LARGEFILE_REQUIRED rather than on AC_SYS_YEAR2038 so that we replace older but still unreleased Autoconf. (AC_SYS_LARGEFILE_REQUIRED, AC_SYS_YEAR2038_REQUIRED): New macros.
* year2038: configure earlierPaul Eggert2023-04-091-1/+1
| | | | | * modules/year2038: Put AC_SYS_YEAR2038 in configure.ac-early since it can affect CPPFLAGS with _TIME_BITS=64.
* c32toupper: Add tests.Bruno Haible2023-04-101-0/+30
| | | | | | * tests/test-c32toupper.sh: New file. * tests/test-c32toupper.c: New file, based on tests/test-c32islower.c. * modules/c32toupper-tests: New file.
* c32toupper: New module.Bruno Haible2023-04-102-0/+45
| | | | | | | | | * lib/uchar.in.h (c32toupper): New declaration. * lib/c32toupper.c: New file. * modules/c32toupper: New file. * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_C32TOUPPER. * modules/uchar (Makefile.am): Substitute GNULIB_C32TOUPPER.
* c32tolower: Add tests.Bruno Haible2023-04-101-0/+30
| | | | | | * tests/test-c32tolower.sh: New file. * tests/test-c32tolower.c: New file, based on tests/test-c32isupper.c. * modules/c32tolower-tests: New file.
* c32tolower: New module.Bruno Haible2023-04-092-0/+45
| | | | | | | | | | * lib/uchar.in.h (c32tolower): New declaration. * lib/c32tolower.c: New file. * lib/c32to-impl.h: New file, based on lib/c32is-impl.h. * modules/c32tolower: New file. * m4/uchar_h.m4 (gl_UCHAR_H_REQUIRE_DEFAULTS): Initialize GNULIB_C32TOLOWER. * modules/uchar (Makefile.am): Substitute GNULIB_C32TOLOWER.
* c32is*: Ensure GNULIB_defined_mbstate_t is defined on AIX.Bruno Haible2023-04-0912-0/+60
| | | | | | | | | | | | | | | | | | * m4/mbrtowc.m4 (gl_MBSTATE_T_BROKEN): Define through AC_DEFUN_ONCE. * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32): Require it. * modules/c32isalnum (Files): Add m4/mbrtowc.m4, m4/locale-ja.m4. (configure.ac): Require gl_MBSTATE_T_BROKEN. * modules/c32isalpha: Likewise. * modules/c32isblank: Likewise. * modules/c32iscntrl: Likewise. * modules/c32isdigit: Likewise. * modules/c32isgraph: Likewise. * modules/c32islower: Likewise. * modules/c32isprint: Likewise. * modules/c32ispunct: Likewise. * modules/c32isspace: Likewise. * modules/c32isupper: Likewise. * modules/c32isxdigit: Likewise.
* unistdio/*: Fix test failures (regression 2023-01-28).Bruno Haible2023-04-0858-58/+58
| | | | | * modules/unistdio/*printf (configure.ac): Bump required libunistring version number.
* trim tests: Fix link error.Bruno Haible2023-04-081-1/+1
| | | | * modules/trim-tests (Makefile.am): Link test-trim also against libintl.
* random_r: Fix compilation error on Haiku.Bruno Haible2023-04-051-1/+1
| | | | | * lib/stdlib.in.h: For random_r, include <stdint.h> always. * modules/random_r (Depends-on): Depend on 'stdint' always.
* stdlib, btowc: Fix file lists.Bruno Haible2023-04-059-0/+9
| | | | | | | | | | | | * modules/stdlib (Files): Add m4/codeset.m4. * modules/btowc (Files): Likewise. * modules/c-dtoastr-tests (Files): Likewise. * modules/c-ldtoastr-tests (Files): Likewise. * modules/c-snprintf-tests (Files): Likewise. * modules/c-vasprintf-tests (Files): Likewise. * modules/c-vsnprintf-tests (Files): Likewise. * modules/c-xvasprintf-tests (Files): Likewise. * modules/nl_langinfo-tests (Files): Likewise.
* duplocale: Fix compilation error on Haiku (regression 2023-01-22).Bruno Haible2023-04-051-2/+3
| | | | | | | * lib/locale.in.h (duplocale): If HAVE_DUPLOCALE = 0, don't declare it, even if REPLACE_DUPLOCALE = 1. * modules/duplocale (Depends-on, configure.ac): Don't compile a replacement if HAVE_DUPLOCALE = 0 and REPLACE_DUPLOCALE = 1.
* c32tob, c32is*, c32rtomb, mbrtoc32: Fix file lists.Bruno Haible2023-04-0415-0/+45
| | | | | | | | | | | | | | | | | | | * modules/c32tob (Files): Add m4/locale-fr.m4, m4/locale-zh.m4, m4/codeset.m4. * modules/c32isalnum (Files): Likewise. * modules/c32isalpha (Files): Likewise. * modules/c32isblank (Files): Likewise. * modules/c32iscntrl (Files): Likewise. * modules/c32isdigit (Files): Likewise. * modules/c32isgraph (Files): Likewise. * modules/c32islower (Files): Likewise. * modules/c32isprint (Files): Likewise. * modules/c32ispunct (Files): Likewise. * modules/c32isspace (Files): Likewise. * modules/c32isupper (Files): Likewise. * modules/c32isxdigit (Files): Likewise. * modules/c32rtomb (Files): Likewise. * modules/mbrtoc32 (Files): Likewise.
* stdlib: Work around MB_CUR_MAX bug on Solaris 10.Bruno Haible2023-04-041-0/+2
| | | | | | | | | | * lib/stdlib.in.h (gl_MB_CUR_MAX): New function. (MB_CUR_MAX, GNULIB_defined_MB_CUR_MAX): New macros. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether MB_CUR_MAX is correct. (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MB_CUR_MAX. * modules/stdlib (Files): Add m4/locale-fr.m4. (Makefile.am): Substitute REPLACE_MB_CUR_MAX. * doc/posix-headers/stdlib.texi: Mention the Solaris 10 bug.
* *c32*: Inline most functions on glibc and musl libc.Bruno Haible2023-04-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/uchar.in.h: Invoke _GL_INLINE_HEADER_BEGIN, _GL_INLINE_HEADER_END. (btoc32): Inline if _GL_WCHAR_T_IS_UCS4. (c32isalnum, c32isalpha, c32isblank, c32iscntrl, c32isdigit, c32isgraph, c32islower, c32isprint, c32ispunct, c32isspace, c32isupper, c32isxdigit): Inline if _GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t. (c32snrtombs, c32srtombs, c32stombs, c32tob, mbsnrtoc32s, mbsrtoc32s, mbstoc32s): Inline if _GL_WCHAR_T_IS_UCS4. * lib/btoc32.c: Define compilation unit marker. (btoc32): Conditionally mark as _GL_EXTERN_INLINE. * lib/c32isalnum.c: Define compilation unit marker. * lib/c32isalpha.c: Likewise. * lib/c32isblank.c: Likewise. * lib/c32iscntrl.c: Likewise. * lib/c32isdigit.c: Likewise. * lib/c32isgraph.c: Likewise. * lib/c32islower.c: Likewise. * lib/c32isprint.c: Likewise. * lib/c32ispunct.c: Likewise. * lib/c32isspace.c: Likewise. * lib/c32isupper.c: Likewise. * lib/c32isxdigit.c: Likewise. * lib/c32is-impl.h (FUNC): Conditionally mark as _GL_EXTERN_INLINE. * lib/c32snrtombs.c: Define compilation unit marker. (c32snrtombs): Conditionally mark as _GL_EXTERN_INLINE. * lib/c32srtombs.c: Define compilation unit marker. (c32srtombs): Conditionally mark as _GL_EXTERN_INLINE. * lib/c32stombs.c: Define compilation unit marker. (c32stombs): Conditionally mark as _GL_EXTERN_INLINE. * lib/c32tob.c: Define compilation unit marker. (c32tob): Conditionally mark as _GL_EXTERN_INLINE. * lib/mbsnrtoc32s.c: Define compilation unit marker. (mbsnrtoc32s): Conditionally mark as _GL_EXTERN_INLINE. * lib/mbsrtoc32s.c: Define compilation unit marker. (mbsrtoc32s): Conditionally mark as _GL_EXTERN_INLINE. * lib/mbstoc32s.c: Define compilation unit marker. (mbstoc32s): Conditionally mark as _GL_EXTERN_INLINE. * modules/uchar (Depends-on): Add extern-inline.
* Use the 'extern-inline' module explicitly where needed.Bruno Haible2023-04-039-0/+9
| | | | | | | | | | | | * modules/fdutimensat (Depends-on): Add extern-inline. * modules/file-has-acl (Depends-on): Likewise. * modules/hamt (Depends-on): Likewise. * modules/relocatable-prog-wrapper (Depends-on): Likewise. * modules/safe-alloc (Depends-on): Likewise. * modules/string-desc (Depends-on): Likewise. * modules/string-desc-quotearg (Depends-on): Likewise. * modules/xstring-desc (Depends-on): Likewise. * modules/xvasprintf (Depends-on): Likewise.
* mbstoc32s tests: Check behaviour in the C locale.Bruno Haible2023-04-031-1/+5
| | | | | | | | | * tests/test-mbstoc32s.c (main): Test behaviour in the C locale. Based on tests/test-mbstowcs.c. * tests/test-mbstoc32s-5.sh: New file, based on tests/test-mbstowcs5.sh. * modules/mbstoc32s-tests (Files): Add it. (Depends-on): Add btoc32. (Makefile.am): Run test-mbstoc32s-5.sh.
* mbsnrtoc32s tests: Check behaviour in the C locale.Bruno Haible2023-04-031-1/+5
| | | | | | | | | | * tests/test-mbsnrtoc32s.c (main): Test behaviour in the C locale. Based on tests/test-mbsnrtowcs.c. * tests/test-mbsnrtoc32s-5.sh: New file, based on tests/test-mbsrtowcs5.sh. * modules/mbsnrtoc32s-tests (Files): Add it. (Depends-on): Add btoc32. (Makefile.am): Run test-mbsnrtoc32s-5.sh.
* mbsrtoc32s tests: Check behaviour in the C locale.Bruno Haible2023-04-031-1/+5
| | | | | | | | | | * tests/test-mbsrtoc32s.c (main): Test behaviour in the C locale. Based on tests/test-mbsrtowcs.c. * tests/test-mbsrtoc32s-5.sh: New file, based on tests/test-mbsrtowcs5.sh. * modules/mbsrtoc32s-tests (Files): Add it. (Depends-on): Add btoc32. (Makefile.am): Run test-mbsrtoc32s-5.sh.
* btoc32 tests: Check behaviour in the C locale.Bruno Haible2023-04-031-1/+2
| | | | | | | | * tests/test-btoc32.c (main): Test behaviour in the C locale. Based on tests/test-btowc.c. * tests/test-btoc32-3.sh: New file, based on tests/test-btowc3.sh. * modules/btoc32-tests (Files): Add it. (Makefile.am): Test it.
* mbrtoc32 tests: Prefer *c32* functions.Bruno Haible2023-04-031-0/+1
| | | | | * tests/test-mbrtoc32.c (main): Use btoc32 instead of btowc. * modules/mbrtoc32-tests (Depends-on): Add btoc32.
* trim: Add tests.Bruno Haible2023-04-021-0/+22
| | | | | | | | * tests/test-trim.c: New file. * tests/test-trim1.sh: New file. * tests/test-trim2.sh: New file. * tests/test-trim3.sh: New file. * modules/trim-tests: New file.
* unistr/u8-strstr: Simplify code.Bruno Haible2023-04-021-1/+0
| | | | | | * lib/unistr/u8-strstr.c: Inline the contents of lib/unistr/u-strstr.h. * lib/unistr/u-strstr.h: Remove file. * modules/unistr/u8-strstr (Files): Remove it.
* unistr/u{16,32}-strstr: Use two-way algorithm (no memory allocation).Bruno Haible2023-04-022-11/+8
| | | | | | | | | | | | | | | | | | | | | | | * lib/wcs-two-way.h: Use UNIT instead of wchar_t. Don't undefine RETURN_TYPE. * lib/wcsstr-impl.h: Move the non-linear implementation away. Use UNIT instead of wchar_t, RETURN_TYPE instead of 'wchar_t *', FUNC instead of wcsstr. (AVAILABLE): Use MEMCHR0 instead of wmemchr. (FUNC): Use STRCHR instead of wcschr. * lib/wcsstr.c: Moved the non-linear implementation to here. (FUNC, UNIT, RETURN_TYPE, MEMCHR0, STRCHR): New macros. * lib/unistr/u16-strstr.c: Don't include malloca.h, str-kmp.h, u-strstr.h. Instead, include wcsstr-impl.h. * lib/unistr/u32-strstr.c: Likewise. * modules/unistr/u16-strstr (Files): Remove u-strstr.h, str-kmp.h. Add wcsstr-impl.h, wcs-two-way.h. (Depends-on): Remove u16-strmbtouc, u16-strlen, u16-strnlen, malloca. Add u16-chr, u16-cmp. * modules/unistr/u32-strstr (Files): Remove u-strstr.h, str-kmp.h. Add wcsstr-impl.h, wcs-two-way.h. (Depends-on): Remove u32-strlen, u32-strnlen, malloca. Add u32-chr, u32-cmp.
* unistr/u*strstr tests: Add more tests.Bruno Haible2023-04-023-0/+3
| | | | | | | | | | | * tests/unistr/test-u-strstr.h (test_u_strstr): Add the two latest tests from tests/test-strstr.c. * tests/unistr/test-u8-strstr.c (U_SET): New macro. * tests/unistr/test-u16-strstr.c (U_SET): New macro. * tests/unistr/test-u32-strstr.c (U_SET): New macro. * modules/unistr/u8-strstr-tests (Depends-on): Add unistr/u8-set. * modules/unistr/u16-strstr-tests (Depends-on): Add unistr/u16-set. * modules/unistr/u32-strstr-tests (Depends-on): Add unistr/u32-set.
* vasnwprintf-posix: Fix behaviour in the C locale.Bruno Haible2023-04-011-0/+1
| | | | | | | | | | | | | | | | * lib/vasnprintf.c (VASNPRINTF): If NEED_WPRINTF_DIRECTIVE_C is set, implement the 'c' directive here. * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_MBRTOWC_C_LOCALE. If mbrtowc is buggy in the C locale, define NEED_WPRINTF_DIRECTIVE_C. * modules/vasnwprintf (Files): Add m4/mbrtowc.m4. * tests/test-vasnwprintf-posix.c (test_function): Add tests of %s and %c in the C locale. * doc/posix-functions/fwprintf.texi: Mention the C locale behaviour bug. * doc/posix-functions/swprintf.texi: Likewise. * doc/posix-functions/vfwprintf.texi: Likewise. * doc/posix-functions/vswprintf.texi: Likewise. * doc/posix-functions/vwprintf.texi: Likewise. * doc/posix-functions/wprintf.texi: Likewise.
* mbstowcs: Add tests.Bruno Haible2023-03-311-0/+37
| | | | | | | | | | * tests/test-mbstowcs1.sh: New file, based on tests/test-mbsrtowcs1.sh. * tests/test-mbstowcs2.sh: New file, based on tests/test-mbsrtowcs2.sh. * tests/test-mbstowcs3.sh: New file, based on tests/test-mbsrtowcs3.sh. * tests/test-mbstowcs4.sh: New file, based on tests/test-mbsrtowcs4.sh. * tests/test-mbstowcs5.sh: New file, based on tests/test-mbsrtowcs5.sh. * tests/test-mbstowcs.c: New file, based on tests/test-mbsrtowcs.c. * modules/mbstowcs-tests: New file, based on modules/mbsrtowcs-tests.
* mbstowcs: New module.Bruno Haible2023-03-312-0/+35
| | | | | | | | | | | | | | | * lib/stdlib.in.h (mbstowcs): New declaration. * lib/mbstowcs.c: New file, based on lib/mbstoc32s.c. * m4/mbstowcs.m4: New file. * m4/stdlib_h.m4 (gl_STDLIB_H): Test whether mbstowcs is declared. (gl_STDLIB_H_REQUIRE_DEFAULTS): Initialize GNULIB_MBSTOWCS. (gl_STDLIB_H_DEFAULTS): Initialize REPLACE_MBSTOWCS. * modules/stdlib (Makefile.am): Substitute GNULIB_MBSTOWCS, REPLACE_MBSTOWCS. * modules/mbstowcs: New file. * tests/test-stdlib-c++.cc (mbstowcs): Check signature. * doc/posix-functions/mbstowcs.texi: Mention the C locale behaviour bug and the new module.
* mbsnrtowcs: Fix behaviour in the C locale.Bruno Haible2023-03-302-1/+5
| | | | | | | | | | | | | * m4/mbsnrtowcs.m4 (gl_FUNC_MBSNRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If mbrtowc is buggy in the C locale, override also mbsnrtowcs. * modules/mbsnrtowcs (Files): Add m4/mbrtowc.m4. * tests/test-mbsnrtowcs.c (main): Add a test of the C locale, based on tests/test-mbsrtowcs.c. * tests/test-mbsnrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh. * modules/mbsnrtowcs-tests (Files): Add it. (Makefile.am): Test it. * doc/posix-functions/mbsnrtowcs.texi: Mention the C locale behaviour bug.
* mbsrtowcs: Fix behaviour in the C locale.Bruno Haible2023-03-302-1/+5
| | | | | | | | | | | | | * m4/mbsrtowcs.m4 (gl_FUNC_MBSRTOWCS): Invoke gl_MBRTOWC_C_LOCALE. If mbrtowc is buggy in the C locale, override also mbsrtowcs. * modules/mbsrtowcs (Files): Add m4/mbrtowc.m4. * tests/test-mbsrtowcs.c (main): Add a test of the C locale, based on tests/test-mbrtowc.c. * tests/test-mbsrtowcs5.sh: New file, based on tests/test-mbrtowc5.sh. * modules/mbsrtowcs-tests (Files): Add it. (Makefile.am): Test it. * doc/posix-functions/mbsrtowcs.texi: Mention the C locale behaviour bug.
* mbrlen: Add tests.Bruno Haible2023-03-301-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | * tests/test-mbrlen1.sh: New file, based on tests/test-mbrtowc1.sh. * tests/test-mbrlen2.sh: New file, based on tests/test-mbrtowc2.sh. * tests/test-mbrlen3.sh: New file, based on tests/test-mbrtowc3.sh. * tests/test-mbrlen4.sh: New file, based on tests/test-mbrtowc4.sh. * tests/test-mbrlen5.sh: New file, based on tests/test-mbrtowc5.sh. * tests/test-mbrlen.c: New file, based on tests/test-mbrtowc.c. * tests/test-mbrlen-w32-1.sh: New file, based on tests/test-mbrtowc-w32-1.sh. * tests/test-mbrlen-w32-2.sh: New file, based on tests/test-mbrtowc-w32-2.sh. * tests/test-mbrlen-w32-3.sh: New file, based on tests/test-mbrtowc-w32-3.sh. * tests/test-mbrlen-w32-4.sh: New file, based on tests/test-mbrtowc-w32-4.sh. * tests/test-mbrlen-w32-5.sh: New file, based on tests/test-mbrtowc-w32-5.sh. * tests/test-mbrlen-w32-6.sh: New file, based on tests/test-mbrtowc-w32-6.sh. * tests/test-mbrlen-w32-7.sh: New file, based on tests/test-mbrtowc-w32-7.sh. * tests/test-mbrlen-w32.c: New file, based on tests/test-mbrtowc-w32.c. * modules/mbrlen-tests: New file, based on modules/mbrtowc-tests. * doc/posix-functions/mbrlen.texi: Update.
* btowc: Fix behaviour in the C locale.Bruno Haible2023-03-302-1/+4
| | | | | | | | | | | | | | | | | | * lib/btowc.c: Include <string.h> (btowc): Use mbrtowc instead of mbtowc when possible. * m4/btowc.m4 (gl_FUNC_BTOWC): Test for the mingw bug in the C locale. Invoke gl_MBRTOWC_C_LOCALE. If mbrtowc is buggy in the C locale, override also btowc. (gl_PREREQ_BTOWC): Test whether mbrtowc exists. * modules/btowc (Files): Add m4/mbrtowc.m4. (Depends-on): Add mbrtowc. * tests/test-btowc.c (main): Add a test of the C locale, based on tests/test-mbrtowc.c. * tests/test-btowc3.sh: New file, based on tests/test-mbrtowc5.sh. * modules/btowc-tests (Files): Add it. (Makefile.am): Test it. * doc/posix-functions/btowc.texi: Mention the two C locale behaviour bugs and that they are worked around.
* string-desc-quotearg: Add tests.Bruno Haible2023-03-291-0/+12
| | | | | * tests/test-string-desc-quotearg.c: New file. * modules/string-desc-quotearg-tests: New file.
* string-desc-quotearg: New module.Bruno Haible2023-03-291-0/+24
| | | | | | * lib/string-desc-quotearg.h: New file. * lib/string-desc-quotearg.c: New file. * modules/string-desc-quotearg: New file.
* xstring-desc: Add tests.Bruno Haible2023-03-291-0/+12
| | | | | * tests/test-xstring-desc.c: New file. * modules/xstring-desc-tests: New file.
* xstring-desc: New module.Bruno Haible2023-03-291-0/+24
| | | | | | * lib/xstring-desc.h: New file. * lib/xstring-desc.c: New file. * modules/xstring-desc: New file.
* string-desc: Add tests.Bruno Haible2023-03-291-0/+12
| | | | | | * tests/test-string-desc.sh: New file. * tests/test-string-desc.c: New file. * modules/string-desc-tests: New file.
* string-desc: New module.Bruno Haible2023-03-291-0/+30
| | | | | | | * lib/string-desc.h: New file. * lib/string-desc.c: New file. * lib/string-desc-contains.c: New file. * modules/string-desc: New file.
* wcsstr: Ensure worst-case linear execution time.Bruno Haible2023-03-274-8/+62
| | | | | | | | | | | | | | | | | | | | | | | | | * lib/wchar.in.h (wcsstr): Consider REPLACE_WCSSTR. * lib/wcs-two-way.h: New file, based on lib/str-two-way.h. * lib/wcsstr-impl.h: If requested, use the two-way algorithm. New code based on lib/strstr.c. * m4/wcsstr.m4 (gl_FUNC_WCSSTR_SIMPLE): Renamed from gl_FUNC_WCSSTR. (gl_FUNC_WCSSTR): New macro, based on gl_FUNC_STRSTR in m4/strstr.m4. * m4/wchar_h.m4 (gl_WCHAR_H_DEFAULTS): Initialize REPLACE_WCSSTR. * modules/wchar (Makefile.am): Substitute REPLACE_WCSSTR. * modules/wcsstr-simple: New file, based on modules/wcsstr. * modules/wcsstr (Description): Document that this module now provides an efficient implementation. (Files): Add lib/wcs-two-way.h. (Depends-on): Depend on wcsstr-simple and the dependencies of the two-way implementation. (configure.ac): Use AC_LIBOBJ instead of a conditional. Don't invoke gl_WCHAR_MODULE_INDICATOR. (Makefile.am): Don't augment lib_SOURCES. * tests/test-wcsstr.c: New file, based on tests/test-strstr.c. * modules/wcsstr-tests: New file, based on modules/strstr-tests. * doc/posix-functions/wcsstr.texi: Mention the worst-case complexity. Mention the new 'wcsstr-simple' module. * doc/posix-functions/strstr.texi: Fix typo.
* uchar: ISO C 23: Define char8_t.Bruno Haible2023-03-271-0/+2
| | | | | | | | | * lib/uchar.in.h (char8_t): New type or macro. * m4/uchar_h.m4 (gl_TYPE_CHAR8_T): New macro. (gl_UCHAR_H): Invoke it. Set CXX_HAS_CHAR8_TYPE. * modules/uchar (Makefile.am): Substitute CXX_HAS_CHAR8_TYPE, GNULIBHEADERS_OVERRIDE_CHAR8_T. * tests/test-uchar.c: Add tests for char8_t.
* call_once: New module, separate from mtx.Bruno Haible2023-03-255-4/+47
| | | | | | | | | | | | | | | | | | | * lib/threads.in.h (call_once): Declare as part of module 'call_once', not module 'mtx'. * lib/call_once.c: New file, extracted from lib/mtx.c. * lib/mtx.c (call_once): Remove function. * m4/threads_h.m4 (gl_THREADS_H_REQUIRE_DEFAULTS): Inititalize GNULIB_CALL_ONCE. * modules/threads-h (Makefile.am): Substitute GNULIB_CALL_ONCE. * modules/call_once: New file, based on modules/mtx. * modules/threads (Depends-on): Add call_once. * tests/test-threads-c++.cc: Update accordingly. * modules/call_once-tests: New file, based on modules/mtx-tests. * modules/mtx-tests (Files): Remove tests/test-call_once.c. (Makefile.am): Don't compile test-call_once. * doc/posix-functions/call_once.texi: Document that the relevant module is now 'call_once'. * NEWS: Mention the change.
* stdio: ISO C 23: Define _PRINTF_NAN_LEN_MAX.Bruno Haible2023-03-252-0/+5
| | | | | | | | | | | | * lib/stdio.in.h (_PRINTF_NAN_LEN_MAX): New macro. * m4/stdio_h.m4 (gl_STDIO_H): Invoke gl_MUSL_LIBC. * modules/stdio (Files): Add m4/musl.m4. * tests/test-stdio.c: Check that _PRINTF_NAN_LEN_MAX is defined. Include nan.h, macros.h. (main): Check the value of _PRINTF_NAN_LEN_MAX. * modules/stdio-tests (Files): Add tests/nan.h, tests/macros.h, m4/exponentd.m4. (configure.ac): Invoke gl_DOUBLE_EXPONENT_LOCATION.
* is* tests: Ensure needed .m4 files are packaged.Bruno Haible2023-03-259-3/+15
| | | | | | | | | | | | * modules/isfinite-tests (Files): Add m4/exponent*.m4. * modules/isnan-tests (Files): Likewise. * modules/isnanf-tests (Files): Add m4/exponentf.m4. * modules/isnanf-nolibm-tests (Files): Likewise. * modules/isnand-tests (Files): Add m4/exponentd.m4. * modules/isnand-nolibm-tests (Files): Likewise. * modules/isnanl-tests (Files): Add m4/exponentl.m4. * modules/isnanl-nolibm-tests (Files): Likewise. * modules/isinf-tests (Files): Reorder.
* *printf-posix: ISO C 23: Support size specifiers 'wN' and 'wfN'.Bruno Haible2023-03-244-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/printf-args.h: Include <stdint.h>. (arg_type): Add TYPE_[U]INT8_T, ..., TYPE_[U]INT_FAST64_T and TYPE_COUNT_INT8_T_POINTER, ..., TYPE_COUNT_INT_FAST64_T_POINTER. (argument): Add the union members a_[u]int8_t, ..., a_[u]int_fast64_t and a_count_int8_t_pointer, ..., a_count_int_fast64_t_pointer. * lib/printf-args.c: Include <limits.h>. (PRINTF_FETCHARGS): Handle TYPE_[U]INT8_T, ..., TYPE_[U]INT_FAST64_T and TYPE_COUNT_INT8_T_POINTER, ..., TYPE_COUNT_INT_FAST64_T_POINTER. * lib/printf-parse.c (PRINTF_PARSE): Accept only one size specifier, not a sequence of size specifiers. Accept "wN" and "wfN", where N = 8, 16, 32, 64. * lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Handle the new TYPE_* values as well. * m4/printf.m4 (gl_PRINTF_SIZES_C23): New macro. * m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_IS_POSIX): Require gl_PRINTF_SIZES_C23. Test gl_cv_func_printf_sizes_c23. * m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_IS_POSIX): Likewise. * m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_IS_POSIX): Likewise. * m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_IS_POSIX): Likewise. * m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_IS_POSIX): Likewise. * m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_IS_POSIX): Likewise. * m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_IS_POSIX): Likewise. * m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_IS_POSIX): Likewise. * m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_IS_POSIX): Likewise. * m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_IS_POSIX): Likewise. * m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_IS_POSIX): Likewise. * tests/test-vasnprintf-posix.c (test_function): Add tests for size specifiers with %d, %u, %b, %o, %x. * tests/test-snprintf-posix.h (test_function): Likewise. * tests/test-sprintf-posix.h (test_function): Likewise. * tests/test-vasnwprintf-posix.c (test_function): Likewise. * tests/test-vasprintf-posix.c (test_function): Likewise. * modules/vasnprintf (Depends-on): Add limits-h. * modules/vasnwprintf (Depends-on): Add limits-h. * modules/c-vasnprintf (Depends-on): Add limits-h, stdint. * modules/unistdio/u-printf-args (Depends-on): Add stdint, limits-h. * doc/posix-functions/dprintf.texi: Mention the ISO C 23 size specifiers. * doc/posix-functions/fprintf.texi: Likewise. * doc/posix-functions/fwprintf.texi: Likewise. * doc/posix-functions/printf.texi: Likewise. * doc/posix-functions/snprintf.texi: Likewise. * doc/posix-functions/sprintf.texi: Likewise. * doc/posix-functions/swprintf.texi: Likewise. * doc/posix-functions/vdprintf.texi: Likewise. * doc/posix-functions/vfprintf.texi: Likewise. * doc/posix-functions/vfwprintf.texi: Likewise. * doc/posix-functions/vprintf.texi: Likewise. * doc/posix-functions/vsnprintf.texi: Likewise. * doc/posix-functions/vsprintf.texi: Likewise. * doc/posix-functions/vswprintf.texi: Likewise. * doc/posix-functions/vwprintf.texi: Likewise. * doc/posix-functions/wprintf.texi: Likewise.
* xprintf-gnu: New module.Bruno Haible2023-03-241-0/+29
| | | | | * modules/xprintf-gnu: New file, based on modules/vasnprintf-gnu and modules/xprintf-posix.
* xvasprintf-gnu: New module.Bruno Haible2023-03-241-0/+28
| | | | * modules/xvasprintf-gnu: New file, based on modules/xvasprintf-posix.
* vasnwprintf-gnu: Add tests.Bruno Haible2023-03-241-0/+14
| | | | | | | * tests/test-vasnwprintf-gnu.c: New file, based on tests/test-vasnwprintf-posix.c and tests/test-vasnprintf-gnu.c. * modules/vasnwprintf-gnu-tests: New file, based on modules/vasnwprintf-posix-tests.
* vasnwprintf-gnu: New module.Bruno Haible2023-03-241-0/+32
| | | | | | | | * m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_IS_POSIX): New macro. (gl_FUNC_VASNWPRINTF_POSIX): Require it. Invoke gl_PREREQ_VASNPRINTF_WITH_POSIX_EXTRAS. * m4/vasnwprintf-gnu.m4: New file, based on m4/vasnprintf-gnu.m4. * modules/vasnwprintf-gnu: New file, based on modules/vasnprintf-gnu.
* obstack-printf-gnu: Add tests.Bruno Haible2023-03-241-0/+8
| | | | | * modules/obstack-printf-gnu-tests: New file, based on modules/obstack-printf-posix-tests.