libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

FYI: work around old Bash bug (HEAD)


From: Ralf Wildenhues
Subject: FYI: work around old Bash bug (HEAD)
Date: Tue, 28 Dec 2004 16:16:51 +0100
User-agent: Mutt/1.4.1i

Applied to HEAD.

2004-12-28  Ralf Wildenhues  <address@hidden>

        * 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.
 
Index: config/general.m4sh
===================================================================
RCS file: /cvsroot/libtool/libtool/config/general.m4sh,v
retrieving revision 1.13
diff -u -r1.13 general.m4sh
--- config/general.m4sh 28 Dec 2004 12:40:43 -0000      1.13
+++ config/general.m4sh 28 Dec 2004 15:03:03 -0000
@@ -275,7 +275,7 @@
 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 @@
 # 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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]