#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;
# 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