Ronald Oussoren | 5640ce2 | 2008-06-05 12:58:24 +0000 | [diff] [blame] | 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 SIZEOF_LONG |
| 14 | # undef SIZEOF_PTHREAD_T |
| 15 | # undef SIZEOF_SIZE_T |
| 16 | # undef SIZEOF_TIME_T |
| 17 | # undef SIZEOF_VOID_P |
| 18 | |
| 19 | # undef VA_LIST_IS_ARRAY |
| 20 | # if defined(__LP64__) && defined(__x86_64__) |
| 21 | # define VA_LIST_IS_ARRAY 1 |
| 22 | # endif |
| 23 | |
| 24 | # undef HAVE_LARGEFILE_SUPPORT |
| 25 | # ifndef __LP64__ |
| 26 | # define HAVE_LARGEFILE_SUPPORT 1 |
| 27 | # endif |
| 28 | |
| 29 | # undef SIZEOF_LONG |
| 30 | # ifdef __LP64__ |
| 31 | # define SIZEOF_LONG 8 |
| 32 | # define SIZEOF_PTHREAD_T 8 |
| 33 | # define SIZEOF_SIZE_T 8 |
| 34 | # define SIZEOF_TIME_T 8 |
| 35 | # define SIZEOF_VOID_P 8 |
| 36 | # else |
| 37 | # define SIZEOF_LONG 4 |
| 38 | # define SIZEOF_PTHREAD_T 4 |
| 39 | # define SIZEOF_SIZE_T 4 |
| 40 | # define SIZEOF_TIME_T 4 |
| 41 | # define SIZEOF_VOID_P 4 |
| 42 | # endif |
| 43 | |
| 44 | # if defined(__LP64__) |
| 45 | /* MacOSX 10.4 (the first release to suppport 64-bit code |
| 46 | * at all) only supports 64-bit in the UNIX layer. |
| 47 | * Therefore surpress the toolbox-glue in 64-bit mode. |
| 48 | */ |
| 49 | |
| 50 | /* In 64-bit mode setpgrp always has no argments, in 32-bit |
| 51 | * mode that depends on the compilation environment |
| 52 | */ |
| 53 | # undef SETPGRP_HAVE_ARG |
| 54 | |
| 55 | # endif |
| 56 | |
| 57 | #endif /* defined(_APPLE__) */ |
| 58 | |
| 59 | #endif /* PYMACCONFIG_H */ |