more ports to Solaris tr, which needs [] around ranges
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Oct 2010 16:29:28 +0000 (09:29 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 5 Oct 2010 16:30:08 +0000 (09:30 -0700)
* gnulib-tool: Solaris tr needs [] around ranges.
* m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
* tests/test-pipe-filter-gi1.c (main): Likewise.
* tests/test-pipe-filter-ii1.c (main): Likewise.

ChangeLog
gnulib-tool
m4/fnmatch.m4
tests/test-pipe-filter-gi1.c
tests/test-pipe-filter-ii1.c

index e37577afc6dbe9189e689a18a5958f285db424d7..6cf569a79129bf7278980d32adc29457ed24ffc0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-10-05  Paul Eggert  <eggert@cs.ucla.edu>
+
+       more ports to Solaris tr, which needs [] around ranges
+       * gnulib-tool: Solaris tr needs [] around ranges.
+       * m4/fnmatch.m4 (gl_FUNC_FNMATCH_POSIX): Likewise.
+       * tests/test-pipe-filter-gi1.c (main): Likewise.
+       * tests/test-pipe-filter-ii1.c (main): Likewise.
+
 2010-10-05  Eric Blake  <eblake@redhat.com>
 
        bootstrap: fix Solaris regression
index b89c2eb4a82763629183faa98e5c943b57d98b9b..afd649369198d44d26c4d1b9d89278f7a6957c73 100755 (executable)
@@ -4584,7 +4584,7 @@ s,//*$,/,'
     # _LIBDEPS and _LTLIBDEPS variables are not needed if this library is
     # created using libtool, because libtool already handles the dependencies.
     if test "$libtool" != true; then
-      libname_upper=`echo "$libname" | LC_ALL=C tr 'a-z-' 'A-Z_'`
+      libname_upper=`echo "$libname" | LC_ALL=C tr '[a-z]-' '[A-Z]_'`
       echo "  ${libname_upper}_LIBDEPS=\"\$gl_libdeps\""
       echo "  AC_SUBST([${libname_upper}_LIBDEPS])"
       echo "  ${libname_upper}_LTLIBDEPS=\"\$gl_ltlibdeps\""
@@ -5163,7 +5163,7 @@ func_create_testdir ()
      # _LIBDEPS and _LTLIBDEPS variables are not needed if this library is
      # created using libtool, because libtool already handles the dependencies.
      if test "$libtool" != true; then
-       libname_upper=`echo "$libname" | LC_ALL=C tr 'a-z-' 'A-Z_'`
+       libname_upper=`echo "$libname" | LC_ALL=C tr '[a-z]-' '[A-Z]_'`
        echo "  ${libname_upper}_LIBDEPS=\"\$gl_libdeps\""
        echo "  AC_SUBST([${libname_upper}_LIBDEPS])"
        echo "  ${libname_upper}_LTLIBDEPS=\"\$gl_ltlibdeps\""
@@ -5281,7 +5281,7 @@ func_create_testdir ()
    # _LIBDEPS and _LTLIBDEPS variables are not needed if this library is
    # created using libtool, because libtool already handles the dependencies.
    if test "$libtool" != true; then
-     libname_upper=`echo "$libname" | LC_ALL=C tr 'a-z-' 'A-Z_'`
+     libname_upper=`echo "$libname" | LC_ALL=C tr '[a-z]-' '[A-Z]_'`
      echo "  ${libname_upper}_LIBDEPS=\"\$gl_libdeps\""
      echo "  AC_SUBST([${libname_upper}_LIBDEPS])"
      echo "  ${libname_upper}_LTLIBDEPS=\"\$gl_ltlibdeps\""
index 212ead57291fe6fcb88929b91250c891de3b012f..84bcabd9ff122254a55cad66724ec8183e27bff8 100644 (file)
@@ -20,7 +20,9 @@ AC_DEFUN([gl_FUNC_FNMATCH_POSIX],
   AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
 
   FNMATCH_H=
-  gl_fnmatch_required_lowercase=`echo $gl_fnmatch_required | tr 'A-Z' 'a-z'`
+  gl_fnmatch_required_lowercase=`
+    echo $gl_fnmatch_required | 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],
     [$gl_fnmatch_cache_var],
index 2305fa60a3140d487b8287302e66fbac0a6c1b93..d35838eeae9144d12e9e1895ed0ba9208a475d09 100644 (file)
@@ -26,8 +26,8 @@
 #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 'tr "[a-z]" "[A-Z]"', which converts ASCII
+   characters from lower case to upper case.  */
 
 struct locals
 {
@@ -96,8 +96,8 @@ main (int argc, char *argv[])
     l.nread = 0;
 
     argv[0] = tr_program;
-    argv[1] = "a-z";
-    argv[2] = "A-Z";
+    argv[1] = "[a-z]";
+    argv[2] = "[A-Z]";
     argv[3] = NULL;
 
     f = pipe_filter_gi_create ("tr", tr_program, argv, false, true,
index 58cc1926c5b6f2be609b49253630f30450a7e4c0..94de2f1520f0e7bbf9325cd694d1a0951ed2e03b 100644 (file)
@@ -26,8 +26,8 @@
 #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 'tr "[a-z]" "[A-Z]"', which converts ASCII
+   characters from lower case to upper case.  */
 
 struct locals
 {
@@ -119,8 +119,8 @@ main (int argc, char *argv[])
     l.nread = 0;
 
     argv[0] = tr_program;
-    argv[1] = "a-z";
-    argv[2] = "A-Z";
+    argv[1] = "[a-z]";
+    argv[2] = "[A-Z]";
     argv[3] = NULL;
 
     result = pipe_filter_ii_execute ("tr", tr_program, argv, false, true,