]> Savannah Git Hosting - gnulib.git/commitdiff
Make internationalization tests stricter on musl systems.
authorBruno Haible <bruno@clisp.org>
Tue, 13 Jun 2023 23:30:47 +0000 (01:30 +0200)
committerBruno Haible <bruno@clisp.org>
Tue, 13 Jun 2023 23:30:47 +0000 (01:30 +0200)
* m4/locale-fr.m4 (gt_LOCALE_FR): On musl systems, set LOCALE_FR_UTF8 to
"fr_FR.UTF-8" instead of "none". Set and substitute
LC_COLLATE_IMPLEMENTED, LC_NUMERIC_IMPLEMENTED, LC_TIME_IMPLEMENTED,
LC_MONETARY_IMPLEMENTED.
* m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Skip testing a certain locale if
that locale is "none".
* m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
* m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Likewise.
* m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Likewise.
* m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
* m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
* m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
--
* tests/test-c32isalpha.c (main): On musl libc, disable tests that fail.
* tests/test-c32iscntrl.c (main): Likewise.
* tests/test-c32isgraph.c (main): Likewise.
* tests/test-c32islower.c (main): Likewise.
* tests/test-c32isprint.c (main): Likewise.
* tests/test-c32toupper.c (main): Likewise.
* tests/test-nl_langinfo1.c (main): Likewise.
* tests/test-nl_langinfo2.c (main): Likewise.
* modules/c32isalpha-tests (Files): Add musl.m4.
(configure.ac): Invoke gl_MUSL_LIBC.
* modules/c32iscntrl-tests (Files): Add musl.m4.
(configure.ac): Invoke gl_MUSL_LIBC.
* modules/c32isgraph-tests (Files): Add musl.m4.
(configure.ac): Invoke gl_MUSL_LIBC.
* modules/c32islower-tests (Files): Add musl.m4.
(configure.ac): Invoke gl_MUSL_LIBC.
* modules/c32isprint-tests (Files): Add musl.m4.
(configure.ac): Invoke gl_MUSL_LIBC.
* modules/c32toupper-tests (Files): Add musl.m4.
(configure.ac): Invoke gl_MUSL_LIBC.
* modules/nl_langinfo-tests (Files): Add musl.m4.
(configure.ac): Invoke gl_MUSL_LIBC.
--
* tests/test-strtod1.sh: Skip the test if LC_NUMERIC_IMPLEMENTED is
false.
* tests/test-strtold1.sh: Likewise.
* tests/test-vasnprintf-posix2.sh: Likewise.
* tests/test-vasnwprintf-posix2.sh: Likewise.
* modules/strtod-tests (Makefile.am): Set LC_NUMERIC_IMPLEMENTED in the
tests environment.
* modules/strtold-tests (Makefile.am): Likewise.
* modules/vasnprintf-posix-tests (Makefile.am): Likewise.
* modules/vasnwprintf-posix-tests (Makefile.am): Likewise.

32 files changed:
ChangeLog
m4/iswdigit.m4
m4/iswxdigit.m4
m4/locale-fr.m4
m4/mbrlen.m4
m4/mbrtoc32.m4
m4/mbrtowc.m4
m4/mbsrtowcs.m4
m4/wcrtomb.m4
modules/c32isalpha-tests
modules/c32iscntrl-tests
modules/c32isgraph-tests
modules/c32islower-tests
modules/c32isprint-tests
modules/c32toupper-tests
modules/nl_langinfo-tests
modules/strtod-tests
modules/strtold-tests
modules/vasnprintf-posix-tests
modules/vasnwprintf-posix-tests
tests/test-c32isalpha.c
tests/test-c32iscntrl.c
tests/test-c32isgraph.c
tests/test-c32islower.c
tests/test-c32isprint.c
tests/test-c32toupper.c
tests/test-nl_langinfo1.c
tests/test-nl_langinfo2.c
tests/test-strtod1.sh
tests/test-strtold1.sh
tests/test-vasnprintf-posix2.sh
tests/test-vasnwprintf-posix2.sh

