[svn-commits] file: trunk r89396 - /trunk/include/asterisk/compat.h
SVN commits to the Digium repositories
svn-commits at lists.digium.com
Sun Nov 18 11:01:41 CST 2007
Author: file
Date: Sun Nov 18 11:01:41 2007
New Revision: 89396
URL: http://svn.digium.com/view/asterisk?view=rev&rev=89396
Log:
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.
Modified:
trunk/include/asterisk/compat.h
Modified: trunk/include/asterisk/compat.h
URL: http://svn.digium.com/view/asterisk/trunk/include/asterisk/compat.h?view=diff&rev=89396&r1=89395&r2=89396
==============================================================================
--- trunk/include/asterisk/compat.h (original)
+++ trunk/include/asterisk/compat.h Sun Nov 18 11:01:41 2007
@@ -52,9 +52,14 @@
#endif
#ifdef HAVE_ALLOCA_H
-#include <alloca.h> /* not necessarily present - could be in stdlib */
-#elif defined(HAVE_ALLOCA)
-#include <malloc.h> /* see if it is here... */
+#include <alloca.h>
+#elif defined(__GNUC__)
+#define alloca __builtin_alloca
+#elif defined(_AIX)
+#define alloca __alloca
+#elif defined(_MSC_VER)
+#include <malloc.h>
+#define alloca _alloca
#endif
#include <stdio.h> /* this is always present */
More information about the svn-commits
mailing list