]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
propername-lite: simplify USE_MBRTOC32 away
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 5 Sep 2025 15:28:56 +0000 (08:28 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 5 Sep 2025 15:29:15 +0000 (08:29 -0700)
* lib/propername-lite.c (USE_MBRTOC32): Remove.
Replace its use with HAVE_UCHAR_H.

ChangeLog
lib/propername-lite.c

index ad354680233f2a9f9277b5cdafd18487a651a363..0837b6c8214d080312404d106635169240f5d317 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2025-09-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       propername-lite: simplify USE_MBRTOC32 away
+       * lib/propername-lite.c (USE_MBRTOC32): Remove.
+       Replace its use with HAVE_UCHAR_H.
+
 2025-09-05  Bruno Haible  <bruno@clisp.org>
 
        propername-lite: Fix compilation error on Haiku r1/beta4 (regr. today).
index 4bcb860303d709e4227522df26fa4a2918c6ce60..d465548238232570d3239247e0a808e9ff51c90d 100644 (file)
@@ -29,7 +29,6 @@
 # ifdef __GLIBC__
 #  undef mbrtoc32
 # endif
-# define USE_MBRTOC32
 #endif
 
 /* Return the localization of the name spelled NAME_ASCII in ASCII,
@@ -42,9 +41,9 @@ proper_name_lite (char const *name_ascii, _GL_UNUSED char const *name_utf8)
   if (translation != name_ascii)
     return translation;
 
-#ifdef USE_MBRTOC32
+#if HAVE_UCHAR_H
   /* If DF BF decodes to 07FF, assume it is UTF-8.  */
-  static char const utf07FF[2] = { 0xDF, 0xBF };
+  static char const utf07FF[] = { 0xDF, 0xBF };
   char32_t w;
   mbstate_t mbstate = {0,};
   if (mbrtoc32 (&w, utf07FF, 2, &mbstate) == 2 && w == 0x07FF)