]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* config/general.m4sh (func_quote_for_eval): Move backslash to
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 28 Dec 2004 15:16:33 +0000 (15:16 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Tue, 28 Dec 2004 15:16:33 +0000 (15:16 +0000)
beginning of character class, to work around old Bash bug.
(func_quote_for_expand): Also test to avoid unnecessary fork.

ChangeLog
config/general.m4sh

index ca691ac0121058929e79735671c3c3e1b0a16efb..72a62957abd38b137ed8ca1839750a9fde1ee9ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-12-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * config/general.m4sh (func_quote_for_eval): Move backslash to
+       beginning of character class, to work around old Bash bug.
+       (func_quote_for_expand): Also test to avoid unnecessary fork.
+
 2004-12-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>,
            Gary V. Vaughan <gary@gnu.org>
 
index cc4777423271a366bd9b4ec96c3b130e23655615..8a43ee779b3de363f4f256ec1abec00c535c8797 100644 (file)
@@ -275,7 +275,7 @@ func_mktempdir ()
 func_quote_for_eval ()
 {
     case $1 in
-      *[[\`\"\\\$]]*)
+      *[[\\\`\"\$]]*)
        func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
       *)
         func_quote_for_eval_unquoted_result="$1" ;;
@@ -303,8 +303,13 @@ func_quote_for_eval ()
 # but do not quote variable references.
 func_quote_for_expand ()
 {
-    my_arg=`$ECHO "X$1" | $Xsed \
-        -e "$double_quote_subst" -e "$sed_double_backslash"`
+    case $1 in
+      *[[\\\`\"]]*)
+       my_arg=`$ECHO "X$1" | $Xsed \
+           -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+      *)
+        my_arg="$1" ;;
+    esac
 
     case $my_arg in
       # Double-quote args containing shell metacharacters to delay