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

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to