[Top][All Lists]

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

Re: cwrapper generates long strings.

From: Peter Rosin
Subject: Re: cwrapper generates long strings.
Date: Fri, 01 Oct 2010 16:21:39 +0200
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20100915 Thunderbird/3.1.4

Den 2010-10-01 14:35 skrev Gary V. Vaughan:
> Hi Peter,
> On 1 Oct 2010, at 18:28, Peter Rosin wrote:
>> In my case the string is 3400+ characters which is too much for MSVC 6,
>> but this appears to not be really compiler specific, and I can easily
>> imagine other compilers with other arbitrary (and possibly standardized)
>> limits.
>> One thing that could be done is to only have the PATH once, but that is
>> not a real fix.
>> Should we worry about my insane case?  I didn't intend to have such a long
>> PATH, it has many duplicate entries due to repeated PATH="/foo:$PATH".
> Normalising PATH and not repeating it on the command line certainly can't
> do any harm... and will at least mitigate the probability of hitting your
> failure.  IMHO.

I'd say the time would be better spent fixing the real problem, because
there is no telling if normalizing and not repeating will have any effect

FWIW, I think this fixes it.  Is it too complex or should I make a proper


diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index 0418007..deeb02d 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -4268,9 +4268,17 @@ void lt_dump_script (FILE* f)
            func_emit_wrapper yes |
-              $SED -e 's/\([\\"]\)/\\\1/g' \
-                  -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
+             $SED -n -e 
+                     -e 's/\([\\"]\)/\\\1/g' \
+                     -e 's/$/\\n/' \
+                     -e 'h' \
+                     -e 's/\n.*//' \
+                     -e 's/^/  fputs ("/' \
+                     -e 's/$/", f);/p' \
+                     -e 'g' \
+                     -e 's/\\n$//' \
+                     -e 's/\\\([\\"]\)/\1/g' \
+                     -e 'D'
             cat <<"EOF"

reply via email to

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