Martin v. Löwis wrote: >> 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 ........ >> #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.
I prefer to continue using WORDS_BIGENDIAN so fewer changes need to be made to the code. It just makes resynching with the upstream code easier. If neither are defined we get to use the definition from setup.py if it's needed. -- Robin Becker -- http://mail.python.org/mailman/listinfo/python-list