Re: php5 as universal binary (Mac OS X)

From: Date: Mon, 13 Aug 2007 10:25:09 +0000
Subject: Re: php5 as universal binary (Mac OS X)
References: 1 2 3 4 5 6 7 8  Groups: php.internals 
Request: Send a blank email to internals+get-31545@lists.php.net to get a copy of this message
On 13.08.2007 14:09, Christian Speich wrote:
hello again, so now i have the test results :) (I dont have an ppc mac, so i ask an friend)
As far as I know, GCC on PPC is unable to generate universal binaries, so I don't understand what exactly you were testing there..
And it dosn't work! When i configure it on an intel mac, the WORDS_BIDENDIAN macro will never definied.
Right, because Intel is little endian.
But i need to define this macro when the compiler runs the ppc-compile.
That's why the ifdefs check for __LITTLE_ENDIAN__ and __BIG_ENDIAN__ which are defined by Apple's GCC.
I think the code should look like this: if (defined(__APPLE__) || defined(__APPLE_CC__)) && (defined (__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__)) # if defined(__LITTLE_ENDIAN__) # undef WORDS_BIGENDIAN # else if defined(__BIG_ENDIAN__) # define WORDS_BIGENDIAN # endif #endif
Yes, I guess you're right. -- Wbr, Antony Dovgal

« previous php.internals (#31545) next »