summaryrefslogtreecommitdiffstats
path: root/gl/m4/iswxdigit.m4
diff options
context:
space:
mode:
Diffstat (limited to 'gl/m4/iswxdigit.m4')
-rw-r--r--gl/m4/iswxdigit.m421
1 files changed, 11 insertions, 10 deletions
diff --git a/gl/m4/iswxdigit.m4 b/gl/m4/iswxdigit.m4
index 6085bf6b..95226fc4 100644
--- a/gl/m4/iswxdigit.m4
+++ b/gl/m4/iswxdigit.m4
@@ -1,16 +1,17 @@
1# iswxdigit.m4 1# iswxdigit.m4
2# serial 7 2# serial 9
3dnl Copyright (C) 2020-2024 Free Software Foundation, Inc. 3dnl Copyright (C) 2020-2025 Free Software Foundation, Inc.
4dnl This file is free software; the Free Software Foundation 4dnl This file is free software; the Free Software Foundation
5dnl gives unlimited permission to copy and/or distribute it, 5dnl gives unlimited permission to copy and/or distribute it,
6dnl with or without modifications, as long as this notice is preserved. 6dnl with or without modifications, as long as this notice is preserved.
7dnl This file is offered as-is, without any warranty.
7 8
8AC_DEFUN([gl_FUNC_ISWXDIGIT], 9AC_DEFUN([gl_FUNC_ISWXDIGIT],
9[ 10[
10 AC_REQUIRE([gl_WCTYPE_H_DEFAULTS]) 11 AC_REQUIRE([gl_WCTYPE_H_DEFAULTS])
11 AC_REQUIRE([gl_WCTYPE_H]) 12 AC_REQUIRE([gl_WCTYPE_H])
12 AC_REQUIRE([gt_LOCALE_JA]) 13 AC_REQUIRE([gt_LOCALE_JA])
13 AC_REQUIRE([gt_LOCALE_FR_UTF8]) 14 AC_REQUIRE([gt_LOCALE_EN_UTF8])
14 AC_REQUIRE([gt_LOCALE_ZH_CN]) 15 AC_REQUIRE([gt_LOCALE_ZH_CN])
15 AC_REQUIRE([AC_CANONICAL_HOST]) 16 AC_REQUIRE([AC_CANONICAL_HOST])
16 17
@@ -25,14 +26,14 @@ AC_DEFUN([gl_FUNC_ISWXDIGIT],
25 dnl is present. 26 dnl is present.
26changequote(,)dnl 27changequote(,)dnl
27 case "$host_os" in 28 case "$host_os" in
28 # Guess no on FreeBSD, NetBSD, Solaris, native Windows. 29 # Guess no on FreeBSD, NetBSD, OpenBSD, Solaris, native Windows, Haiku, Android.
29 freebsd* | dragonfly* | netbsd* | solaris* | mingw* | windows*) 30 freebsd* | dragonfly* | netbsd* | openbsd* | solaris* | mingw* | windows* | haiku* | *-android*)
30 gl_cv_func_iswxdigit_works="guessing no" ;; 31 gl_cv_func_iswxdigit_works="guessing no" ;;
31 # Guess yes otherwise. 32 # Guess yes otherwise.
32 *) gl_cv_func_iswxdigit_works="guessing yes" ;; 33 *) gl_cv_func_iswxdigit_works="guessing yes" ;;
33 esac 34 esac
34changequote([,])dnl 35changequote([,])dnl
35 if test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then 36 if test $LOCALE_JA != none || test "$LOCALE_EN_UTF8" != none || test $LOCALE_ZH_CN != none; then
36 AC_RUN_IFELSE( 37 AC_RUN_IFELSE(
37 [AC_LANG_SOURCE([[ 38 [AC_LANG_SOURCE([[
38#include <locale.h> 39#include <locale.h>
@@ -73,15 +74,15 @@ main (int argc, char *argv[])
73 if (!(is == 0)) 74 if (!(is == 0))
74 result |= 1; 75 result |= 1;
75 } 76 }
76 if (strcmp ("$LOCALE_FR_UTF8", "none") != 0 77 if (strcmp ("$LOCALE_EN_UTF8", "none") != 0
77 && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 78 && setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL)
78 { 79 {
79 /* This fails on FreeBSD 13.0. */ 80 /* This fails on FreeBSD 13.0, Haiku, Android. */
80 /* U+0663 ARABIC-INDIC DIGIT THREE */ 81 /* U+0663 ARABIC-INDIC DIGIT THREE */
81 is = for_character ("\331\243", 2); 82 is = for_character ("\331\243", 2);
82 if (!(is == 0)) 83 if (!(is == 0))
83 result |= 2; 84 result |= 2;
84 /* This fails on NetBSD 10.0, MSVC 14. */ 85 /* This fails on NetBSD 10.0, OpenBSD 7.5, MSVC 14, Haiku, Android. */
85 /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */ 86 /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
86 is = for_character ("\357\274\241", 3); 87 is = for_character ("\357\274\241", 3);
87 if (!(is == 0)) 88 if (!(is == 0))