Donn Terry <[EMAIL PROTECTED]> writes:
> I'm pretty sure that Solaris is POSIX conformant. However, the GNU
> assumption that /bin/sh is the one and only shell leads to a permanent
> deadlock. Vendors don't want to break user's existant shell scripts,
> and there are some corner cases in the Bourne shell that are not
> completely compatible with a POSIX shell. Thus, vendors who have taken
> this route will NEVER (OK... "never say never") replace the Bourne shell
> (as /bin/sh) with a POSIX shell. Thus, to the same degree of "never",
> we'll never be able to advance beyond the original Bourne shell.
Is this really that serious of a problem? autoconf has been making do
with even less than that for quite some time now.
> However, if we ask a different question: can we count on there being a
> POSIX shell by some name or other (and thus figure out how to find that)
> then I think there's a good chance that virtually all vendor systems
> have a shell supporting $() and functions.
The POSIX-compliant Bourne shell on a Solaris system is located in
/usr/xpg4/bin/sh and is part of an extra optional package. There is no
extra charge for this package, but it is also not part of a minimal OS
install and therefore some folks may not have it. (It's not installed
currently on any of my servers, which are currently capable of building
gcc.)
Of course, the assembler and linker are also not part of a minimal
install, and we could tell every site that wanted to build gcc that they
need to install the POSIX user utilities in order to do so. I currently
do install those additional packages specifically so that building and
using gcc will work and could potentially do the same for the XPG4 stuff.
I would, however, expect every operating system to require similar
knowledge like the above to find the POSIX shell, and that said shell may
not be installed by default and may require instructions to the
administrator on how to install extra packages. This strikes me as a
significant support headache, and while I can't judge how useful $() would
be in a particular situation, I really would be surprised to find that
it's worth it. It would seem to me like there would be available
workarounds, such as using temporary files, that may be slightly uglier
but far more portable.
--
Russ Allbery ([EMAIL PROTECTED]) <http://www.eyrie.org/~eagle/>