From: Anatol Belski Date: Wed, 29 May 2019 00:40:09 +0000 (+0200) Subject: Fix conditional compilation X-Git-Tag: php-7.4.0alpha1~167 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=08a0030b33a46849ddda8bd962a6b05db0750c4a;p=php Fix conditional compilation The new symbols are shared and don't need to depend on the availability of __builtin_constant_p. --- diff --git a/Zend/zend_alloc.c b/Zend/zend_alloc.c index 79b6640cbf..9c081477d0 100644 --- a/Zend/zend_alloc.c +++ b/Zend/zend_alloc.c @@ -2373,9 +2373,6 @@ ZEND_API int is_zend_ptr(const void *ptr) return 0; } -#if !ZEND_DEBUG && defined(HAVE_BUILTIN_CONSTANT_P) -#undef _emalloc - #if ZEND_MM_CUSTOM static ZEND_COLD void* ZEND_FASTCALL _malloc_custom(size_t size ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) @@ -2404,7 +2401,12 @@ static ZEND_COLD void* ZEND_FASTCALL _realloc_custom(void *ptr, size_t size ZEND return AG(mm_heap)->custom_heap.std._realloc(ptr, size); } } +#endif +#if !ZEND_DEBUG && defined(HAVE_BUILTIN_CONSTANT_P) +#undef _emalloc + +#if ZEND_MM_CUSTOM # define ZEND_MM_CUSTOM_ALLOCATOR(size) do { \ if (UNEXPECTED(AG(mm_heap)->use_custom_heap)) { \ return _malloc_custom(size ZEND_FILE_LINE_RELAY_CC ZEND_FILE_LINE_ORIG_RELAY_CC); \