Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 1 | #ifndef Py_CONFIG_H |
| 2 | #define Py_CONFIG_H |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 3 | |
Tim Peters | 76f373d | 2001-07-26 21:34:59 +0000 | [diff] [blame] | 4 | /* pyconfig.h. NOT Generated automatically by configure. |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 5 | |
| 6 | This is a manually maintained version used for the Watcom, |
| 7 | Borland and and Microsoft Visual C++ compilers. It is a |
| 8 | standard part of the Python distribution. |
| 9 | |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 10 | WINDOWS DEFINES: |
| 11 | The code specific to Windows should be wrapped around one of |
| 12 | the following #defines |
| 13 | |
Guido van Rossum | c66ae96 | 2000-05-08 14:14:48 +0000 | [diff] [blame] | 14 | MS_WIN64 - Code specific to the MS Win64 API |
| 15 | MS_WIN32 - Code specific to the MS Win32 (and Win64) API |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 16 | MS_WIN16 - Code specific to the old 16 bit Windows API. |
| 17 | MS_WINDOWS - Code specific to Windows, but all versions. |
| 18 | MS_COREDLL - Code if the Python core is built as a DLL. |
| 19 | |
| 20 | Note that the old defines "NT" and "WIN32" are still supported, but |
| 21 | will soon be dropped. |
| 22 | |
| 23 | Also note that neither "_M_IX86" or "_MSC_VER" should be used for |
| 24 | any purpose other than "Windows Intel x86 specific" and "Microsoft |
| 25 | compiler specific". Therefore, these should be very rare. |
| 26 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 27 | */ |
| 28 | |
Fred Drake | 91c4e2b | 2000-06-19 13:41:54 +0000 | [diff] [blame] | 29 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 30 | /* |
| 31 | Some systems require special declarations for data items imported |
| 32 | or exported from dynamic link libraries. Note that the definition |
| 33 | of DL_IMPORT covers both cases. Define USE_DL_IMPORT for the client |
| 34 | of a DLL. Define USE_DL_EXPORT when making a DLL. |
| 35 | */ |
| 36 | |
| 37 | #include <io.h> |
| 38 | #define HAVE_LIMITS_H |
Tim Peters | 58e0a8c | 2001-05-14 22:32:33 +0000 | [diff] [blame] | 39 | #define HAVE_SYS_UTIME_H |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 40 | #define HAVE_HYPOT |
Fred Drake | 832181e | 2001-07-17 20:35:59 +0000 | [diff] [blame] | 41 | #define HAVE_TEMPNAM |
| 42 | #define HAVE_TMPFILE |
| 43 | #define HAVE_TMPNAM |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 44 | #define DONT_HAVE_SIG_ALARM |
| 45 | #define DONT_HAVE_SIG_PAUSE |
Guido van Rossum | 1bc716f | 1996-06-28 19:12:06 +0000 | [diff] [blame] | 46 | #define LONG_BIT 32 |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 47 | #define PREFIX "" |
| 48 | #define EXEC_PREFIX "" |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 49 | |
| 50 | /* Microsoft C defines _MSC_VER */ |
Guido van Rossum | c66ae96 | 2000-05-08 14:14:48 +0000 | [diff] [blame] | 51 | #ifdef _MSC_VER |
| 52 | |
| 53 | /* MSVC defines _WINxx to differentiate the windows platform types |
| 54 | |
| 55 | Note that for compatibility reasons _WIN32 is defined on Win32 |
| 56 | *and* on Win64. For the same reasons, in Python, MS_WIN32 is |
| 57 | defined on Win32 *and* Win64. Win32 only code must therefore be |
| 58 | guarded as follows: |
| 59 | #if defined(MS_WIN32) && !defined(MS_WIN64) |
| 60 | */ |
| 61 | #ifdef _WIN64 |
| 62 | #define MS_WIN64 |
| 63 | #endif |
| 64 | #ifdef _WIN32 |
| 65 | #define NT /* NT is obsolete - please use MS_WIN32 instead */ |
| 66 | #define MS_WIN32 |
| 67 | #endif |
| 68 | #ifdef _WIN16 |
| 69 | #define MS_WIN16 |
| 70 | #endif |
| 71 | #define MS_WINDOWS |
| 72 | |
| 73 | /* set the COMPILER */ |
| 74 | #ifdef MS_WIN64 |
| 75 | #ifdef _M_IX86 |
| 76 | #define COMPILER "[MSC 64 bit (Intel)]" |
| 77 | #elif defined(_M_ALPHA) |
| 78 | #define COMPILER "[MSC 64 bit (Alpha)]" |
| 79 | #else |
| 80 | #define COMPILER "[MSC 64 bit (Unknown)]" |
| 81 | #endif |
| 82 | #endif /* MS_WIN64 */ |
| 83 | |
| 84 | #if defined(MS_WIN32) && !defined(MS_WIN64) |
| 85 | #ifdef _M_IX86 |
| 86 | #define COMPILER "[MSC 32 bit (Intel)]" |
| 87 | #elif defined(_M_ALPHA) |
| 88 | #define COMPILER "[MSC 32 bit (Alpha)]" |
| 89 | #else |
| 90 | #define COMPILER "[MSC (Unknown)]" |
| 91 | #endif |
| 92 | #endif /* MS_WIN32 && !MS_WIN64 */ |
| 93 | |
| 94 | #endif /* _MSC_VER */ |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 95 | |
| 96 | #if defined(_MSC_VER) && _MSC_VER > 850 |
Guido van Rossum | 1bc716f | 1996-06-28 19:12:06 +0000 | [diff] [blame] | 97 | /* Start of defines for MS_WIN32 using VC++ 2.0 and up */ |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 98 | |
Guido van Rossum | eaf9b6c | 1996-08-22 00:06:59 +0000 | [diff] [blame] | 99 | /* For NT the Python core is in a DLL by default. Test the |
| 100 | standard macro MS_COREDLL to find out. If you have an exception |
| 101 | you must define MS_NO_COREDLL (do not test this macro) */ |
| 102 | #ifndef MS_NO_COREDLL |
| 103 | #define MS_COREDLL /* Python core is in a DLL */ |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 104 | #ifndef USE_DL_EXPORT |
| 105 | #define USE_DL_IMPORT |
| 106 | #endif /* !USE_DL_EXPORT */ |
Guido van Rossum | eaf9b6c | 1996-08-22 00:06:59 +0000 | [diff] [blame] | 107 | #endif /* !MS_NO_COREDLL */ |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 108 | |
Guido van Rossum | 52f4915 | 1998-04-11 02:31:30 +0000 | [diff] [blame] | 109 | #define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk" |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 110 | typedef int pid_t; |
Guido van Rossum | 1bc716f | 1996-06-28 19:12:06 +0000 | [diff] [blame] | 111 | #define WORD_BIT 32 |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 112 | #pragma warning(disable:4113) |
| 113 | #define hypot _hypot |
| 114 | #include <stdio.h> |
| 115 | #define HAVE_CLOCK |
| 116 | #define HAVE_STRFTIME |
Guido van Rossum | 9b499d2 | 1998-08-12 02:10:05 +0000 | [diff] [blame] | 117 | #define HAVE_STRERROR |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 118 | #define NT_THREADS |
| 119 | #define WITH_THREAD |
| 120 | #ifndef NETSCAPE_PI |
| 121 | #define USE_SOCKET |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 122 | #endif |
| 123 | #ifdef USE_DL_IMPORT |
| 124 | #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE |
| 125 | #endif |
| 126 | #ifdef USE_DL_EXPORT |
| 127 | #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE |
Guido van Rossum | 9df827f | 1998-12-10 16:50:49 +0000 | [diff] [blame] | 128 | #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 129 | #endif |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 130 | |
Guido van Rossum | 3293b07 | 1998-08-25 16:07:15 +0000 | [diff] [blame] | 131 | #define HAVE_LONG_LONG 1 |
| 132 | #define LONG_LONG __int64 |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 133 | #endif /* _MSC_VER && > 850 */ |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 134 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 135 | /* The Borland compiler defines __BORLANDC__ */ |
Guido van Rossum | cf6c0ea | 1996-10-21 14:52:24 +0000 | [diff] [blame] | 136 | /* XXX These defines are likely incomplete, but should be easy to fix. */ |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 137 | #ifdef __BORLANDC__ |
| 138 | #define COMPILER "[Borland]" |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 139 | #define HAVE_CLOCK |
| 140 | #define HAVE_STRFTIME |
Mark Hammond | c756bdb | 2000-08-15 22:33:59 +0000 | [diff] [blame] | 141 | |
| 142 | #ifdef _WIN32 |
| 143 | |
| 144 | /* tested with BCC 5.5 (__BORLANDC__ >= 0x0550) |
| 145 | */ |
| 146 | #define NT /* NT is obsolete - please use MS_WIN32 instead */ |
| 147 | #define MS_WIN32 |
| 148 | #define MS_WINDOWS |
| 149 | |
| 150 | /* For NT the Python core is in a DLL by default. Test the |
| 151 | standard macro MS_COREDLL to find out. If you have an exception |
| 152 | you must define MS_NO_COREDLL (do not test this macro) */ |
| 153 | #ifndef MS_NO_COREDLL |
| 154 | #define MS_COREDLL /* Python core is in a DLL */ |
| 155 | #ifndef USE_DL_EXPORT |
| 156 | #define USE_DL_IMPORT |
| 157 | #endif /* !USE_DL_EXPORT */ |
| 158 | #endif /* !MS_NO_COREDLL */ |
| 159 | |
| 160 | #define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk" |
| 161 | typedef int pid_t; |
| 162 | #define WORD_BIT 32 |
| 163 | #include <stdio.h> |
| 164 | #define HAVE_STRERROR |
| 165 | #define NT_THREADS |
| 166 | #define WITH_THREAD |
| 167 | #ifndef NETSCAPE_PI |
| 168 | #define USE_SOCKET |
| 169 | #endif |
| 170 | /* BCC55 seems to understand __declspec(dllimport), it is used in its |
| 171 | own header files (winnt.h, ...) */ |
| 172 | #ifdef USE_DL_IMPORT |
| 173 | #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE |
| 174 | #endif |
| 175 | #ifdef USE_DL_EXPORT |
| 176 | #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE |
| 177 | #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE |
| 178 | #endif |
| 179 | |
| 180 | #define HAVE_LONG_LONG 1 |
| 181 | #define LONG_LONG __int64 |
| 182 | |
Tim Peters | 58e0a8c | 2001-05-14 22:32:33 +0000 | [diff] [blame] | 183 | #undef HAVE_SYS_UTIME_H |
| 184 | #define HAVE_UTIME_H |
| 185 | #define HAVE_DIRENT_H |
| 186 | #define HAVE_CLOCK |
Tim Peters | 7f00deb | 2001-04-21 03:20:47 +0000 | [diff] [blame] | 187 | |
Mark Hammond | c756bdb | 2000-08-15 22:33:59 +0000 | [diff] [blame] | 188 | #else /* !_WIN32 */ |
Guido van Rossum | 6042741 | 2000-11-13 17:29:30 +0000 | [diff] [blame] | 189 | #error "Only Win32 and later are supported" |
Mark Hammond | c756bdb | 2000-08-15 22:33:59 +0000 | [diff] [blame] | 190 | #endif /* !_WIN32 */ |
| 191 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 192 | #endif /* BORLANDC */ |
| 193 | |
Mark Hammond | c756bdb | 2000-08-15 22:33:59 +0000 | [diff] [blame] | 194 | /* egcs/gnu-win32 defines __GNUC__ and _WIN32 */ |
| 195 | #if defined(__GNUC__) && defined(_WIN32) |
Tim Peters | b26f363 | 2002-03-22 06:32:32 +0000 | [diff] [blame] | 196 | /* XXX These defines are likely incomplete, but should be easy to fix. |
Mark Hammond | c756bdb | 2000-08-15 22:33:59 +0000 | [diff] [blame] | 197 | They should be complete enough to build extension modules. */ |
| 198 | /* Suggested by Rene Liebscher <R.Liebscher@gmx.de> to avoid a GCC 2.91.* |
| 199 | bug that requires structure imports. More recent versions of the |
| 200 | compiler don't exhibit this bug. |
| 201 | */ |
| 202 | #if (__GNUC__==2) && (__GNUC_MINOR__<=91) |
| 203 | #warning "Please use an up-to-date version of gcc! (>2.91 recommended)" |
| 204 | #endif |
| 205 | |
| 206 | #define NT /* NT is obsolete - please use MS_WIN32 instead */ |
| 207 | #define MS_WIN32 |
| 208 | #define MS_WINDOWS |
| 209 | |
| 210 | /* For NT the Python core is in a DLL by default. Test the |
| 211 | standard macro MS_COREDLL to find out. If you have an exception |
| 212 | you must define MS_NO_COREDLL (do not test this macro) */ |
| 213 | #ifndef MS_NO_COREDLL |
| 214 | #define MS_COREDLL /* Python core is in a DLL */ |
| 215 | #ifndef USE_DL_EXPORT |
| 216 | #define USE_DL_IMPORT |
| 217 | #endif /* !USE_DL_EXPORT */ |
| 218 | #endif /* !MS_NO_COREDLL */ |
| 219 | |
| 220 | #define COMPILER "[gcc]" |
| 221 | #define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk" |
| 222 | #define WORD_BIT 32 |
| 223 | #define hypot _hypot |
| 224 | #include <stdio.h> |
| 225 | #define HAVE_CLOCK |
| 226 | #define HAVE_STRFTIME |
| 227 | #define HAVE_STRERROR |
| 228 | #define NT_THREADS |
| 229 | #define WITH_THREAD |
| 230 | #ifndef NETSCAPE_PI |
| 231 | #define USE_SOCKET |
| 232 | #endif |
| 233 | #ifdef USE_DL_IMPORT |
| 234 | #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE |
| 235 | #endif |
| 236 | #ifdef USE_DL_EXPORT |
| 237 | #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE |
| 238 | #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE |
| 239 | #endif |
| 240 | |
| 241 | #define HAVE_LONG_LONG 1 |
Tim Peters | b26f363 | 2002-03-22 06:32:32 +0000 | [diff] [blame] | 242 | #define LONG_LONG long long |
Mark Hammond | c756bdb | 2000-08-15 22:33:59 +0000 | [diff] [blame] | 243 | #endif /* GNUC */ |
| 244 | |
| 245 | /* lcc-win32 defines __LCC__ */ |
| 246 | |
| 247 | #if defined(__LCC__) |
Tim Peters | b26f363 | 2002-03-22 06:32:32 +0000 | [diff] [blame] | 248 | /* XXX These defines are likely incomplete, but should be easy to fix. |
Mark Hammond | c756bdb | 2000-08-15 22:33:59 +0000 | [diff] [blame] | 249 | They should be complete enough to build extension modules. */ |
| 250 | |
| 251 | #define NT /* NT is obsolete - please use MS_WIN32 instead */ |
| 252 | #define MS_WIN32 |
| 253 | #define MS_WINDOWS |
| 254 | |
| 255 | /* For NT the Python core is in a DLL by default. Test the |
| 256 | standard macro MS_COREDLL to find out. If you have an exception |
| 257 | you must define MS_NO_COREDLL (do not test this macro) */ |
| 258 | #ifndef MS_NO_COREDLL |
| 259 | #define MS_COREDLL /* Python core is in a DLL */ |
| 260 | #ifndef USE_DL_EXPORT |
| 261 | #define USE_DL_IMPORT |
| 262 | #endif /* !USE_DL_EXPORT */ |
| 263 | #endif /* !MS_NO_COREDLL */ |
| 264 | |
| 265 | #define COMPILER "[lcc-win32]" |
| 266 | #define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk" |
| 267 | typedef int pid_t; |
| 268 | #define WORD_BIT 32 |
| 269 | #include <stdio.h> |
| 270 | #define HAVE_CLOCK |
| 271 | #define HAVE_STRFTIME |
| 272 | #define HAVE_STRERROR |
| 273 | #define NT_THREADS |
| 274 | #define WITH_THREAD |
| 275 | #ifndef NETSCAPE_PI |
| 276 | #define USE_SOCKET |
| 277 | #endif |
| 278 | #ifdef USE_DL_IMPORT |
| 279 | #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE |
| 280 | #endif |
| 281 | #ifdef USE_DL_EXPORT |
| 282 | #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE |
| 283 | #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE |
| 284 | #endif |
| 285 | |
| 286 | #define HAVE_LONG_LONG 1 |
| 287 | #define LONG_LONG __int64 |
| 288 | #endif /* LCC */ |
| 289 | |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 290 | /* End of compilers - finish up */ |
| 291 | |
Fredrik Lundh | 6947d0b | 2000-08-07 20:16:28 +0000 | [diff] [blame] | 292 | /* define some ANSI types that are not defined in earlier Win headers */ |
Guido van Rossum | 361b583 | 2000-06-30 22:17:53 +0000 | [diff] [blame] | 293 | #if _MSC_VER >= 1200 /* This file only exists in VC 6.0 or higher */ |
Fred Drake | a3f6e91 | 2000-06-29 20:44:47 +0000 | [diff] [blame] | 294 | #include <basetsd.h> |
Guido van Rossum | 361b583 | 2000-06-30 22:17:53 +0000 | [diff] [blame] | 295 | #endif |
Fred Drake | a3f6e91 | 2000-06-29 20:44:47 +0000 | [diff] [blame] | 296 | |
Guido van Rossum | c66ae96 | 2000-05-08 14:14:48 +0000 | [diff] [blame] | 297 | #if defined(MS_WIN64) |
Guido van Rossum | da5cc82 | 2000-05-10 13:25:32 +0000 | [diff] [blame] | 298 | /* maintain "win32" sys.platform for backward compatibility of Python code, |
| 299 | the Win64 API should be close enough to the Win32 API to make this |
| 300 | preferable */ |
Fred Drake | a3f6e91 | 2000-06-29 20:44:47 +0000 | [diff] [blame] | 301 | # define PLATFORM "win32" |
| 302 | # define SIZEOF_VOID_P 8 |
| 303 | # define SIZEOF_TIME_T 8 |
| 304 | # define SIZEOF_OFF_T 4 |
| 305 | # define SIZEOF_FPOS_T 8 |
| 306 | # define SIZEOF_HKEY 8 |
| 307 | /* configure.in defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG, |
| 308 | sizeof(off_t) > sizeof(long), and sizeof(LONG_LONG) >= sizeof(off_t). |
| 309 | On Win64 the second condition is not true, but if fpos_t replaces off_t |
| 310 | then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64 |
| 311 | should define this. */ |
| 312 | # define HAVE_LARGEFILE_SUPPORT |
Guido van Rossum | c66ae96 | 2000-05-08 14:14:48 +0000 | [diff] [blame] | 313 | #elif defined(MS_WIN32) |
Fred Drake | a3f6e91 | 2000-06-29 20:44:47 +0000 | [diff] [blame] | 314 | # define PLATFORM "win32" |
Tim Peters | 6e13a56 | 2001-09-06 00:32:15 +0000 | [diff] [blame] | 315 | # define HAVE_LARGEFILE_SUPPORT |
Fred Drake | a3f6e91 | 2000-06-29 20:44:47 +0000 | [diff] [blame] | 316 | # ifdef _M_ALPHA |
| 317 | # define SIZEOF_VOID_P 8 |
| 318 | # define SIZEOF_TIME_T 8 |
| 319 | # else |
| 320 | # define SIZEOF_VOID_P 4 |
| 321 | # define SIZEOF_TIME_T 4 |
| 322 | # define SIZEOF_OFF_T 4 |
| 323 | # define SIZEOF_FPOS_T 8 |
| 324 | # define SIZEOF_HKEY 4 |
| 325 | # endif |
Guido van Rossum | c66ae96 | 2000-05-08 14:14:48 +0000 | [diff] [blame] | 326 | #endif |
| 327 | |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 328 | |
Guido van Rossum | f4aeb84 | 1998-02-19 20:59:23 +0000 | [diff] [blame] | 329 | #ifdef MS_WIN32 |
Guido van Rossum | d3ab101 | 1998-05-29 02:53:29 +0000 | [diff] [blame] | 330 | |
Greg Ward | ff7b562 | 2000-08-05 00:58:14 +0000 | [diff] [blame] | 331 | #if !defined(USE_DL_EXPORT) && defined(_MSC_VER) |
| 332 | /* So nobody using MSVC needs to specify the .lib in their Makefile any |
| 333 | more (other compilers will still need to do so, but that's taken care |
| 334 | of by the Distutils, so it's not a problem). */ |
Guido van Rossum | 446f033 | 1998-08-07 15:32:00 +0000 | [diff] [blame] | 335 | #ifdef _DEBUG |
Tim Peters | 83a3f0c | 2001-12-21 22:06:12 +0000 | [diff] [blame] | 336 | #pragma comment(lib,"python23_d.lib") |
Guido van Rossum | 446f033 | 1998-08-07 15:32:00 +0000 | [diff] [blame] | 337 | #else |
Tim Peters | 83a3f0c | 2001-12-21 22:06:12 +0000 | [diff] [blame] | 338 | #pragma comment(lib,"python23.lib") |
Guido van Rossum | 446f033 | 1998-08-07 15:32:00 +0000 | [diff] [blame] | 339 | #endif |
Guido van Rossum | 1a87be1 | 1998-08-08 18:25:43 +0000 | [diff] [blame] | 340 | #endif /* USE_DL_EXPORT */ |
Guido van Rossum | 446f033 | 1998-08-07 15:32:00 +0000 | [diff] [blame] | 341 | |
Guido van Rossum | bffd683 | 2000-01-20 22:32:56 +0000 | [diff] [blame] | 342 | #ifdef _DEBUG |
| 343 | #define Py_DEBUG |
| 344 | #endif |
| 345 | |
Tim Peters | 208efe5 | 2001-06-26 22:40:47 +0000 | [diff] [blame] | 346 | #define SIZEOF_SHORT 2 |
Guido van Rossum | d3ab101 | 1998-05-29 02:53:29 +0000 | [diff] [blame] | 347 | #define SIZEOF_INT 4 |
| 348 | #define SIZEOF_LONG 4 |
Guido van Rossum | b00d252 | 1998-09-17 13:19:36 +0000 | [diff] [blame] | 349 | #define SIZEOF_LONG_LONG 8 |
Guido van Rossum | d3ab101 | 1998-05-29 02:53:29 +0000 | [diff] [blame] | 350 | |
Guido van Rossum | f4aeb84 | 1998-02-19 20:59:23 +0000 | [diff] [blame] | 351 | #endif |
| 352 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 353 | /* Fairly standard from here! */ |
| 354 | |
| 355 | /* Define if on AIX 3. |
| 356 | System headers sometimes define this. |
| 357 | We just want to avoid a redefinition error message. */ |
| 358 | #ifndef _ALL_SOURCE |
| 359 | /* #undef _ALL_SOURCE */ |
| 360 | #endif |
| 361 | |
| 362 | /* Define to empty if the keyword does not work. */ |
| 363 | /* #define const */ |
| 364 | |
| 365 | /* Define if you have dirent.h. */ |
| 366 | /* #define DIRENT 1 */ |
| 367 | |
| 368 | /* Define to the type of elements in the array set by `getgroups'. |
| 369 | Usually this is either `int' or `gid_t'. */ |
| 370 | /* #undef GETGROUPS_T */ |
| 371 | |
| 372 | /* Define to `int' if <sys/types.h> doesn't define. */ |
| 373 | /* #undef gid_t */ |
| 374 | |
| 375 | /* Define if your struct tm has tm_zone. */ |
| 376 | /* #undef HAVE_TM_ZONE */ |
| 377 | |
| 378 | /* Define if you don't have tm_zone but do have the external array |
| 379 | tzname. */ |
| 380 | #define HAVE_TZNAME |
| 381 | |
| 382 | /* Define if on MINIX. */ |
| 383 | /* #undef _MINIX */ |
| 384 | |
| 385 | /* Define to `int' if <sys/types.h> doesn't define. */ |
| 386 | /* #undef mode_t */ |
| 387 | |
| 388 | /* Define if you don't have dirent.h, but have ndir.h. */ |
| 389 | /* #undef NDIR */ |
| 390 | |
| 391 | /* Define to `long' if <sys/types.h> doesn't define. */ |
| 392 | /* #undef off_t */ |
| 393 | |
| 394 | /* Define to `int' if <sys/types.h> doesn't define. */ |
| 395 | /* #undef pid_t */ |
| 396 | |
| 397 | /* Define if the system does not provide POSIX.1 features except |
| 398 | with this defined. */ |
| 399 | /* #undef _POSIX_1_SOURCE */ |
| 400 | |
| 401 | /* Define if you need to in order for stat and other things to work. */ |
| 402 | /* #undef _POSIX_SOURCE */ |
| 403 | |
| 404 | /* Define as the return type of signal handlers (int or void). */ |
| 405 | #define RETSIGTYPE void |
| 406 | |
| 407 | /* Define to `unsigned' if <sys/types.h> doesn't define. */ |
| 408 | /* #undef size_t */ |
| 409 | |
Guido van Rossum | db575db | 2000-04-24 15:37:34 +0000 | [diff] [blame] | 410 | /* Define to `int' if <sys/types.h> doesn't define. */ |
Martin v. Löwis | 272cb40 | 2002-03-01 08:31:07 +0000 | [diff] [blame] | 411 | #if _MSC_VER + 0 >= 1300 |
| 412 | /* VC.NET typedefs socklen_t in ws2tcpip.h. */ |
| 413 | #else |
Guido van Rossum | db575db | 2000-04-24 15:37:34 +0000 | [diff] [blame] | 414 | #define socklen_t int |
Martin v. Löwis | 272cb40 | 2002-03-01 08:31:07 +0000 | [diff] [blame] | 415 | #endif |
Guido van Rossum | db575db | 2000-04-24 15:37:34 +0000 | [diff] [blame] | 416 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 417 | /* Define if you have the ANSI C header files. */ |
| 418 | #define STDC_HEADERS 1 |
| 419 | |
| 420 | /* Define if you don't have dirent.h, but have sys/dir.h. */ |
| 421 | /* #undef SYSDIR */ |
| 422 | |
| 423 | /* Define if you don't have dirent.h, but have sys/ndir.h. */ |
| 424 | /* #undef SYSNDIR */ |
| 425 | |
| 426 | /* Define if you can safely include both <sys/time.h> and <time.h>. */ |
| 427 | /* #undef TIME_WITH_SYS_TIME */ |
| 428 | |
| 429 | /* Define if your <sys/time.h> declares struct tm. */ |
| 430 | /* #define TM_IN_SYS_TIME 1 */ |
| 431 | |
| 432 | /* Define to `int' if <sys/types.h> doesn't define. */ |
| 433 | /* #undef uid_t */ |
| 434 | |
| 435 | /* Define if the closedir function returns void instead of int. */ |
| 436 | /* #undef VOID_CLOSEDIR */ |
| 437 | |
| 438 | /* Define if your <unistd.h> contains bad prototypes for exec*() |
| 439 | (as it does on SGI IRIX 4.x) */ |
| 440 | /* #undef BAD_EXEC_PROTOTYPES */ |
| 441 | |
| 442 | /* Define if your compiler botches static forward declarations |
| 443 | (as it does on SCI ODT 3.0) */ |
| 444 | #define BAD_STATIC_FORWARD 1 |
| 445 | |
| 446 | /* Define if getpgrp() must be called as getpgrp(0) |
| 447 | and (consequently) setpgrp() as setpgrp(0, 0). */ |
| 448 | /* #undef GETPGRP_HAVE_ARGS */ |
| 449 | |
| 450 | /* Define this if your time.h defines altzone */ |
| 451 | /* #define HAVE_ALTZONE */ |
| 452 | |
Guido van Rossum | eaf9b6c | 1996-08-22 00:06:59 +0000 | [diff] [blame] | 453 | /* Define if you have the putenv function. */ |
| 454 | #ifdef MS_WIN32 |
| 455 | /* Does this exist on Win16? */ |
| 456 | #define HAVE_PUTENV |
| 457 | #endif |
| 458 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 459 | /* Define if your compiler supports function prototypes */ |
| 460 | #define HAVE_PROTOTYPES |
| 461 | |
| 462 | /* Define if you can safely include both <sys/select.h> and <sys/time.h> |
| 463 | (which you can't on SCO ODT 3.0). */ |
| 464 | /* #undef SYS_SELECT_WITH_SYS_TIME */ |
| 465 | |
| 466 | /* Define if you want to use SGI (IRIX 4) dynamic linking. |
| 467 | This requires the "dl" library by Jack Jansen, |
| 468 | ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z. |
| 469 | Don't bother on IRIX 5, it already has dynamic linking using SunOS |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 470 | style shared libraries */ |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 471 | /* #undef WITH_SGI_DL */ |
| 472 | |
| 473 | /* Define if you want to emulate SGI (IRIX 4) dynamic linking. |
| 474 | This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4), |
| 475 | Sequent Symmetry (Dynix), and Atari ST. |
| 476 | This requires the "dl-dld" library, |
| 477 | ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z, |
| 478 | as well as the "GNU dld" library, |
| 479 | ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z. |
| 480 | Don't bother on SunOS 4 or 5, they already have dynamic linking using |
Guido van Rossum | 950a126 | 1996-07-30 17:38:17 +0000 | [diff] [blame] | 481 | shared libraries */ |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 482 | /* #undef WITH_DL_DLD */ |
| 483 | |
| 484 | /* Define if you want to compile in rudimentary thread support */ |
| 485 | /* #undef WITH_THREAD */ |
| 486 | |
| 487 | /* Define if you want to use the GNU readline library */ |
| 488 | /* #define WITH_READLINE 1 */ |
| 489 | |
Fredrik Lundh | 9b14ab3 | 2001-06-26 22:59:49 +0000 | [diff] [blame] | 490 | /* Define if you want to have a Unicode type. */ |
| 491 | #define Py_USING_UNICODE |
| 492 | |
| 493 | /* Define as the integral type used for Unicode representation. */ |
| 494 | #define PY_UNICODE_TYPE unsigned short |
| 495 | |
| 496 | /* Define as the size of the unicode type. */ |
| 497 | #define Py_UNICODE_SIZE SIZEOF_SHORT |
| 498 | |
Fredrik Lundh | 793c197 | 2001-06-27 19:49:17 +0000 | [diff] [blame] | 499 | /* Define if you have a useable wchar_t type defined in wchar.h; useable |
| 500 | means wchar_t must be 16-bit unsigned type. (see |
| 501 | Include/unicodeobject.h). */ |
| 502 | #if Py_UNICODE_SIZE == 2 |
| 503 | #define HAVE_USABLE_WCHAR_T |
| 504 | #endif |
| 505 | |
Jeremy Hylton | c5007aa | 2000-06-30 05:02:53 +0000 | [diff] [blame] | 506 | /* Define if you want cycle garbage collection */ |
Guido van Rossum | 4767402 | 2000-06-30 20:31:50 +0000 | [diff] [blame] | 507 | #define WITH_CYCLE_GC 1 |
Jeremy Hylton | c5007aa | 2000-06-30 05:02:53 +0000 | [diff] [blame] | 508 | |
Tim Peters | b26f363 | 2002-03-22 06:32:32 +0000 | [diff] [blame] | 509 | /* Use Python's own small-block memory-allocator. */ |
| 510 | #define WITH_PYMALLOC 1 |
| 511 | |
Tim Peters | 639295f | 2002-04-21 07:30:30 +0000 | [diff] [blame^] | 512 | /* Enable \n, \r, \r\n line ends on import; also the 'U' mode flag for open. */ |
| 513 | #define WITH_UNIVERSAL_NEWLINES 1 |
| 514 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 515 | /* Define if you have clock. */ |
| 516 | /* #define HAVE_CLOCK */ |
| 517 | |
Guido van Rossum | 9f9fa6d | 1999-12-20 22:57:41 +0000 | [diff] [blame] | 518 | /* Define when any dynamic module loading is enabled */ |
| 519 | #define HAVE_DYNAMIC_LOADING |
| 520 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 521 | /* Define if you have ftime. */ |
| 522 | #define HAVE_FTIME |
| 523 | |
| 524 | /* Define if you have getpeername. */ |
Guido van Rossum | c339753 | 1997-05-06 15:58:18 +0000 | [diff] [blame] | 525 | #define HAVE_GETPEERNAME |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 526 | |
| 527 | /* Define if you have getpgrp. */ |
| 528 | /* #undef HAVE_GETPGRP */ |
| 529 | |
| 530 | /* Define if you have getpid. */ |
Guido van Rossum | c339753 | 1997-05-06 15:58:18 +0000 | [diff] [blame] | 531 | #define HAVE_GETPID |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 532 | |
| 533 | /* Define if you have gettimeofday. */ |
| 534 | /* #undef HAVE_GETTIMEOFDAY */ |
| 535 | |
| 536 | /* Define if you have getwd. */ |
| 537 | /* #undef HAVE_GETWD */ |
| 538 | |
| 539 | /* Define if you have lstat. */ |
| 540 | /* #undef HAVE_LSTAT */ |
| 541 | |
Guido van Rossum | 63096d4 | 1998-04-10 21:28:49 +0000 | [diff] [blame] | 542 | /* Define if you have the mktime function. */ |
| 543 | #define HAVE_MKTIME |
| 544 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 545 | /* Define if you have nice. */ |
| 546 | /* #undef HAVE_NICE */ |
| 547 | |
| 548 | /* Define if you have readlink. */ |
| 549 | /* #undef HAVE_READLINK */ |
| 550 | |
| 551 | /* Define if you have select. */ |
| 552 | /* #undef HAVE_SELECT */ |
| 553 | |
| 554 | /* Define if you have setpgid. */ |
| 555 | /* #undef HAVE_SETPGID */ |
| 556 | |
| 557 | /* Define if you have setpgrp. */ |
| 558 | /* #undef HAVE_SETPGRP */ |
| 559 | |
| 560 | /* Define if you have setsid. */ |
| 561 | /* #undef HAVE_SETSID */ |
| 562 | |
Guido van Rossum | c339753 | 1997-05-06 15:58:18 +0000 | [diff] [blame] | 563 | /* Define if you have setvbuf. */ |
| 564 | #define HAVE_SETVBUF |
| 565 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 566 | /* Define if you have siginterrupt. */ |
| 567 | /* #undef HAVE_SIGINTERRUPT */ |
| 568 | |
| 569 | /* Define if you have symlink. */ |
| 570 | /* #undef HAVE_SYMLINK */ |
| 571 | |
| 572 | /* Define if you have tcgetpgrp. */ |
| 573 | /* #undef HAVE_TCGETPGRP */ |
| 574 | |
| 575 | /* Define if you have tcsetpgrp. */ |
| 576 | /* #undef HAVE_TCSETPGRP */ |
| 577 | |
| 578 | /* Define if you have times. */ |
| 579 | /* #undef HAVE_TIMES */ |
| 580 | |
| 581 | /* Define if you have uname. */ |
| 582 | /* #undef HAVE_UNAME */ |
| 583 | |
| 584 | /* Define if you have waitpid. */ |
| 585 | /* #undef HAVE_WAITPID */ |
| 586 | |
| 587 | /* Define if you have the <dlfcn.h> header file. */ |
| 588 | /* #undef HAVE_DLFCN_H */ |
| 589 | |
| 590 | /* Define if you have the <fcntl.h> header file. */ |
| 591 | #define HAVE_FCNTL_H 1 |
| 592 | |
| 593 | /* Define if you have the <signal.h> header file. */ |
| 594 | #define HAVE_SIGNAL_H 1 |
| 595 | |
| 596 | /* Define if you have the <stdarg.h> header file. */ |
| 597 | #define HAVE_STDARG_H 1 |
| 598 | |
| 599 | /* Define if you have the <stdarg.h> prototypes. */ |
| 600 | #define HAVE_STDARG_PROTOTYPES |
| 601 | |
Guido van Rossum | 4da55f0 | 1998-09-23 13:35:45 +0000 | [diff] [blame] | 602 | /* Define if you have the <stddef.h> header file. */ |
| 603 | #define HAVE_STDDEF_H 1 |
| 604 | |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 605 | /* Define if you have the <stdlib.h> header file. */ |
| 606 | #define HAVE_STDLIB_H 1 |
| 607 | |
| 608 | /* Define if you have the <sys/audioio.h> header file. */ |
| 609 | /* #undef HAVE_SYS_AUDIOIO_H */ |
| 610 | |
| 611 | /* Define if you have the <sys/param.h> header file. */ |
| 612 | /* #define HAVE_SYS_PARAM_H 1 */ |
| 613 | |
| 614 | /* Define if you have the <sys/select.h> header file. */ |
| 615 | /* #define HAVE_SYS_SELECT_H 1 */ |
| 616 | |
| 617 | /* Define if you have the <sys/time.h> header file. */ |
| 618 | /* #define HAVE_SYS_TIME_H 1 */ |
| 619 | |
| 620 | /* Define if you have the <sys/times.h> header file. */ |
| 621 | /* #define HAVE_SYS_TIMES_H 1 */ |
| 622 | |
| 623 | /* Define if you have the <sys/un.h> header file. */ |
| 624 | /* #define HAVE_SYS_UN_H 1 */ |
| 625 | |
| 626 | /* Define if you have the <sys/utime.h> header file. */ |
Tim Peters | 58e0a8c | 2001-05-14 22:32:33 +0000 | [diff] [blame] | 627 | /* #define HAVE_SYS_UTIME_H 1 */ |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 628 | |
| 629 | /* Define if you have the <sys/utsname.h> header file. */ |
| 630 | /* #define HAVE_SYS_UTSNAME_H 1 */ |
| 631 | |
| 632 | /* Define if you have the <thread.h> header file. */ |
| 633 | /* #undef HAVE_THREAD_H */ |
| 634 | |
| 635 | /* Define if you have the <unistd.h> header file. */ |
| 636 | /* #define HAVE_UNISTD_H 1 */ |
| 637 | |
| 638 | /* Define if you have the <utime.h> header file. */ |
| 639 | /* #define HAVE_UTIME_H 1 */ |
| 640 | |
| 641 | /* Define if you have the dl library (-ldl). */ |
| 642 | /* #undef HAVE_LIBDL */ |
| 643 | |
| 644 | /* Define if you have the mpc library (-lmpc). */ |
| 645 | /* #undef HAVE_LIBMPC */ |
| 646 | |
| 647 | /* Define if you have the nsl library (-lnsl). */ |
| 648 | #define HAVE_LIBNSL 1 |
| 649 | |
| 650 | /* Define if you have the seq library (-lseq). */ |
| 651 | /* #undef HAVE_LIBSEQ */ |
| 652 | |
| 653 | /* Define if you have the socket library (-lsocket). */ |
| 654 | #define HAVE_LIBSOCKET 1 |
| 655 | |
| 656 | /* Define if you have the sun library (-lsun). */ |
| 657 | /* #undef HAVE_LIBSUN */ |
| 658 | |
| 659 | /* Define if you have the termcap library (-ltermcap). */ |
| 660 | /* #undef HAVE_LIBTERMCAP */ |
| 661 | |
| 662 | /* Define if you have the termlib library (-ltermlib). */ |
| 663 | /* #undef HAVE_LIBTERMLIB */ |
| 664 | |
| 665 | /* Define if you have the thread library (-lthread). */ |
| 666 | /* #undef HAVE_LIBTHREAD */ |
Guido van Rossum | 87d5e70 | 1996-05-28 22:50:17 +0000 | [diff] [blame] | 667 | #endif /* !Py_CONFIG_H */ |