1
0
mirror of https://https.git.savannah.gnu.org/git/gnulib.git synced 2026-04-28 06:33:36 +00:00

c32tolower, c32toupper: Fix for Turkish locale in Cygwin 3.6.7.

* lib/c32to-impl.h (FUNC): Move _GL_SMALL_WCHAR_T case up.
This commit is contained in:
Bruno Haible
2026-03-09 14:10:43 +01:00
parent a65f999035
commit ce596a4aa5
2 changed files with 21 additions and 16 deletions

View File

@@ -1,3 +1,8 @@
2026-03-09 Bruno Haible <bruno@clisp.org>
c32tolower, c32toupper: Fix for Turkish locale in Cygwin 3.6.7.
* lib/c32to-impl.h (FUNC): Move _GL_SMALL_WCHAR_T case up.
2026-03-09 Bruno Haible <bruno@clisp.org>
doc: Document C2y stdc_* <stdbit.h> functions.

View File

@@ -53,22 +53,6 @@ FUNC (wint_t wc)
else
return wc;
#elif HAVE_WORKING_MBRTOC32 && HAVE_WORKING_C32RTOMB /* glibc, Android */
/* mbrtoc32() is essentially defined by the system libc. */
# 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);
# else
/* The char32_t encoding of a multibyte character is known to be UCS-4,
different from the wchar_t encoding. */
if (wc != WEOF)
return UCS_FUNC (wc);
else
return wc;
# endif
#elif _GL_SMALL_WCHAR_T /* Cygwin, mingw, MSVC */
/* The wchar_t encoding is UTF-16.
The char32_t encoding is UCS-4. */
@@ -90,6 +74,22 @@ FUNC (wint_t wc)
return UCS_FUNC (wc);
# endif
#elif HAVE_WORKING_MBRTOC32 && HAVE_WORKING_C32RTOMB /* glibc, Android */
/* mbrtoc32() is essentially defined by the system libc. */
# 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);
# else
/* The char32_t encoding of a multibyte character is known to be UCS-4,
different from the wchar_t encoding. */
if (wc != WEOF)
return UCS_FUNC (wc);
else
return wc;
# endif
#else /* macOS, FreeBSD, NetBSD, OpenBSD, HP-UX, Solaris, Minix, Android */
/* char32_t and wchar_t are equivalent. */
static_assert (sizeof (char32_t) == sizeof (wchar_t));