libtool-patches
[Top][All Lists]
Advanced

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

Re: test && test --> test -a


From: Kevin Ryde
Subject: Re: test && test --> test -a
Date: 05 Dec 2001 08:41:13 +1000
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5

"Tim Van Holder" <address@hidden> writes:
> 
> I do seem to recall either the autoconf docs, or the GNU coding
> standards saying many options to test are highly unportable, -a being
> one of the more benign (though still not technically portable),

For what it's worth, autoconf says the following.  (Oh, but is this
saying POSIX doesn't specify -a and -o at all, or only that it doesn't
specify their precedence?)

     If you need to make multiple checks using `test', combine them with
     the shell operators `&&' and `||' instead of using the `test'
     operators `-a' and `-o'.  On System V, the precedence of `-a' and
     `-o' is wrong relative to the unary operators; consequently, POSIX
     does not specify them, so using them is nonportable.  If you
     combine `&&' and `||' in the same statement, keep in mind that
     they have equal precedence.



reply via email to

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