[Top][All Lists]

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

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

From: Paolo Bonzini
Subject: Re: "The `-a', `-o', `(', and `)' operands are not portable": please clarify
Date: Fri, 07 Aug 2009 12:54:24 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1b3pre) Gecko/20090513 Fedora/3.0-2.3.beta2.fc11 Lightning/1.0pre Thunderbird/3.0b2

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.

If you write a script with

#! /bin/sh

then yes, you cannot program to _any_ standard. Autoconf 2.64 is now expecting that all systems have _somewhere in the PATH_ a POSIX shell, but that need not be /bin/sh.

If you use M4sh, then you have access to almost all useful functionality (e.g. shell functions). You also have wrappers to sanitize incompletely specified parts (e.g. AS_ECHO), to work around widely deployed bugs (e.g. AS_UNSET, or even in modern shells $LINENO which the Debian dash lacks), and to speed up execution when commonly found extensions enable it (e.g. AS_VAR_APPEND).


reply via email to

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