cvs: ZendEngine2 / zend.h zend_alloc.h

From: Date: Thu, 28 Aug 2003 14:53:02 +0000
Subject: cvs: ZendEngine2 / zend.h zend_alloc.h
Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-1718@lists.php.net to get a copy of this message
sas Thu Aug 28 10:53:02 2003 EDT Modified files: /ZendEngine2 zend.h zend_alloc.h Log: cleanup & centralize ZEND_GCC_VERSION and ZEND_ATTRIBUTE_MALLOC so that they can be used by downstream applications Index: ZendEngine2/zend.h diff -u ZendEngine2/zend.h:1.219 ZendEngine2/zend.h:1.220 --- ZendEngine2/zend.h:1.219 Mon Aug 25 19:24:28 2003 +++ ZendEngine2/zend.h Thu Aug 28 10:53:02 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend.h,v 1.219 2003/08/25 23:24:28 sniper Exp $ */ +/* $Id: zend.h,v 1.220 2003/08/28 14:53:02 sas Exp $ */ #ifndef ZEND_H #define ZEND_H @@ -144,6 +144,18 @@ # endif # endif # endif +#endif + +#ifdef __GNUC__ +# define ZEND_GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) +#else +# define ZEND_GCC_VERSION +#endif + +#if ZEND_GCC_VERSION >= 2096 +# define ZEND_ATTRIBUTE_MALLOC __attribute__ ((__malloc__)) +#else +# define ZEND_ATTRIBUTE_MALLOC #endif #if (HAVE_ALLOCA || (defined (__GNUC__) && __GNUC__ >= 2)) && !(defined(ZTS) && defined(ZEND_WIN32)) && !(defined(ZTS) && defined(NETWARE)) && !(defined(ZTS) && defined(HPUX)) Index: ZendEngine2/zend_alloc.h diff -u ZendEngine2/zend_alloc.h:1.47 ZendEngine2/zend_alloc.h:1.48 --- ZendEngine2/zend_alloc.h:1.47 Thu Aug 28 07:55:39 2003 +++ ZendEngine2/zend_alloc.h Thu Aug 28 10:53:02 2003 @@ -17,7 +17,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: zend_alloc.h,v 1.47 2003/08/28 11:55:39 sas Exp $ */ +/* $Id: zend_alloc.h,v 1.48 2003/08/28 14:53:02 sas Exp $ */ #ifndef ZEND_ALLOC_H #define ZEND_ALLOC_H @@ -64,16 +64,10 @@ #define MAX_CACHED_ENTRIES 256 #define PRE_INIT_CACHE_ENTRIES 32 -#if __GNUC__ -0 >= 2 +#if ZEND_GCC_VERSION >= 2000 # define PLATFORM_ALIGNMENT (__alignof__ (align_test)) #else # define PLATFORM_ALIGNMENT (sizeof(align_test)) -#endif - -#if GCC_VERSION - 0 >= 2096 -# define ZEND_ATTRIBUTE_MALLOC __attribute__ ((malloc)) -#else -# define ZEND_ATTRIBUTE_MALLOC #endif #define MEM_HEADER_PADDING (((PLATFORM_ALIGNMENT-sizeof(zend_mem_header))%PLATFORM_ALIGNMENT+PLATFORM_ALIGNMENT)%PLATFORM_ALIGNMENT)

« previous php.zend-engine.cvs (#1718) next »