Hash :
13cd6eb1
Author :
Date :
2023-07-16T07:30:59
uchar-c23: Optimize clearing an mbstate_t. * lib/lc-charset-unicode.c (locale_encoding_to_unicode, unicode_to_locale_encoding): Use mbszero. * modules/uchar-c23 (Depends-on): Add mbszero.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58
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
mbszero
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