On 12/20/2012 02:51 AM, Patrick Welche wrote: > Having seen the message that a release might be imminent, I had a look > at the patches for autoconf in > http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/autoconf/patches > > so the attached might want to go in... >
> +++ b/lib/autoconf/functions.m4 > @@ -384,6 +384,8 @@ AC_CACHE_CHECK([for alloca], ac_cv_func_alloca_works, > # ifdef _MSC_VER > # include <malloc.h> > # define alloca _alloca > +# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) > || defined(__OpenBSD__) > +# include <stdlib.h> Does it harm things to unconditionally include <stdlib.h> even on non-BSD platforms? If not, that would be a simpler solution. Furthermore, I'm reluctant to patch this without also patching the documentation to match, where we currently suggest: #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include <stdlib.h> #endif #include <stddef.h> #ifdef HAVE_ALLOCA_H # include <alloca.h> #elif !defined alloca # ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _AIX # define alloca __alloca # elif defined _MSC_VER # include <malloc.h> # define alloca _alloca # elif !defined HAVE_ALLOCA # ifdef __cplusplus extern "C" # endif void *alloca (size_t); # endif #endif Or maybe the problem is that our test for ac_cv_func_alloca_works doesn't match the documentation, since it is only doing: #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include <malloc.h> # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include <alloca.h> # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature