summaryrefslogtreecommitdiff
path: root/lib/c32is-impl.h
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2023-04-04 12:34:12 +0200
committerBruno Haible <bruno@clisp.org>2023-04-04 12:34:12 +0200
commit6b4ef50c64e606f11afcd9e8a063f05c835bb4a6 (patch)
treec8226ef51c1b403627eeb17e0f9ae3ce9cf664b2 /lib/c32is-impl.h
parent4fab8907555510129a2190bb0268cd1525491e0f (diff)
downloadgnulib-6b4ef50c64e606f11afcd9e8a063f05c835bb4a6.tar.gz
*c32*: Optimize on musl libc like on glibc.
* lib/uchar.in.h (_GL_WCHAR_T_IS_UCS4): New macro. * lib/btoc32.c (btoc32): Test _GL_WCHAR_T_IS_UCS4 instead of __GLIBC__. * lib/mbsrtoc32s.c: Likewise. * lib/mbsnrtoc32s.c: Likewise. * lib/c32tob.c (c32tob): Likewise. * lib/c32srtombs.c: Likewise. * lib/c32snrtombs.c: Likewise. * lib/c32is-impl.h (FUNC): Likewise.
Diffstat (limited to 'lib/c32is-impl.h')
-rw-r--r--lib/c32is-impl.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/c32is-impl.h b/lib/c32is-impl.h
index 13a7dff58c..d5e5362c0b 100644
--- a/lib/c32is-impl.h
+++ b/lib/c32is-impl.h
@@ -61,7 +61,7 @@ FUNC (wint_t wc)
#elif HAVE_WORKING_MBRTOC32 /* glibc */
/* mbrtoc32() is essentially defined by the system libc. */
-# if defined __GLIBC__
+# if _GL_WCHAR_T_IS_UCS4
/* The char32_t encoding of a multibyte character is known to be the same as
the wchar_t encoding. */
return WCHAR_FUNC (wc);