bug-autoconf
[Top][All Lists]
Advanced

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

Re: Problem with autoconf 2.57?


From: David Corlette
Subject: Re: Problem with autoconf 2.57?
Date: Mon, 20 Oct 2003 14:39:08 -0400

Hmm...it gets more subtle than that.  What I don't understand exactly 
is that you don't have your sed command quoted, e.g. I would expect 
that you would need to do:
sed 'y/l/p/;s/e/i/g'
to prevent the shell from interpreting the ';' as a "end of shell 
command" character, and the s/e/i/g as a new shell command.

E.g. on QNX, OpenBSD 3.3, and Linux I get the following (identical) 
results:
$ echo "hello" | sed y/l/p/;s/e/i/g
heppo
ksh: s/e/i/g: not found
$ echo "hello" | sed -e y/l/p/ -e s/e/i/g
hippo

But I'm not sure that's the problem, exactly, since I assume that 
configure works under Linux and OpenBSD.  Is there some magic quoting 
going on that I don't know about?

Oddly, I get the results:
$ echo "hello" | sed 'y/l/p/;s/e/i/g' 
hippo
under OpenBSD and Linux, but
$ echo "hello" | sed 'y/l/p/;s/e/i/g' 
heppo
under QNX (which I suspect is the result I'm seeing in the ntpd 
compile).

Then, to be completely weird, I get:
# echo "hello" | sed 's/e/i/g;y/l/p/'       
hippo

So suffice it to say that although I don't understand the quoting, 
QNX's sed clearly has a bug, in that one ordering of the same 
commands works but the other doesn't.  Sigh.

Thanks for your time...

On 20 Oct 2003 at 9:45, Paul Eggert wrote:

> address@hidden writes:
> 
> > there is no mention of using ';' as a separator for sed commands.
> 
> Hmm, the formal specification for 'sed' says:
> 
>   Command verbs other than {, a, b, c, i, r, t, w, :, and # can be
>   followed by a semicolon, optional <blank>s, and another command
>   verb.
> 
>   -- <http://www.opengroup.org/onlinepubs/007904975/utilities/sed.html>
> 
> If your 'sed' doesn't do that, it's not conforming to the standard.
> I suppose that Autoconf should try to port around the bug, but it's
> probably nontrivial; in the mean time, could you please send a bug
> report to the maintainers of QNX 'sed'?  Thanks.  Or perhaps you could
> port GNU 'sed' to your host and use that.
> 
> I don't like the ' -e ' solution due to quoting problems.  Does it
> work to replace the semicolon with a newline instead?


                                 Dave C

---------------------------------------------------------
David Corlette          mailto:address@hidden
(617)495-5922           http://www.arp.harvard.edu





reply via email to

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