]> Savannah Git Hosting - gnulib.git/commitdiff
uchar: Rename _GL_LARGE_CHAR32_T to _GL_SMALL_WCHAR_T.
authorBruno Haible <bruno@clisp.org>
Tue, 4 Apr 2023 10:31:28 +0000 (12:31 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 4 Apr 2023 10:31:28 +0000 (12:31 +0200)
* lib/uchar.in.h (_GL_SMALL_WCHAR_T): Renamed from _GL_LARGE_CHAR32_T.
* lib/mbrtoc32.c: Update.
* lib/mbsrtoc32s.c: Update.
* lib/mbsnrtoc32s.c: Update.
* lib/c32tob.c: Update.
* lib/c32rtomb.c: Update.
* lib/c32srtombs.c: Update.
* lib/c32snrtombs.c: Update.
* lib/c32is-impl.h: Update.
* tests/test-uchar.c: Update.

ChangeLog
lib/c32is-impl.h
lib/c32rtomb.c
lib/c32snrtombs.c
lib/c32srtombs.c
lib/c32tob.c
lib/mbrtoc32.c
lib/mbsnrtoc32s.c
lib/mbsrtoc32s.c
lib/uchar.in.h
tests/test-uchar.c

index 87fac6232cd3b4ce8e79097a64e9b7083ce4890b..8ac34217ce13e422c37733d89f00f1434471ef96 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,17 @@
+2023-04-04  Bruno Haible  <bruno@clisp.org>
+
+       uchar: Rename _GL_LARGE_CHAR32_T to _GL_SMALL_WCHAR_T.
+       * lib/uchar.in.h (_GL_SMALL_WCHAR_T): Renamed from _GL_LARGE_CHAR32_T.
+       * lib/mbrtoc32.c: Update.
+       * lib/mbsrtoc32s.c: Update.
+       * lib/mbsnrtoc32s.c: Update.
+       * lib/c32tob.c: Update.
+       * lib/c32rtomb.c: Update.
+       * lib/c32srtombs.c: Update.
+       * lib/c32snrtombs.c: Update.
+       * lib/c32is-impl.h: Update.
+       * tests/test-uchar.c: Update.
+
 2023-04-04  Bruno Haible  <bruno@clisp.org>
 
        c32rtomb: Fix an autoconf test.
index dba00b51ae8bf9db84c9bdd9505410bc917ba6a7..13a7dff58cd2e9ed25249871f841b5d6056a5d6e 100644 (file)
@@ -74,7 +74,7 @@ FUNC (wint_t wc)
     return 0;
 # endif
 
-#elif _GL_LARGE_CHAR32_T                /* Cygwin, mingw, MSVC */
+#elif _GL_SMALL_WCHAR_T                 /* Cygwin, mingw, MSVC */
   /* The wchar_t encoding is UTF-16.
      The char32_t encoding is UCS-4.  */
 
index eb312f49f7a8e00ba328587d11fe9654b3fcc7b1..298c6be235162ec6b6cfad520b484cb72ab47530 100644 (file)
@@ -42,7 +42,7 @@ c32rtomb (char *s, char32_t wc, mbstate_t *ps)
 
   return c32rtomb (s, wc, ps);
 
-#elif _GL_LARGE_CHAR32_T
+#elif _GL_SMALL_WCHAR_T
 
   if (s == NULL)
     return wcrtomb (NULL, 0, ps);
index 7988be4ae45436fe767796d9706531cb65312359..644e171afe1efd3ebd6f210de176c7d4281de0f0 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <wchar.h>
 
-#if (HAVE_WORKING_MBRTOC32 && !defined __GLIBC__) || _GL_LARGE_CHAR32_T
+#if (HAVE_WORKING_MBRTOC32 && !defined __GLIBC__) || _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.  */
 
index 9152e750575f4ef899aff4d6ab61dd7d6175152a..093d151483454609c1a577a11ee6e5186c44f34e 100644 (file)
@@ -23,7 +23,7 @@
 
 #include <wchar.h>
 
-#if (HAVE_WORKING_MBRTOC32 && !defined __GLIBC__) || _GL_LARGE_CHAR32_T
+#if (HAVE_WORKING_MBRTOC32 && !defined __GLIBC__) || _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.  */
 
index 2d7296463db2c2bfda9bcacf4b44b38355edb055..75c46c1dcde5ded05c594279d58319073ce3e969 100644 (file)
@@ -41,7 +41,7 @@ c32tob (wint_t wc)
         return (unsigned char) buf[0];
     }
   return EOF;
