blob: 7b204316d1d5a2eeda67c2bd12c5f513a4dc516b [file] [log] [blame]
Georg Brandlfcaf9102008-07-16 02:17:56 +00001#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 SIZEOF_LONG
14# undef SIZEOF_PTHREAD_T
15# undef SIZEOF_SIZE_T
16# undef SIZEOF_TIME_T
17# undef SIZEOF_VOID_P
Benjamin Petersonc39d7622008-12-30 17:56:45 +000018# undef SIZEOF__BOOL
19# undef WORDS_BIGENDIAN
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000020# undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754
21# undef DOUBLE_IS_BIG_ENDIAN_IEEE754
22# undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754
Georg Brandlfcaf9102008-07-16 02:17:56 +000023
24# undef VA_LIST_IS_ARRAY
25# if defined(__LP64__) && defined(__x86_64__)
26# define VA_LIST_IS_ARRAY 1
27# endif
28
29# undef HAVE_LARGEFILE_SUPPORT
30# ifndef __LP64__
31# define HAVE_LARGEFILE_SUPPORT 1
32# endif
33
34# undef SIZEOF_LONG
35# ifdef __LP64__
Benjamin Petersonc39d7622008-12-30 17:56:45 +000036# define SIZEOF__BOOL 1
37# define SIZEOF__BOOL 1
Georg Brandlfcaf9102008-07-16 02:17:56 +000038# define SIZEOF_LONG 8
39# define SIZEOF_PTHREAD_T 8
40# define SIZEOF_SIZE_T 8
41# define SIZEOF_TIME_T 8
42# define SIZEOF_VOID_P 8
43# else
Benjamin Petersonc39d7622008-12-30 17:56:45 +000044# ifdef __ppc__
45# define SIZEOF__BOOL 4
46# else
47# define SIZEOF__BOOL 1
48# endif
Georg Brandlfcaf9102008-07-16 02:17:56 +000049# define SIZEOF_LONG 4
50# define SIZEOF_PTHREAD_T 4
51# define SIZEOF_SIZE_T 4
52# define SIZEOF_TIME_T 4
53# define SIZEOF_VOID_P 4
54# endif
55
56# if defined(__LP64__)
57 /* MacOSX 10.4 (the first release to suppport 64-bit code
58 * at all) only supports 64-bit in the UNIX layer.
59 * Therefore surpress the toolbox-glue in 64-bit mode.
60 */
61
62 /* In 64-bit mode setpgrp always has no argments, in 32-bit
63 * mode that depends on the compilation environment
64 */
65# undef SETPGRP_HAVE_ARG
66
67# endif
68
Benjamin Petersonc39d7622008-12-30 17:56:45 +000069#ifdef __BIG_ENDIAN__
70#define WORDS_BIGENDIAN 1
Mark Dickinsonb08a53a2009-04-16 19:52:09 +000071#define DOUBLE_IS_BIG_ENDIAN_IEEE754
72#else
73#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754
Benjamin Petersonc39d7622008-12-30 17:56:45 +000074#endif /* __BIG_ENDIAN */
75
76
Georg Brandlfcaf9102008-07-16 02:17:56 +000077#endif /* defined(_APPLE__) */
78
79#endif /* PYMACCONFIG_H */