bug-libtool
[Top][All Lists]
Advanced

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

Re: cwrapper generates long strings.


From: Ralf Wildenhues
Subject: Re: cwrapper generates long strings.
Date: Sat, 2 Oct 2010 08:32:24 +0200
User-agent: Mutt/1.5.20 (2010-08-04)

Hi Peter,

* Peter Rosin wrote on Fri, Oct 01, 2010 at 11:22:54PM CEST:
> Subject: [PATCH] cwrapper: split long lines when dumping the wrapper script.
> 
> * libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src): If
> the wrapper script contains long lines, split them for
> readability and to conform with C standards.

OK with me with nits addressed.  I see this as a fairly straightforward
way to work around the issue; we can still think about following Chuck's
proposal in due course even with this in place.

Nit 1: testsuite exposure.  Should be fairly straightforward to set
  PATH=$PATH$PATH_SEPARATOR$PATH

a couple of times until long enough (but not too long so that
environment plus command line length already go over the limit), then
build a library and a program linked against it, covering the path that
failed for you, no?

Thanks,
Ralf

> --- a/libltdl/config/ltmain.m4sh
> +++ b/libltdl/config/ltmain.m4sh
> @@ -4268,9 +4268,14 @@ void lt_dump_script (FILE* f)
>  {
>  EOF
>           func_emit_wrapper yes |
> -              $SED -e 's/\([\\"]\)/\\\1/g' \
> -                -e 's/^/  fputs ("/' -e 's/$/\\n", f);/'
> -
> +           $SED -n -e '
> +s/^\(.\{79\}\)\(..*\)/\1\n\2/

\n is portable only in the regex part, but not in the replacement part.
For that you need backslash then literal newline.

> +h
> +s/\([\\"]\)/\\\1/g
> +s/$/\\n/
> +s/\([^\n]*\).*/  fputs ("\1", f);/p

Why not above, right after h, do s/\n.*// and then simplify this s
command?

> +g
> +D'
>              cat <<"EOF"
>  }
>  EOF



reply via email to

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