mirror of
https://git.savannah.gnu.org/git/gnulib.git
synced 2025-08-08 17:22:05 +03:00
c32*: Optionally enforce ISO C 23 semantics of char32_t.
* lib/lc-charset-unicode.h: New file. * lib/lc-charset-unicode.c: New file. * modules/uchar-c23: New file. * lib/uchar.in.h (char32_t): Add comment. * lib/mbrtoc32.c: Include lc-charset-unicode.h. (mbrtoc32): If char32_t is Unicode and wchar_t is not, invoke locale_encoding_to_unicode. * lib/btoc32.c: Include lc-charset-unicode.h. (btoc32): If char32_t is Unicode and wchar_t is not, invoke locale_encoding_to_unicode. * lib/c32rtomb.c: Include lc-charset-unicode.h. (c32rtomb): If char32_t is Unicode and wchar_t is not, invoke unicode_to_locale_encoding. * lib/c32tob.c: Include lc-charset-unicode.h. (c32tob): If char32_t is Unicode and wchar_t is not, invoke unicode_to_locale_encoding. * lib/mbsnrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't use mbsnrtowcs. * lib/mbsrtoc32s.c: If char32_t is Unicode and wchar_t is not, don't use mbsrtowcs. * lib/c32snrtombs.c: If char32_t is Unicode and wchar_t is not, don't use wcsnrtombs. * lib/c32srtombs.c: If char32_t is Unicode and wchar_t is not, don't use wcsrtombs. * lib/c32is-impl.h: Include lc-charset-unicode.h. (FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC. * lib/c32to-impl.h: Include lc-charset-unicode.h. (FUNC): If char32_t is Unicode and wchar_t is not, use UCS_FUNC. * lib/c32width.c: Include lc-charset-unicode.h. (c32width): If char32_t is Unicode and wchar_t is not, use uc_width. * tests/test-mbrtoc32.c: Include <wchar.h>. (main): Skip GB18030 tests on NetBSD and Solaris. If GL_CHAR32_T_IS_UNICODE, expect Unicode encoding for the char32_t values. * tests/test-mbrtoc32-w32.c: Include <wchar.h>. (test_one_locale): Simplify. * tests/test-c32rtomb.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32rtomb.sh: Update. * tests/test-mbsnrtoc32s.c: Include <wchar.h>. (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-mbsrtoc32s.c: Include <wchar.h>. (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-mbstoc32s.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32snrtombs.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32srtombs.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32stombs.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isalnum.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isalnum.sh: Update. * tests/test-c32isalpha.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32isalpha.sh: Update. * tests/test-c32isblank.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isblank.sh: Update. * tests/test-c32iscntrl.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32iscntrl.sh: Update. * tests/test-c32isdigit.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isdigit.sh: Update. * tests/test-c32isgraph.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32isgraph.sh: Update. * tests/test-c32islower.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32islower.sh: Update. * tests/test-c32isprint.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32isprint.sh: Update. * tests/test-c32ispunct.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32ispunct.sh: Update. * tests/test-c32isspace.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isspace.sh: Update. * tests/test-c32isupper.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isupper.sh: Update. * tests/test-c32isxdigit.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32isxdigit.sh: Update. * tests/test-c32tolower.c (main): Skip GB18030 tests on NetBSD and Solaris. * tests/test-c32tolower.sh: Update. * tests/test-c32toupper.c (main): Skip GB18030 tests on NetBSD and Solaris. Disable tests that would fail on macOS, FreeBSD, NetBSD, Solaris. * tests/test-c32toupper.sh: Update. * modules/mbrtoc32 (Link): Add $(LIBUNISTRING) $(LIBC32CONV). * modules/mbrtoc32-tests (Makefile.am): Link test-mbrtoc32 with $(LIBUNISTRING) $(LIBC32CONV). * modules/btoc32 (Link): New section. * modules/btoc32-tests (Makefile.am): Link test-btoc32 with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32rtomb (Link): New section. * modules/c32rtomb-tests (Makefile.am): Link test-c32rtomb with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32tob (Link): New section. * modules/mbsnrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV). * modules/mbsnrtoc32s-tests (Makefile.am): Link test-mbsnrtoc32s with $(LIBUNISTRING) $(LIBC32CONV). * modules/mbsrtoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV). * modules/mbsrtoc32s-tests (Makefile.am): Link test-mbsrtoc32s with $(LIBUNISTRING) $(LIBC32CONV). * modules/mbstoc32s (Link): Add $(LIBUNISTRING) $(LIBC32CONV). * modules/mbstoc32s-tests (Makefile.am): Link test-mbstoc32s with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32snrtombs (Link): New section. * modules/c32snrtombs-tests (Makefile.am): Link test-c32snrtombs with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32srtombs (Link): New section. * modules/c32srtombs-tests (Makefile.am): Link test-c32srtombs with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32stombs (Link): New section. * modules/c32stombs-tests (Makefile.am): Link test-c32stombs with $(LIBUNISTRING) $(LIBC32CONV). * modules/c32isalnum (Link): Add $(LIBC32CONV). * modules/c32isalnum-tests (Makefile.am): Link test-c32isalnum with $(LIBC32CONV). * modules/c32isalpha (Link): Add $(LIBC32CONV). * modules/c32isalpha-tests (Makefile.am): Link test-c32isalpha with $(LIBC32CONV). * modules/c32isblank (Link): Add $(LIBC32CONV). * modules/c32isblank-tests (Makefile.am): Link test-c32isblank with $(LIBC32CONV). * modules/c32iscntrl (Link): Add $(LIBC32CONV). * modules/c32iscntrl-tests (Makefile.am): Link test-c32iscntrl with $(LIBC32CONV). * modules/c32isdigit (Link): Add $(LIBC32CONV). * modules/c32isdigit-tests (Makefile.am): Link test-c32isdigit with $(LIBC32CONV). * modules/c32isgraph (Link): Add $(LIBC32CONV). * modules/c32isgraph-tests (Makefile.am): Link test-c32isgraph with $(LIBC32CONV). * modules/c32islower (Link): Add $(LIBC32CONV). * modules/c32islower-tests (Makefile.am): Link test-c32islower with $(LIBC32CONV). * modules/c32isprint (Link): Add $(LIBC32CONV). * modules/c32isprint-tests (Makefile.am): Link test-c32isprint with $(LIBC32CONV). * modules/c32ispunct (Link): Add $(LIBC32CONV). * modules/c32ispunct-tests (Makefile.am): Link test-c32ispunct with $(LIBC32CONV). * modules/c32isspace (Link): Add $(LIBC32CONV). * modules/c32isspace-tests (Makefile.am): Link test-c32isspace with $(LIBC32CONV). * modules/c32isupper (Link): Add $(LIBC32CONV). * modules/c32isupper-tests (Makefile.am): Link test-c32isupper with $(LIBC32CONV). * modules/c32isxdigit (Link): Add $(LIBC32CONV). * modules/c32isxdigit-tests (Makefile.am): Link test-c32isxdigit with $(LIBC32CONV). * modules/c32tolower (Link): Add $(LIBC32CONV). * modules/c32tolower-tests (Makefile.am): Link test-c32tolower with $(LIBC32CONV). * modules/c32toupper (Link): Add $(LIBC32CONV). * modules/c32toupper-tests (Makefile.am): Link test-c32toupper with $(LIBC32CONV). * modules/c32width (Link): Add $(LIBC32CONV). * modules/c32width-tests (Makefile.am): Link test-c32width with $(LIBC32CONV). * modules/c32swidth (Link): Add $(LIBC32CONV). * modules/c32swidth-tests (Makefile.am): Link test-c32swidth with $(LIBC32CONV). * modules/mbchar (Link): Add $(LIBC32CONV). * modules/mbiter (Link): Add $(LIBC32CONV). * modules/mbuiter (Link): Add $(LIBC32CONV). * modules/mbfile (Link): Add $(LIBC32CONV). * modules/mbmemcasecmp (Link): Add $(LIBC32CONV). * modules/mbmemcasecmp-tests (Makefile.am): Link test-mbmemcasecmp with $(LIBC32CONV). * modules/mbscasecmp (Link): Add $(LIBC32CONV). * modules/mbscasecmp-tests (Makefile.am): Link test-mbscasecmp with $(LIBC32CONV). * modules/mbscasestr (Link): Add $(LIBC32CONV). * modules/mbscasestr-tests (Makefile.am): Link test-mbscasestr1, test-mbscasestr2, test-mbscasestr3, test-mbscasestr4 with $(LIBC32CONV). * modules/mbschr (Link): Add $(LIBC32CONV). * modules/mbschr-tests (Makefile.am): Link test-mbschr with $(LIBC32CONV). * modules/mbscspn (Link): Add $(LIBC32CONV). * modules/mbscspn-tests (Makefile.am): Link test-mbscspn with $(LIBC32CONV). * modules/mbslen (Link): Add $(LIBC32CONV). * modules/mbsncasecmp (Link): Add $(LIBC32CONV). * modules/mbsncasecmp-tests (Makefile.am): Link test-mbsncasecmp with $(LIBC32CONV). * modules/mbsnlen (Link): Add $(LIBC32CONV). * modules/mbspbrk (Link): Add $(LIBC32CONV). * modules/mbspbrk-tests (Makefile.am): Link test-mbspbrk with $(LIBC32CONV). * modules/mbspcasecmp (Link): Add $(LIBC32CONV). * modules/mbspcasecmp-tests (Makefile.am): Link test-mbspcasecmp with $(LIBC32CONV). * modules/mbsrchr (Link): Add $(LIBC32CONV). * modules/mbsrchr-tests (Makefile.am): Link test-mbsrchr with $(LIBC32CONV). * modules/mbssep (Link): Add $(LIBC32CONV). * modules/mbsspn (Link): Add $(LIBC32CONV). * modules/mbsspn-tests (Makefile.am): Link test-mbsspn with $(LIBC32CONV). * modules/mbsstr (Link): Add $(LIBC32CONV). * modules/mbsstr-tests (Makefile.am): Link test-mbsstr1, test-mbsstr2, test-mbsstr3 with $(LIBC32CONV). * modules/mbstok_r (Link): Add $(LIBC32CONV). * modules/propername (Link): Add $(LIBC32CONV). * modules/regex-quote (Link): Add $(LIBC32CONV). * modules/regex-quote-tests (Makefile.am): Link test-regex-quote with $(LIBC32CONV). * modules/trim (Link): Add $(LIBC32CONV). * modules/trim-tests (Makefile.am): Link test-trim with $(LIBC32CONV). * modules/exclude (Link): Add $(LIBC32CONV). * modules/exclude-tests (Makefile.am): Link test-exclude with $(LIBC32CONV). * doc/posix-headers/uchar.texi: Mention the uchar-c23 module. * doc/posix-functions/mbrtoc32.texi: Likewise. * doc/strings.texi (The char32_t type): Likewise.
This commit is contained in:
@@ -22,6 +22,7 @@ Include:
|
||||
Link:
|
||||
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
|
||||
$(MBRTOWC_LIB)
|
||||
$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
|
||||
|
||||
License:
|
||||
GPL
|
||||
|
Reference in New Issue
Block a user