libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Add func_append_quoted and do inline func_append substitutio


From: Ralf Wildenhues
Subject: Re: [PATCH] Add func_append_quoted and do inline func_append substitutions.
Date: Tue, 3 Aug 2010 21:52:34 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

* Peter Rosin wrote on Thu, Jul 01, 2010 at 07:38:45PM CEST:
> Den 2010-06-28 01:24 skrev Gary V. Vaughan:
> >@@ -704,15 +710,14 @@ func_mode_compile ()
> >       save_ifs="$IFS"; IFS=','
> >       for arg in $args; do
> >         IFS="$save_ifs"
> >-        func_quote_for_eval "$arg"
> >-        lastarg="$lastarg $func_quote_for_eval_result"
> >+        func_append lastarg " $arg"
> >       done
> >       IFS="$save_ifs"
> >       func_stripname ' ' '' "$lastarg"
> 
> Oh, and this look suspicious...
> 
> s/func_append/func_append_quoted/ ?

A change like you suggested was apparently done in v2.2.10-49-gc13532a,
but it is not right.  The quoting may not extend to the added space.

This causes the compile failure reported in
<http://lists.gnu.org/archive/html/bug-libtool/2010-08/msg00003.html>.

I'm fixing the issue as follows.  I'm seeing lots more testsuite
failures in the quoting section part with AIX and FreeBSD shells
though ...

Cheers,
Ralf

    Fix build failure with AIX sh due to shell quoting error.
    
    * libltdl/config/ltmain.m4sh (func_append_quoted): Document
    that this function inserts a separator space.
    (func_mode_compile): Do not pass extra space here.
    Fixes regression introduced in v2.2.10-49-gc13532a.
    Report by Rainer Tammer.

diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 897a5e8..193ff1a 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -157,7 +157,8 @@ func_append ()
 } # func_append may be replaced by extended shell implementation
 
 # func_append_quoted var value
-# Quote VALUE and append to the end of shell variable VAR.
+# Quote VALUE and append to the end of shell variable VAR, separated
+# by a space.
 func_append_quoted ()
 {
     func_quote_for_eval "${2}"
@@ -710,7 +711,7 @@ func_mode_compile ()
          save_ifs="$IFS"; IFS=','
          for arg in $args; do
            IFS="$save_ifs"
-           func_append_quoted lastarg " $arg"
+           func_append_quoted lastarg "$arg"
          done
          IFS="$save_ifs"
          func_stripname ' ' '' "$lastarg"



reply via email to

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