From ba53c29261baa1f1c8a6f2cedbc6f755183d42d2 Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Sun, 18 Nov 2012 13:42:48 +0000 Subject: [PATCH] E17: update alloca detection SVN revision: 79427 --- src/bin/e.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/src/bin/e.h b/src/bin/e.h index ec3c61468..919d3fb01 100644 --- a/src/bin/e.h +++ b/src/bin/e.h @@ -24,22 +24,31 @@ # define _FILE_OFFSET_BITS 64 # endif -# ifdef HAVE_ALLOCA_H -# include -# elif defined __GNUC__ +#ifdef STDC_HEADERS +# include +# include +#else +# ifdef HAVE_STDLIB_H +# include +# endif +#endif +#ifdef HAVE_ALLOCA_H +# include +#elif !defined alloca +# ifdef __GNUC__ # define alloca __builtin_alloca # elif defined _AIX # define alloca __alloca # elif defined _MSC_VER # include # define alloca _alloca -# else -# include +# elif !defined HAVE_ALLOCA # ifdef __cplusplus extern "C" # endif -void *alloca(size_t); +void *alloca (size_t); # endif +#endif # ifdef __linux__ # include