summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Zend/zend_alloc.h2
-rw-r--r--Zend/zend_portability.h4
2 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h
index f76494e0d4..6c12b4247d 100644
--- a/Zend/zend_alloc.h
+++ b/Zend/zend_alloc.h
@@ -84,7 +84,7 @@ ZEND_API size_t ZEND_FASTCALL _zend_mem_block_size(void *ptr ZEND_FILE_LINE_DC Z
#include "zend_alloc_sizes.h"
/* _emalloc() & _efree() specialization */
-#if !ZEND_DEBUG && !defined(_WIN32)
+#if !ZEND_DEBUG && defined(HAVE_BUILTIN_CONSTANT_P)
# define _ZEND_BIN_ALLOCATOR_DEF(_num, _size, _elements, _pages, x, y) \
ZEND_API void* ZEND_FASTCALL _emalloc_ ## _size(void) ZEND_ATTRIBUTE_MALLOC;
diff --git a/Zend/zend_portability.h b/Zend/zend_portability.h
index 57080ca7b7..8c6989d030 100644
--- a/Zend/zend_portability.h
+++ b/Zend/zend_portability.h
@@ -246,6 +246,10 @@ char *alloca();
# define HAVE_ATTRIBUTE_WEAK
#endif
+#if ZEND_GCC_VERSION >= 3001 || __has_builtin(__builtin_constant_p)
+# define HAVE_BUILTIN_CONSTANT_P
+#endif
+
#if ZEND_DEBUG
# define zend_always_inline inline
# define zend_never_inline