codekingpro/portable-devtools
114k
1// This file moves some of the autoconf magic to compile-time when building on2// macOS. This is needed for building 4-way universal binaries and for 64-bit3// universal binaries because the values redefined below aren't configure-time4// constant but only compile-time constant in these scenarios.5 6#ifndef PY_MACCONFIG_H7#define PY_MACCONFIG_H8#ifdef __APPLE__9 10#undef ALIGNOF_MAX_ALIGN_T11#undef SIZEOF_LONG12#undef SIZEOF_LONG_DOUBLE13#undef SIZEOF_PTHREAD_T14#undef SIZEOF_SIZE_T15#undef SIZEOF_TIME_T16#undef SIZEOF_VOID_P17#undef SIZEOF__BOOL18#undef SIZEOF_UINTPTR_T19#undef SIZEOF_PTHREAD_T20#undef WORDS_BIGENDIAN21#undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE75422#undef DOUBLE_IS_BIG_ENDIAN_IEEE75423#undef DOUBLE_IS_LITTLE_ENDIAN_IEEE75424#undef HAVE_GCC_ASM_FOR_X8725#undef HAVE_GCC_ASM_FOR_X6426 27#undef VA_LIST_IS_ARRAY28#if defined(__LP64__) && defined(__x86_64__)29# define VA_LIST_IS_ARRAY 130#endif31 32#undef HAVE_LARGEFILE_SUPPORT33#ifndef __LP64__34# define HAVE_LARGEFILE_SUPPORT 135#endif36 37#undef SIZEOF_LONG38#ifdef __LP64__39# define SIZEOF__BOOL 140# define SIZEOF__BOOL 141# define SIZEOF_LONG 842# define SIZEOF_PTHREAD_T 843# define SIZEOF_SIZE_T 844# define SIZEOF_TIME_T 845# define SIZEOF_VOID_P 846# define SIZEOF_UINTPTR_T 847# define SIZEOF_PTHREAD_T 848#else49# ifdef __ppc__50# define SIZEOF__BOOL 451# else52# define SIZEOF__BOOL 153# endif54# define SIZEOF_LONG 455# define SIZEOF_PTHREAD_T 456# define SIZEOF_SIZE_T 457# define SIZEOF_TIME_T 458# define SIZEOF_VOID_P 459# define SIZEOF_UINTPTR_T 460# define SIZEOF_PTHREAD_T 461#endif62 63// macOS 10.4 (the first release to support 64-bit code64// at all) only supports 64-bit in the UNIX layer.65// Therefore suppress the toolbox-glue in 64-bit mode.66//67// In 64-bit mode setpgrp always has no arguments, in 32-bit68// mode that depends on the compilation environment69#if defined(__LP64__)70# undef SETPGRP_HAVE_ARG71#endif72 73#ifdef __BIG_ENDIAN__74# define WORDS_BIGENDIAN 175# define DOUBLE_IS_BIG_ENDIAN_IEEE75476#else77# define DOUBLE_IS_LITTLE_ENDIAN_IEEE75478#endif79 80#if defined(__i386__) || defined(__x86_64__)81# define HAVE_GCC_ASM_FOR_X8782# define ALIGNOF_MAX_ALIGN_T 1683# define HAVE_GCC_ASM_FOR_X64 184# define SIZEOF_LONG_DOUBLE 1685#else86# define ALIGNOF_MAX_ALIGN_T 887# define SIZEOF_LONG_DOUBLE 888#endif89 90#endif // __APPLE__91#endif // !PY_MACCONFIG_H92 