apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aa...@apache.org
Subject cvs commit: apr/build apr_common.m4
Date Thu, 21 Mar 2002 19:31:41 GMT
aaron       02/03/21 11:31:41

  Modified:    build    apr_common.m4
  Log:
  Namespace protect the "local" variables in this m4/autoconf macro.
  Also, to satisfy the pedant in me, put {} delimiters around all the
  variables, and "" around the RHS of all assignments (in case of spaces).
  
  Revision  Changes    Path
  1.28      +10 -10    apr/build/apr_common.m4
  
  Index: apr_common.m4
  ===================================================================
  RCS file: /home/cvs/apr/build/apr_common.m4,v
  retrieving revision 1.27
  retrieving revision 1.28
  diff -u -r1.27 -r1.28
  --- apr_common.m4	14 Mar 2002 01:41:32 -0000	1.27
  +++ apr_common.m4	21 Mar 2002 19:31:41 -0000	1.28
  @@ -570,14 +570,14 @@
   dnl   $fraz is now "1/2/3"
   dnl 
   AC_DEFUN(APR_EXPAND_VAR,[
  -last=
  -cur=$2
  -while test "x$cur" != "x$last";
  +ap_last=
  +ap_cur="$2"
  +while test "x${ap_cur}" != "x${ap_last}";
   do
  -  last=$cur
  -  cur=`eval "echo $cur"`
  +  ap_last="${ap_cur}"
  +  ap_cur=`eval "echo ${ap_cur}"`
   done
  -$1=$cur
  +$1="${ap_cur}"
   ])
   
   dnl
  @@ -589,14 +589,14 @@
   dnl APR_PATH_RELATIVE(final_path, $orig_path, $prefix)
   dnl    $final_path now contains "bar"
   AC_DEFUN(APR_PATH_RELATIVE,[
  -stripped=`echo $2 | sed -e "s#^$3##"`
  +ap_stripped="`echo $2 | sed -e "s#^$3##"`"
   # check if the stripping was successful
  -if test "x$2" != "x$stripped"; then
  +if test "x$2" != "x${ap_stripped}"; then
       # it was, so strip of any leading slashes
  -    $1=`echo $stripped | sed -e 's#^/*##'`
  +    $1="`echo ${ap_stripped} | sed -e 's#^/*##'`"
   else
       # it wasn't so return the original
  -    $1=$2
  +    $1="$2"
   fi
   ])
   
  
  
  

Mime
View raw message