aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Sebor <msebor@gcc.gnu.org>2015-09-28 16:55:57 -0400
committerCarlos O'Donell <carlos@systemhalted.org>2015-10-08 17:08:14 -0400
commited7f3a2e27e816488d5a8ef570052a5a2c3c515b (patch)
tree9839cc89d1a21080e48e99c6e55d255952ac7766
parent6c84109cfa26f35c3dfed3acb97d347361bd5849 (diff)
downloadglibc-ed7f3a2e27e816488d5a8ef570052a5a2c3c515b.zip
glibc-ed7f3a2e27e816488d5a8ef570052a5a2c3c515b.tar.gz
glibc-ed7f3a2e27e816488d5a8ef570052a5a2c3c515b.tar.bz2
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'). (cherry picked from commit 60cf80f09d029257caedc0c8abe7e3e09c64e6c7)
-rw-r--r--ChangeLog10
-rw-r--r--NEWS2
-rw-r--r--string/Makefile10
-rw-r--r--string/tst-strxfrm2.c6
4 files changed, 25 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 70a1dfe..5698424 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2015-09-28 Martin Sebor <msebor@redhat.com>
+
+ [BZ #18969]
+ * string/Makefile (LOCALES): Define.
+ (gen-locales.mk): Include.
+ (test-strcasecmp.out, test-strncasecmp.out, tst-strxfrm.out)
+ (tst-strxfrm2.out): Add deppendency on $(gen-locales).
+ * string/tst-strxfrm2.c (do_test): Print the name of the locale
+ on setlocale failure.
+
2015-10-08 Carlos O'Donell <carlos@redhat.com>
[BZ #18589]
diff --git a/NEWS b/NEWS
index 44ddc97..9b10bff 100644
--- a/NEWS
+++ b/NEWS
@@ -9,7 +9,7 @@ Version 2.22.1
* The following bugs are resolved with this release:
- 18589, 18778, 18781, 18787, 18796, 18870, 18887, 18921.
+ 18589, 18778, 18781, 18787, 18796, 18870, 18887, 18921, 18969.
Version 2.22
diff --git a/string/Makefile b/string/Makefile
index 8424a61..c543159 100644
--- a/string/Makefile
+++ b/string/Makefile
@@ -75,4 +75,14 @@ ifeq ($(run-built-tests),yes)
$(objpfx)tst-svc-cmp.out: tst-svc.expect $(objpfx)tst-svc.out
cmp $^ > $@; \
$(evaluate-test)
+
+LOCALES := de_DE.UTF-8 en_US.ISO-8859-1 en_US.UTF-8 \
+ tr_TR.ISO-8859-9 tr_TR.UTF-8
+include ../gen-locales.mk
+
+$(objpfx)test-strcasecmp.out: $(gen-locales)
+$(objpfx)test-strncasecmp.out: $(gen-locales)
+$(objpfx)tst-strxfrm.out: $(gen-locales)
+$(objpfx)tst-strxfrm2.out: $(gen-locales)
+
endif
diff --git a/string/tst-strxfrm2.c b/string/tst-strxfrm2.c
index d5a1115..bea5aa2 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