index e2eb7e6faa8d36fa9889b30ec2145f04e6a3635c..e514787f89925cc96a3d4331b7d467a355c8d2ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,54 @@
+2023-06-13  Bruno Haible  <bruno@clisp.org>
+
+       Make internationalization tests stricter on musl systems.
+       --
+       * m4/locale-fr.m4 (gt_LOCALE_FR): On musl systems, set LOCALE_FR_UTF8 to
+       "fr_FR.UTF-8" instead of "none". Set and substitute
+       LC_COLLATE_IMPLEMENTED, LC_NUMERIC_IMPLEMENTED, LC_TIME_IMPLEMENTED,
+       LC_MONETARY_IMPLEMENTED.
+       * m4/iswdigit.m4 (gl_FUNC_ISWDIGIT): Skip testing a certain locale if
+       that locale is "none".
+       * m4/iswxdigit.m4 (gl_FUNC_ISWXDIGIT): Likewise.
+       * m4/mbrlen.m4 (gl_MBRLEN_RETVAL): Likewise.
+       * m4/mbrtowc.m4 (gl_MBRTOWC_RETVAL): Likewise.
+       * m4/mbrtoc32.m4 (gl_MBRTOC32_SANITYCHECK): Likewise.
+       * m4/mbsrtowcs.m4 (gl_MBSRTOWCS_WORKS): Likewise.
+       * m4/wcrtomb.m4 (gl_FUNC_WCRTOMB): Likewise.
+       --
+       * tests/test-c32isalpha.c (main): On musl libc, disable tests that fail.
+       * tests/test-c32iscntrl.c (main): Likewise.
+       * tests/test-c32isgraph.c (main): Likewise.
+       * tests/test-c32islower.c (main): Likewise.
+       * tests/test-c32isprint.c (main): Likewise.
+       * tests/test-c32toupper.c (main): Likewise.
+       * tests/test-nl_langinfo1.c (main): Likewise.
+       * tests/test-nl_langinfo2.c (main): Likewise.
+       * modules/c32isalpha-tests (Files): Add musl.m4.
+       (configure.ac): Invoke gl_MUSL_LIBC.
+       * modules/c32iscntrl-tests (Files): Add musl.m4.
+       (configure.ac): Invoke gl_MUSL_LIBC.
+       * modules/c32isgraph-tests (Files): Add musl.m4.
+       (configure.ac): Invoke gl_MUSL_LIBC.
+       * modules/c32islower-tests (Files): Add musl.m4.
+       (configure.ac): Invoke gl_MUSL_LIBC.
+       * modules/c32isprint-tests (Files): Add musl.m4.
+       (configure.ac): Invoke gl_MUSL_LIBC.
+       * modules/c32toupper-tests (Files): Add musl.m4.
+       (configure.ac): Invoke gl_MUSL_LIBC.
+       * modules/nl_langinfo-tests (Files): Add musl.m4.
+       (configure.ac): Invoke gl_MUSL_LIBC.
+       --
+       * tests/test-strtod1.sh: Skip the test if LC_NUMERIC_IMPLEMENTED is
+       false.
+       * tests/test-strtold1.sh: Likewise.
+       * tests/test-vasnprintf-posix2.sh: Likewise.
+       * tests/test-vasnwprintf-posix2.sh: Likewise.
+       * modules/strtod-tests (Makefile.am): Set LC_NUMERIC_IMPLEMENTED in the
+       tests environment.
+       * modules/strtold-tests (Makefile.am): Likewise.
+       * modules/vasnprintf-posix-tests (Makefile.am): Likewise.
+       * modules/vasnwprintf-posix-tests (Makefile.am): Likewise.
+
 2023-06-12  Bruno Haible  <bruno@clisp.org>
 
        vasnwprintf-posix: Work around another musl libc bug.
index 0df7b303fc40483c550e8f0f04c9978664be91fb..54a2943ead4fd11af2e8e7a15d61e6bd1de24fe2 100644 (file)
@@ -1,4 +1,4 @@
-# iswdigit.m4 serial 3
+# iswdigit.m4 serial 4
 dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -63,7 +63,8 @@ main (int argc, char *argv[])
   int is;
   int result = 0;
 
