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