From 7400439ca591586f023626368f0e1c52685b039f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Niels=20M=C3=B6ller?= Date: Tue, 3 Jul 2012 22:43:56 +0200 Subject: [PATCH] Include malloc.h if available, also when compiling with gcc. --- ChangeLog | 4 ++++ aclocal.m4 | 5 +++++ 2 files changed, 9 insertions(+) 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 ])]) -- 2.47.2