From: Niels Möller Date: Tue, 3 Jul 2012 20:43:56 +0000 (+0200) Subject: Include malloc.h if available, also when compiling with gcc. X-Git-Tag: nettle_2.5_release_20120707~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7400439ca591586f023626368f0e1c52685b039f;p=thirdparty%2Fnettle.git Include malloc.h if available, also when compiling with gcc. --- diff --git a/ChangeLog b/ChangeLog index 86d69fe7..d021b322 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2012-07-03 Niels Möller + * aclocal.m4 (LSH_FUNC_ALLOCA): In the config.h boilerplate, + include malloc.h if it exists, also when compiling with gcc. + Needed for cross-compiling with --host=i586-mingw32msvc. + * examples/base16dec.c: Don't #include files using , we don't want to pick up installed versions. * examples/base16enc.c: Likewise. diff --git a/aclocal.m4 b/aclocal.m4 index d2915e9e..a94c20d3 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -369,6 +369,11 @@ char *alloca (); #else /* defined __GNUC__ */ # if HAVE_ALLOCA_H # include +# else +/* Needed for alloca on windows, also with gcc */ +# if HAVE_MALLOC_H +# include +# endif # endif #endif ])])