com php-src: Better check for __builtin_constant_p( ) availability: Zend/zend_alloc.h Zend/zend_por tability.h

From: Date: Thu, 25 Jun 2015 09:02:28 +0000
Subject: com php-src: Better check for __builtin_constant_p( ) availability: Zend/zend_alloc.h Zend/zend_por tability.h
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-87525@lists.php.net to get a copy of this message
Commit: f5fd58f737eb988fdd484effe0f05d5b6e9af64e Author: Dmitry Stogov <dmitry@zend.com> Thu, 25 Jun 2015 12:02:28 +0300 Parents: 90976c997898f88961ac8ed941537c64551336e4 Branches: master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=f5fd58f737eb988fdd484effe0f05d5b6e9af64e Log: Better check for __builtin_constant_p() availability Changed paths: M Zend/zend_alloc.h M Zend/zend_portability.h Diff: diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index f76494e..6c12b42 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 57080ca..8c6989d 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

« previous php.cvs (#87525) next »