From: Ralf Wildenhues Date: Tue, 28 Dec 2004 15:16:33 +0000 (+0000) Subject: * config/general.m4sh (func_quote_for_eval): Move backslash to X-Git-Tag: release-2-1b~797 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8782d88386ef15e6b8472be9237e33951c39b36a;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index ca691ac01..72a62957a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-12-28 Ralf Wildenhues + + * 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 , Gary V. Vaughan diff --git a/config/general.m4sh b/config/general.m4sh index cc4777423..8a43ee779 100644 --- a/config/general.m4sh +++ b/config/general.m4sh @@ -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