Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:33045 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68888 invoked by uid 1010); 7 Nov 2007 07:49:05 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 68872 invoked from network); 7 Nov 2007 07:49:05 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 7 Nov 2007 07:49:05 -0000 Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from [212.25.124.162] ([212.25.124.162:41004] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 3E/9C-31692-0FD61374 for ; Wed, 07 Nov 2007 02:49:05 -0500 Received: (qmail 30659 invoked from network); 7 Nov 2007 07:49:01 -0000 Received: from internal.zend.office (HELO thinkpad) (10.1.1.1) by internal.zend.office with SMTP; 7 Nov 2007 07:49:01 -0000 To: "'Wez Furlong'" , Date: Wed, 7 Nov 2007 10:48:52 +0300 Message-ID: <000701c82112$a4970df0$6e02a8c0@thinkpad> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.6626 In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198 Importance: Normal Subject: RE: [PHP-DEV] zend.h breaks system headers on OSX in PHP 5.3 From: dmitry@zend.com ("Dmitry Stogov") References: May be it is better to just define always_inline as inline on OSX. Something like: #if defined(__GNUC__) && !defined(OSX) ... Thanks. Dmitry. > -----Original Message----- > From: Wez Furlong [mailto:wez.furlong@messagesystems.com] > Sent: Wednesday, November 07, 2007 7:43 AM > To: internals@lists.php.net > Subject: [PHP-DEV] zend.h breaks system headers on OSX in PHP 5.3 > > > 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; > } > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >