This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] libjava: avoid using escape sequence with undefined behaviour in echo


On Tue, Sep 20, 2005 at 09:52:11AM +0200, Matthias Klose wrote:
> Paolo Bonzini writes:
> > I'm sorry for having put out a false claim.  I should have read the 
> > standard.  However, this undefined behavior apparently rules out ash 
> > from running configure
> > 
> >      sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
> >            /^X\(\/\/\)[^/].*/{ s//\1/; q; }
> >            /^X\(\/\/\)$/{ s//\1/; q; }
> >            /^X\(\/\).*/{ s//\1/; q; }
> >            s/.*/./; q'
> > 
> > (no I don't want to know what this does).
> 
> no, it does not, because it doesn't use \1 in an argument to the *echo*
> builtin.

Though, for the record, there's a fair bit of funky code in configure
scripts related to backslashes which doesn't work in ash.  IIRC, you
can't use a sed script argument to --program-transform-name which
contains backslashes, in ash, and get the arguments to come out right. 
Or maybe it was "which contains whitespace".

-- 
Daniel Jacobowitz
CodeSourcery, LLC


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]