]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
c32tolower, c32toupper: Fix for Turkish locale in Cygwin 3.6.7.
authorBruno Haible <bruno@clisp.org>
Mon, 9 Mar 2026 13:10:43 +0000 (14:10 +0100)
committerBruno Haible <bruno@clisp.org>
Mon, 9 Mar 2026 13:11:54 +0000 (14:11 +0100)
* lib/c32to-impl.h (FUNC): Move _GL_SMALL_WCHAR_T case up.

ChangeLog
lib/c32to-impl.h

index 3ec0fee6b1f65450dc388e1a5dfdcb6cb1b592ec..0d5cbd16728c21a73d7b198771f80663c747d976 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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.
index f6eaf5fdb459c6d5921590671c770b286b6b706d..b89cc98e2dd88bb9fbee3e80b183a17880465780 100644 (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));