Re: NKEs on Intel-based Macs
Re: NKEs on Intel-based Macs
- Subject: Re: NKEs on Intel-based Macs
- From: Peter Lovell <email@hidden>
- Date: Sat, 5 Aug 2006 15:18:31 -0400
On Aug 3, 2006, at 2:08 PM, David A Rowland wrote:
I just finished a universal NKE, and it seems fine. However, we
have not really begun to test, and Joshua's caution is a red flag
for us.
Nevertheless, our experience with the universal part was smooth.
We did have a big/little endian problem. Our software uses
conditional defs like:
#if defined(LITTLE_ENDIAN)
....
#elif defined(BIG_ENDIAN)
...
#else
#error Must define LITTLE_ENDIAN or BIG_ENDIAN in moptions.h
#endif
but the Apple headers define both LITTLE_ENDIAN and BIG_ENDIAN !
Yeah - we hit this when we first went to Mac OS X. It's a BSD-origin
thing from what I understand.
Both are defined, and have different values. So what you want is ...
#if BYTE_ORDER == BIG_ENDIAN
or LITTLE_ENDIAN as appropriate.
In case you hadn't found it and are up for amusement, there are
<three> endian-nesses.
LITTLE_ENDIAN, BIG_ENDIAN and PDP_ENDIAN
Cheers.....Peter
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden