[Python-Dev] Shorter float repr in Python 3.1?

"Martin v. Löwis" martin at v.loewis.de
Tue Apr 14 19:55:36 CEST 2009


> Is it true that to produce a working universal/fat build of Python,
> one has to first regenerate configure and pyconfig.h.in using autoconf
> version >= 2.62?  If not, then I don't understand how the
> AC_C_BIGENDIAN autoconf macro can be giving the right results.

The outcome of AC_C_BIGENDIAN isn't used on OSX. Depending on the exact
version you look at, things might work differently; in trunk,
Include/pymacconfig.h should be used, which does

#if defined(__APPLE__)
# undef WORDS_BIGENDIAN
#ifdef __BIG_ENDIAN__
#define WORDS_BIGENDIAN 1
#endif /* __BIG_ENDIAN */
#endif

Earlier versions included that ifdef block directly in pyconfig.h.in.

In case it isn't clear how this works: GCC predefines __BIG_ENDIAN__
on PPC but not on x86; for universal binaries, two (or more) separate
preprocessor (and compiler runs) are done.

HTH,
Martin


More information about the Python-Dev mailing list