[m-rev.] diff: fix tr portability bug

Fergus Henderson fjh at cs.mu.OZ.AU
Tue May 7 17:46:48 AEST 2002


Estimated hours taken: 0.75
Branches: main

configure.in:
	Change "tr a-z A-Z" to "tr '[a-z]' '[A-Z]'".  The former is
	Posix-conforming, but doesn't work on some non-Posix-conforming
	systems, in particular Solaris.  The latter works on both Solaris
	and on Posix-conforming systems.

Workspace: /home/ceres/fjh/mercury
Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.304
diff -u -d -r1.304 configure.in
--- configure.in	3 May 2002 05:07:07 -0000	1.304
+++ configure.in	7 May 2002 07:45:04 -0000
@@ -432,7 +432,9 @@
 
     for mercury_cv_func in "$@"
     do
-	mercury_cv_func_define=MR_HAVE_`echo $mercury_cv_func | tr a-z A-Z`
+	changequote(<<,>>) 
+	mercury_cv_func_define=MR_HAVE_`echo $mercury_cv_func | tr '[a-z]' '[A-Z]'`
+	changequote([,]) 
 	AC_CHECK_FUNC($mercury_cv_func, [
 		AC_DEFINE_UNQUOTED($mercury_cv_func_define)
 	])
@@ -460,8 +462,10 @@
 mercury_check_for_headers () {
     for mercury_cv_header in "$@"
     do
+	changequote(<<,>>) 
 	mercury_cv_header_define="MR_HAVE_`echo $mercury_cv_header | \
-						tr 'a-z./' 'A-Z__'`"
+						tr '[a-z]./' '[A-Z]__'`"
+	changequote([,]) 
 	AC_CHECK_HEADER($mercury_cv_header, [
 		AC_DEFINE_UNQUOTED($mercury_cv_header_define)
 		eval "$mercury_cv_header_define=1"
-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list