Re: Re: fnmatch.c includes alloca.h conditionally?
Paul Eggert <[email protected]> Sun, 16 May 2004 22:44:54 -0700
| Newsgroups | gmane.comp.lib.gnulib.bugs,gmane.comp.version-control.cvs.bugs |
|---|---|
| Message-ID | <[email protected]> |
Derek Robert Price <[email protected]> writes: > It strikes me that this ties the alloca.m4 file and the alloca_.h > file rather tightly, maintenance-wise, That's already the case for alloca, and anyway is pretty much the tradition in gnulib these days. > 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. > 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 Yes, but that was a mild stylistic recommendation. The code works as-is; it's really up to Bruno (who maintains vansprintf.c). > 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.