I was poking around in Core Foundation for unrelated reasons and came
across the following code in CFRuntime.h [1] in the 10.4.3 version of
things (CF-368.18).
typedef struct __CFRuntimeBase {
void *_isa;
#if defined(__ppc__) || defined(__ppc64__)
uint16_t _rc;
uint16_t _info;
#elif defined(__i386__)
uint16_t _info;
uint16_t _rc;
#else
#error unknown architecture
#endif
} CFRuntimeBase;
#if defined(__ppc__) || defined(__ppc64__)
#define INIT_CFRUNTIME_BASE(isa, info, rc) { isa, info, rc }
#elif defined(__i386__)
#define INIT_CFRUNTIME_BASE(isa, info, rc) { isa, rc, info }
#else
#error unknown architecture
#endif
It looks like an endian specific compile time check... if so I believe
it is better to check for __BIG_ENDIAN__ (and possibly also
__LITTLE_ENDIAN__) in the above instead of checking processor type
macros. If others agree I will file a defect.
-Shawn