about summary refs log tree commit diff
path: root/string/tst-strxfrm2.c
diff options
context:
space:
mode:
authorMartin Sebor <msebor@gcc.gnu.org>2015-09-28 16:55:57 -0400
committerMartin Sebor <msebor@gcc.gnu.org>2015-09-28 16:55:57 -0400
commit60cf80f09d029257caedc0c8abe7e3e09c64e6c7 (patch)
tree3527e453dfb97f4b54ba476572bb8b044dbf5714 /string/tst-strxfrm2.c
parentd36c75fc0d44deec29635dd239b0fbd206ca49b7 (diff)
downloadglibc-60cf80f09d029257caedc0c8abe7e3e09c64e6c7.tar.gz
glibc-60cf80f09d029257caedc0c8abe7e3e09c64e6c7.tar.xz
glibc-60cf80f09d029257caedc0c8abe7e3e09c64e6c7.zip
Let 'make check subdirs=string' succeed even when it's invoked
immediately after glibc has been built and before 'make check'
(or after 'make clean').
Diffstat (limited to 'string/tst-strxfrm2.c')
-rw-r--r--string/tst-strxfrm2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/string/tst-strxfrm2.c b/string/tst-strxfrm2.c
index d5a1115338..bea5aa2cea 100644
--- a/string/tst-strxfrm2.c
+++ b/string/tst-strxfrm2.c
@@ -5,6 +5,8 @@
 static int
 do_test (void)
 {
+  static const char test_locale[] = "de_DE.UTF-8";
+
   int res = 0;
 
   char buf[20];
@@ -38,9 +40,9 @@ do_test (void)
       res = 1;
     }
 
-  if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL)
+  if (setlocale (LC_ALL, test_locale) == NULL)
     {
-      puts ("setlocale failed");
+      printf ("cannot set locale \"%s\"\n", test_locale);
       res = 1;
     }
   else