|
| 1 | +/* copied from pyconfig.h */ |
| 2 | +#define SIZEOF_SHORT 2 |
| 3 | +#define SIZEOF_INT 4 |
| 4 | +#define SIZEOF_LONG 4 |
| 5 | +#define ALIGNOF_LONG 4 |
| 6 | +#define SIZEOF_LONG_LONG 8 |
| 7 | +#define SIZEOF_DOUBLE 8 |
| 8 | +#define SIZEOF_FLOAT 4 |
| 9 | + |
| 10 | +#if defined(__APPLE__) |
| 11 | + |
| 12 | +# undef SIZEOF_LONG |
| 13 | +# undef SIZEOF_PTHREAD_T |
| 14 | +# undef SIZEOF_SIZE_T |
| 15 | +# undef SIZEOF_TIME_T |
| 16 | +# undef SIZEOF_VOID_P |
| 17 | +# undef SIZEOF__BOOL |
| 18 | +# undef SIZEOF_UINTPTR_T |
| 19 | +# undef SIZEOF_PTHREAD_T |
| 20 | +# undef WORDS_BIGENDIAN |
| 21 | +# undef DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 |
| 22 | +# undef DOUBLE_IS_BIG_ENDIAN_IEEE754 |
| 23 | +# undef DOUBLE_IS_LITTLE_ENDIAN_IEEE754 |
| 24 | +# undef HAVE_GCC_ASM_FOR_X87 |
| 25 | + |
| 26 | +# undef VA_LIST_IS_ARRAY |
| 27 | +# if defined(__LP64__) && defined(__x86_64__) |
| 28 | +# define VA_LIST_IS_ARRAY 1 |
| 29 | +# endif |
| 30 | + |
| 31 | +# undef HAVE_LARGEFILE_SUPPORT |
| 32 | +# ifndef __LP64__ |
| 33 | +# define HAVE_LARGEFILE_SUPPORT 1 |
| 34 | +# endif |
| 35 | + |
| 36 | +# undef SIZEOF_LONG |
| 37 | +# ifdef __LP64__ |
| 38 | +# define SIZEOF__BOOL 1 |
| 39 | +# define SIZEOF__BOOL 1 |
| 40 | +# define SIZEOF_LONG 8 |
| 41 | +# define SIZEOF_PTHREAD_T 8 |
| 42 | +# define SIZEOF_SIZE_T 8 |
| 43 | +# define SIZEOF_TIME_T 8 |
| 44 | +# define SIZEOF_VOID_P 8 |
| 45 | +# define SIZEOF_UINTPTR_T 8 |
| 46 | +# define SIZEOF_PTHREAD_T 8 |
| 47 | +# else |
| 48 | +# ifdef __ppc__ |
| 49 | +# define SIZEOF__BOOL 4 |
| 50 | +# else |
| 51 | +# define SIZEOF__BOOL 1 |
| 52 | +# endif |
| 53 | +# define SIZEOF_LONG 4 |
| 54 | +# define SIZEOF_PTHREAD_T 4 |
| 55 | +# define SIZEOF_SIZE_T 4 |
| 56 | +# define SIZEOF_TIME_T 4 |
| 57 | +# define SIZEOF_VOID_P 4 |
| 58 | +# define SIZEOF_UINTPTR_T 4 |
| 59 | +# define SIZEOF_PTHREAD_T 4 |
| 60 | +# endif |
| 61 | + |
| 62 | +# if defined(__LP64__) |
| 63 | +/* MacOSX 10.4 (the first release to support 64-bit code |
| 64 | + * at all) only supports 64-bit in the UNIX layer. |
| 65 | + * Therefore suppress the toolbox-glue in 64-bit mode. |
| 66 | + */ |
| 67 | + |
| 68 | + /* In 64-bit mode setpgrp always has no arguments, in 32-bit |
| 69 | + * mode that depends on the compilation environment |
| 70 | + */ |
| 71 | +# undef SETPGRP_HAVE_ARG |
| 72 | + |
| 73 | +# endif |
| 74 | + |
| 75 | +#ifdef __BIG_ENDIAN__ |
| 76 | +#define WORDS_BIGENDIAN 1 |
| 77 | +#define DOUBLE_IS_BIG_ENDIAN_IEEE754 |
| 78 | +#else |
| 79 | +#define DOUBLE_IS_LITTLE_ENDIAN_IEEE754 |
| 80 | +#endif /* __BIG_ENDIAN */ |
| 81 | + |
| 82 | +#ifdef __i386__ |
| 83 | +# define HAVE_GCC_ASM_FOR_X87 |
| 84 | +#endif |
| 85 | + |
| 86 | + /* |
| 87 | + * The definition in pyconfig.h is only valid on the OS release |
| 88 | + * where configure ran on and not necessarily for all systems where |
| 89 | + * the executable can be used on. |
| 90 | + * |
| 91 | + * Specifically: OSX 10.4 has limited supported for '%zd', while |
| 92 | + * 10.5 has full support for '%zd'. A binary built on 10.5 won't |
| 93 | + * work properly on 10.4 unless we suppress the definition |
| 94 | + * of PY_FORMAT_SIZE_T |
| 95 | + */ |
| 96 | +#undef PY_FORMAT_SIZE_T |
| 97 | + |
| 98 | + |
| 99 | +#endif |
| 100 | + |
| 101 | + |
| 102 | +#define NPY_SIZEOF_SHORT SIZEOF_SHORT |
| 103 | +#define NPY_SIZEOF_INT SIZEOF_INT |
| 104 | +#define NPY_SIZEOF_LONG SIZEOF_LONG |
| 105 | +#define NPY_SIZEOF_FLOAT 4 |
| 106 | +#define NPY_SIZEOF_COMPLEX_FLOAT 8 |
| 107 | +#define NPY_SIZEOF_DOUBLE 8 |
| 108 | +#define NPY_SIZEOF_COMPLEX_DOUBLE 16 |
| 109 | +#define NPY_SIZEOF_LONGDOUBLE 8 |
| 110 | +#define NPY_SIZEOF_COMPLEX_LONGDOUBLE 16 |
| 111 | +#define NPY_SIZEOF_PY_INTPTR_T 8 |
| 112 | +#define NPY_SIZEOF_OFF_T 4 |
| 113 | +#define NPY_SIZEOF_PY_LONG_LONG 8 |
| 114 | +#define NPY_SIZEOF_LONGLONG 8 |
| 115 | +#define NPY_NO_SIGNAL 1 |
| 116 | +#define NPY_NO_SMP 0 |
| 117 | +#define NPY_HAVE_DECL_ISNAN |
| 118 | +#define NPY_HAVE_DECL_ISINF |
| 119 | +#define NPY_HAVE_DECL_SIGNBIT |
| 120 | +#define NPY_HAVE_DECL_ISFINITE |
| 121 | +#define NPY_USE_C99_COMPLEX 1 |
| 122 | +#define NPY_USE_C99_FORMATS 1 |
| 123 | +#define NPY_VISIBILITY_HIDDEN |
| 124 | +#define NPY_ABI_VERSION 0x01000009 |
| 125 | +#define NPY_API_VERSION 0x00000010 |
| 126 | + |
| 127 | +#ifndef __STDC_FORMAT_MACROS |
| 128 | +#define __STDC_FORMAT_MACROS 1 |
| 129 | +#endif |
0 commit comments