* 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.
+2023-06-27 Bruno Haible <bruno@clisp.org>
+
+ 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.
+
2023-06-27 Bruno Haible <bruno@clisp.org>
striconveh: Fix module description.
This function is only defined as an inline function on some platforms:
Haiku 2020.
@end itemize
+
+Note: If you want the guarantee that the @code{char32_t} values returned
+by this function are Unicode code points, you also need to request the
+@code{uchar-c23} module.
functions @code{mbrtoc16}, @code{c16rtomb}, @code{mbrtoc32},
@code{c32rtomb}.
-Gnulib module: uchar
+Gnulib module: uchar or uchar-c23
-Portability problems fixed by Gnulib:
+Portability problems fixed by either Gnulib module @code{uchar} or @code{uchar-c23}:
@itemize
@item
This header file is missing on many non-glibc platforms:
AIX 7.2 with xlclang++.
@end itemize
+Portability problems fixed by Gnulib module @code{uchar-c23}:
+@itemize
+@item
+@code{char32_t} values may not be Unicode code points.
+This is the case in ISO C 11 compliant but not ISO C 23 compliant
+implementations.
+@end itemize
+
Portability problems not fixed by Gnulib:
@itemize
@end itemize
@code{*c32*} functions are optimized so that on glibc systems they
immediately redirect to the corresponding @code{*wc*} functions.
+Gnulib implements the ISO C 23 semantics of @code{char32_t} when you
+import the @samp{uchar-c23} module. Without this module, it implements
+only the ISO C 11 semantics; the effect is that on some platforms
+(macOS, FreeBSD, NetBSD, Solaris) a @code{char32_t} value is the same
+as a @code{wchar_t} value, not a Unicode code point. Thus, when you
+want to pass @code{char32_t} values to GNU libunistring or to some Unicode
+centric Gnulib functions, you need the @samp{uchar-c23} module in order
+to do so without portability problems.
+
@node The mbchar_t type
@subsection The @code{mbchar_t} type
#include <stdio.h>
#include <string.h>
+#if GL_CHAR32_T_IS_UNICODE
+# include "lc-charset-unicode.h"
+#endif
+
#if _GL_WCHAR_T_IS_UCS4
_GL_EXTERN_INLINE
#endif
#else
/* In all known locale encodings, unibyte characters correspond only to
characters in the BMP. */
- return btowc (c);
+ wint_t wc = btowc (c);
+# if GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION
+ if (wc != WEOF && wc != 0)
+ {
+ wc = locale_encoding_to_unicode (wc);
+ if (wc == 0)
+ return WEOF;
+ }
+# endif
+ return wc;
#endif
}
# include "streq.h"
#endif
+#if GL_CHAR32_T_IS_UNICODE
+# include "lc-charset-unicode.h"
+#endif
+
#include "unictype.h"
#if _GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t
/* char32_t and wchar_t are equivalent. */
static_assert (sizeof (char32_t) == sizeof (wchar_t));
+# if GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION
+ return UCS_FUNC (wc);
+# else
return WCHAR_FUNC (wc);
+# endif
#endif
}
#include "localcharset.h"
#include "streq.h"
+#if GL_CHAR32_T_IS_UNICODE
+# include "lc-charset-unicode.h"
+#endif
+
size_t
c32rtomb (char *s, char32_t wc, mbstate_t *ps)
#undef c32rtomb
#else
/* char32_t and wchar_t are equivalent. */
+# if GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION
+ if (wc != 0)
+ {
+ wc = unicode_to_locale_encoding (wc);
+ if (wc == 0)
+ {
+ errno = EILSEQ;
+ return (size_t)(-1);
+ }
+ }
+# endif
return wcrtomb (s, (wchar_t) wc, ps);
#endif
#include <wchar.h>
-#if (HAVE_WORKING_MBRTOC32 && !_GL_WCHAR_T_IS_UCS4) || _GL_SMALL_WCHAR_T
+#if (HAVE_WORKING_MBRTOC32 && !_GL_WCHAR_T_IS_UCS4) || (GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION) || _GL_SMALL_WCHAR_T
/* The char32_t encoding of a multibyte character may be different than its
wchar_t encoding, or char32_t is wider than wchar_t. */
#include <wchar.h>
-#if (HAVE_WORKING_MBRTOC32 && !_GL_WCHAR_T_IS_UCS4) || _GL_SMALL_WCHAR_T
+#if (HAVE_WORKING_MBRTOC32 && !_GL_WCHAR_T_IS_UCS4) || (GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION) || _GL_SMALL_WCHAR_T
/* The char32_t encoding of a multibyte character may be different than its
wchar_t encoding, or char32_t is wider than wchar_t. */
# include "streq.h"
#endif
+#if GL_CHAR32_T_IS_UNICODE
+# include "lc-charset-unicode.h"
+#endif
+
#include "unicase.h"
#if _GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t
/* char32_t and wchar_t are equivalent. */
static_assert (sizeof (char32_t) == sizeof (wchar_t));
+# if GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION
+ return UCS_FUNC (wc);
+# else
return WCHAR_FUNC (wc);
+# endif
#endif
}
#include <string.h>
#include <wchar.h>
+#if GL_CHAR32_T_IS_UNICODE
+# include "lc-charset-unicode.h"
+#endif
+
#if _GL_WCHAR_T_IS_UCS4
_GL_EXTERN_INLINE
#endif
else
return EOF;
#else
+# if GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION
+ if (wc != 0)
+ {
+ wc = unicode_to_locale_encoding (wc);
+ if (wc == 0)
+ return EOF;
+ }
+# endif
return wctob (wc);
#endif
}
#endif
#include "localcharset.h"
+
+#if GL_CHAR32_T_IS_UNICODE
+# include "lc-charset-unicode.h"
+#endif
+
#include "uniwidth.h"
#if _GL_WCHAR_T_IS_UCS4 && !GNULIB_defined_mbstate_t
/* char32_t and wchar_t are equivalent. */
static_assert (sizeof (char32_t) == sizeof (wchar_t));
+# if GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION
+ return uc_width (wc, locale_charset ());
+# endif
return wcwidth (wc);
#endif
}
--- /dev/null
+/* Conversion between the current locale's character encoding and Unicode.
+ Copyright (C) 2023 Free Software Foundation, Inc.
+
+ This file is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2023. */
+
+#include <config.h>
+
+/* Specification. */
+#include "lc-charset-unicode.h"
+
+#if GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION
+
+/* We use iconv() to convert between a 'wchar_t' value and a Unicode code point.
+ For performance reasons, we don't allocate an iconv_t for each conversion,
+ but instead cache it for subsequent conversions. Since an iconv_t descriptor
+ can only be used in a single thread at a time, this cache must be
+ per-thread. */
+
+# include <iconv.h>
+# include <stdlib.h>
+# include <string.h>
+# include <wchar.h>
+
+# include "localcharset.h"
+# include "streq.h"
+# include "glthread/lock.h"
+# include "glthread/tls.h"
+# include "unistr.h"
+
+/* Maximum length of encoding. Attained for "ISO-8859-15". */
+# define MAX_ENCODING_LEN 11
+
+struct converters
+{
+ iconv_t cd_locale_to_utf8;
+ iconv_t cd_utf8_to_locale;
+ /* NUL-terminated encoding name. */
+ char encoding[MAX_ENCODING_LEN + 1];
+};
+
+static gl_tls_key_t converters_key; /* TLS key for a 'struct converters *' */
+
+/* Frees a 'struct converters *', for example when a thread terminates. */
+static void
+free_converters (void *p)
+{
+ if (p != NULL)
+ {
+ struct converters *conv = p;
+ iconv_close (conv->cd_locale_to_utf8);
+ iconv_close (conv->cd_utf8_to_locale);
+ free (conv);
+ }
+}
+
+static void
+key_init (void)
+{
+ gl_tls_key_init (converters_key, free_converters);
+ /* The per-thread initial value is NULL. */
+}
+
+/* Ensure that key_init is called once only. */
+gl_once_define(static, key_init_once)
+
+/* Returns the per-thread 'struct converters *' that contains converters for the
+ given encoding. Returns NULL upon failure. */
+static struct converters *
+get_converters (const char *encoding)
+{
+ if (strlen (encoding) > MAX_ENCODING_LEN)
+ /* If this happens, increase MAX_ENCODING_LEN. */
+ return NULL;
+
+ gl_once (key_init_once, key_init);
+ struct converters *conv = gl_tls_get (converters_key);
+ if (conv == NULL)
+ {
+ conv = (struct converters *) malloc (sizeof (struct converters));
+ if (conv == NULL)
+ /* Out of memory. */
+ return NULL;
+ conv->cd_locale_to_utf8 = iconv_open ("UTF-8", encoding);
+ conv->cd_utf8_to_locale = iconv_open (encoding, "UTF-8");
+ if (conv->cd_locale_to_utf8 == (iconv_t)(-1)
+ || conv->cd_utf8_to_locale == (iconv_t)(-1))
+ {
+ /* iconv does not support this encoding. */
+ if (conv->cd_locale_to_utf8 != (iconv_t)(-1))
+ iconv_close (conv->cd_locale_to_utf8);
+ if (conv->cd_utf8_to_locale != (iconv_t)(-1))
+ iconv_close (conv->cd_utf8_to_locale);
+ free (conv);
+ return NULL;
+ }
+ strcpy (conv->encoding, encoding);
+ }
+ else if (strcmp (conv->encoding, encoding) != 0)
+ {
+ /* The locale encoding of this thread changed. */
+ iconv_t new_cd_locale_to_utf8 = iconv_open ("UTF-8", encoding);
+ iconv_t new_cd_utf8_to_locale = iconv_open (encoding, "UTF-8");
+ if (new_cd_locale_to_utf8 == (iconv_t)(-1)
+ || new_cd_utf8_to_locale == (iconv_t)(-1))
+ {
+ /* iconv does not support this encoding. */
+ if (new_cd_locale_to_utf8 != (iconv_t)(-1))
+ iconv_close (new_cd_locale_to_utf8);
+ if (new_cd_utf8_to_locale != (iconv_t)(-1))
+ iconv_close (new_cd_utf8_to_locale);
+ return NULL;
+ }
+ iconv_close (conv->cd_locale_to_utf8);
+ iconv_close (conv->cd_utf8_to_locale);
+ conv->cd_locale_to_utf8 = new_cd_locale_to_utf8;
+ conv->cd_utf8_to_locale = new_cd_utf8_to_locale;
+ strcpy (conv->encoding, encoding);
+ }
+ return conv;
+}
+
+char32_t
+locale_encoding_to_unicode (wchar_t wc)
+{
+ /* This function is like a simplified variant of u32_conv_from_encoding,
+ that uses a cached per-thread iconv_t instead of allocating an iconv_t
+ at each call. */
+ if (wc == 0)
+ /* Invalid argument. */
+ abort ();
+
+ const char *encoding = locale_charset ();
+ if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+ /* Assume that if the locale encoding is UTF-8, the wchar_t encoding is
+ Unicode. */
+ return wc;
+ if (STREQ_OPT (encoding, "ASCII", 'A', 'S', 'C', 'I', 'I', 0, 0, 0, 0))
+ /* In the POSIX locale, avoid conversion errors. */
+ return wc;
+
+ struct converters *conv = get_converters (encoding);
+ if (conv == NULL)
+ return 0;
+
+ char mbbuf[64];
+ size_t mbcnt;
+ {
+ mbstate_t state = { 0 };
+ mbcnt = wcrtomb (mbbuf, wc, &state);
+ if (mbcnt > sizeof (mbbuf))
+ /* wcrtomb did not recognize the wide character wc. */
+ abort ();
+ }
+
+ char utf8buf[6];
+ size_t utf8cnt;
+ {
+ char *mbptr = mbbuf;
+ size_t mbsize = mbcnt;
+ char *utf8ptr = utf8buf;
+ size_t utf8size = sizeof (utf8buf);
+ size_t ret = iconv (conv->cd_locale_to_utf8,
+ &mbptr, &mbsize,
+ &utf8ptr, &utf8size);
+ if (ret == (size_t)(-1))
+ /* Conversion error. */
+ return 0;
+ if (mbsize != 0)
+ /* The input was not entirely converted. */
+ return 0;
+ utf8cnt = sizeof (utf8buf) - utf8size; /* = utf8ptr - utf8buf */
+ if (utf8cnt == 0)
+ /* The conversion produced no output. */
+ return 0;
+ }
+
+ ucs4_t uc;
+ if (u8_mbtouc (&uc, (const uint8_t *) utf8buf, utf8cnt) != utf8cnt)
+ /* iconv produced an invalid UTF-8 byte sequence. */
+ abort ();
+
+ return uc;
+}
+
+wchar_t
+unicode_to_locale_encoding (char32_t uc)
+{
+ if (uc == 0)
+ /* Invalid argument. */
+ abort ();
+
+ /* This function is like a simplified variant of u32_conv_to_encoding
+ that uses a cached per-thread iconv_t instead of allocating an iconv_t
+ at each call. */
+ const char *encoding = locale_charset ();
+ if (STREQ_OPT (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+ /* Assume that if the locale encoding is UTF-8, the wchar_t encoding is
+ Unicode. */
+ return uc;
+ if (STREQ_OPT (encoding, "ASCII", 'A', 'S', 'C', 'I', 'I', 0, 0, 0, 0))
+ /* In the POSIX locale, avoid conversion errors. */
+ return uc;
+
+ struct converters *conv = get_converters (encoding);
+ if (conv == NULL)
+ return 0;
+
+ char utf8buf[6];
+ int utf8cnt = u8_uctomb ((uint8_t *) utf8buf, uc, sizeof (utf8buf));
+ if (utf8cnt < 0)
+ /* Out-of-range Unicode character. */
+ return 0;
+
+ char mbbuf[64];
+ size_t mbcnt;
+ {
+ char *utf8ptr = utf8buf;
+ size_t utf8size = utf8cnt;
+ char *mbptr = mbbuf;
+ size_t mbsize = sizeof (mbbuf);
+ size_t ret = iconv (conv->cd_utf8_to_locale,
+ &utf8ptr, &utf8size,
+ &mbptr, &mbsize);
+ if (ret == (size_t)(-1))
+ /* Conversion error. */
+ return 0;
+ if (utf8size != 0)
+ /* The input was not entirely converted. */
+ return 0;
+ mbcnt = sizeof (mbbuf) - mbsize; /* = mbptr - mbbuf */
+ if (mbcnt == 0)
+ /* The conversion produced no output. */
+ return 0;
+ }
+
+ wchar_t wc;
+ {
+ mbstate_t state = { 0 };
+ if (mbrtowc (&wc, mbbuf, mbcnt, &state) != mbcnt)
+ /* iconv produced an invalid multibyte sequence. */
+ return 0;
+ }
+
+ return wc;
+}
+
+#else
+
+/* This declaration is solely to ensure that after preprocessing
+ this file is never empty. */
+typedef int dummy;
+
+#endif
--- /dev/null
+/* Conversion between the current locale's character encoding and Unicode.
+ Copyright (C) 2023 Free Software Foundation, Inc.
+
+ This file is free software: you can redistribute it and/or modify
+ it under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of the
+ License, or (at your option) any later version.
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public License
+ along with this program. If not, see <https://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2023. */
+
+/* This facility is only needed on specific platforms. */
+#if GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION
+
+# include <wchar.h>
+# include <uchar.h>
+
+/* Returns WC (must be != 0) as a Unicode character,
+ or 0 in case it cannot be converted. */
+extern char32_t locale_encoding_to_unicode (wchar_t wc);
+
+/* Returns UC (must be != 0) as a wide character,
+ or 0 in case it cannot be converted. */
+extern wchar_t unicode_to_locale_encoding (char32_t uc);
+
+#endif
#include <errno.h>
#include <stdlib.h>
+#if GL_CHAR32_T_IS_UNICODE
+# include "lc-charset-unicode.h"
+#endif
+
#if GNULIB_defined_mbstate_t /* AIX, IRIX */
/* Implement mbrtoc32() on top of mbtowc() for the non-UTF-8 locales
and directly for the UTF-8 locales. */
/* char32_t and wchar_t are equivalent. Use mbrtowc(). */
wchar_t wc;
size_t ret = mbrtowc (&wc, s, n, ps);
+# if GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION
+ if (ret < (size_t) -2 && wc != 0)
+ {
+ wc = locale_encoding_to_unicode (wc);
+ if (wc == 0)
+ {
+ ret = (size_t) -1;
+ errno = EILSEQ;
+ }
+ }
+# endif
if (ret < (size_t) -2 && pwc != NULL)
*pwc = wc;
return ret;
#include <wchar.h>
-#if (HAVE_WORKING_MBRTOC32 && !_GL_WCHAR_T_IS_UCS4) || _GL_SMALL_WCHAR_T
+#if (HAVE_WORKING_MBRTOC32 && !_GL_WCHAR_T_IS_UCS4) || (GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION) || _GL_SMALL_WCHAR_T
/* The char32_t encoding of a multibyte character may be different than its
wchar_t encoding, or char32_t is wider than wchar_t. */
#include <wchar.h>
-#if (HAVE_WORKING_MBRTOC32 && !_GL_WCHAR_T_IS_UCS4) || _GL_SMALL_WCHAR_T
+#if (HAVE_WORKING_MBRTOC32 && !_GL_WCHAR_T_IS_UCS4) || (GL_CHAR32_T_IS_UNICODE && GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION) || _GL_SMALL_WCHAR_T
/* The char32_t encoding of a multibyte character may be different than its
wchar_t encoding, or char32_t is wider than wchar_t. */
/* A 32-bit variant of wchar_t.
Note: This type is only mandated by ISO C 11 or newer. In ISO C 23
and newer, it denotes UTF-32 code points; in older versions of ISO C
- it did so only on platforms on which __STDC_UTF_32__ was defined. */
+ it did so only on platforms on which __STDC_UTF_32__ was defined.
+ In gnulib, we guarantee that it denotes UTF-32 code points if and
+ only if the module 'uchar-c23' is in use. */
typedef uint_least32_t char32_t;
#elif @GNULIBHEADERS_OVERRIDE_CHAR32_T@
Include:
<uchar.h>
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
+
License:
LGPLv2+
TESTS += test-btoc32-1.sh test-btoc32-2.sh test-btoc32-3.sh
TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
check_PROGRAMS += test-btoc32
-test_btoc32_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_btoc32_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32isalnum
-test_c32isalnum_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32isalnum_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32isalpha
-test_c32isalpha_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32isalpha_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32isblank
-test_c32isblank_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32isblank_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32iscntrl
-test_c32iscntrl_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32iscntrl_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32isdigit
-test_c32isdigit_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32isdigit_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32isgraph
-test_c32isgraph_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32isgraph_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32islower
-test_c32islower_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32islower_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32isprint
-test_c32isprint_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32isprint_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32ispunct
-test_c32ispunct_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32ispunct_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32isspace
-test_c32isspace_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32isspace_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32isupper
-test_c32isupper_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32isupper_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32isxdigit
-test_c32isxdigit_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32isxdigit_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Include:
<uchar.h>
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
+
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32rtomb test-c32rtomb-w32
-test_c32rtomb_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_c32rtomb_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(LIBC32CONV)
Include:
<uchar.h>
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
+
License:
LGPL
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32snrtombs
-test_c32snrtombs_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_c32snrtombs_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(LIBC32CONV)
Include:
<uchar.h>
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
+
License:
LGPL
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32srtombs
-test_c32srtombs_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_c32srtombs_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(LIBC32CONV)
Include:
<uchar.h>
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
+
License:
LGPL
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32stombs
-test_c32stombs_LDADD = $(LDADD) $(SETLOCALE_LIB)
+test_c32stombs_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
Makefile.am:
TESTS += test-c32swidth
check_PROGRAMS += test-c32swidth
-test_c32swidth_LDADD = $(LDADD) $(SETLOCALE_LIB) $(LIBUNISTRING)
+test_c32swidth_LDADD = $(LDADD) $(SETLOCALE_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Include:
<uchar.h>
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
+
License:
LGPL
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32tolower
-test_c32tolower_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32tolower_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-c32toupper
-test_c32toupper_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING)
+test_c32toupper_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
Makefile.am:
TESTS += test-c32width
check_PROGRAMS += test-c32width
-test_c32width_LDADD = $(LDADD) $(SETLOCALE_LIB) $(LIBUNISTRING)
+test_c32width_LDADD = $(LDADD) $(SETLOCALE_LIB) $(LIBUNISTRING) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
GPL
test-exclude8.sh
check_PROGRAMS += test-exclude
-test_exclude_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(MBRTOWC_LIB) $(LIBTHREAD)
+test_exclude_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(MBRTOWC_LIB) $(LIBTHREAD) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
check_PROGRAMS += test-mbmemcasecmp
-test_mbmemcasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbmemcasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
<uchar.h>
Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-mbrtoc32 test-mbrtoc32-w32
-test_mbrtoc32_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbrtoc32_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
TESTS += test-mbscasecmp.sh
TESTS_ENVIRONMENT += LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
check_PROGRAMS += test-mbscasecmp
-test_mbscasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbscasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
TESTS += test-mbscasestr1 test-mbscasestr2.sh test-mbscasestr3.sh test-mbscasestr4.sh
TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-mbscasestr1 test-mbscasestr2 test-mbscasestr3 test-mbscasestr4
-test_mbscasestr1_LDADD = $(LDADD) $(LIBUNISTRING) $(MBRTOWC_LIB)
-test_mbscasestr2_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
-test_mbscasestr3_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
-test_mbscasestr4_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbscasestr1_LDADD = $(LDADD) $(LIBUNISTRING) $(MBRTOWC_LIB) $(LIBC32CONV)
+test_mbscasestr2_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
+test_mbscasestr3_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
+test_mbscasestr4_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
TESTS += test-mbschr.sh
TESTS_ENVIRONMENT += LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-mbschr
-test_mbschr_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbschr_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
TESTS += test-mbscspn.sh
TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
check_PROGRAMS += test-mbscspn
-test_mbscspn_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbscspn_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
TESTS += test-mbsncasecmp.sh
TESTS_ENVIRONMENT += LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
check_PROGRAMS += test-mbsncasecmp
-test_mbsncasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsncasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
<uchar.h>
Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-mbsnrtoc32s
-test_mbsnrtoc32s_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsnrtoc32s_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
TESTS += test-mbspbrk.sh
TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
check_PROGRAMS += test-mbspbrk
-test_mbspbrk_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbspbrk_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
TESTS += test-mbspcasecmp.sh
TESTS_ENVIRONMENT += LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
check_PROGRAMS += test-mbspcasecmp
-test_mbspcasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbspcasecmp_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
TESTS += test-mbsrchr.sh
TESTS_ENVIRONMENT += LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-mbsrchr
-test_mbsrchr_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsrchr_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
<uchar.h>
Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-mbsrtoc32s
-test_mbsrtoc32s_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsrtoc32s_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
TESTS += test-mbsspn.sh
TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
check_PROGRAMS += test-mbsspn
-test_mbsspn_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsspn_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
TESTS += test-mbsstr1 test-mbsstr2.sh test-mbsstr3.sh
TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-mbsstr1 test-mbsstr2 test-mbsstr3
-test_mbsstr1_LDADD = $(LDADD) $(LIBUNISTRING) $(MBRTOWC_LIB)
-test_mbsstr2_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
-test_mbsstr3_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbsstr1_LDADD = $(LDADD) $(LIBUNISTRING) $(MBRTOWC_LIB) $(LIBC32CONV)
+test_mbsstr2_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
+test_mbsstr3_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
<uchar.h>
Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPLv2+
LOCALE_JA='@LOCALE_JA@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-mbstoc32s
-test_mbstoc32s_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
+test_mbstoc32s_LDADD = $(LDADD) $(LIBUNISTRING) $(SETLOCALE_LIB) $(MBRTOWC_LIB) $(LIBC32CONV)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
LGPL
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
GPL
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
GPL
Makefile.am:
TESTS += test-regex-quote
check_PROGRAMS += test-regex-quote
-test_regex_quote_LDADD = $(LDADD) $(LIBUNISTRING) $(LIBINTL) $(MBRTOWC_LIB) $(LIBTHREAD)
+test_regex_quote_LDADD = $(LDADD) $(LIBUNISTRING) $(LIBINTL) $(MBRTOWC_LIB) $(LIBC32CONV) $(LIBTHREAD)
Link:
$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
$(MBRTOWC_LIB)
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
License:
GPL
LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
LOCALE_ZH_CN='@LOCALE_ZH_CN@'
check_PROGRAMS += test-trim
-test_trim_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(MBRTOWC_LIB)
+test_trim_LDADD = $(LDADD) $(LIBUNISTRING) @LIBINTL@ $(MBRTOWC_LIB) $(LIBC32CONV)
--- /dev/null
+Description:
+A <uchar.h> in which the char32_t values are always Unicode code points.
+
+Files:
+lib/lc-charset-unicode.h
+lib/lc-charset-unicode.c
+
+Depends-on:
+uchar
+wchar
+iconv
+localcharset
+streq
+lock
+tls
+wcrtomb
+unistr/u8-mbtouc
+unistr/u8-uctomb
+mbrtowc
+
+configure.ac:
+AC_REQUIRE([AC_CANONICAL_HOST])
+AC_REQUIRE([AM_ICONV])
+AC_DEFINE([GL_CHAR32_T_IS_UNICODE], [1],
+ [Define if gnulib's char32_t values are always Unicode code points.])
+dnl On macOS, FreeBSD, NetBSD, Solaris, the functions mbrtoc32 and c32rtomb
+dnl need to convert between the wchar_t encoding and Unicode.
+case "$host_os" in
+ darwin* | freebsd* | dragonfly* | netbsd* | solaris*)
+ AC_DEFINE([GL_CHAR32_T_VS_WCHAR_T_NEEDS_CONVERSION], [1],
+ [Define if gnulib needs to convert between the wchar_t encoding and Unicode.])
+ LIBC32CONV="$LIBICONV"
+ LTLIBC32CONV="$LTLIBICONV"
+ ;;
+ *)
+ LIBC32CONV=
+ LTLIBC32CONV=
+ ;;
+esac
+AC_SUBST([LIBC32CONV])
+AC_SUBST([LTLIBC32CONV])
+
+Makefile.am:
+lib_SOURCES += lc-charset-unicode.c
+
+Include:
+<uchar.h>
+
+Link:
+$(LTLIBUNISTRING) when linking with libtool, $(LIBUNISTRING) otherwise
+$(LTLIBC32CONV) when linking with libtool, $(LIBC32CONV) otherwise
+
+License:
+LGPLv2+
+
+Maintainer:
+all
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+00D7 MULTIPLICATION SIGN */
is = for_character ("\241\301", 2);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32isalnum${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32isalnum${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
/* U+3001 IDEOGRAPHIC COMMA */
is = for_character ("\241\242", 2);
ASSERT (is == 0);
- #if !(defined __GLIBC__ || defined __CYGWIN__)
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined __sun || defined __CYGWIN__)
/* U+FF11 FULLWIDTH DIGIT ONE */
is = for_character ("\243\261", 2);
ASSERT (is == 0);
/* U+3001 IDEOGRAPHIC COMMA */
is = for_character ("\343\200\201", 3);
ASSERT (is == 0);
- #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__)
+ #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__)
/* U+FF11 FULLWIDTH DIGIT ONE */
is = for_character ("\357\274\221", 3);
ASSERT (is == 0);
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+00D7 MULTIPLICATION SIGN */
is = for_character ("\241\301", 2);
/* U+3001 IDEOGRAPHIC COMMA */
is = for_character ("\241\242", 2);
ASSERT (is == 0);
- #if !defined __GLIBC__
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)
/* U+FF11 FULLWIDTH DIGIT ONE */
is = for_character ("\243\261", 2);
ASSERT (is == 0);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32isalpha${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32isalpha${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
#if defined __GLIBC__
/* U+00A0 NO-BREAK SPACE */
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32isblank${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32isblank${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
/* U+00A0 NO-BREAK SPACE */
is = for_character ("\302\240", 2);
ASSERT (is == 0);
- #if !(defined __GLIBC__ || defined MUSL_LIBC || defined __FreeBSD__ || defined __DragonFly__ || defined _AIX || defined __sun || defined __CYGWIN__)
+ #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__)
/* U+202E RIGHT-TO-LEFT OVERRIDE */
is = for_character ("\342\200\256", 3);
ASSERT (is != 0);
/* U+3000 IDEOGRAPHIC SPACE */
is = for_character ("\343\200\200", 3);
ASSERT (is == 0);
- #if !(defined __GLIBC__ || defined MUSL_LIBC || defined __FreeBSD__ || defined __DragonFly__ || defined _AIX || defined __sun || defined __CYGWIN__)
+ #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__)
/* U+FEFF ZERO WIDTH NO-BREAK SPACE */
is = for_character ("\357\273\277", 3);
ASSERT (is != 0);
/* U+20000 <CJK Ideograph> */
is = for_character ("\360\240\200\200", 4);
ASSERT (is == 0);
- #if !(defined __GLIBC__ || defined MUSL_LIBC || defined __FreeBSD__ || defined __DragonFly__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+ #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
/* U+E0001 LANGUAGE TAG */
is = for_character ("\363\240\200\201", 4);
ASSERT (is != 0);
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+007F <control> */
is = for_character ("\177", 1);
/* U+00A0 NO-BREAK SPACE */
is = for_character ("\201\060\204\062", 4);
ASSERT (is == 0);
- #if !(defined __GLIBC__ || defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
/* U+202E RIGHT-TO-LEFT OVERRIDE */
is = for_character ("\201\066\247\061", 4);
ASSERT (is != 0);
/* U+3000 IDEOGRAPHIC SPACE */
is = for_character ("\241\241", 2);
ASSERT (is == 0);
- #if !(defined __GLIBC__ || defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
/* U+FEFF ZERO WIDTH NO-BREAK SPACE */
is = for_character ("\204\061\225\063", 4);
ASSERT (is != 0);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32iscntrl${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32iscntrl${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+00B2 SUPERSCRIPT TWO */
is = for_character ("\201\060\205\065", 4);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32isdigit${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32isdigit${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
/* U+2002 EN SPACE */
is = for_character ("\342\200\202", 3);
ASSERT (is == 0);
- #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__)
+ #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__)
/* U+202E RIGHT-TO-LEFT OVERRIDE */
is = for_character ("\342\200\256", 3);
ASSERT (is == 0);
/* U+3000 IDEOGRAPHIC SPACE */
is = for_character ("\343\200\200", 3);
ASSERT (is == 0);
- #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__)
+ #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__)
/* U+FEFF ZERO WIDTH NO-BREAK SPACE */
is = for_character ("\357\273\277", 3);
ASSERT (is == 0);
is = for_character ("\360\240\200\200", 4);
ASSERT (is != 0);
#endif
- #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+ #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
/* U+E0001 LANGUAGE TAG */
is = for_character ("\363\240\200\201", 4);
ASSERT (is == 0);
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+007F <control> */
is = for_character ("\177", 1);
/* U+2002 EN SPACE */
is = for_character ("\201\066\243\070", 4);
ASSERT (is == 0);
- #if !defined __GLIBC__
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)
/* U+202E RIGHT-TO-LEFT OVERRIDE */
is = for_character ("\201\066\247\061", 4);
ASSERT (is == 0);
/* U+3000 IDEOGRAPHIC SPACE */
is = for_character ("\241\241", 2);
ASSERT (is == 0);
- #if !defined __GLIBC__
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)
/* U+FEFF ZERO WIDTH NO-BREAK SPACE */
is = for_character ("\204\061\225\063", 4);
ASSERT (is == 0);
is = for_character ("\225\062\202\066", 4);
ASSERT (is != 0);
#endif
- #if !defined __GLIBC__
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)
/* U+E0001 LANGUAGE TAG */
is = for_character ("\323\066\225\071", 4);
ASSERT (is == 0);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32isgraph${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32isgraph${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
/* U+00B2 SUPERSCRIPT TWO */
is = for_character ("\262", 1);
ASSERT (is == 0);
- #if !(defined __GLIBC__ || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
/* U+00B5 MICRO SIGN */
is = for_character ("\265", 1);
ASSERT (is == 0);
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+00B2 SUPERSCRIPT TWO */
is = for_character ("\201\060\205\065", 4);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32islower${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32islower${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
is = for_character ("\342\200\202", 3);
ASSERT (is != 0);
#endif
- #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__)
+ #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__)
/* U+202E RIGHT-TO-LEFT OVERRIDE */
is = for_character ("\342\200\256", 3);
ASSERT (is == 0);
is = for_character ("\343\200\200", 3);
ASSERT (is != 0);
#endif
- #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+ #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
/* U+FEFF ZERO WIDTH NO-BREAK SPACE */
is = for_character ("\357\273\277", 3);
ASSERT (is == 0);
is = for_character ("\360\240\200\200", 4);
ASSERT (is != 0);
#endif
- #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+ #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
/* U+E0001 LANGUAGE TAG */
is = for_character ("\363\240\200\201", 4);
ASSERT (is == 0);
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+007F <control> */
is = for_character ("\177", 1);
is = for_character ("\201\066\243\070", 4);
ASSERT (is != 0);
#endif
- #if !defined __GLIBC__
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)
/* U+202E RIGHT-TO-LEFT OVERRIDE */
is = for_character ("\201\066\247\061", 4);
ASSERT (is == 0);
is = for_character ("\241\241", 2);
ASSERT (is != 0);
#endif
- #if !defined __GLIBC__
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)
/* U+FEFF ZERO WIDTH NO-BREAK SPACE */
is = for_character ("\204\061\225\063", 4);
ASSERT (is == 0);
is = for_character ("\225\062\202\066", 4);
ASSERT (is != 0);
#endif
- #if !defined __GLIBC__
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)
/* U+E0001 LANGUAGE TAG */
is = for_character ("\323\066\225\071", 4);
ASSERT (is == 0);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32isprint${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32isprint${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
is = for_character ("\360\235\204\200", 4);
ASSERT (is != 0);
#endif
- #if !(defined __GLIBC__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
/* U+E003A TAG COLON */
is = for_character ("\363\240\200\272", 4);
ASSERT (is == 0);
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
#if !(defined __FreeBSD__ || defined __DragonFly__ || defined __sun)
/* U+00BF INVERTED QUESTION MARK */
is = for_character ("\224\062\273\064", 4);
ASSERT (is != 0);
#endif
- #if !defined __GLIBC__
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__)
/* U+E003A TAG COLON */
is = for_character ("\323\066\233\066", 4);
ASSERT (is == 0);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32ispunct${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32ispunct${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+00B7 MIDDLE DOT */
is = for_character ("\241\244", 2);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32isspace${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32isspace${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+00B2 SUPERSCRIPT TWO */
is = for_character ("\201\060\205\065", 4);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32isupper${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32isupper${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+00B2 SUPERSCRIPT TWO */
is = for_character ("\201\060\205\065", 4);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32isxdigit${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32isxdigit${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
const char input[] = "s\250\271\201\060\211\070\224\071\375\067!"; /* "süß😋!" */
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32rtomb${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32rtomb${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
# Test in the POSIX locale.
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
const char original[] = "s\250\271\201\060\211\070\224\071\375\067!"; /* "süß😋!" */
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
const char original[] = "s\250\271\201\060\211\070\224\071\375\067!"; /* "süß😋!" */
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
const char original[] = "s\250\271\201\060\211\070\224\071\375\067!"; /* "süß😋!" */
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+00B2 SUPERSCRIPT TWO */
mb = for_character ("\201\060\205\065", 4);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32tolower${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32tolower${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
mb = for_character ("\262", 1);
ASSERT (mb.nbytes == 1);
ASSERT (memcmp (mb.buf, "\262", 1) == 0);
- #if !(defined __GLIBC__ || defined __sun || defined __CYGWIN__)
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __NetBSD__ || defined __sun || defined __CYGWIN__)
/* U+00B5 MICRO SIGN */
mb = for_character ("\265", 1);
ASSERT (mb.nbytes == 1);
mb = for_character ("\351", 1);
ASSERT (mb.nbytes == 1);
ASSERT (memcmp (mb.buf, "\311", 1) == 0);
- #if !(defined __GLIBC__ || defined __DragonFly__ || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+ #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
/* U+00FF LATIN SMALL LETTER Y WITH DIAERESIS */
mb = for_character ("\377", 1);
ASSERT (mb.nbytes == 1);
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
/* U+00B2 SUPERSCRIPT TWO */
mb = for_character ("\201\060\205\065", 4);
ASSERT (mb.nbytes == 4);
ASSERT (memcmp (mb.buf, "\201\060\205\065", 4) == 0);
- #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __NetBSD__)
+ #if !(defined __GLIBC__ || defined __FreeBSD__ || (defined __APPLE__ && defined __MACH__) || defined __NetBSD__)
/* U+00B5 MICRO SIGN */
mb = for_character ("\201\060\205\070", 4);
ASSERT (mb.nbytes == 4);
: "${LOCALE_ZH_CN=zh_CN.GB18030}"
if test $LOCALE_ZH_CN != none; then
LC_ALL=$LOCALE_ZH_CN \
- ${CHECKER} ./test-c32toupper${EXEEXT} 4 \
- || exit 1
+ ${CHECKER} ./test-c32toupper${EXEEXT} 4
+ case $? in
+ 0 | 77) ;;
+ *) exit 1 ;;
+ esac
fi
exit 0
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <wchar.h>
#include "localcharset.h"
#include "macros.h"
memset (&state, '\0', sizeof (mbstate_t));
wc = (char32_t) 0xBADFACE;
ret = mbrtoc32 (&wc, "x", 0, &state);
- /* gnulib's implementation returns (size_t)(-2).
- The AIX 5.1 implementation returns (size_t)(-1).
- glibc's implementation returns 0. */
- ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0);
+ ASSERT (ret == (size_t)(-2));
ASSERT (mbsinit (&state));
}
ret = mbrtoc32 (&wc, input + 1, 1, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == (unsigned char) '\374');
- ASSERT (wc == 0x00FC);
+ ASSERT (wc == 0x00FC); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[1] = '\0';
ret = mbrtoc32 (&wc, input + 2, 3, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == (unsigned char) '\337');
- ASSERT (wc == 0x00DF);
+ ASSERT (wc == 0x00DF); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[2] = '\0';
ret = mbrtoc32 (&wc, input + 1, 1, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == (unsigned char) '\302');
- ASSERT (wc == 0x0622);
+ ASSERT (wc == 0x0622); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[1] = '\0';
ret = mbrtoc32 (&wc, input + 2, 3, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == (unsigned char) '\341');
- ASSERT (wc == 0x0644);
+ ASSERT (wc == 0x0644); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[2] = '\0';
ret = mbrtoc32 (&wc, input + 3, 2, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == (unsigned char) '\346');
- ASSERT (wc == 0x0648);
+ ASSERT (wc == 0x0648); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[3] = '\0';
ret = mbrtoc32 (&wc, input + 1, 2, &state);
ASSERT (ret == 2);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x65E5);
+ ASSERT (wc == 0x65E5); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[1] = '\0';
input[2] = '\0';
ret = mbrtoc32 (&wc, input + 4, 4, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x672C);
+ ASSERT (wc == 0x672C); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[4] = '\0';
ret = mbrtoc32 (&wc, input + 5, 3, &state);
ASSERT (ret == 2);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x8A9E);
+ ASSERT (wc == 0x8A9E); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[5] = '\0';
input[6] = '\0';
ret = mbrtoc32 (&wc, input + 1, 2, &state);
ASSERT (ret == 2);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x65E5);
+ ASSERT (wc == 0x65E5); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[1] = '\0';
input[2] = '\0';
ret = mbrtoc32 (&wc, input + 4, 4, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x672C);
+ ASSERT (wc == 0x672C); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[4] = '\0';
ret = mbrtoc32 (&wc, input + 5, 3, &state);
ASSERT (ret == 2);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x8A9E);
+ ASSERT (wc == 0x8A9E); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[5] = '\0';
input[6] = '\0';
ret = mbrtoc32 (&wc, input + 1, 2, &state);
ASSERT (ret == 2);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x65E5);
+ ASSERT (wc == 0x65E5); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[1] = '\0';
input[2] = '\0';
ret = mbrtoc32 (&wc, input + 4, 4, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x672C);
+ ASSERT (wc == 0x672C); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[4] = '\0';
ret = mbrtoc32 (&wc, input + 5, 3, &state);
ASSERT (ret == 2);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x8A9E);
+ ASSERT (wc == 0x8A9E); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[5] = '\0';
input[6] = '\0';
ret = mbrtoc32 (&wc, input + 2, 9, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x00FC);
+ ASSERT (wc == 0x00FC); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[2] = '\0';
ret = mbrtoc32 (&wc, input + 3, 8, &state);
ASSERT (ret == 4);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x00DF);
+ ASSERT (wc == 0x00DF); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[3] = '\0';
input[4] = '\0';
ret = mbrtoc32 (&wc, input + 7, 4, &state);
ASSERT (ret == 4);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x1F60B);
+ ASSERT (wc == 0x1F60B); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[7] = '\0';
input[8] = '\0';
ret = mbrtoc32 (&wc, input + 2, 7, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x00FC);
+ ASSERT (wc == 0x00FC); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[2] = '\0';
ret = mbrtoc32 (&wc, input + 3, 6, &state);
ASSERT (ret == 2);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x00DF);
+ ASSERT (wc == 0x00DF); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[3] = '\0';
input[4] = '\0';
ret = mbrtoc32 (&wc, input + 5, 4, &state);
ASSERT (ret == 4);
ASSERT (c32tob (wc) == EOF);
- ASSERT (wc == 0x1F60B);
+ ASSERT (wc == 0x1F60B); /* expect Unicode encoding */
ASSERT (mbsinit (&state));
input[5] = '\0';
input[6] = '\0';
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <wchar.h>
#include "macros.h"
ret = mbrtoc32 (&wc, input + 1, 1, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == (unsigned char) '\374');
+ #if GL_CHAR32_T_IS_UNICODE
+ ASSERT (wc == 0x00FC); /* expect Unicode encoding */
+ #endif
ASSERT (mbsinit (&state));
input[1] = '\0';
ret = mbrtoc32 (&wc, input + 2, 3, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == (unsigned char) '\337');
+ #if GL_CHAR32_T_IS_UNICODE
+ ASSERT (wc == 0x00DF); /* expect Unicode encoding */
+ #endif
ASSERT (mbsinit (&state));
input[2] = '\0';
ret = mbrtoc32 (&wc, input + 1, 2, &state);
ASSERT (ret == 2);
ASSERT (c32tob (wc) == EOF);
+ #if GL_CHAR32_T_IS_UNICODE
+ ASSERT (wc == 0x65E5); /* expect Unicode encoding */
+ #endif
ASSERT (mbsinit (&state));
input[1] = '\0';
input[2] = '\0';
ret = mbrtoc32 (&wc, input + 4, 4, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == EOF);
+ #if GL_CHAR32_T_IS_UNICODE
+ ASSERT (wc == 0x672C); /* expect Unicode encoding */
+ #endif
ASSERT (mbsinit (&state));
input[4] = '\0';
ret = mbrtoc32 (&wc, input + 5, 3, &state);
ASSERT (ret == 2);
ASSERT (c32tob (wc) == EOF);
+ #if GL_CHAR32_T_IS_UNICODE
+ ASSERT (wc == 0x8A9E); /* expect Unicode encoding */
+ #endif
ASSERT (mbsinit (&state));
input[5] = '\0';
input[6] = '\0';
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
char input[] = "s\250\271\201\060\211\070\224\071\375\067!"; /* "süß😋!" */
memset (&state, '\0', sizeof (mbstate_t));
ret = mbrtoc32 (&wc, input + 2, 9, &state);
ASSERT (ret == 1);
ASSERT (c32tob (wc) == EOF);
+ #if GL_CHAR32_T_IS_UNICODE
+ ASSERT (wc == 0x00FC); /* expect Unicode encoding */
+ #endif
ASSERT (mbsinit (&state));
input[2] = '\0';
ret = mbrtoc32 (&wc, input + 3, 8, &state);
ASSERT (ret == 4);
ASSERT (c32tob (wc) == EOF);
+ #if GL_CHAR32_T_IS_UNICODE
+ ASSERT (wc == 0x00DF); /* expect Unicode encoding */
+ #endif
ASSERT (mbsinit (&state));
input[3] = '\0';
input[4] = '\0';
ret = mbrtoc32 (&wc, input + 7, 4, &state);
ASSERT (ret == 4);
ASSERT (c32tob (wc) == EOF);
+ #if GL_CHAR32_T_IS_UNICODE
+ ASSERT (wc == 0x1F60B); /* expect Unicode encoding */
+ #endif
ASSERT (mbsinit (&state));
input[7] = '\0';
input[8] = '\0';
#include <locale.h>
#include <stdio.h>
#include <string.h>
+#include <wchar.h>
#include "macros.h"
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
char input[] = "s\250\271\201\060\211\070\224\071\375\067!"; /* "süß😋!" */
memset (&state, '\0', sizeof (mbstate_t));
#include <locale.h>
#include <stdio.h>
#include <string.h>
+#include <wchar.h>
#include "macros.h"
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
char input[] = "s\250\271\201\060\211\070\224\071\375\067!"; /* "süß😋!" */
memset (&state, '\0', sizeof (mbstate_t));
case '4':
/* Locale encoding is GB18030. */
+ #if GL_CHAR32_T_IS_UNICODE && (defined __NetBSD__ || defined __sun)
+ fputs ("Skipping test: The GB18030 converter in this system's iconv is broken.\n", stderr);
+ return 77;
+ #endif
{
char input[] = "s\250\271\201\060\211\070\224\071\375\067!"; /* "süß😋!" */