diff options
Diffstat (limited to 'gl/m4/iswdigit.m4')
| -rw-r--r-- | gl/m4/iswdigit.m4 | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/gl/m4/iswdigit.m4 b/gl/m4/iswdigit.m4 index 999acd28..4582f598 100644 --- a/gl/m4/iswdigit.m4 +++ b/gl/m4/iswdigit.m4 | |||
| @@ -1,9 +1,10 @@ | |||
| 1 | # iswdigit.m4 | 1 | # iswdigit.m4 |
| 2 | # serial 7 | 2 | # serial 9 |
| 3 | dnl Copyright (C) 2020-2024 Free Software Foundation, Inc. | 3 | dnl Copyright (C) 2020-2025 Free Software Foundation, Inc. |
| 4 | dnl This file is free software; the Free Software Foundation | 4 | dnl This file is free software; the Free Software Foundation |
| 5 | dnl gives unlimited permission to copy and/or distribute it, | 5 | dnl gives unlimited permission to copy and/or distribute it, |
| 6 | dnl with or without modifications, as long as this notice is preserved. | 6 | dnl with or without modifications, as long as this notice is preserved. |
| 7 | dnl This file is offered as-is, without any warranty. | ||
| 7 | 8 | ||
| 8 | AC_DEFUN([gl_FUNC_ISWDIGIT], | 9 | AC_DEFUN([gl_FUNC_ISWDIGIT], |
| 9 | [ | 10 | [ |
| @@ -11,7 +12,7 @@ AC_DEFUN([gl_FUNC_ISWDIGIT], | |||
| 11 | AC_REQUIRE([gl_WCTYPE_H]) | 12 | AC_REQUIRE([gl_WCTYPE_H]) |
| 12 | AC_REQUIRE([gt_LOCALE_FR]) | 13 | AC_REQUIRE([gt_LOCALE_FR]) |
| 13 | AC_REQUIRE([gt_LOCALE_JA]) | 14 | AC_REQUIRE([gt_LOCALE_JA]) |
| 14 | AC_REQUIRE([gt_LOCALE_FR_UTF8]) | 15 | AC_REQUIRE([gt_LOCALE_EN_UTF8]) |
| 15 | AC_REQUIRE([gt_LOCALE_ZH_CN]) | 16 | AC_REQUIRE([gt_LOCALE_ZH_CN]) |
| 16 | AC_REQUIRE([AC_CANONICAL_HOST]) | 17 | AC_REQUIRE([AC_CANONICAL_HOST]) |
| 17 | 18 | ||
| @@ -26,14 +27,14 @@ AC_DEFUN([gl_FUNC_ISWDIGIT], | |||
| 26 | dnl is present. | 27 | dnl is present. |
| 27 | changequote(,)dnl | 28 | changequote(,)dnl |
| 28 | case "$host_os" in | 29 | case "$host_os" in |
| 29 | # Guess no on FreeBSD, NetBSD, Solaris, native Windows. | 30 | # Guess no on FreeBSD, NetBSD, OpenBSD, Solaris, native Windows, Haiku, Android. |
| 30 | freebsd* | dragonfly* | netbsd* | solaris* | mingw* | windows*) | 31 | freebsd* | dragonfly* | netbsd* | openbsd* | solaris* | mingw* | windows* | haiku* | *-android*) |
| 31 | gl_cv_func_iswdigit_works="guessing no" ;; | 32 | gl_cv_func_iswdigit_works="guessing no" ;; |
| 32 | # Guess yes otherwise. | 33 | # Guess yes otherwise. |
| 33 | *) gl_cv_func_iswdigit_works="guessing yes" ;; | 34 | *) gl_cv_func_iswdigit_works="guessing yes" ;; |
| 34 | esac | 35 | esac |
| 35 | changequote([,])dnl | 36 | changequote([,])dnl |
| 36 | if test $LOCALE_FR != none || test $LOCALE_JA != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_ZH_CN != none; then | 37 | if test $LOCALE_FR != none || test $LOCALE_JA != none || test "$LOCALE_EN_UTF8" != none || test $LOCALE_ZH_CN != none; then |
| 37 | AC_RUN_IFELSE( | 38 | AC_RUN_IFELSE( |
| 38 | [AC_LANG_SOURCE([[ | 39 | [AC_LANG_SOURCE([[ |
| 39 | #include <locale.h> | 40 | #include <locale.h> |
| @@ -83,15 +84,15 @@ main (int argc, char *argv[]) | |||
| 83 | if (!(is == 0)) | 84 | if (!(is == 0)) |
| 84 | result |= 2; | 85 | result |= 2; |
| 85 | } | 86 | } |
| 86 | if (strcmp ("$LOCALE_FR_UTF8", "none") != 0 | 87 | if (strcmp ("$LOCALE_EN_UTF8", "none") != 0 |
| 87 | && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) | 88 | && setlocale (LC_ALL, "$LOCALE_EN_UTF8") != NULL) |
| 88 | { | 89 | { |
| 89 | /* This fails on FreeBSD 13.0, NetBSD 10.0, MSVC 14. */ | 90 | /* This fails on FreeBSD 13.0, NetBSD 10.0, OpenBSD 7.5, MSVC 14, Haiku, Android. */ |
| 90 | /* U+0663 ARABIC-INDIC DIGIT THREE */ | 91 | /* U+0663 ARABIC-INDIC DIGIT THREE */ |
| 91 | is = for_character ("\331\243", 2); | 92 | is = for_character ("\331\243", 2); |
| 92 | if (!(is == 0)) | 93 | if (!(is == 0)) |
| 93 | result |= 4; | 94 | result |= 4; |
| 94 | /* This fails on FreeBSD 13.0, NetBSD 10.0, MSVC 14. */ | 95 | /* This fails on FreeBSD 13.0, NetBSD 10.0, OpenBSD 7.5, MSVC 14, Haiku, Android. */ |
| 95 | /* U+FF11 FULLWIDTH DIGIT ONE */ | 96 | /* U+FF11 FULLWIDTH DIGIT ONE */ |
| 96 | is = for_character ("\357\274\221", 3); | 97 | is = for_character ("\357\274\221", 3); |
| 97 | if (!(is == 0)) | 98 | if (!(is == 0)) |
