On 09/14/2012 07:24 AM, Thomas Klausner wrote: > Hi! > > Jörg Sonnenberger added the attached patch to the autoconf package in > pkgsrc in 2010; it seems the patch still isn't integrated, so I > thought I'd send it upstream. > > The commit message was: AC_FUNC_ALLOCA should never define a prototype > on the BSDs. (The patch comment is "Do not fall through to the > implicit prototype as it conflicts with stdlib.h.") > > Please include it in the next release.
Thanks for reporting this. However, it needs tweaking before it can be applied... > @@ -369,6 +369,8 @@ AC_CACHE_CHECK([for alloca], ac_cv_func_ > # ifdef _MSC_VER > # include <malloc.h> > # define alloca _alloca > +# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) > || defined(__OpenBSD__) > +# include <stdlib.h> The autoconf philosophy is to avoid system-specific defines, and instead test features. I would rather do one of two things - identify the specific feature (that is, write a test that fails if <stdlib.h> is not included, and define something like FUNC_ALLOCA_REQUIRES_STDLIB), or make the use of <stdlib.h> unconditional (does it hurt any other platform, other than the possibility of namespace pollution?). Also, I'm worried that there is some matching documentation that will need touching up. Can you please investigate these two points, and resubmit the patch accordingly? -- Eric Blake ebl...@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature