]> Savannah Git Hosting - gnulib.git/commitdiff
iswxdigit: Work around OpenBSD, Android, Haiku bug.
authorBruno Haible <bruno@clisp.org>
Sat, 31 Aug 2024 22:12:54 +0000 (00:12 +0200)
committerBruno Haible <bruno@clisp.org>
Sat, 31 Aug 2024 22:27:58 +0000 (00:27 +0200)
* m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Require gt_LOCALE_EN_UTF8 instead
of gt_LOCALE_FR_UTF8. Use LOCALE_EN_UTF8 instead of LOCALE_FR_UTF8.
Update cross-compilation guess.
* modules/iswxdigit (Files): Add m4/locale-en.m4. Remove m4/locale-fr.m4.
* doc/posix-functions/iswxdigit.texi: Update list of platforms.

ChangeLog
doc/posix-functions/iswxdigit.texi
m4/iswxdigit.m4
modules/iswxdigit

index b3922f22624401a2beaef11ff1a999bbbdc3ebbf..f510a7f72eb3551520d090b42fa07806b4adc226 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-08-31  Bruno Haible  <bruno@clisp.org>
+
+       iswxdigit: Work around OpenBSD, Android, Haiku bug.
+       * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Require gt_LOCALE_EN_UTF8 instead
+       of gt_LOCALE_FR_UTF8. Use LOCALE_EN_UTF8 instead of LOCALE_FR_UTF8.
+       Update cross-compilation guess.
+       * modules/iswxdigit (Files): Add m4/locale-en.m4. Remove m4/locale-fr.m4.
+       * doc/posix-functions/iswxdigit.texi: Update list of platforms.
+
 2024-08-31  Bruno Haible  <bruno@clisp.org>
 
        iswdigit: Work around OpenBSD, Android, Haiku bug.
index 145d76ad9c67e951b19361cef94a72bc90d87c6f..6c4e388a0c5b0013a64ec1e20b12950077e422db 100644 (file)
@@ -17,7 +17,7 @@ on some platforms:
 macOS 10.8.
 @item
 This function is not ISO C 99 compliant on some platforms:
-FreeBSD 14.0, NetBSD 10.0, Solaris 11.4, MSVC 14.
+FreeBSD 14.0, NetBSD 10.0, OpenBSD 7.5, Solaris 11.4, MSVC 14, Haiku, Android.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 6085bf6b019b0655e8750b593fefbcb3b41c2b3f..b5ca40e058d167bceaf302d40dc335f695bf882f 100644 (file)
@@ -1,5 +1,5 @@
 # iswxdigit.m4
-# serial 7
+# serial 8
 dnl Copyright (C) 2020-2024 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -10,7 +10,7 @@ AC_DEFUN([gl_FUNC_ISWXDIGIT],
   AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
   AC_REQUIRE([gl_WCTYPE_H])
   AC_REQUIRE([gt_LOCALE_JA])
-  AC_REQUIRE([gt_LOCALE_FR_UTF8])
+  AC_REQUIRE([gt_LOCALE_EN_UTF8])
   AC_REQUIRE([gt_LOCALE_ZH_CN])
   AC_REQUIRE([AC_CANONICAL_HOST])
 
@@ -25,14 +25,14 @@ AC_DEFUN([gl_FUNC_ISWXDIGIT],
        dnl is present.
 changequote(,)dnl
        case "$host_os" in
-         # Guess no on FreeBSD, NetBSD, Solaris, native Windows.
-         freebsd* | dragonfly* | netbsd* | solaris* | mingw* | windows*)
+         # Guess no on FreeBSD, NetBSD, OpenBSD, Solaris, native Windows, Haiku, Android.
+         freebsd* | dragonfly* | netbsd* | openbsd* | solaris* | mingw* | windows* | haiku* | *-android*)
            gl_cv_func_iswxdigit_works="guessing no" ;;
          # Guess yes otherwise.
          *) gl_cv_func_iswxdigit_works="guessing yes" ;;
        esac
 changequote([,])dnl
-       if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then
+       if test $LOCALE_JA != none || test $LOCALE_EN_UTF8 != none || test $LOCALE_ZH_CN != none; then
          AC_RUN_IFELSE(
            [AC_LANG_SOURCE([[
 #include <locale.h>
@@ -73,15 +73,15 @@ main (int argc, char *argv[])
       if (!(is == 0))
         result |= 1;
     }
-  if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
-      && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+  if (strcmp ("$LOCALE_EN_UTF8", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
     {
-      /* This fails on FreeBSD 13.0.  */
+      /* This fails on FreeBSD 13.0, Haiku, Android.  */
       /* U+0663 ARABIC-INDIC DIGIT THREE */
       is = for_character ("\331\243", 2);
       if (!(is == 0))
         result |= 2;
-      /* This fails on NetBSD 10.0, MSVC 14.  */
+      /* This fails on NetBSD 10.0, OpenBSD 7.5, MSVC 14, Haiku, Android.  */
       /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
       is = for_character ("\357\274\241", 3);
       if (!(is == 0))
index 9261524c6ee26fdcc2eadd107c4c7b9422e88e9a..a0cb6c5945aa9d3eea4be52e4a8293771a41ee9b 100644 (file)
@@ -4,7 +4,7 @@ iswxdigit() function: test wide character for being a hexadecimal digit.
 Files:
 lib/iswxdigit.c
 m4/iswxdigit.m4
-m4/locale-fr.m4
+m4/locale-en.m4
 m4/locale-ja.m4
 m4/locale-zh.m4
 m4/codeset.m4