From: Paul Eggert Date: Fri, 5 Sep 2025 15:28:56 +0000 (-0700) Subject: propername-lite: simplify USE_MBRTOC32 away X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f92122f98a81ad4b47055d6acf7db33dc44b5e25;p=thirdparty%2Fgnulib.git propername-lite: simplify USE_MBRTOC32 away * lib/propername-lite.c (USE_MBRTOC32): Remove. Replace its use with HAVE_UCHAR_H. --- diff --git a/ChangeLog b/ChangeLog index ad35468023..0837b6c821 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2025-09-05 Paul Eggert + + 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 propername-lite: Fix compilation error on Haiku r1/beta4 (regr. today). diff --git a/lib/propername-lite.c b/lib/propername-lite.c index 4bcb860303..d465548238 100644 --- a/lib/propername-lite.c +++ b/lib/propername-lite.c @@ -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)