|
5 | 5 |
|
6 | 6 | /* Some versions of HP-UX & Solaris need inttypes.h for int32_t, |
7 | 7 | INT32_MAX, etc. */ |
8 | | -#ifdef HAVE_INTTYPES_H |
9 | 8 | #include <inttypes.h> |
10 | | -#endif |
11 | | - |
12 | | -#ifdef HAVE_STDINT_H |
13 | 9 | #include <stdint.h> |
14 | | -#endif |
15 | 10 |
|
16 | 11 | /************************************************************************** |
17 | 12 | Symbols and macros to supply platform-independent interfaces to basic |
@@ -74,64 +69,19 @@ Used in: Py_uintptr_t |
74 | 69 | #endif /* LLONG_MAX */ |
75 | 70 | #endif |
76 | 71 |
|
77 | | -/* a build with 30-bit digits for Python integers needs an exact-width |
78 | | - * 32-bit unsigned integer type to store those digits. (We could just use |
79 | | - * type 'unsigned long', but that would be wasteful on a system where longs |
80 | | - * are 64-bits.) On Unix systems, the autoconf macro AC_TYPE_UINT32_T defines |
81 | | - * uint32_t to be such a type unless stdint.h or inttypes.h defines uint32_t. |
82 | | - * However, it doesn't set HAVE_UINT32_T, so we do that here. |
83 | | - */ |
84 | | -#ifdef uint32_t |
85 | | -#define HAVE_UINT32_T 1 |
86 | | -#endif |
87 | | - |
88 | | -#ifdef HAVE_UINT32_T |
89 | | -#ifndef PY_UINT32_T |
90 | 72 | #define PY_UINT32_T uint32_t |
91 | | -#endif |
92 | | -#endif |
93 | | - |
94 | | -/* Macros for a 64-bit unsigned integer type; used for type 'twodigits' in the |
95 | | - * integer implementation, when 30-bit digits are enabled. |
96 | | - */ |
97 | | -#ifdef uint64_t |
98 | | -#define HAVE_UINT64_T 1 |
99 | | -#endif |
100 | | - |
101 | | -#ifdef HAVE_UINT64_T |
102 | | -#ifndef PY_UINT64_T |
103 | 73 | #define PY_UINT64_T uint64_t |
104 | | -#endif |
105 | | -#endif |
106 | 74 |
|
107 | 75 | /* Signed variants of the above */ |
108 | | -#ifdef int32_t |
109 | | -#define HAVE_INT32_T 1 |
110 | | -#endif |
111 | | - |
112 | | -#ifdef HAVE_INT32_T |
113 | | -#ifndef PY_INT32_T |
114 | 76 | #define PY_INT32_T int32_t |
115 | | -#endif |
116 | | -#endif |
117 | | - |
118 | | -#ifdef int64_t |
119 | | -#define HAVE_INT64_T 1 |
120 | | -#endif |
121 | | - |
122 | | -#ifdef HAVE_INT64_T |
123 | | -#ifndef PY_INT64_T |
124 | 77 | #define PY_INT64_T int64_t |
125 | | -#endif |
126 | | -#endif |
127 | 78 |
|
128 | 79 | /* If PYLONG_BITS_IN_DIGIT is not defined then we'll use 30-bit digits if all |
129 | 80 | the necessary integer types are available, and we're on a 64-bit platform |
130 | 81 | (as determined by SIZEOF_VOID_P); otherwise we use 15-bit digits. */ |
131 | 82 |
|
132 | 83 | #ifndef PYLONG_BITS_IN_DIGIT |
133 | | -#if (defined HAVE_UINT64_T && defined HAVE_INT64_T && \ |
134 | | - defined HAVE_UINT32_T && defined HAVE_INT32_T && SIZEOF_VOID_P >= 8) |
| 84 | +#if SIZEOF_VOID_P >= 8 |
135 | 85 | #define PYLONG_BITS_IN_DIGIT 30 |
136 | 86 | #else |
137 | 87 | #define PYLONG_BITS_IN_DIGIT 15 |
|
0 commit comments