Re: GNOME CVS: libxslt kloczek
- From: James Henstridge <james daa com au>
- To: veillard redhat com
- Cc: kloczek cvs gnome org, gnome-hackers gnome org
- Subject: Re: GNOME CVS: libxslt kloczek
- Date: Mon, 16 Feb 2004 21:03:16 +0800
On 16/02/04 15:39, Daniel Veillard wrote:
There isn't even a bug number associated to the commit or a
description of the problem actually occuring.
While I don't agree with the way this change was made, it is something
that should be reviewed in all modules that install M4 macros for use by
other packages.
The problem is that failing to quote the first argument to AC_DEFUN()
can cause problems (ones that are difficult to debug if you aren't
expecting them). Automake 1.8 now checks for this condition because
they want to have the option of making changes in the future that might
trigger the bug in those macros.
The crux of the problem is what happens if a particular macro is defined
twice (eg. if the .m4 file got included twice in aclocal.m4 by
mistake). Consider the following code snippet:
AC_DEFUN(foo, bar)
AC_DEFUN(foo, bar)
This actually defines two macros: one that translates "foo" to "bar",
and the other that translates "bar" to "bar". This is because the first
argument in the second AC_DEFUN gets expanded (the errors are even more
cryptic if the macro has a more complicated body).
In comparison, the following snippet only defines a single "foo" ->
"bar" macro:
AC_DEFUN([foo], [bar])
AC_DEFUN([foo], [bar])
While you may not have received any bug reports about it (yet), it is
definitely good practice to quote the arguments to AC_DEFUN.
James.
--
Email: james daa com au
WWW: http://www.daa.com.au/~james/
_______________________________________________
gnome-hackers mailing list
gnome-hackers gnome org
http://mail.gnome.org/mailman/listinfo/gnome-hackers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]