-  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+  if (strcmp ("$LOCALE_FR", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
     {
       /* This fails on mingw, MSVC 14.  */
       /* U+00B2 SUPERSCRIPT TWO */
@@ -71,7 +72,8 @@ main (int argc, char *argv[])
       if (!(is == 0))
         result |= 1;
     }
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+  if (strcmp ("$LOCALE_JA", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
     {
       /* This fails on NetBSD 8.0.  */
       /* U+FF11 FULLWIDTH DIGIT ONE */
@@ -79,7 +81,8 @@ main (int argc, char *argv[])
       if (!(is == 0))
         result |= 2;
     }
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+  if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
     {
       /* This fails on FreeBSD 13.0, NetBSD 8.0, MSVC 14.  */
       /* U+0663 ARABIC-INDIC DIGIT THREE */
@@ -92,7 +95,8 @@ main (int argc, char *argv[])
       if (!(is == 0))
         result |= 8;
     }
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+  if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
     {
       /* This fails on NetBSD 8.0, Solaris 10, Solaris 11.4.  */
       /* U+FF11 FULLWIDTH DIGIT ONE */
index 3f952f0b0d4884d1f7d1d08f7c75acf0588b6d8e..a16b10aed3df0e805838a0a054282ce07beb8962 100644 (file)
@@ -1,4 +1,4 @@
-# iswxdigit.m4 serial 3
+# iswxdigit.m4 serial 4
 dnl Copyright (C) 2020-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -62,7 +62,8 @@ main (int argc, char *argv[])
   int is;
   int result = 0;
 
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+  if (strcmp ("$LOCALE_JA", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
     {
       /* This fails on NetBSD 8.0.  */
       /* U+FF21 FULLWIDTH LATIN CAPITAL LETTER A */
@@ -70,7 +71,8 @@ main (int argc, char *argv[])
       if (!(is == 0))
         result |= 1;
     }
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+  if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
     {
       /* This fails on FreeBSD 13.0.  */
       /* U+0663 ARABIC-INDIC DIGIT THREE */
@@ -83,7 +85,8 @@ main (int argc, char *argv[])
       if (!(is == 0))
         result |= 4;
     }
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+  if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
     {
       /* This fails on Solaris 10, Solaris 11.4.  */
       /* U+FF11 FULLWIDTH DIGIT ONE */
index 5e13f3945d288209683a56939f77152a54437b8f..107ab931e8306d7421cd676a20810004fce66603 100644 (file)
@@ -139,9 +139,19 @@ int main () {
 dnl Determine the name of a french locale with UTF-8 encoding.
 AC_DEFUN_ONCE([gt_LOCALE_FR_UTF8],
 [
+  AC_REQUIRE([AC_CANONICAL_HOST])
   AC_REQUIRE([AM_LANGINFO_CODESET])
   AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
-    AC_LANG_CONFTEST([AC_LANG_SOURCE([[
+    case "$host_os" in
+      *-musl* | midipix*)
+        dnl On musl libc, all kinds of ll_CC.UTF-8 locales exist, even without
+        dnl any locale file on disk. But they are effectively equivalent to the
+        dnl C.UTF-8 locale, except for locale categories (such as LC_MESSSAGES)
+        dnl for which localizations (.mo files) have been installed.
+        gt_cv_locale_fr_utf8=fr_FR.UTF-8
+        ;;
+      *)
+        AC_LANG_CONFTEST([AC_LANG_SOURCE([[
 #include <locale.h>
 #include <time.h>
 #if HAVE_LANGINFO_CODESET
@@ -203,51 +213,76 @@ int main () {
 #endif
   return 0;
 }
-      ]])])
-    if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
-      case "$host_os" in
-        # Handle native Windows specially, because there setlocale() interprets
-        # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
-        # "fr" or "fra" as "French" or "French_France.1252",
-        # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
-        # "ja" as "Japanese" or "Japanese_Japan.932",
-        # and similar.
-        mingw*)
-          # Test for the hypothetical native Windows locale name.
-          if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=French_France.65001
-          else
-            # None found.
-            gt_cv_locale_fr_utf8=none
-          fi
-          ;;
-        *)
-          # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
-          # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
-          # configure script would override the LC_ALL setting. Likewise for
-          # LC_CTYPE, which is also set at the beginning of the configure script.
-          # Test for the usual locale name.
-          if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-            gt_cv_locale_fr_utf8=fr_FR
-          else
-            # Test for the locale name with explicit encoding suffix.
-            if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-              gt_cv_locale_fr_utf8=fr_FR.UTF-8
-            else
-              # Test for the Solaris 7 locale name.
-              if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
-                gt_cv_locale_fr_utf8=fr.UTF-8
+          ]])])
+        if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+          case "$host_os" in
+            # Handle native Windows specially, because there setlocale() interprets
+            # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
+            # "fr" or "fra" as "French" or "French_France.1252",
+            # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
+            # "ja" as "Japanese" or "Japanese_Japan.932",
+            # and similar.
+            mingw*)
+              # Test for the hypothetical native Windows locale name.
+              if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=French_France.65001
               else
                 # None found.
                 gt_cv_locale_fr_utf8=none
               fi
-            fi
-          fi
-          ;;
-      esac
-    fi
-    rm -fr conftest*
+              ;;
+            *)
+              # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+              # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
+              # configure script would override the LC_ALL setting. Likewise for
+              # LC_CTYPE, which is also set at the beginning of the configure script.
+              # Test for the usual locale name.
+              if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                gt_cv_locale_fr_utf8=fr_FR
+              else
+                # Test for the locale name with explicit encoding suffix.
+                if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                  gt_cv_locale_fr_utf8=fr_FR.UTF-8
+                else
+                  # Test for the Solaris 7 locale name.
+                  if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+                    gt_cv_locale_fr_utf8=fr.UTF-8
+                  else
+                    # None found.
+                    gt_cv_locale_fr_utf8=none
+                  fi
+                fi
+              fi
+              ;;
+          esac
+        fi
+        rm -fr conftest*
+        ;;
+    esac
   ])
   LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
   AC_SUBST([LOCALE_FR_UTF8])
+
+  dnl Users of $LOCALE_FR_UTF8 need to know which of the locale categories they
+  dnl can rely on.
+  case "$host_os" in
+    *-musl* | midipix*)
+      dnl On musl libc, locale categories other than LC_CTYPE and LC_MESSAGES
+      dnl are effectively unimplemented.
+      LC_COLLATE_IMPLEMENTED=false
+      LC_NUMERIC_IMPLEMENTED=false
+      LC_TIME_IMPLEMENTED=false
+      LC_MONETARY_IMPLEMENTED=false
+      ;;
+    *)
+      LC_COLLATE_IMPLEMENTED=true
+      LC_NUMERIC_IMPLEMENTED=true
+      LC_TIME_IMPLEMENTED=true
+      LC_MONETARY_IMPLEMENTED=true
+      ;;
+  esac
+  AC_SUBST([LC_COLLATE_IMPLEMENTED])
+  AC_SUBST([LC_NUMERIC_IMPLEMENTED])
+  AC_SUBST([LC_TIME_IMPLEMENTED])
+  AC_SUBST([LC_MONETARY_IMPLEMENTED])
 ])
