bug-cvs
[Top][All Lists]
Advanced

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

Re: [Bug-gnulib] Re: fnmatch.c includes alloca.h conditionally?


From: Derek Robert Price
Subject: Re: [Bug-gnulib] Re: fnmatch.c includes alloca.h conditionally?
Date: Wed, 05 May 2004 16:56:47 -0400
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040413

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

Paul Eggert wrote:

>Derek Robert Price <address@hidden> writes:
>
>>Mostly this looks great to me, but you left out the HAVE_ALLOCA
>>definitions from my patch.  I've attached a revised version.
>
>
>Sorry, I neglected that.  However, wouldn't it be better to define
>HAVE_ALLOCA in config.h, where most other code expects it?  It's a
>small point, but I'd rather have HAVE_ALLOCA be a configure-time
>setting.  The patch proposed below does this.


I don't have a problem with that.  It strikes me that this ties the
alloca.m4 file and the alloca_.h file rather tightly,
maintenance-wise, but I don't have a better solution that answers both
concerns.

>>The revised version also updates vasnprintf.c to include <alloca.h>
>>unconditionally (its module is listed as dependent on the alloca
>>module already).  This way, vasnprintf can have HAVE_ALLOCA defined
>>properly relative to Bruno's concerns about only using alloca when
>>it is a built-in & fast.
>
>
>Your patch didn't include any changes to vasnprintf.c.  


Sorry, it wasn't necessary.  I had misread #ifndef IN_LIBINTL as
#ifdef IN_LIBINTL, as you appear to have below.  It might still be
desirable, however - see below.

>However, is
>such a change needed?  Its #include <alloca.h> is conditional only on
>"#ifndef IN_LIBINTL", and IN_LIBINTL shouldn't be defined in GNU
>applications.


Actually, that is a "#ifndef".  Since IN_LIBINTL won't be defined in
GNU applications, alloca.h _will_ be included.

You yourself commented that it was odd that <alloca.h> was included
dependant on IN_LIBINTL and then the use of alloca() only switched on
HAVE_ALLOCA here:

http://mail.gnu.org/archive/html/bug-gnulib/2004-04/msg00063.html

Could we change the switch to #ifdef HAVE_ALLOCA_H and assume that
HAVE_ALLOCA_H will be defined or undefined properly, even when
IN_LIBINTL is defined?

Derek

- --
                *8^)

Email: address@hidden

Get CVS support at <http://ximbiot.com>!
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAmVUOLD1OTBfyMaQRAhxFAKCqEyOIlALah/TaxZtBkjVNB4AP1gCfRsN6
XKqIXwdggpOB6vPTV4XZkNM=
=X1R9
-----END PGP SIGNATURE-----





reply via email to

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