This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: user hostile gobbledygook in top level Makefile
On Nov 23, 2000, Bill Wendling <wendling@ncsa.uiuc.edu> wrote:
> I wasn't aware that -z wasn't portable.
From the CVS autoconf manual:
Contrary to a common belief, @samp{test -n @var{string}} and @samp{test
-z @var{string}} @strong{are} portable, nevertheless many shells (such
as Solaris 2.5, AIX 3.2, UNICOS 10.0.0.6, Digital Unix 4 etc.) have
bizarre precedence and may be confused if @var{string} looks like an
operator:
@example
$ test -n =
test: argument expected
@end example
If there are risks, use @samp{test "x@var{string}" = x} or @samp{test
"x@var{string}" != x} instead.
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me