Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-11-19 09:50:54

0001 // This file moves some of the autoconf magic to compile-time when building on
0002 // macOS. This is needed for building 4-way universal binaries and for 64-bit
0003 // universal binaries because the values redefined below aren't configure-time
0004 // constant but only compile-time constant in these scenarios.
0005 
0006 #ifndef PY_MACCONFIG_H
0007 #define PY_MACCONFIG_H
0008 #ifdef __APPLE__
0009 
0010 #undef ALIGNOF_MAX_ALIGN_T
0011 #undef SIZEOF_LONG
0012 #undef SIZEOF_LONG_DOUBLE
0013 #undef SIZEOF_PTHREAD_T
0014 #undef SIZEOF_SIZE_T
0015 #undef SIZEOF_TIME_T
0016 #undef SIZEOF_VOID_P
0017 #undef SIZEOF__BOOL
0018 #undef SIZEOF_UINTPTR_T
0019 #undef SIZEOF_PTHREAD_T
0020 #undef WORDS_BIGENDIAN
0021 #undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754
0022 #undef DOUBLE_IS_BIG_ENDIAN_IEEE754
0023 #undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754
0024 #undef HAVE_GCC_ASM_FOR_X87
0025 #undef HAVE_GCC_ASM_FOR_X64
0026 
0027 #undef VA_LIST_IS_ARRAY
0028 #if defined(__LP64__) && defined(__x86_64__)
0029 #  define VA_LIST_IS_ARRAY 1
0030 #endif
0031 
0032 #undef HAVE_LARGEFILE_SUPPORT
0033 #ifndef __LP64__
0034 #   define HAVE_LARGEFILE_SUPPORT 1
0035 #endif
0036 
0037 #undef SIZEOF_LONG
0038 #ifdef __LP64__
0039 #  define SIZEOF__BOOL            1
0040 #  define SIZEOF__BOOL            1
0041 #  define SIZEOF_LONG             8
0042 #  define SIZEOF_PTHREAD_T        8
0043 #  define SIZEOF_SIZE_T           8
0044 #  define SIZEOF_TIME_T           8
0045 #  define SIZEOF_VOID_P           8
0046 #  define SIZEOF_UINTPTR_T        8
0047 #  define SIZEOF_PTHREAD_T        8
0048 #else
0049 #  ifdef __ppc__
0050 #     define SIZEOF__BOOL         4
0051 #  else
0052 #     define SIZEOF__BOOL         1
0053 #  endif
0054 #  define SIZEOF_LONG             4
0055 #  define SIZEOF_PTHREAD_T        4
0056 #  define SIZEOF_SIZE_T           4
0057 #  define SIZEOF_TIME_T           4
0058 #  define SIZEOF_VOID_P           4
0059 #  define SIZEOF_UINTPTR_T        4
0060 #  define SIZEOF_PTHREAD_T        4
0061 #endif
0062 
0063 // macOS 10.4 (the first release to support 64-bit code
0064 // at all) only supports 64-bit in the UNIX layer.
0065 // Therefore suppress the toolbox-glue in 64-bit mode.
0066 //
0067 // In 64-bit mode setpgrp always has no arguments, in 32-bit
0068 // mode that depends on the compilation environment
0069 #if defined(__LP64__)
0070 #   undef SETPGRP_HAVE_ARG
0071 #endif
0072 
0073 #ifdef __BIG_ENDIAN__
0074 #  define WORDS_BIGENDIAN 1
0075 #  define DOUBLE_IS_BIG_ENDIAN_IEEE754
0076 #else
0077 #  define DOUBLE_IS_LITTLE_ENDIAN_IEEE754
0078 #endif
0079 
0080 #if defined(__i386__) || defined(__x86_64__)
0081 #  define HAVE_GCC_ASM_FOR_X87
0082 #  define ALIGNOF_MAX_ALIGN_T 16
0083 #  define HAVE_GCC_ASM_FOR_X64 1
0084 #  define SIZEOF_LONG_DOUBLE 16
0085 #else
0086 #  define ALIGNOF_MAX_ALIGN_T 8
0087 #  define SIZEOF_LONG_DOUBLE 8
0088 #endif
0089 
0090 #endif   // __APPLE__
0091 #endif   // !PY_MACCONFIG_H