From: Joshua Colp Date: Sun, 18 Nov 2007 17:01:41 +0000 (+0000) Subject: Change how we handle alloca to conform with how it is suggested in the autoconf manua... X-Git-Tag: 1.6.0-beta1~3^2~787 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5adb2b2b0693664a7d1e6b463972ae1da99f5775;p=thirdparty%2Fasterisk.git Change how we handle alloca to conform with how it is suggested in the autoconf manual for AC_FUNC_ALLOCA. FreeBSD 6 now builds again and no other platforms should be broken by this. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89396 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/include/asterisk/compat.h b/include/asterisk/compat.h index ced14fc41b..0dd3685d61 100644 --- a/include/asterisk/compat.h +++ b/include/asterisk/compat.h @@ -52,9 +52,14 @@ #endif #ifdef HAVE_ALLOCA_H -#include /* not necessarily present - could be in stdlib */ -#elif defined(HAVE_ALLOCA) -#include /* see if it is here... */ +#include +#elif defined(__GNUC__) +#define alloca __builtin_alloca +#elif defined(_AIX) +#define alloca __alloca +#elif defined(_MSC_VER) +#include +#define alloca _alloca #endif #include /* this is always present */