autoconf
[Top][All Lists]
Advanced

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

Re: Portability problems of "Usual Tools" not described in manual


From: Russ Allbery
Subject: Re: Portability problems of "Usual Tools" not described in manual
Date: Tue, 17 Mar 2009 10:10:13 -0700
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Eric Blake <address@hidden> writes:
> According to Russ Allbery on 3/12/2009 10:32 PM:

>> 2. On HP-UX 11.23, regexp matching with expr does not allow multiple sub-
>>    expressions:
>> 
>>      bash-3.1$ expr 'Xfoo' : 'X\(f\(oo\)*\)$'
>>      expr: More than one '\(' was used.

> Ouch.  I don't have access to HP-UX to verify, but this means we need to
> audit autoconf source to make sure we don't violate this restriction.

I unfortunately have no access to HP-UX any more either and hence can't
confirm this one.

>> 3. On GNU/Linux the regexp "$", when used with older versions of expr,
>>    matches newlines embedded in the match string:
>> 
>>      bash-3.1$ baz='foo
>>      > bar'
>>      bash-3.1$ expr "X$baz" : 'X\(foo\)$' || echo baz
>>      foo
>
> I'm assuming this was from an older version of coreutils?  Can someone
> determine 'expr --version' in the broken case, to see when it was fixed?

address@hidden:~$ baz='foo
> bar'
address@hidden:~$ expr "X$baz" : 'X\(foo\)$' || echo baz
foo
address@hidden:~$ expr --version
expr (GNU coreutils) 5.2.1

exodus:~> bash
address@hidden:~$ baz='foo
> bar'
address@hidden:~$ expr "X$baz" : 'X\(foo\)$' || echo baz
foo
address@hidden:~$ expr --version
expr (GNU coreutils) 5.97

address@hidden:~$ baz='foo
> bar'
address@hidden:~$ expr "X$baz" : 'X\(foo\)$' || echo baz

baz
address@hidden:~$ expr --version
expr (GNU coreutils) 6.10

There's no mention that I can find in the coreutils NEWS file, though, in
a quick search for "expr".

-- 
Russ Allbery (address@hidden)               <http://www.eyrie.org/~eagle/>




reply via email to

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