This is the mail archive of the
mailing list for the GCC project.
Re: [JAVA] /bin/sh portability issues in gen-classlist.sh.in
* Andrew Pinski wrote on Sat, Jul 08, 2006 at 02:57:26AM CEST:
> On Jul 6, 2006, at 9:10 PM, Roger Sayle wrote:
> >The first pair of issues is in libjava/classpath/lib/gen-
> >which uses test's "-ef" and "-e" operators which aren't available on
> >Solaris. Many thanks to Ian Lance Taylor for recommending the more
> >portable idiom used below.
> Actually they are available on Solaris, just not with the builtin
> inside /bin/sh. This is just one reason why /bin/sh should not be
> used. We do document that we require a real POSIX shell and /bin/sh
> is not complaint in other ways, this is just one.
AFAIK 'test -ef' is not POSIX. It's mentioned in SUSv3 as 'considered
in an early proposal' but then rejected because of the non-presence in
historical sh implementations.
(This is not to say that your argument against sh on Solaris isn't
valid. I simply haven't yet had a chance to look into the bugs it
causes elsewhere in the install.)