summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Avoid Autoconf "was expanded before it was required" warning.Bruno Haible2023-04-084-6/+14
| | | | | | | * m4/exponentf.m4 (gl_FLOAT_EXPONENT_LOCATION): Define through AC_DEFUN_ONCE. * m4/exponentd.m4 (gl_DOUBLE_EXPONENT_LOCATION): Likewise. * m4/exponentl.m4 (gl_LONG_DOUBLE_EXPONENT_LOCATION): Likewise.
* striconveh tests: Avoid test failure on glibc 2.15.Bruno Haible2023-04-082-6/+18
| | | | | * tests/test-striconveh.c (main): Skip some of the GB18030 tests on glibc < 2.16.
* vasnwprintf-posix: Really work around %La bug in glibc 2.15 and Haiku.Bruno Haible2023-04-082-1/+6
| | | | * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Fix a copy&paste bug.
* login_tty: Fix compilation error in C++ mode on Solaris 11.4.Bruno Haible2023-04-084-4/+19
| | | | | | | | * m4/login_tty.m4 (gl_FUNC_LOGIN_TTY): Test whether <termios.h> exists. Consider it when testing whether login_tty is declared. * lib/utmp.in.h: If none of <util.h> and <libutil.h> exists, include <termios.h> instead. * doc/glibc-functions/login_tty.texi: Document the Solaris 11.4 problem.
* time: Fix compilation error in C++ mode on Solaris 11.Bruno Haible2023-04-082-0/+8
| | | | | * lib/time.in.h (time): Disable _GL_CXXALIASWARN invocation on non-glibc systems.
* unistdio/*: Fix test failures (regression 2023-01-28).Bruno Haible2023-04-0859-58/+64
| | | | | * modules/unistdio/*printf (configure.ac): Bump required libunistring version number.
* trim tests: Fix link error.Bruno Haible2023-04-082-1/+6
| | | | * modules/trim-tests (Makefile.am): Link test-trim also against libintl.
* stdio: Fix the value of _PRINTF_NAN_LEN_MAX on OpenBSD.Bruno Haible2023-04-082-3/+7
| | | | * lib/stdio.in.h (_PRINTF_NAN_LEN_MAX): Define to 4 on OpenBSD.
* vasnwprintf-posix: Work around %La bug in glibc 2.15 and Haiku.Bruno Haible2023-04-075-50/+137
| | | | | | | | | | * m4/printf.m4 (gl_SWPRINTF_DIRECTIVE_LA): New macro. * m4/vasnprintf.m4 (gl_PREREQ_VASNWPRINTF): Invoke gl_SWPRINTF_DIRECTIVE_LA and define NEED_WPRINTF_DIRECTIVE_LA accordingly. * lib/vasnprintf.c: When compiling vasnwprintf, if NEED_WPRINTF_DIRECTIVE_LA, handle the %La and %LA directives ourselves. * doc/posix-functions/swprintf.texi: Mention the %La bug.
* stdio: Fix compilation error in C++ mode on macOS.Bruno Haible2023-04-072-0/+14
| | | | | * lib/stdio.in.h (getw, putw): Repeat the declaration even if the function is already supposed to be declared.
* vasnwprintf-posix tests: Avoid test failure on mingw.Bruno Haible2023-04-072-2/+8
| | | | | * tests/test-vasnwprintf-posix.c (test_function): For mingw, change two expected test results.
* uchar: Force inline functions to C linkage in C++ mode.Bruno Haible2023-04-063-2/+62
| | | | | | | * m4/gnulib-common.m4 (gl_COMMON_BODY): Put definitions of _GL_BEGIN_C_LINKAGE, _GL_END_C_LINKAGE into config.h. * lib/uchar.in.h: Enclose all inline functions in _GL_BEGIN_C_LINKAGE / _GL_END_C_LINKAGE.
* alignalloc: Fix link error on glibc 2.15 systems.Bruno Haible2023-04-062-1/+7
| | | | | * lib/alignalloc.h (ALIGNALLOC_VIA_ALIGNED_ALLOC): Set to 0 on glibc 2.15 systems.
* doc: Add references to registered Haiku bugs.Bruno Haible2023-04-069-2/+44
| | | | | | | | | | | * doc/posix-functions/call_once.texi: Mention Haiku bug. * doc/posix-functions/duplocale.texi: Likewise. * doc/posix-functions/freelocale.texi: Likewise. * doc/posix-functions/getlogin_r.texi: Likewise. * doc/posix-functions/initstate.texi: Likewise. * doc/posix-functions/mbrtoc32.texi: Likewise. * doc/posix-functions/strxfrm.texi: Likewise. * doc/posix-headers/math.texi: Update.
* string-desc-quotearg tests: Avoid a test failure on Haiku.Bruno Haible2023-04-062-2/+13
| | | | | | * tests/test-string-desc-quotearg.c (main): For the clocale_quoting_style, accept also the U+2018 and U+2019 characters in UTF-8 encoding.
* random_r: Fix compilation error on Haiku.Bruno Haible2023-04-053-4/+8
| | | | | * lib/stdlib.in.h: For random_r, include <stdint.h> always. * modules/random_r (Depends-on): Depend on 'stdint' always.
* forkpty, openpty, login_tty: Fix link errors of the tests.Bruno Haible2023-04-052-11/+23
| | | | * m4/pty.m4 (gl_PTY_LIB): On Haiku, set PTY_LIB to '-lbsd'.
* strerrorname_np: Fix compilation error on Haiku.Bruno Haible2023-04-053-2/+9
| | | | | | * lib/strerrorname_np.c (strerrorname_np): Avoid conflict between EDOOFUS and EINVAL. * tests/test-strerrorname_np.c (main): Likewise.
* uchar: Fix recent change.Bruno Haible2023-04-052-0/+9
| | | | * lib/uchar.in.h: Include <string.h>, <wctype.h>.
* localename tests: Work around a Haiku bug.Bruno Haible2023-04-052-0/+10
| | | | * tests/test-localename.c (freelocale): New macro.
* localename: Add support for Haiku's per-thread locales.Bruno Haible2023-04-052-0/+71
| | | | | * lib/localename.c: Include <dlfcn.h>. (gl_locale_name_thread_unsafe): Add special code for Haiku.
* uchar: Work around Haiku bug.Bruno Haible2023-04-056-6/+68
| | | | | | | | | | | | * m4/uchar_h.m4 (gl_UCHAR_H, gl_TYPE_CHAR8_T, gl_TYPE_CHAR16_T, gl_TYPE_CHAR32_T): Before including <uchar.h>, on Haiku, first include <stdint.h>. * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): Likewise. * m4/mbrtoc32.m4 (gl_FUNC_MBRTOC32, gl_CHECK_FUNC_MBRTOC32, gl_MBRTOC32_EMPTY_INPUT, gl_MBRTOC32_C_LOCALE, gl_MBRTOC32_SANITYCHECK): Likewise. * lib/uchar.in.h: On Haiku, include <stdint.h> before the include_next. * doc/posix-headers/uchar.texi: Mention the Haiku bug.
* stdlib, btowc: Fix file lists.Bruno Haible2023-04-0510-0/+22
| | | | | | | | | | | | * 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-053-11/+20
| | | | | | | * 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-0416-0/+65
| | | | | | | | | | | | | | | | | | | * 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-045-1/+77
| | | | | | | | | | * 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-0424-0/+271
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* backupfile: fix bug when renaming from subdirectoryPádraig Brady2023-04-042-3/+12
| | | | | | | * lib/backupfile.c (backup_internal): Ensure we use the appropriate offset if operating on a subdirectory, i.e., on an updated sdir. Fixes https://bugs.gnu.org/62607
* *c32*: Optimize on musl libc like on glibc.Bruno Haible2023-04-049-7/+35
| | | | | | | | | | | * lib/uchar.in.h (_GL_WCHAR_T_IS_UCS4): New macro. * lib/btoc32.c (btoc32): Test _GL_WCHAR_T_IS_UCS4 instead of __GLIBC__. * lib/mbsrtoc32s.c: Likewise. * lib/mbsnrtoc32s.c: Likewise. * lib/c32tob.c (c32tob): Likewise. * lib/c32srtombs.c: Likewise. * lib/c32snrtombs.c: Likewise. * lib/c32is-impl.h (FUNC): Likewise.
* uchar: Rename _GL_LARGE_CHAR32_T to _GL_SMALL_WCHAR_T.Bruno Haible2023-04-0411-14/+28
| | | | | | | | | | | | | * lib/uchar.in.h (_GL_SMALL_WCHAR_T): Renamed from _GL_LARGE_CHAR32_T. * lib/mbrtoc32.c: Update. * lib/mbsrtoc32s.c: Update. * lib/mbsnrtoc32s.c: Update. * lib/c32tob.c: Update. * lib/c32rtomb.c: Update. * lib/c32srtombs.c: Update. * lib/c32snrtombs.c: Update. * lib/c32is-impl.h: Update. * tests/test-uchar.c: Update.
* c32rtomb: Fix an autoconf test.Bruno Haible2023-04-042-1/+8
| | | | | * m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): In a test program, include <stddef.h>, for NULL.
* Add extern-inline recipe to ChangeLog commentPaul Eggert2023-04-031-0/+5
|
* tests: Set executable bit on more tests.Bruno Haible2023-04-035-0/+8
| | | | | | | * tests/test-c-dtoastr.sh: Make executable. * tests/test-c-ldtoastr.sh: Likewise. * tests/test-immutable.sh: Likewise. * tests/test-vasnwprintf-posix2.sh: Likewise.
* fix harmless ChangeLog typoJim Meyering2023-04-032-1/+1
|
* tests: set executable bit in test-trim[1-3].shJim Meyering2023-04-033-0/+8
| | | | | | | This avoids a test failure for each new file. * tests/test-trim1.sh: Make this file executable. * tests/test-trim2.sh: Likewise. * tests/test-trim1.sh: Likewise.
* Use the 'extern-inline' module explicitly where needed.Bruno Haible2023-04-0310-0/+22
| | | | | | | | | | | | * 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.
* vasnprintf-posix: Fix harmless mistake (regression 2023-03-24).Bruno Haible2023-04-032-0/+7
| | | | | | Found by Coverity. * lib/vasnprintf.c (MAX_ROOM_NEEDED): Insert 'break;' statement.
* mbstoc32s tests: Check behaviour in the C locale.Bruno Haible2023-04-034-1/+90
| | | | | | | | | * 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-034-1/+102
| | | | | | | | | | * 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-034-1/+102
| | | | | | | | | | * 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-034-1/+50
| | | | | | | | * 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-033-1/+8
| | | | | * tests/test-mbrtoc32.c (main): Use btoc32 instead of btowc. * modules/mbrtoc32-tests (Depends-on): Add btoc32.
* mbrtoc32 tests: Add comment.Bruno Haible2023-04-036-4/+29
| | | | | | | | * m4/mbrtowc.m4 (gl_MBRTOWC_C_LOCALE): Add comment. * m4/mbrtoc32.m4 (gl_MBRTOC32_C_LOCALE): Add comment. * tests/test-mbrtoc32.c: Add comment. * tests/test-mbrtoc32-5.sh: Use symmetric coding style. * doc/posix-functions/mbrtoc32.texi: Update.
* trim: Fix trim_trailing result in multibyte locales.Bruno Haible2023-04-022-7/+1
| | | | * lib/trim.c (IF_LINT): Remove macro.
* trim: Fix trim_trailing result in multibyte locales.Bruno Haible2023-04-022-32/+15
| | | | | * lib/trim.c (trim2): Simplify algorithm for trim_trailing in multibyte locales, to use 2 instead of 3 states.
* trim: Add tests.Bruno Haible2023-04-026-0/+224
| | | | | | | | * 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-024-148/+28
| | | | | | * 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-028-106/+119
| | | | | | | | | | | | | | | | | | | | | | | * 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-028-0/+56
| | | | | | | | | | | * 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-0111-2/+166
| | | | | | | | | | | | | | | | * 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.