1#ifndef PYMACCONFIG_H
2#define PYMACCONFIG_H
3 /*
4 * This file moves some of the autoconf magic to compile-time
5 * when building on MacOSX. This is needed for building 4-way
6 * universal binaries and for 64-bit universal binaries because
7 * the values redefined below aren't configure-time constant but
8 * only compile-time constant in these scenarios.
9 */
10
11#if defined(__APPLE__)
12
13# undef ALIGNOF_MAX_ALIGN_T
14# undef SIZEOF_LONG
15# undef SIZEOF_LONG_DOUBLE
16# undef SIZEOF_PTHREAD_T
17# undef SIZEOF_SIZE_T
18# undef SIZEOF_TIME_T
19# undef SIZEOF_VOID_P
20# undef SIZEOF__BOOL
21# undef SIZEOF_UINTPTR_T
22# undef SIZEOF_PTHREAD_T
23# undef WORDS_BIGENDIAN
24# undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754
25# undef DOUBLE_IS_BIG_ENDIAN_IEEE754
26# undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754
27# undef HAVE_GCC_ASM_FOR_X87
28# undef HAVE_GCC_ASM_FOR_X64
29
30# undef VA_LIST_IS_ARRAY
31# if defined(__LP64__) && defined(__x86_64__)
32# define VA_LIST_IS_ARRAY 1
33# endif
34
35# undef HAVE_LARGEFILE_SUPPORT
36# ifndef __LP64__
37# define HAVE_LARGEFILE_SUPPORT 1
38# endif
39
40# undef SIZEOF_LONG
41# ifdef __LP64__
42# define SIZEOF__BOOL 1
43# define SIZEOF__BOOL 1
44# define SIZEOF_LONG 8
45# define SIZEOF_PTHREAD_T 8
46# define SIZEOF_SIZE_T 8
47# define SIZEOF_TIME_T 8
48# define SIZEOF_VOID_P 8
49# define SIZEOF_UINTPTR_T 8
50# define SIZEOF_PTHREAD_T 8
51# else
52# ifdef __ppc__
53# define SIZEOF__BOOL 4
54# else
55# define SIZEOF__BOOL 1
56# endif
57# define SIZEOF_LONG 4
58# define SIZEOF_PTHREAD_T 4
59# define SIZEOF_SIZE_T 4
60# define SIZEOF_TIME_T 4
61# define SIZEOF_VOID_P 4
62# define SIZEOF_UINTPTR_T 4
63# define SIZEOF_PTHREAD_T 4
64# endif
65
66# if defined(__LP64__)
67 /* MacOSX 10.4 (the first release to support 64-bit code
68 * at all) only supports 64-bit in the UNIX layer.
69 * Therefore suppress the toolbox-glue in 64-bit mode.
70 */
71
72 /* In 64-bit mode setpgrp always has no arguments, in 32-bit
73 * mode that depends on the compilation environment
74 */
75# undef SETPGRP_HAVE_ARG
76
77# endif
78
79#ifdef __BIG_ENDIAN__
80#define WORDS_BIGENDIAN 1
81#define DOUBLE_IS_BIG_ENDIAN_IEEE754
82#else
83#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754
84#endif /* __BIG_ENDIAN */
85
86#if defined(__i386__) || defined(__x86_64__)
87# define HAVE_GCC_ASM_FOR_X87
88# define ALIGNOF_MAX_ALIGN_T 16
89# define HAVE_GCC_ASM_FOR_X64 1
90# define SIZEOF_LONG_DOUBLE 16
91#else
92# define ALIGNOF_MAX_ALIGN_T 8
93# define SIZEOF_LONG_DOUBLE 8
94#endif
95
96
97#endif /* defined(_APPLE__) */
98
99#endif /* PYMACCONFIG_H */
100

source code of include/python3.12/pymacconfig.h