braced variable expansion in here documents (was: non portable sed scripts)

2006-05-25 Thread Ralf Wildenhues
Hi Paul, * Paul Eggert wrote on Wed, May 24, 2006 at 01:32:18AM CEST: Ralf Wildenhues [EMAIL PROTECTED] writes: I hope we get away with this. I don't think we will, since the bug occurs every 1024 bytes, and many define.sed scripts are longer than that. I installed this patch, which

Re: non portable sed scripts

2006-05-25 Thread Tim Rice
On Tue, 23 May 2006, Paul Eggert wrote: I installed this patch, which works around this particular problem by not using shell expansion at all in the here-documents used to create defines.sed. However, other instances of this problem lurk in AC_LANG_SOURCE(C), _AC_INIT_HELP, _AC_DEFINE_Q,

Re: non portable sed scripts

2006-05-23 Thread Ralf Wildenhues
[ Cc:ing bug-autoconf again ] * Tim Rice wrote on Tue, May 23, 2006 at 04:13:34AM CEST: On Mon, 22 May 2006, Ralf Wildenhues wrote: Next I tried CONFIG_SHELL=/bin/sh /bin/sh \ /opt/src/gnu/coreutils-5.95/configure \ CONFIG_SHELL=/bin/sh Again a valid config.h and

Re: non portable sed scripts

2006-05-23 Thread Stepan Kasal
Hello, On Tue, May 23, 2006 at 10:43:22AM +0200, Ralf Wildenhues wrote: | s,^\([ ]*#[]*\)[^ ]*\([ ][ ]*HAVE_DECL_NANOSLEEP\)[ (].*$,\1define\2 0 , | s,^\([ ]*#[]*\)[^ ]*\([ ][ ]*HAVE_DECL_REALLOC\)[ (].*$,\1define\2 1 , | s,^\([ ]*#[

Re: non portable sed scripts

2006-05-23 Thread Stepan Kasal
Hello, On Tue, May 23, 2006 at 02:33:42PM +0200, Stepan Kasal wrote: you are so bright, Ralf! this doesn't sound nice, I'm afraid. I wanted to say that it was realy clever to notice that | s,^\([ ]*#[]*\)[^ ]*\([ ][ ]*HAVE_DECL_STPCPY\)[ (].*$,\1define\2 0 , |

Re: non portable sed scripts

2006-05-23 Thread Paul Eggert
Ralf Wildenhues [EMAIL PROTECTED] writes: the 2.59 shell selection algorithm would probably(?) have selected /bin/sh as shell, whereas, due to changes we did because of OSF, /usr/bin/posix/sh is preferred now. Ouch. Good catch. I hope we get away with this. I don't think we will, since

Re: non portable sed scripts

2006-05-22 Thread Tim Rice
On Mon, 22 May 2006, Ralf Wildenhues wrote: Well, my guess is still that (at least one sed on) UnixWare has similar issues, but I have no idea whether this UnixWare has several sed implementations, and one of them is usable, or whether it is common to have GNU sed as add-on installed and in

Re: non portable sed scripts

2006-05-22 Thread Tim Rice
On Sun, 21 May 2006, Paul Eggert wrote: Switching to awk sounds like a win to me, as awk is more expressive than sed is. In the old days this would have been problematic due to the incompatibilities between traditional and POSIX Awk, but nowadays we can assume an almost-POSIX-complaint awk,

Re: non portable sed scripts

2006-05-19 Thread Ralf Wildenhues
Hi Tim, * Tim Rice wrote on Fri, May 19, 2006 at 06:57:48PM CEST: Autoconf version 2.59c I had an opportunity to run a configure script generated with 2.59c (ftp://ftp.gnu.org/gnu/coreutils/coreutils-5.95.tar.gz) and found that it failed. config.status: creating config.h UX:sed: ERROR:

Re: non portable sed scripts

2006-05-19 Thread Ralf Wildenhues
* Ralf Wildenhues wrote on Fri, May 19, 2006 at 08:37:06PM CEST: * Tim Rice wrote on Fri, May 19, 2006 at 06:57:48PM CEST: Autoconf version 2.59c config.status: creating config.h UX:sed: ERROR: Command garbled: HAVE_DECL_STRNDUP\)[ (].*$,\1define\2 0 , I'm pretty sure the

Re: non portable sed scripts

2006-05-19 Thread Paul Eggert
Thanks for the bug report. I suspect that the sed usage is portable but that we are running into some limitation of your 'sed' implementation. Here is some further information that you can send that will help us debug this. (I don't have access to your platform so I can't debug the problem

Re: non portable sed scripts

2006-05-19 Thread Paul Eggert
Ralf Wildenhues [EMAIL PROTECTED] writes: We check the 99 commands limit, but not the [4000] characters limit any more... :-/ But the 4000-character limit is documented by Autoconf to be a limit on the length of lines of sed's input data, not a limit on the total size of the sed script.