-#elif _GL_LARGE_CHAR32_T
+#elif _GL_SMALL_WCHAR_T
   /* In all known encodings, unibyte characters correspond only to
      characters in the BMP.  */
   if (wc != WEOF && (wchar_t) wc == wc)
index 6c711678ce99c759b74fb105863f6068a1aa6fb7..bd901320867afb368f489ea2f6a3260ddf9dda92 100644 (file)
@@ -94,7 +94,7 @@ mbrtoc32 (char32_t *pwc, const char *s, size_t n, mbstate_t *ps)
       n = 1;
     }
 
-# if MBRTOC32_EMPTY_INPUT_BUG || _GL_LARGE_CHAR32_T
+# if MBRTOC32_EMPTY_INPUT_BUG || _GL_SMALL_WCHAR_T
   if (n == 0)
     return (size_t) -2;
 # endif
@@ -126,7 +126,7 @@ mbrtoc32 (char32_t *pwc, const char *s, size_t n, mbstate_t *ps)
 
   return ret;
 
-# elif _GL_LARGE_CHAR32_T
+# elif _GL_SMALL_WCHAR_T
 
   /* Special-case all encodings that may produce wide character values
      > WCHAR_MAX.  */
index f2e2248f666c785b642d3520555aac461ac4c3ab..81125fdc54a59083d3f8dbb85962749ff891d36f 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <wchar.h>
 
-#if (HAVE_WORKING_MBRTOC32 && !defined __GLIBC__) || _GL_LARGE_CHAR32_T
+#if (HAVE_WORKING_MBRTOC32 && !defined __GLIBC__) || _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.  */
 
index a400b5851abf356ec91632407c0b86cd9b1206c6..b5f25239903b6f827616fe8e24a5ec482d6c5e42 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <wchar.h>
 
-#if (HAVE_WORKING_MBRTOC32 && !defined __GLIBC__) || _GL_LARGE_CHAR32_T
+#if (HAVE_WORKING_MBRTOC32 && !defined __GLIBC__) || _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.  */
 
index 4d5f07fcce70d4b345ab50cb98b262d31c63fe6b..adf9c551eb23dc76ab08074896ae07da34733694 100644 (file)
@@ -104,7 +104,7 @@ typedef uint_least32_t gl_char32_t;
 
 /* Define if a 'char32_t' can hold more characters than a 'wchar_t'.  */
 #if @SMALL_WCHAR_T@                    /* 32-bit AIX, Cygwin, native Windows */
-# define _GL_LARGE_CHAR32_T 1
+# define _GL_SMALL_WCHAR_T 1
 #endif
 
 
index 38c5f2538e64a3648cf49d18f6dd2775e136b511..df6a3ea0d06c017d41ee1e694f24085d0ae7d207 100644 (file)
@@ -43,11 +43,11 @@ static_assert ((char16_t)0xFFFF != (char16_t)0x7FFF);
 /* Check that char32_t is at least 31 bits wide.  */
 static_assert ((char32_t)0x7FFFFFFF != (char32_t)0x3FFFFFFF);
 
-/* Check that _GL_LARGE_CHAR32_T is correctly defined.  */
-#if _GL_LARGE_CHAR32_T
-static_assert (sizeof (char32_t) > sizeof (wchar_t));
+/* Check that _GL_SMALL_WCHAR_T is correctly defined.  */
+#if _GL_SMALL_WCHAR_T
+static_assert (sizeof (wchar_t) < sizeof (char32_t));
 #else
-static_assert (sizeof (char32_t) == sizeof (wchar_t));
+static_assert (sizeof (wchar_t) == sizeof (char32_t));
 #endif
 
 int