-----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 e...@byu.net -----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-----