[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: braced variable expansion in here documents
From: |
Ralf Wildenhues |
Subject: |
Re: braced variable expansion in here documents |
Date: |
Thu, 25 May 2006 10:49:07 +0200 |
User-agent: |
Mutt/1.5.11+cvs20060403 |
Hi Paul,
* Paul Eggert wrote on Thu, May 25, 2006 at 10:37:11AM CEST:
> Ralf Wildenhues <address@hidden> writes:
>
> > So I propose the following doc patch (last attachment).
>
> Looks fine, thanks. You might want to add version numbers. I
> confirmed that the dtksh bug still exists in Solaris 10.
Thanks. Applied as follows.
Cheers,
Ralf
* doc/autoconf.texi (Here-Documents): We now know more about
the variable expansion in here documents bug.
Thanks to Tim Rice and Stepan Kasal.
Index: doc/autoconf.texi
===================================================================
RCS file: /cvsroot/autoconf/autoconf/doc/autoconf.texi,v
retrieving revision 1.1022
diff -u -r1.1022 autoconf.texi
--- doc/autoconf.texi 25 May 2006 07:39:58 -0000 1.1022
+++ doc/autoconf.texi 25 May 2006 08:47:47 -0000
@@ -10748,13 +10748,14 @@
Many older shells (including the Bourne shell) implement here-documents
-inefficiently. And some shells mishandle large here-documents: for
-example, Solaris @command{dtksh}, which is derived from Korn shell
-version M-12/28/93d, mishandles variable expansion that occurs on
-1024-byte buffer boundaries within a here-document. Users can generally
-fix these problems by using a faster or more reliable shell, e.g., by
-using the command @samp{CONFIG_SHELL=/bin/bash /bin/bash ./configure} rather
-than plain @samp{./configure}.
+inefficiently. And some shells mishandle large here-documents: for example,
+Solaris 10 @command{dtksh} and the UnixWare 7.1.1 Posix shell, which are
+derived from Korn shell version M-12/28/93d, mishandle braced variable
+expansion @address@hidden@}} that crosses a 1024- or 4096-byte buffer boundary
+within a here-document. If the closing brace does not lie on the boundary,
+the failure is silent and the variable expansion will be empty, otherwise
+the shell will report a bad substitution. This bug can usually be worked
+around by omitting the braces: @code{$var}.
Some shells can be extremely inefficient when there are a lot of
here-documents inside a single statement. For instance if your
- Re: non portable sed scripts, (continued)
- Re: non portable sed scripts, Paul Eggert, 2006/05/22
- Re: non portable sed scripts, Paul Eggert, 2006/05/23
- Re: non portable sed scripts, Tim Rice, 2006/05/23
- Re: non portable sed scripts, Stepan Kasal, 2006/05/23
- Re: non portable sed scripts, Ralf Wildenhues, 2006/05/23
- Re: non portable sed scripts, Tim Rice, 2006/05/23
Re: non portable sed scripts, Ralf Wildenhues, 2006/05/23
Re: non portable sed scripts, Paul Eggert, 2006/05/23
Re: braced variable expansion in here documents, Ralf Wildenhues, 2006/05/25
Re: non portable sed scripts, Tim Rice, 2006/05/25
Re: non portable sed scripts, Ralf Wildenhues, 2006/05/23