]> granicus.if.org Git - php/commitdiff
<alloca.h> needs to be included before we define macros calling alloca()
authorThies C. Arntzen <thies@php.net>
Sun, 26 Mar 2000 14:46:25 +0000 (14:46 +0000)
committerThies C. Arntzen <thies@php.net>
Sun, 26 Mar 2000 14:46:25 +0000 (14:46 +0000)
atleast using SGI's cc - should not harm other platforms (i hope)

Zend/zend.h
Zend/zend_execute.c

index bce477c0067ca297f5484cdd299bd20f28cbe689..c47c2562926359186675b575a50c3656934b348e 100644 (file)
 # define ZEND_EXTENSIONS_SUPPORT       0
 #endif
 
+#if defined(HAVE_ALLOCA) && defined(HAVE_ALLOCA_H)
+# include <alloca.h>
+#endif
+
 #if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32))
-#      define do_alloca(p) alloca(p)
-#      define free_alloca(p)
+# define do_alloca(p) alloca(p)
+# define free_alloca(p)
 #else
-#      define do_alloca(p)             emalloc(p)
-#      define free_alloca(p)   efree(p)
+# define do_alloca(p)          emalloc(p)
+# define free_alloca(p)        efree(p)
 #endif
 
 #if ZEND_DEBUG
index 1986e1c43a4eb0b88a430b98399d4c27656ec10a..5764937db2e38d9589e3669d6dfdd35ce41e8923 100644 (file)
 #include "zend_fast_cache.h"
 #include "zend_execute_locks.h"
 
-#if defined(HAVE_ALLOCA) && defined(HAVE_ALLOCA_H)
-# include <alloca.h>
-#endif
-
 #define get_zval_ptr(node, Ts, should_free, type) _get_zval_ptr(node, Ts, should_free ELS_CC)
 #define get_zval_ptr_ptr(node, Ts, type) _get_zval_ptr_ptr(node, Ts ELS_CC)