-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Simon Josefsson on 4/1/2009 9:30 AM:
>> Even though Posix says this should silently return non-zero exit status,
>> some test implementations complain to stderr if the argument starts with
>> something that looks like an operator or option.  Hence, any time you are
>> validating the contents of a variable that can be set outside of your
>> control, you should always prefix it with x, to ensure that it doesn't
>> start with -, (, ), etc.
> 
> "test implementations"?  If there aren't any more widely deployed
> implementations out there that break (like irix, hpux or some other
> system that we do support), IMO it makes the code harder to read for no
> good reason and that we are better off making people stop use these test
> implementations.

test(1) is often a shell builtin.  And we support a wide variety of
shells, very many of which do not comply with POSIX.  For example, Solaris
/bin/sh.  This portability pitfall is documented in the autoconf manual.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAknTjWoACgkQ84KuGfSFAYAOvgCfVj7ysrMuv1AutZtGc1xsRLqS
J2IAoNKVgH/cvdxPJtaE4ZfX6wjLLqD/
=Z4gs
-----END PGP SIGNATURE-----


Reply via email to