]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* config/ltmain.m4sh (func_mode_compile): In order to find out
authorRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 5 Jun 2005 17:35:11 +0000 (17:35 +0000)
committerRalf Wildenhues <Ralf.Wildenhues@gmx.de>
Sun, 5 Jun 2005 17:35:11 +0000 (17:35 +0000)
about forbidden characters in output, check with grep after checking
func_quote_for_eval result.  Also, warn instead of fail.
* config/general.m4sh (func_quote_for_eval, func_quote_for_expand):
Revert SunOS sh bug workaround patch from 2004-12-28 as it
triggers bugs in the Tru64 5.1B shell.
Reported by Albert Chin <libtool@mlists.thewrittenword.com> and
Nicolas Joly <njoly@pasteur.fr>.

ChangeLog
config/general.m4sh
config/ltmain.m4sh

index f744fe1d66dc58e470e4289d474667edf46dc316..1e698162ff1ad4260355d1ca5e58785320fee4a1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2005-06-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * config/ltmain.m4sh (func_mode_compile): In order to find out
+       about forbidden characters in output, check with grep after checking
+       func_quote_for_eval result.  Also, warn instead of fail.
+       * config/general.m4sh (func_quote_for_eval, func_quote_for_expand):
+       Revert SunOS sh bug workaround patch from 2004-12-28 as it
+       triggers bugs in the Tru64 5.1B shell.
+       Reported by Albert Chin <libtool@mlists.thewrittenword.com> and
+       Nicolas Joly <njoly@pasteur.fr>.
+
 2005-06-01  Olly Betts <olly@survex.com>  (tiny change)
 
        * libltdl/argz.c (argz_create_sep): Fix typo.
index 0d928ce3642a2dbbfb80946ca0419e5ec75541a0..feb54100b61eb20ce473f1d168c70ec0a7c37240 100644 (file)
@@ -96,9 +96,6 @@ sed_quote_subst='s/\([[`"$\\]]\)/\\\1/g'
 # Same as above, but do not quote variable references.
 double_quote_subst='s/\([["`\\]]\)/\\\1/g'
 
-# Protect character class for func_quote_* by variable expansion.
-quote_scanset='[[@<:@~#^*{};<>?'"'"'   ]]'
-
 # Re-`\' parameter expansions in output of double_quote_subst that were
 # `\'-ed in input to the same.  If an odd number of `\' preceded a '$'
 # in input to double_quote_subst, that '$' was protected from expansion.
@@ -278,11 +275,8 @@ func_quote_for_eval ()
       # word splitting, command substitution and and variable
       # expansion for a subsequent eval.
       # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, and some SunOS ksh mistreat backslash-escaping
-      # in scan sets (worked around with variable expansion),
-      # and furthermore cannot handle '|' '&' '(' ')' in scan sets
-      # at all, so we specify them separately.
-      *$quote_scanset* | *@:>@* | *\|* | *\&* | *\(* | *\)* | "")
+      # in scan sets, so we specify it separately.
+      *[[\@<:@\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \        ]]*|*@:>@*|"")
         my_arg="\"$my_arg\""
         ;;
     esac
@@ -303,11 +297,8 @@ func_quote_for_expand ()
       # Double-quote args containing shell metacharacters to delay
       # word splitting and command substitution for a subsequent eval.
       # Many Bourne shells cannot handle close brackets correctly
-      # in scan sets, and some SunOS ksh mistreat backslash-escaping
-      # in scan sets (worked around with variable expansion),
-      # and furthermore cannot handle '|' '&' '(' ')' in scan sets
-      # at all, so we specify them separately.
-      *$quote_scanset* | *@:>@* | *\|* | *\&* | *\(* | *\)* | "")
+      # in scan sets, so we specify it separately.
+      *[[\@<:@\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \        ]]*|*@:>@*|"")
         my_arg="\"$my_arg\""
         ;;
     esac
index 7524357f9d3fab48a047737968f146db2601c80c..e2c01de4199bcc82db8b9bfc6e1b6ba0f203e4cd 100644 (file)
@@ -1172,7 +1172,8 @@ func_mode_compile ()
 
     func_quote_for_eval "$libobj"
     test "X$libobj" != "X$func_quote_for_eval_result" \
-      && func_fatal_error "libobj name \`$libobj' may not contain shell special characters."
+      && $ECHO "X$libobj" | $GREP ['[@:>@~#^*{};<>?"'"'"'      &()|`$@<:@]'] \
+      && func_warning "libobj name \`$libobj' may not contain shell special characters."
     objname=`$ECHO "X$obj" | $Xsed -e 's%^.*/%%'`
     xdir=`$ECHO "X$obj" | $Xsed -e 's%/[[^/]]*$%%'`
     if test "X$xdir" = "X$obj"; then