summaryrefslogtreecommitdiff
path: root/modules/mbsnrtoc32s
Commit message (Collapse)AuthorAgeFilesLines
* mbrtowc: Rename LIB_MBRTOWC to MBRTOWC_LIB.Bruno Haible2023-01-071-1/+1
| | | | | | * m4/mbrtowc.m4: Rename LIB_MBRTOWC to MBRTOWC_LIB. All uses changed. * NEWS: Mention the change.
* assert-h: prefer to ‘verify’Paul Eggert2022-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Where it’s easy, prefer ‘static_assert’ to ‘verify’, as this simplifies the source by removing the need to include verify.h. Keep using ‘verify’ if verify.h is used for other reasons, or if code is shared with glibc. * lib/alignalloc.c, lib/argmatch.h, lib/c32is-impl.h: * lib/c32snrtombs.c, lib/c32srtombs.c, lib/exclude.c: * lib/filevercmp.c, lib/fma.c, lib/i-ring.h, lib/ino-map.c: * lib/localeinfo.c, lib/malloca.c, lib/mbrtoc32.c, lib/mbrtowc.c: * lib/mbsinit.c, lib/mbsnrtoc32s.c, lib/mbsrtoc32s.c: * lib/nanosleep.c, lib/parse-datetime.y, lib/pipe2.c: * lib/rawmemchr.c, lib/relocwrapper.c, lib/sleep.c: * lib/stat-w32.c, lib/strerror.c, lib/strtoimax.c: * lib/utimecmp.c, lib/vasnprintf.c, tests/test-alignof.c: * tests/test-intprops.c, tests/test-libgmp.c: * tests/test-limits-h.c, tests/test-locale.c: * tests/test-pthread.c, tests/test-round2.c: * tests/test-stdalign.c, tests/test-stddef.c, tests/test-stdio.c: * tests/test-stdlib.c, tests/test-string.c, tests/test-sys_stat.c: * tests/test-time.c, tests/test-uchar.c, tests/test-unistd.c: * tests/test-wchar.c: Prefer static_assert to verify, and stop including verify.h. * lib/stat.c: Don’t include verify.h (this include was unnecessary). * modules/alignalloc, modules/alignof-tests, modules/argmatch: * modules/c-vasnprintf, modules/c32isalnum, modules/c32isalpha: * modules/c32isblank, modules/c32iscntrl, modules/c32isdigit: * modules/c32isgraph, modules/c32islower, modules/c32isprint: * modules/c32ispunct, modules/c32isspace, modules/c32isupper: * modules/c32isxdigit, modules/c32snrtombs, modules/c32srtombs: * modules/exclude, modules/filevercmp, modules/fma, modules/fmaf: * modules/fmal, modules/fstat, modules/i-ring, modules/ino-map: * modules/intprops-tests, modules/libgmp-tests: * modules/limits-h-tests, modules/locale-tests, modules/malloca: * modules/mbrtoc32, modules/mbrtowc, modules/mbsinit: * modules/mbsnrtoc32s, modules/mbsrtoc32s, modules/nanosleep: * modules/parse-datetime, modules/pipe2, modules/pthread-h-tests: * modules/rawmemchr, modules/relocatable-prog-wrapper: * modules/round-tests, modules/roundf-tests, modules/sleep: * modules/stat, modules/stdalign-tests, modules/stdckdint-tests: * modules/stddef-tests, modules/stdio-tests, modules/stdlib-tests: * modules/strerror, modules/string-tests, modules/strtoimax: * modules/strtoumax, modules/sys_stat-tests, modules/time-tests: * modules/uchar-tests, modules/unistd-tests: * modules/unistdio/u16-u16-vasnprintf: * modules/unistdio/u16-vasnprintf: * modules/unistdio/u32-u32-vasnprintf: * modules/unistdio/u32-vasnprintf: * modules/unistdio/u8-u8-vasnprintf: * modules/unistdio/u8-vasnprintf, modules/unistdio/ulc-vasnprintf: * modules/utimecmp, modules/vasnprintf, modules/wchar-tests: Depend on assert-h, not verify.
* mbrtoc32: Use the system's mbrtoc32 if it exists and basically works.Bruno Haible2020-01-091-6/+4
| | | | | | | | | | | | | | | | | | | | | | | | * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): New macro. (gl_FUNC_MBRTOC32): Require it. Set REPLACE_MBRTOC32 if mbrtoc32 exists but is not working. * lib/mbrtoc32.c: Include hard-locale.h, <locale.h>. (mbrtoc32): If the char32_t encoding and the wchar_t encoding may differ, use the system's mbrtoc32, adding workarounds. * modules/mbrtoc32 (Depends-on): Add hard-locale. * doc/posix-functions/mbrtoc32.texi: Mention the Solaris and native Windows problem. * lib/btoc32.c: Include <stdio.h>, <string.h>. (btoc32): If the char32_t encoding and the wchar_t encoding may differ, use mbrtoc32, not btowc. * modules/btoc32 (Depends-on): Add mbrtoc32. * lib/mbsrtoc32s.c (mbsrtoc32s): If the char32_t encoding and the wchar_t encoding may differ, use mbrtoc32, not mbsrtowcs. * modules/mbsrtoc32s (Depends-on): Update conditions. (configure.ac): Compile mbsrtoc32s-state.c unconditionally. * lib/mbsnrtoc32s.c (mbsnrtoc32s): If the char32_t encoding and the wchar_t encoding may differ, use mbrtoc32, not mbsnrtowcs. * modules/mbsnrtoc32s (Depends-on): Update conditions. (configure.ac): Compile mbsrtoc32s-state.c unconditionally.
* mbsnrtoc32s: New module.Bruno Haible2020-01-051-0/+38
* lib/uchar.in.h (mbsnrtoc32s): New declaration. * lib/mbsnrtowcs-impl.h: Parameterize: Use macros FUNC, DCHAR_T, INTERNAL_STATE, MBRTOWC. * lib/mbsnrtowcs.c (FUNC, DCHAR_T, INTERNAL_STATE, MBRTOWC): New macros. * lib/mbsnrtoc32s.c: New file. * m4/uchar.m4 (gl_UCHAR_H_DEFAULTS): Initialize GNULIB_MBSNRTOC32S. * modules/uchar (Makefile.am): Substitute GNULIB_MBSNRTOC32S. * modules/mbsnrtoc32s: New file. * tests/test-uchar-c++.cc: Test the signature of mbsnrtoc32s. * doc/posix-functions/mbsnrtowcs.texi: Mention the new module.