distutils & OS X universal binaries

"Martin v. Löwis" martin at v.loewis.de
Sat Dec 8 12:47:57 EST 2007


> 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



More information about the Python-list mailing list