[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] more ports to Solaris tr, which needs [] around ranges
From: |
Paul Eggert |
Subject: |
[PATCH] more ports to Solaris tr, which needs [] around ranges |
Date: |
Tue, 05 Oct 2010 09:31:57 -0700 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.12) Gecko/20100915 Thunderbird/3.0.8 |
* 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 | 8 ++++++++
gnulib-tool | 6 +++---
m4/fnmatch.m4 | 4 +++-
tests/test-pipe-filter-gi1.c | 8 ++++----
tests/test-pipe-filter-ii1.c | 8 ++++----
5 files changed, 22 insertions(+), 12 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index e37577a..6cf569a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2010-10-05 Paul Eggert <address@hidden>
+
+ 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 <address@hidden>
bootstrap: fix Solaris regression
diff --git a/gnulib-tool b/gnulib-tool
index b89c2eb..afd6493 100755
--- a/gnulib-tool
+++ b/gnulib-tool
@@ -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\""
diff --git a/m4/fnmatch.m4 b/m4/fnmatch.m4
index 212ead5..84bcabd 100644
--- a/m4/fnmatch.m4
+++ b/m4/fnmatch.m4
@@ -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],
diff --git a/tests/test-pipe-filter-gi1.c b/tests/test-pipe-filter-gi1.c
index 2305fa6..d35838e 100644
--- a/tests/test-pipe-filter-gi1.c
+++ b/tests/test-pipe-filter-gi1.c
@@ -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,
diff --git a/tests/test-pipe-filter-ii1.c b/tests/test-pipe-filter-ii1.c
index 58cc192..94de2f1 100644
--- a/tests/test-pipe-filter-ii1.c
+++ b/tests/test-pipe-filter-ii1.c
@@ -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,
--
1.7.2
- [PATCH] more ports to Solaris tr, which needs [] around ranges,
Paul Eggert <=