bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] nl_langinfo: avoid configure-time syntax error


From: Ralf Wildenhues
Subject: Re: [PATCH] nl_langinfo: avoid configure-time syntax error
Date: Wed, 6 Jan 2010 07:29:46 +0100
User-agent: Mutt/1.5.20 (2009-10-28)

Hello,

* Jim Meyering wrote on Tue, Jan 05, 2010 at 07:09:57PM CET:
> Paolo Bonzini wrote:
> > On 01/04/2010 03:03 PM, Jim Meyering wrote:
> >> However, it would be far better if AC_CHECK_FUNCS_ONCE
> >> were to expand to e.g., ":" rather than the empty string,
> >> so that it can be used unadorned in situations like the above.
> >> Otherwise, it looks like a pitfall designed to trap the uninitiated.
> >>
> >> Bruno, ok to apply?
> >
> > No, AC_CHECK_FUNCS_ONCE should _always_ expand to an empty string.
> > The test is done always---and it is done outside the macro.  It's
> > clearer to do as in the attached patch.  Bruno, is this okay?

> Your proposed version is both more concise and more readable.
> One might regret however that when the test is performed here,
> it is wasted effort on systems lacking langinfo.h.
> Considering that the penalty is incurred only on losing systems,
> this seems like a clear improvement.

I think there is a misunderstanding here.  It doesn't matter where you
invoke AC_CHECK_FUNCS_ONCE([foo]), the function foo will always be
checked, unconditionally, and early in the configure script, far away
from the expansion of the rest of the gl_FUNC_NL_LANGINFO code.  Paolo's
change doesn't change those semantics at all, this is a feature of
AC_CHECK_FUNCS_ONCE.  The other *_ONCE macros work similarly.

Cheers,
Ralf




reply via email to

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