* 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>
+
+ 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.
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. */
return c32rtomb (s, wc, ps);
-#elif _GL_LARGE_CHAR32_T
+#elif _GL_SMALL_WCHAR_T
if (s == NULL)
return wcrtomb (NULL, 0, ps);
#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. */
#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. */
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)
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
return ret;
-# elif _GL_LARGE_CHAR32_T
+# elif _GL_SMALL_WCHAR_T
/* Special-case all encodings that may produce wide character values
> WCHAR_MAX. */
#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. */
#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. */
/* 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
/* 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