Chris@87: #ifndef PYMACCONFIG_H Chris@87: #define PYMACCONFIG_H Chris@87: /* Chris@87: * This file moves some of the autoconf magic to compile-time Chris@87: * when building on MacOSX. This is needed for building 4-way Chris@87: * universal binaries and for 64-bit universal binaries because Chris@87: * the values redefined below aren't configure-time constant but Chris@87: * only compile-time constant in these scenarios. Chris@87: */ Chris@87: Chris@87: #if defined(__APPLE__) Chris@87: Chris@87: # undef SIZEOF_LONG Chris@87: # undef SIZEOF_PTHREAD_T Chris@87: # undef SIZEOF_SIZE_T Chris@87: # undef SIZEOF_TIME_T Chris@87: # undef SIZEOF_VOID_P Chris@87: # undef SIZEOF__BOOL Chris@87: # undef SIZEOF_UINTPTR_T Chris@87: # undef SIZEOF_PTHREAD_T Chris@87: # undef WORDS_BIGENDIAN Chris@87: # undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 Chris@87: # undef DOUBLE_IS_BIG_ENDIAN_IEEE754 Chris@87: # undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754 Chris@87: # undef HAVE_GCC_ASM_FOR_X87 Chris@87: Chris@87: # undef VA_LIST_IS_ARRAY Chris@87: # if defined(__LP64__) && defined(__x86_64__) Chris@87: # define VA_LIST_IS_ARRAY 1 Chris@87: # endif Chris@87: Chris@87: # undef HAVE_LARGEFILE_SUPPORT Chris@87: # ifndef __LP64__ Chris@87: # define HAVE_LARGEFILE_SUPPORT 1 Chris@87: # endif Chris@87: Chris@87: # undef SIZEOF_LONG Chris@87: # ifdef __LP64__ Chris@87: # define SIZEOF__BOOL 1 Chris@87: # define SIZEOF__BOOL 1 Chris@87: # define SIZEOF_LONG 8 Chris@87: # define SIZEOF_PTHREAD_T 8 Chris@87: # define SIZEOF_SIZE_T 8 Chris@87: # define SIZEOF_TIME_T 8 Chris@87: # define SIZEOF_VOID_P 8 Chris@87: # define SIZEOF_UINTPTR_T 8 Chris@87: # define SIZEOF_PTHREAD_T 8 Chris@87: # else Chris@87: # ifdef __ppc__ Chris@87: # define SIZEOF__BOOL 4 Chris@87: # else Chris@87: # define SIZEOF__BOOL 1 Chris@87: # endif Chris@87: # define SIZEOF_LONG 4 Chris@87: # define SIZEOF_PTHREAD_T 4 Chris@87: # define SIZEOF_SIZE_T 4 Chris@87: # define SIZEOF_TIME_T 4 Chris@87: # define SIZEOF_VOID_P 4 Chris@87: # define SIZEOF_UINTPTR_T 4 Chris@87: # define SIZEOF_PTHREAD_T 4 Chris@87: # endif Chris@87: Chris@87: # if defined(__LP64__) Chris@87: /* MacOSX 10.4 (the first release to support 64-bit code Chris@87: * at all) only supports 64-bit in the UNIX layer. Chris@87: * Therefore surpress the toolbox-glue in 64-bit mode. Chris@87: */ Chris@87: Chris@87: /* In 64-bit mode setpgrp always has no argments, in 32-bit Chris@87: * mode that depends on the compilation environment Chris@87: */ Chris@87: # undef SETPGRP_HAVE_ARG Chris@87: Chris@87: # endif Chris@87: Chris@87: #ifdef __BIG_ENDIAN__ Chris@87: #define WORDS_BIGENDIAN 1 Chris@87: #define DOUBLE_IS_BIG_ENDIAN_IEEE754 Chris@87: #else Chris@87: #define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 Chris@87: #endif /* __BIG_ENDIAN */ Chris@87: Chris@87: #ifdef __i386__ Chris@87: # define HAVE_GCC_ASM_FOR_X87 Chris@87: #endif Chris@87: Chris@87: /* Chris@87: * The definition in pyconfig.h is only valid on the OS release Chris@87: * where configure ran on and not necessarily for all systems where Chris@87: * the executable can be used on. Chris@87: * Chris@87: * Specifically: OSX 10.4 has limited supported for '%zd', while Chris@87: * 10.5 has full support for '%zd'. A binary built on 10.5 won't Chris@87: * work properly on 10.4 unless we surpress the definition Chris@87: * of PY_FORMAT_SIZE_T Chris@87: */ Chris@87: #undef PY_FORMAT_SIZE_T Chris@87: Chris@87: Chris@87: #endif /* defined(_APPLE__) */ Chris@87: Chris@87: #endif /* PYMACCONFIG_H */