Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33044 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 30246 invoked by uid 1010); 7 Nov 2007 04:43:08 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 30231 invoked from network); 7 Nov 2007 04:43:08 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Nov 2007 04:43:08 -0000 Authentication-Results: pb1.pair.com smtp.mail=wez.furlong@messagesystems.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=wez.furlong@messagesystems.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain messagesystems.com designates 66.225.209.50 as permitted sender) X-PHP-List-Original-Sender: wez.furlong@messagesystems.com X-Host-Fingerprint: 66.225.209.50 mail.omniti.com Linux 2.5 (sometimes 2.4) (4) Received: from [66.225.209.50] ([66.225.209.50:41297] helo=mail.omniti.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F5/A6-31692-B5241374 for ; Tue, 06 Nov 2007 23:43:08 -0500 Authentication-Results: mail.omniti.com smtp.user=wez; auth=pass (LOGIN) Received: from [76.100.30.170] ([76.100.30.170:51670] helo=[192.168.50.4]) by mail.omniti.com (ecelerity 2.1.1.12 r(14453)) with ESMTPSA (cipher=AES128-SHA) id 50/C7-20058-55241374 for ; Tue, 06 Nov 2007 23:43:05 -0500 Message-ID: To: internals@lists.php.net Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v912) Date: Tue, 6 Nov 2007 23:43:01 -0500 X-Mailer: Apple Mail (2.912) Subject: zend.h breaks system headers on OSX in PHP 5.3 From: wez.furlong@messagesystems.com (Wez Furlong) The system headers on OSX use __attribute__((always_inline)) and zend.h defines always_inline to something else, breaking the build when the compiler tries to resolve that attribute name. A solution is to prefix the defines used in the engine with zend or ZEND or other similar namespacing token, which I thought was our standard practice, considering everything else in there has a prefix. If there have been other similar changes elsewhere, they should also be fixed --Wez. Index: zend.h =================================================================== RCS file: /repository/ZendEngine2/zend.h,v retrieving revision 1.293.2.11.2.9.2.9 diff -u -p -r1.293.2.11.2.9.2.9 zend.h --- zend.h 2 Nov 2007 19:40:37 -0000 1.293.2.11.2.9.2.9 +++ zend.h 7 Nov 2007 04:36:01 -0000 @@ -324,42 +324,42 @@ struct _zval_struct { #define Z_SET_ISREF_TO(z, isref) Z_SET_ISREF_TO_P(&(z), isref) #if defined(__GNUC__) -#define always_inline inline __attribute__((always_inline)) +#define zend_always_inline inline __attribute__((always_inline)) #elif defined(_MSC_VER) -#define always_inline __forceinline +#define zend_always_inline __forceinline #else -#define always_inline inline +#define zend_always_inline inline #endif -static always_inline zend_uint zval_refcount_p(zval* pz) { +static zend_always_inline zend_uint zval_refcount_p(zval* pz) { return pz->refcount__gc; } -static always_inline zend_uint zval_set_refcount_p(zval* pz, zend_uint rc) { +static zend_always_inline zend_uint zval_set_refcount_p(zval* pz, zend_uint rc) { return pz->refcount__gc = rc; } -static always_inline zend_uint zval_addref_p(zval* pz) { +static zend_always_inline zend_uint zval_addref_p(zval* pz) { return ++pz->refcount__gc; } -static always_inline zend_uint zval_delref_p(zval* pz) { +static zend_always_inline zend_uint zval_delref_p(zval* pz) { return --pz->refcount__gc; } -static always_inline zend_bool zval_isref_p(zval* pz) { +static zend_always_inline zend_bool zval_isref_p(zval* pz) { return pz->is_ref__gc; } -static always_inline zend_bool zval_set_isref_p(zval* pz) { +static zend_always_inline zend_bool zval_set_isref_p(zval* pz) { return pz->is_ref__gc = 1; } -static always_inline zend_bool zval_unset_isref_p(zval* pz) { +static zend_always_inline zend_bool zval_unset_isref_p(zval* pz) { return pz->is_ref__gc = 0; } -static always_inline zend_bool zval_set_isref_to_p(zval* pz, zend_bool isref) { +static zend_always_inline zend_bool zval_set_isref_to_p(zval* pz, zend_bool isref) { return pz->is_ref__gc = isref; }