Fix test failure in many locales on Solaris 11.
authorBruno Haible <bruno@clisp.org>
Sun, 19 Feb 2012 14:06:52 +0000 (15:06 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 19 Feb 2012 14:06:52 +0000 (15:06 +0100)
* tests/test-pipe-filter-gi1.c (main): Don't use range expression in
'tr' arguments.
* tests/test-pipe-filter-ii1.c (main): Likewise.
* build-aux/bootstrap (check_versions): Run 'tr' command with range
expressions in the C locale.
* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
* m4/host-os.m4 (gl_HOST_OS): Likewise.

ChangeLog
build-aux/bootstrap
m4/fnmatch.m4
m4/host-os.m4
tests/test-pipe-filter-gi1.c
tests/test-pipe-filter-ii1.c

index cfd09aa..16e4dad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2012-02-19  Bruno Haible  <bruno@clisp.org>
 
+       Fix test failure in many locales on Solaris 11.
+       * tests/test-pipe-filter-gi1.c (main): Don't use range expression in
+       'tr' arguments.
+       * tests/test-pipe-filter-ii1.c (main): Likewise.
+       * build-aux/bootstrap (check_versions): Run 'tr' command with range
+       expressions in the C locale.
+       * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
+       * m4/host-os.m4 (gl_HOST_OS): Likewise.
+
+2012-02-19  Bruno Haible  <bruno@clisp.org>
+
        gnulib-tool: Improve usage message.
        * gnulib-tool (func_usage): Move doc of --help and --version to the
        section "Operation modes".
index c8ee3cc..31eb651 100755 (executable)
@@ -423,7 +423,7 @@ check_versions() {
       $use_git || continue
     fi
     # Honor $APP variables ($TAR, $AUTOCONF, etc.)
-    appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
+    appvar=`echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_'`
     test "$appvar" = TAR && appvar=AMTAR
     case $appvar in
         GZIP) ;; # Do not use $GZIP:  it contains gzip options.
index 07b4350..e46b6e5 100644 (file)
@@ -1,4 +1,4 @@
-# Check for fnmatch - serial 8.
+# Check for fnmatch - serial 9.
 
 # Copyright (C) 2000-2007, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -21,7 +21,7 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
 
   FNMATCH_H=
   gl_fnmatch_required_lowercase=`
-    echo $gl_fnmatch_required | tr '[[A-Z]]' '[[a-z]]'
+    echo $gl_fnmatch_required | LC_ALL=C tr '[[A-Z]]' '[[a-z]]'
   `
   gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
   AC_CACHE_CHECK([for working $gl_fnmatch_required fnmatch],
index 199c239..f76f907 100644 (file)
@@ -1,4 +1,4 @@
-# serial 8
+# serial 9
 
 # Copyright (C) 2001, 2003-2004, 2006, 2009-2012 Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
@@ -66,7 +66,7 @@ AC_DEFUN([gl_HOST_OS],
        # from $host_os, but capitalizes its first letter.
        [A-Za-z]*)
          os=`
-           expr "X$host_os" : 'X\([A-Za-z]\)' | tr '[a-z]' '[A-Z]'
+           expr "X$host_os" : 'X\([A-Za-z]\)' | LC_ALL=C tr '[a-z]' '[A-Z]'
          ``
            expr "X$host_os" : 'X.\([A-Za-z]*\)'
          `
index ed84c7a..d14d4a3 100644 (file)
@@ -26,8 +26,9 @@
 #include "macros.h"
 
 
-/* Pipe a text file through 'tr "[a-z]" "[A-Z]"', which converts ASCII
-   characters from lower case to upper case.  */
+/* Pipe a text file through 'LC_ALL=C tr "[a-z]" "[A-Z]"', or equivalently,
+   'tr "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"', which
+   converts ASCII characters from lower case to upper case.  */
 
 struct locals
 {
@@ -96,8 +97,8 @@ main (int argc, char *argv[])
     l.nread = 0;
 
     argv[0] = tr_program;
-    argv[1] = "[a-z]";
-    argv[2] = "[A-Z]";
+    argv[1] = "abcdefghijklmnopqrstuvwxyz";
+    argv[2] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
     argv[3] = NULL;
 
     f = pipe_filter_gi_create ("tr", tr_program, argv, false, true,
index baa8d85..ac856f5 100644 (file)
@@ -26,8 +26,9 @@
 #include "macros.h"
 
 
-/* Pipe a text file through 'tr "[a-z]" "[A-Z]"', which converts ASCII
-   characters from lower case to upper case.  */
+/* Pipe a text file through 'LC_ALL=C tr "[a-z]" "[A-Z]"', or equivalently,
+   'tr "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ"', which
+   converts ASCII characters from lower case to upper case.  */
 
 struct locals
 {
@@ -119,8 +120,8 @@ main (int argc, char *argv[])
     l.nread = 0;
 
     argv[0] = tr_program;
-    argv[1] = "[a-z]";
-    argv[2] = "[A-Z]";
+    argv[1] = "abcdefghijklmnopqrstuvwxyz";
+    argv[2] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
     argv[3] = NULL;
 
     result = pipe_filter_ii_execute ("tr", tr_program, argv, false, true,