summaryrefslogtreecommitdiff
path: root/Zend/zend.h
diff options
context:
space:
mode:
Diffstat (limited to 'Zend/zend.h')
-rw-r--r--Zend/zend.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/Zend/zend.h b/Zend/zend.h
index aac08cc057..614d8614f7 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -74,6 +74,14 @@
# define ZEND_EXTENSIONS_SUPPORT 0
#endif
+#if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32))
+# define do_alloca(p) alloca(p)
+# define free_alloca(p)
+#else
+# define do_alloca(p) emalloc(p)
+# define free_alloca(p) efree(p)
+#endif
+
#if ZEND_DEBUG
#define ZEND_FILE_LINE_D char *__zend_filename, uint __zend_lineno
#define ZEND_FILE_LINE_DC , ZEND_FILE_LINE_D