Re: GNOME CVS: libxslt kloczek



On Mon, Feb 16, 2004 at 09:03:16PM +0800, James Henstridge wrote:
> 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 

  Yup, that was my main issue.

> 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.

  I already had some related changes done for libxml2, seems in general
automake 1.8 is complaining a lot when I build stuff on the Fedora Core 2
beta. I'm not against having those fixed, just the opposite :-), but
if we need a global review/fix maybe the best is to try to write a 
script doing those escaping (no I do not volunteer :-) sounds like a job
for a perl hacker).

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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