bug-gnulib
[Top][All Lists]
Advanced

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

Re: ld-output-def


From: Eric Blake
Subject: Re: ld-output-def
Date: Wed, 01 Apr 2009 08:43:45 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.21) Gecko/20090302 Thunderbird/2.0.0.21 Mnenhy/0.7.6.666

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

According to Simon Josefsson on 4/1/2009 8:14 AM:
> Thanks.  Is there some way to systematically find these?  A m4 code
> validator or similar?

Unfortunately, not that I know of.  So the best we can do is repeatedly
remind people to follow the autoconf rule of thumb: always provide one
layer of quoting around each argument to a macro, even when omitting the
quoting won't change the output, so that you establish a good habit and
don't get surprised by the cases where omitting the quoting causes early
macro expansion and knock-on problems.

> I don't understand this part, what possible bogus entry could the user
> supply that would cause
> 
>   AM_CONDITIONAL([HAVE_LD_OUTPUT_DEF], test "$gl_cv_ld_output_def" = "yes")
> 
> to fail?

gl_cv_ld_output_def=\( ./configure

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.

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

Eric Blake             address@hidden
-----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

iEYEARECAAYFAknTfZsACgkQ84KuGfSFAYAV8QCgs5xIYYyZynickejgVWu8I2/v
c0EAn3NXuvWUp4T74CsRx2sbg99LsmrL
=7R9+
-----END PGP SIGNATURE-----




reply via email to

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