index c3f0494493fb3c0126ee069b18021b9056955e39..2ea1513ba30712d9ddf94bd9face1ec03b28810f 100644 (file)
@@ -1,4 +1,4 @@
-# mbrlen.m4 serial 11  -*- coding: utf-8 -*-
+# mbrlen.m4 serial 12  -*- coding: utf-8 -*-
 dnl Copyright (C) 2008, 2010-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -116,7 +116,8 @@ int main ()
 {
   int result = 0;
   /* This fails on Solaris.  */
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+  if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
     {
       char input[] = "B\303\274\303\237er"; /* "Büßer" */
       mbstate_t state;
@@ -130,7 +131,8 @@ int main ()
         }
     }
   /* This fails on HP-UX 11.11.  */
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+  if (strcmp ("$LOCALE_JA", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
     {
       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
       mbstate_t state;
index b53636236ccf54055e25f09051a0d54149d2c2ee..52dd913f8a518aa524ba76d3453ca1ea99ec1ac6 100644 (file)
@@ -1,4 +1,4 @@
-# mbrtoc32.m4 serial 14
+# mbrtoc32.m4 serial 15
 dnl Copyright (C) 2014-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -212,7 +212,8 @@ int main ()
   /* This fails on native Windows:
      mbrtoc32 returns (size_t)-1.
      mbrtowc returns 1 (correct).  */
-  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+  if (strcmp ("$LOCALE_FR", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
     {
       mbstate_t state;
       wchar_t wc = (wchar_t) 0xBADFACE;
@@ -228,7 +229,8 @@ int main ()
   /* This fails on FreeBSD 13.0 and Solaris 11.4:
      mbrtoc32 returns (size_t)-2 or (size_t)-1.
      mbrtowc returns 4 (correct).  */
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+  if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
     {
       mbstate_t state;
       wchar_t wc = (wchar_t) 0xBADFACE;
index 893faff637885918309422d50f9f60507b40561a..6173ded2ff1518c2c0c59243985c3f31f2eafb5b 100644 (file)
@@ -1,4 +1,4 @@
-# mbrtowc.m4 serial 40  -*- coding: utf-8 -*-
+# mbrtowc.m4 serial 41  -*- coding: utf-8 -*-
 dnl Copyright (C) 2001-2002, 2004-2005, 2008-2023 Free Software Foundation,
 dnl Inc.
 dnl This file is free software; the Free Software Foundation
@@ -429,7 +429,8 @@ int main ()
   int result = 0;
   int found_some_locale = 0;
   /* This fails on Solaris.  */
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+  if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
     {
       char input[] = "B\303\274\303\237er"; /* "Büßer" */
       mbstate_t state;
@@ -445,7 +446,8 @@ int main ()
       found_some_locale = 1;
     }
   /* This fails on HP-UX 11.11.  */
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+  if (strcmp ("$LOCALE_JA", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
     {
       char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
       mbstate_t state;
index 4f2e88c5a0b898576db241862658642fa84849d8..720f727f95ed4471f3b0d7611e5370235d949e8f 100644 (file)
@@ -1,4 +1,4 @@
-# mbsrtowcs.m4 serial 15
+# mbsrtowcs.m4 serial 16
 dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -78,7 +78,8 @@ int main ()
   int result = 0;
   /* Test whether the function supports a NULL destination argument.
      This fails on native Windows.  */
-  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+  if (strcmp ("$LOCALE_FR", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
     {
       const char input[] = "\337er";
       const char *src = input;
@@ -91,7 +92,8 @@ int main ()
     }
   /* Test whether the function works when started with a conversion state
      in non-initial state.  This fails on HP-UX 11.11 and Solaris 10.  */
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+  if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
     {
       const char input[] = "B\303\274\303\237er";
       mbstate_t state;
@@ -105,7 +107,8 @@ int main ()
               result |= 2;
           }
     }
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+  if (strcmp ("$LOCALE_JA", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
     {
       const char input[] = "<\306\374\313\334\270\354>";
       mbstate_t state;
@@ -119,7 +122,8 @@ int main ()
               result |= 4;
           }
     }
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+  if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
     {
       const char input[] = "B\250\271\201\060\211\070er";
       mbstate_t state;
index d51b36e17ecc8ab1fbba776b64ff39fd778b5c7a..fa503b533543ae2fa78b7f9a38ad1a4a8710030c 100644 (file)
@@ -1,4 +1,4 @@
-# wcrtomb.m4 serial 17
+# wcrtomb.m4 serial 18
 dnl Copyright (C) 2008-2023 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -97,12 +97,14 @@ changequote([,])dnl
 int main ()
 {
   int result = 0;
-  if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+  if (strcmp ("$LOCALE_FR", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_FR") != NULL)
     {
       if (wcrtomb (NULL, 0, NULL) != 1)
         result |= 1;
     }
-  if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+  if (strcmp ("$LOCALE_FR_UTF8", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
     {
       if (wcrtomb (NULL, 0, NULL) != 1)
         result |= 2;
@@ -113,12 +115,14 @@ int main ()
             result |= 2;
       }
     }
-  if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+  if (strcmp ("$LOCALE_JA", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_JA") != NULL)
     {
       if (wcrtomb (NULL, 0, NULL) != 1)
         result |= 4;
     }
-  if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+  if (strcmp ("$LOCALE_ZH_CN", "none") != 0
+      && setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
     {
       if (wcrtomb (NULL, 0, NULL) != 1)
         result |= 8;
index f62f78c28829741d400a35e34ab48bb60176b660..2748fee325a1e41d22562e5474216bab8763029c 100644 (file)
@@ -7,6 +7,7 @@ m4/locale-fr.m4
 m4/locale-ja.m4
 m4/locale-zh.m4
 m4/codeset.m4
+m4/musl.m4
 
 Depends-on:
 mbrtoc32
@@ -17,6 +18,7 @@ gt_LOCALE_FR
 gt_LOCALE_FR_UTF8
 gt_LOCALE_JA
 gt_LOCALE_ZH_CN
+gl_MUSL_LIBC
 
 Makefile.am:
 TESTS += test-c32isalpha.sh
index 097de3cf4781ccf35c863a39616b214b00bed4d7..98a0cb8452c972d12f8abec1e979426fde9ef19f 100644 (file)
@@ -7,6 +7,7 @@ m4/locale-fr.m4
 m4/locale-ja.m4
 m4/locale-zh.m4
 m4/codeset.m4
+m4/musl.m4
 
 Depends-on:
 mbrtoc32
@@ -17,6 +18,7 @@ gt_LOCALE_FR
 gt_LOCALE_FR_UTF8
 gt_LOCALE_JA
 gt_LOCALE_ZH_CN
+gl_MUSL_LIBC
 
 Makefile.am:
 TESTS += test-c32iscntrl.sh
index a6aac6e0670e8925ddaa35a8f11358aa74192222..236d456323daa48a37e35ee54e77773f0eed7230 100644 (file)
@@ -7,6 +7,7 @@ m4/locale-fr.m4
 m4/locale-ja.m4
 m4/locale-zh.m4
 m4/codeset.m4
+m4/musl.m4
 
 Depends-on:
 mbrtoc32
@@ -17,6 +18,7 @@ gt_LOCALE_FR
 gt_LOCALE_FR_UTF8
 gt_LOCALE_JA
 gt_LOCALE_ZH_CN
+gl_MUSL_LIBC
 
 Makefile.am:
 TESTS += test-c32isgraph.sh
index a502e28eb17364fede4ef67e46b5c17787666a3c..2f9aa1600df3c6fcf70b1ceaabd0c77bcfa3a065 100644 (file)
@@ -7,6 +7,7 @@ m4/locale-fr.m4
 m4/locale-ja.m4
 m4/locale-zh.m4
 m4/codeset.m4
+m4/musl.m4
 
 Depends-on:
 mbrtoc32
@@ -17,6 +18,7 @@ gt_LOCALE_FR
 gt_LOCALE_FR_UTF8
 gt_LOCALE_JA
 gt_LOCALE_ZH_CN
+gl_MUSL_LIBC
 
 Makefile.am:
 TESTS += test-c32islower.sh
index 0c13d467b4e27c848d3a766b6e480e67c8846c60..410d4544b331d08b45bfff3f0795153dbef69e5f 100644 (file)
@@ -7,6 +7,7 @@ m4/locale-fr.m4
 m4/locale-ja.m4
 m4/locale-zh.m4
 m4/codeset.m4
+m4/musl.m4
 
 Depends-on:
 mbrtoc32
@@ -17,6 +18,7 @@ gt_LOCALE_FR
 gt_LOCALE_FR_UTF8
 gt_LOCALE_JA
 gt_LOCALE_ZH_CN
+gl_MUSL_LIBC
 
 Makefile.am:
 TESTS += test-c32isprint.sh
index eeedc9df1ec2faeafb395fa8752ebd55744725e2..3de9a9da0d29fa6699d42caa71deeb48868f495b 100644 (file)
@@ -7,6 +7,7 @@ m4/locale-fr.m4
 m4/locale-ja.m4
 m4/locale-zh.m4
 m4/codeset.m4
+m4/musl.m4
 
 Depends-on:
 mbrtoc32
@@ -18,6 +19,7 @@ gt_LOCALE_FR
 gt_LOCALE_FR_UTF8
 gt_LOCALE_JA
 gt_LOCALE_ZH_CN
+gl_MUSL_LIBC
 
 Makefile.am:
 TESTS += test-c32toupper.sh
index b44569eb16a709b80562ad834e758c9eb843c830..6857ef5c2bec5fc1d0d4f0af0e69734a660c3fd6 100644 (file)
@@ -9,6 +9,7 @@ tests/macros.h
 m4/locale-fr.m4
 m4/codeset.m4
 m4/intl-thread-locale.m4
+m4/musl.m4
 
 Depends-on:
 c-strcase
@@ -22,6 +23,7 @@ configure.ac:
 gt_LOCALE_FR
 gt_LOCALE_FR_UTF8
 gt_FUNC_USELOCALE
+gl_MUSL_LIBC
 
 Makefile.am:
 TESTS += test-nl_langinfo1.sh test-nl_langinfo2.sh test-nl_langinfo-mt
index c654264c3d1a9ec3433427275e07000d4827803d..cbc8030ca4819796224901c59eeed5fdc2cf6635 100644 (file)
@@ -24,6 +24,7 @@ check_PROGRAMS += test-strtod
 TESTS += test-strtod1.sh
 TESTS_ENVIRONMENT += \
   LOCALE_FR='@LOCALE_FR@' \
-  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LC_NUMERIC_IMPLEMENTED='@LC_NUMERIC_IMPLEMENTED@'
 check_PROGRAMS += test-strtod1
 test_strtod1_LDADD = $(LDADD) $(SETLOCALE_LIB)
index 0d353908776b74d69a60362297010f068af4d034..1c270954ad80c765995a74da2ada66a2764d0ee0 100644 (file)
@@ -24,6 +24,7 @@ check_PROGRAMS += test-strtold
 TESTS += test-strtold1.sh
 TESTS_ENVIRONMENT += \
   LOCALE_FR='@LOCALE_FR@' \
-  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LC_NUMERIC_IMPLEMENTED='@LC_NUMERIC_IMPLEMENTED@'
 check_PROGRAMS += test-strtold1
 test_strtold1_LDADD = $(LDADD) $(SETLOCALE_LIB)
index 2ff8fc1da3670329b41db4d1039681bba8a6fa4f..b9aabe665fbdc2787fea3f9f8cf316e450115de9 100644 (file)
@@ -22,7 +22,10 @@ gt_LOCALE_FR_UTF8
 
 Makefile.am:
 TESTS += test-vasnprintf-posix test-vasnprintf-posix2.sh test-vasnprintf-posix3
-TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+TESTS_ENVIRONMENT += \
+  LOCALE_FR='@LOCALE_FR@' \
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LC_NUMERIC_IMPLEMENTED='@LC_NUMERIC_IMPLEMENTED@'
 check_PROGRAMS += test-vasnprintf-posix test-vasnprintf-posix2 test-vasnprintf-posix3
 test_vasnprintf_posix2_LDADD = $(LDADD) $(SETLOCALE_LIB)
 test_vasnprintf_posix3_LDADD = $(LDADD) $(SETLOCALE_LIB)
index 6354e79f75a9a29264277bfc94a787ad38bf4208..4a693a1b98de21144f474f23b632a1d5b769b01e 100644 (file)
@@ -28,7 +28,10 @@ gt_LOCALE_FR_UTF8
 
 Makefile.am:
 TESTS += test-vasnwprintf-posix test-vasnwprintf-posix2.sh test-vasnwprintf-posix3
-TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+TESTS_ENVIRONMENT += \
+  LOCALE_FR='@LOCALE_FR@' \
+  LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+  LC_NUMERIC_IMPLEMENTED='@LC_NUMERIC_IMPLEMENTED@'
 check_PROGRAMS += test-vasnwprintf-posix test-vasnwprintf-posix2 test-vasnwprintf-posix3
 test_vasnwprintf_posix_LDADD = $(LDADD) $(MBRTOWC_LIB)
 test_vasnwprintf_posix2_LDADD = $(LDADD) $(SETLOCALE_LIB) $(MBRTOWC_LIB)
index dcb24d1fe8fea222315e4cb3c328c1ac8cfee5b3..90f79192a05fccca437fc9b805424d249fb6539d 100644 (file)
@@ -186,7 +186,7 @@ main (int argc, char *argv[])
           /* U+3001 IDEOGRAPHIC COMMA */
           is = for_character ("\343\200\201", 3);
           ASSERT (is == 0);
-        #if !(defined __GLIBC__ || defined _AIX || defined __sun || defined __CYGWIN__)
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__)
           /* U+FF11 FULLWIDTH DIGIT ONE */
           is = for_character ("\357\274\221", 3);
           ASSERT (is == 0);
index 4cb23e1f8dd0d22be906573a6f75ba865816ec09..dd935ac8c1765974d591a025548352626a7d87f7 100644 (file)
@@ -145,7 +145,7 @@ main (int argc, char *argv[])
           /* U+00A0 NO-BREAK SPACE */
           is = for_character ("\302\240", 2);
           ASSERT (is == 0);
-        #if !(defined __GLIBC__ || defined __FreeBSD__ || defined __DragonFly__ || defined _AIX || defined __sun || defined __CYGWIN__)
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || defined __FreeBSD__ || defined __DragonFly__ || defined _AIX || defined __sun || defined __CYGWIN__)
           /* U+202E RIGHT-TO-LEFT OVERRIDE */
           is = for_character ("\342\200\256", 3);
           ASSERT (is != 0);
@@ -153,7 +153,7 @@ main (int argc, char *argv[])
           /* U+3000 IDEOGRAPHIC SPACE */
           is = for_character ("\343\200\200", 3);
           ASSERT (is == 0);
-        #if !(defined __GLIBC__ || defined __FreeBSD__ || defined __DragonFly__ || defined _AIX || defined __sun || defined __CYGWIN__)
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || defined __FreeBSD__ || defined __DragonFly__ || defined _AIX || defined __sun || defined __CYGWIN__)
           /* U+FEFF ZERO WIDTH NO-BREAK SPACE */
           is = for_character ("\357\273\277", 3);
           ASSERT (is != 0);
@@ -161,7 +161,7 @@ main (int argc, char *argv[])
           /* U+20000 <CJK Ideograph> */
           is = for_character ("\360\240\200\200", 4);
           ASSERT (is == 0);
-        #if !(defined __GLIBC__ || defined __FreeBSD__ || defined __DragonFly__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || defined __FreeBSD__ || defined __DragonFly__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
           /* U+E0001 LANGUAGE TAG */
           is = for_character ("\363\240\200\201", 4);
           ASSERT (is != 0);
index 31e0838d19b3f597fe06be11be559335d0682150..5edf44d46552966013df3724854b4b66fda09bff 100644 (file)
@@ -166,7 +166,7 @@ main (int argc, char *argv[])
           /* U+2002 EN SPACE */
           is = for_character ("\342\200\202", 3);
           ASSERT (is == 0);
-        #if !(defined __GLIBC__ || defined _AIX || defined __sun || defined __CYGWIN__)
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__)
           /* U+202E RIGHT-TO-LEFT OVERRIDE */
           is = for_character ("\342\200\256", 3);
           ASSERT (is == 0);
@@ -174,7 +174,7 @@ main (int argc, char *argv[])
           /* U+3000 IDEOGRAPHIC SPACE */
           is = for_character ("\343\200\200", 3);
           ASSERT (is == 0);
-        #if !(defined __GLIBC__ || defined _AIX || defined __sun || defined __CYGWIN__)
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__)
           /* U+FEFF ZERO WIDTH NO-BREAK SPACE */
           is = for_character ("\357\273\277", 3);
           ASSERT (is == 0);
@@ -184,7 +184,7 @@ main (int argc, char *argv[])
           is = for_character ("\360\240\200\200", 4);
           ASSERT (is != 0);
         #endif
-        #if !(defined __GLIBC__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
           /* U+E0001 LANGUAGE TAG */
           is = for_character ("\363\240\200\201", 4);
           ASSERT (is == 0);
index 78de25ae60e5a2fa2f204912921359a24a87dffa..6d4e222bc3abcc7900f6810e31eb5a2297e1c814 100644 (file)
@@ -202,7 +202,7 @@ main (int argc, char *argv[])
           /* U+00B2 SUPERSCRIPT TWO */
           is = for_character ("\302\262", 2);
           ASSERT (is == 0);
-        #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
           /* U+00B5 MICRO SIGN */
           is = for_character ("\302\265", 2);
           ASSERT (is == 0);
index 498605d8f7ff0ebd6a446e52a1af3df457177e86..538c371f16382951bab6f3a277e3803f08cb0085 100644 (file)
@@ -169,7 +169,7 @@ main (int argc, char *argv[])
           is = for_character ("\342\200\202", 3);
           ASSERT (is != 0);
         #endif
-        #if !(defined __GLIBC__ || defined _AIX || defined __sun || defined __CYGWIN__)
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__)
           /* U+202E RIGHT-TO-LEFT OVERRIDE */
           is = for_character ("\342\200\256", 3);
           ASSERT (is == 0);
@@ -179,7 +179,7 @@ main (int argc, char *argv[])
           is = for_character ("\343\200\200", 3);
           ASSERT (is != 0);
         #endif
-        #if !(defined __GLIBC__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
           /* U+FEFF ZERO WIDTH NO-BREAK SPACE */
           is = for_character ("\357\273\277", 3);
           ASSERT (is == 0);
@@ -189,7 +189,7 @@ main (int argc, char *argv[])
           is = for_character ("\360\240\200\200", 4);
           ASSERT (is != 0);
         #endif
-        #if !(defined __GLIBC__ || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || defined _AIX || defined __sun || defined __CYGWIN__ || (defined _WIN32 && !defined __CYGWIN__))
           /* U+E0001 LANGUAGE TAG */
           is = for_character ("\363\240\200\201", 4);
           ASSERT (is == 0);
index 37f0134de8f45ab272793687e52643e204f2e6aa..af27bbca09d31587727474d99df1be7fbe491f70 100644 (file)
@@ -259,7 +259,7 @@ main (int argc, char *argv[])
           mb = for_character ("\302\262", 2);
           ASSERT (mb.nbytes == 2);
           ASSERT (memcmp (mb.buf, "\302\262", 2) == 0);
-        #if !(defined __GLIBC__ || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__)
+        #if !(defined __GLIBC__ || defined MUSL_LIBC || (defined __APPLE__ && defined __MACH__) || defined __FreeBSD__ || defined __DragonFly__ || defined __NetBSD__ || defined _AIX || defined __sun || defined __CYGWIN__)
           /* U+00B5 MICRO SIGN */
           mb = for_character ("\302\265", 2);
           ASSERT (mb.nbytes == 2);
@@ -269,10 +269,12 @@ main (int argc, char *argv[])
           mb = for_character ("\303\211", 2);
           ASSERT (mb.nbytes == 2);
           ASSERT (memcmp (mb.buf, "\303\211", 2) == 0);
+        #if !defined MUSL_LIBC
           /* U+00DF LATIN SMALL LETTER SHARP S */
           mb = for_character ("\303\237", 2);
           ASSERT (mb.nbytes == 2);
           ASSERT (memcmp (mb.buf, "\303\237", 2) == 0);
+        #endif
         #if !(defined _WIN32 && !defined __CYGWIN__)
           /* U+00E9 LATIN SMALL LETTER E WITH ACUTE */
           mb = for_character ("\303\251", 2);
index 5254f8626ed794fabe031017521c979790bd6cb8..afd40b48c5a77a4665327975b57ec4f90bef1a4b 100644 (file)
@@ -139,7 +139,7 @@ main (int argc, char *argv[])
   {
     const char *currency = nl_langinfo (CRNCYSTR);
     ASSERT (strlen (currency) >= 0);
-#if !defined __NetBSD__
+#if !(defined MUSL_LIBC || defined __NetBSD__)
     if (pass > 0)
       ASSERT (strlen (currency) >= 1);
 #endif
index 7f276da83d148e2c7669f8f19a8cddc6312f496a..108858be346ab38caceafbe104e9696420f14cd9 100644 (file)
@@ -86,6 +86,10 @@ main (int argc, char *argv[])
                 ASSERT (c_strcasecmp (fr_CODESET, "UTF-8") == 0
                         || c_strcasecmp (fr_CODESET, "UTF8") == 0);
 
+              /* In musl libc, locales differ at most in the LC_MESSAGES
+                 category.  */
+              #if !defined MUSL_LIBC
+
               /* nl_langinfo items of the LC_NUMERIC category */
               const char *fr_RADIXCHAR = nl_langinfo (RADIXCHAR);
               ASSERT (strcmp (fr_RADIXCHAR, ",") == 0);
@@ -113,9 +117,15 @@ main (int argc, char *argv[])
                         && strcmp (fr_CRNCYSTR + 1, "€") == 0);
               #endif
 
+              #endif
+
               /* nl_langinfo items of the LC_MESSAGES category */
+              /* In musl libc, this works only if the package 'musl-locales' is
+                 installed.  */
+              #if !defined MUSL_LIBC
               const char *fr_YESEXPR = nl_langinfo (YESEXPR);
               ASSERT (c_strcasestr (fr_YESEXPR, "o" /* from "oui" */) != NULL);
+              #endif
 
               skipped_all = false;
             }
index 1b2de5926ad9e12621166ccc4a9eeb5fc0b254c8..306ca52e27895d79b0cb330a798c51a748f90733 100755 (executable)
@@ -12,6 +12,13 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
   exit 77
 fi
 
+if $LC_NUMERIC_IMPLEMENTED; then
+  :
+else
+  echo "Skipping test: LC_NUMERIC category of locales is not implemented"
+  exit 77
+fi
+
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR      ${CHECKER} ./test-strtod1${EXEEXT} || exit 1
 fi
index 1302c199315c9ae6c754624192f6f970c6627086..3af457611529549d543ad4a664cc944bccfa9c99 100755 (executable)
@@ -12,6 +12,13 @@ if test $LOCALE_FR = none && test $LOCALE_FR_UTF8 = none; then
   exit 77
 fi
 
+if $LC_NUMERIC_IMPLEMENTED; then
+  :
+else
+  echo "Skipping test: LC_NUMERIC category of locales is not implemented"
+  exit 77
+fi
+
 if test $LOCALE_FR != none; then
   LC_ALL=$LOCALE_FR      ${CHECKER} ./test-strtold1${EXEEXT} || exit 1
 fi
index 79c1e2f76f7eace695394ebc1778b018284458e9..e488e94e97f0435bad325b325f6afff6364e4e57 100755 (executable)
@@ -18,5 +18,12 @@ else
   fi
 fi
 
+if $LC_NUMERIC_IMPLEMENTED; then
+  :
+else
+  echo "Skipping test: LC_NUMERIC category of locales is not implemented"
+  exit 77
+fi
+
 LC_ALL=$testlocale \
 ${CHECKER} ./test-vasnprintf-posix2${EXEEXT}
index 7a5a36476c9a184dd8afbb319d498e242fbe2cf8..ecff3c9f65d8e937ef370bd62523f47c1960a26a 100755 (executable)
@@ -18,5 +18,12 @@ else
   fi
 fi
 
+if $LC_NUMERIC_IMPLEMENTED; then
+  :
+else
+  echo "Skipping test: LC_NUMERIC category of locales is not implemented"
+  exit 77
+fi
+
 LC_ALL=$testlocale \
 ${CHECKER} ./test-vasnwprintf-posix2${EXEEXT}