[Top][All Lists]

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

"The `-a', `-o', `(', and `)' operands are not portable": please clarif

From: Reuben Thomas
Subject: "The `-a', `-o', `(', and `)' operands are not portable": please clarify
Date: Tue, 4 Aug 2009 22:32:34 +0100

This assertion about the "test" command/shell built in occurs in the
node "Limitations of Builtins" in the autoconf manual, and puzzles me,
since the mentioned features are all mentioned in sh(1posix), i.e.
they have been in POSIX since at least 2001. I understand their use
being discouraged if they are not in POSIX 1990; the problem, as ever,
is that documentation of that standard is not widely available, which
is annoying as it is the latest pretty-much-ubiquitously-implemented
version of POSIX, and hence if one is really trying to write portable
code, it's the version you have to use. (I use Solaris documentation
as a rough-and-ready check, as Solaris seems by and large to implement
only POSIX 1990, but it too supports -a, -o and parentheses.)

What I'd like therefore is a rationale: if -a, -o and parentheses are
not in POSIX 1990, please say so; if there's some other reason, then
please give it, and it had better be a good one, because if one cannot
program to nearly 20-year-old standards, then I begin to wonder what
the point of prescriptive standards is at all; we may as well give up
and write descriptive standards instead.

Imagine someone who has only ever heard music once

reply via email to

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