| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
* tests/test-localename.c (freelocale): New macro.
|
|
|
|
|
| |
* lib/localename.c: Include <dlfcn.h>.
(gl_locale_name_thread_unsafe): Add special code for Haiku.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* m4/c32rtomb.m4 (gl_FUNC_C32RTOMB): In a test program, include
<stddef.h>, for NULL.
|
| |
|
|
|
|
|
|
|
| |
* tests/test-c-dtoastr.sh: Make executable.
* tests/test-c-ldtoastr.sh: Likewise.
* tests/test-immutable.sh: Likewise.
* tests/test-vasnwprintf-posix2.sh: Likewise.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
Found by Coverity.
* lib/vasnprintf.c (MAX_ROOM_NEEDED): Insert 'break;' statement.
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
| |
* tests/test-mbrtoc32.c (main): Use btoc32 instead of btowc.
* modules/mbrtoc32-tests (Depends-on): Add btoc32.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
* lib/trim.c (IF_LINT): Remove macro.
|
|
|
|
|
| |
* lib/trim.c (trim2): Simplify algorithm for trim_trailing in multibyte
locales, to use 2 instead of 3 states.
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
| |
* lib/vasnprintf.c (VASNPRINTF): Negative results of local_wcrtomb can
now occur; handle them.
* tests/test-vasnprintf-posix.c (test_function): Test %lc directive with
a wint_t argument that is not a valid wide character.
* 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.
|
|
|
|
|
| |
* lib/stddef.in.h: Replace _GL_STDDEF_WINT_T with a symbol that depends
on the @GUARD_PREFIX@.
|
|
|
|
|
| |
* lib/vasnprintf.c (VASNPRINTF): When processing %s with !has_precision
and !has_width, don't call abort() if there is a conversion failure.
|
|
|
|
|
|
|
|
| |
* tests/test-btowc.c (main): Treat C locale like in
tests/test-mbrtowc.c.
* tests/test-mbsrtowcs.c (main): Likewise.
* tests/test-mbsnrtowcs.c (main): Likewise.
* tests/test-mbstowcs.c (main): Likewise.
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
| |
* tests/test-mbrtowc.c: Add comment.
* tests/test-mbrtowc5.sh: Use symmetric coding style.
* doc/posix-functions/mbrtowc.texi: Update.
|
|
|
|
| |
* tests/test-stdlib.c (main): Check MB_CUR_MAX.
|
|
|
|
| |
* tests/test-string-desc.sh: Run the test in a subdir.
|
|
|
|
| |
* m4/printf.m4 (gl_PRINTF_POSITIONS): Define through AC_DEFUN_ONCE.
|
|
|
|
|
| |
* doc/string-desc.texi: New file.
* doc/gnulib.texi (Particular Modules): Include it.
|
|
|
|
|
| |
* tests/test-string-desc-quotearg.c: New file.
* modules/string-desc-quotearg-tests: New file.
|
|
|
|
|
|
| |
* lib/string-desc-quotearg.h: New file.
* lib/string-desc-quotearg.c: New file.
* modules/string-desc-quotearg: New file.
|
|
|
|
|
| |
* tests/test-xstring-desc.c: New file.
* modules/xstring-desc-tests: New file.
|
|
|
|
|
|
| |
* lib/xstring-desc.h: New file.
* lib/xstring-desc.c: New file.
* modules/xstring-desc: New file.
|