Re: Re: fnmatch.c includes alloca.h conditionally?
Derek Robert Price <[email protected]> Mon, 17 May 2004 09:26:51 -0400
| Newsgroups | gmane.comp.lib.gnulib.bugs,gmane.comp.version-control.cvs.bugs |
|---|---|
| Organization | Ximbiot <http://ximbiot.com> |
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul Eggert wrote: >Derek Robert Price <[email protected]> writes: > >>Actually, that is a "#ifndef". Since IN_LIBINTL won't be defined in >>GNU applications, alloca.h _will_ be included. > > >But the code looks like this: > > #ifndef IN_LIBINTL > # include <alloca.h> > #endif > >which means that <alloca.h> _won't_ be included in GNU applications. Urm, I think we are having a communications difficulty. You specified here: <http://mail.gnu.org/archive/html/bug-gnulib/2004-05/msg00026.html> that IN_LIBINTL "shouldn't be defined in GNU applications". Unless my brain is playing new tricks on me, the double-negative of _not being defined in GNU applications_ and an _#ifndef IN_LIBINTL_ (_if not defined_) will cause alloca.h to be included in GNU applications. Thus it should be okay for vasnprintf to include alloca.h unconditionally and rely on HAVE_ALLOCA being set correctly, whether IN_LIBINTL or not. >>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? > > >Yes, that would also work, and perhaps be a bit more straightforward. >But again, it's up to Bruno. > >Similar stylistic cleanups are possible in argp too, now that >"#include <alloca.h>" always works (if you assume the alloca module). >I don't have time to pursue this right now, though. Patch attached. 2004-05-17 Derek R. Price <[email protected]> * lib/argp-help.c, lib/argp-parse.c: Assume <alloca.h> rather than freecoding. * modules/argp: Depend on alloca. Derek - -- *8^) Email: [email protected] 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 iD8DBQFAqL2aLD1OTBfyMaQRAvIjAJ9UxK+LFAKcHiwbjczFsrRSJjFgaQCgujhc +0WpYMQBtynY+NdncF8bNG4= =x3Df -----END PGP SIGNATURE-----