> OK I need to use something a bit more complex then; I figure this should > work > > #if defined(__BIG_ENDIAN__) || defined(__LITTLE_ENDIAN__) > # ifdef __BIG_ENDIAN__ > # ifdef WORDS_BIGENDIAN > # undef WORDS_BIGENDIAN > # endif > # define WORDS_BIGENDIAN 1 > # else > # ifdef __LITTLE_ENDIAN__ > # ifdef WORDS_BIGENDIAN > # undef WORDS_BIGENDIAN > # endif > # endif > # endif > #endif
I don't understand. If you assume that either __BIG_ENDIAN__ or __LITTLE_ENDIAN__ is defined, anyway - just use that! If neither is defined, you are still lost, unless you use pyconfig.h, in which case, you don't need anything of that. Regards, Martin -- http://mail.python.org/mailman/listinfo/python-list