4 /* pyconfig.h. NOT Generated automatically by configure.
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.
11 The code specific to Windows should be wrapped around one of
12 the following #defines
14 MS_WIN64 - Code specific to the MS Win64 API
15 MS_WIN32 - Code specific to the MS Win32 (and Win64) API (obsolete, this covers all supported APIs)
16 MS_WINDOWS - Code specific to Windows, but all versions.
17 Py_ENABLE_SHARED - Code if the Python core is built as a DLL.
19 Also note that neither "_M_IX86" or "_MSC_VER" should be used for
20 any purpose other than "Windows Intel x86 specific" and "Microsoft
21 compiler specific". Therefore, these should be very rare.
24 NOTE: The following symbols are deprecated:
25 NT, WIN32, USE_DL_EXPORT, USE_DL_IMPORT, DL_EXPORT, DL_IMPORT
32 #define HAVE_SYS_UTIME_H
40 #define DONT_HAVE_SIG_ALARM
41 #define DONT_HAVE_SIG_PAUSE
45 #define EXEC_PREFIX ""
47 #define MS_WIN32 /* only support win32 and greater. */
50 # define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
58 /* Compiler specific defines */
60 /* ------------------------------------------------------------------------*/
61 /* Microsoft C defines _MSC_VER */
64 /* MSVC defines _WINxx to differentiate the windows platform types
66 Note that for compatibility reasons _WIN32 is defined on Win32
67 *and* on Win64. For the same reasons, in Python, MS_WIN32 is
68 defined on Win32 *and* Win64. Win32 only code must therefore be
70 #if defined(MS_WIN32) && !defined(MS_WIN64)
76 /* set the COMPILER */
79 #define COMPILER "[MSC 64 bit (Intel)]"
80 #elif defined(_M_ALPHA)
81 #define COMPILER "[MSC 64 bit (Alpha)]"
83 #define COMPILER "[MSC 64 bit (Unknown)]"
87 #if defined(MS_WIN32) && !defined(MS_WIN64)
89 #define COMPILER "[MSC 32 bit (Intel)]"
90 #elif defined(_M_ALPHA)
91 #define COMPILER "[MSC 32 bit (Alpha)]"
93 #define COMPILER "[MSC (Unknown)]"
95 #endif /* MS_WIN32 && !MS_WIN64 */
100 #endif /* _MSC_VER */
102 /* define some ANSI types that are not defined in earlier Win headers */
103 #if defined(_MSC_VER) && _MSC_VER >= 1200
104 /* This file only exists in VC 6.0 or higher */
108 /* ------------------------------------------------------------------------*/
109 /* The Borland compiler defines __BORLANDC__ */
110 /* XXX These defines are likely incomplete, but should be easy to fix. */
112 #define COMPILER "[Borland]"
115 /* tested with BCC 5.5 (__BORLANDC__ >= 0x0550)
119 /* BCC55 seems to understand __declspec(dllimport), it is used in its
120 own header files (winnt.h, ...) - so we can do nothing and get the default*/
122 #undef HAVE_SYS_UTIME_H
124 #define HAVE_DIRENT_H
126 /* rename a few functions for the Borland compiler */
128 #define _chsize chsize
129 #define _setmode setmode
132 #error "Only Win32 and later are supported"
135 #endif /* BORLANDC */
137 /* ------------------------------------------------------------------------*/
138 /* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
139 #if defined(__GNUC__) && defined(_WIN32)
140 /* XXX These defines are likely incomplete, but should be easy to fix.
141 They should be complete enough to build extension modules. */
142 /* Suggested by Rene Liebscher <R.Liebscher@gmx.de> to avoid a GCC 2.91.*
143 bug that requires structure imports. More recent versions of the
144 compiler don't exhibit this bug.
146 #if (__GNUC__==2) && (__GNUC_MINOR__<=91)
147 #warning "Please use an up-to-date version of gcc! (>2.91 recommended)"
150 #define COMPILER "[gcc]"
152 #define LONG_LONG long long
155 /* ------------------------------------------------------------------------*/
156 /* lcc-win32 defines __LCC__ */
158 /* XXX These defines are likely incomplete, but should be easy to fix.
159 They should be complete enough to build extension modules. */
161 #define COMPILER "[lcc-win32]"
163 /* __declspec() is supported here too - do nothing to get the defaults */
167 /* ------------------------------------------------------------------------*/
168 /* End of compilers - finish up */
174 /* 64 bit ints are usually spelt __int64 unless compiler has overridden */
175 #define HAVE_LONG_LONG 1
177 # define LONG_LONG __int64
180 /* For Windows the Python core is in a DLL by default. Test
181 Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
182 #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED)
183 # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */
184 # define MS_COREDLL /* deprecated old symbol */
185 #endif /* !MS_NO_COREDLL && ... */
187 /* Deprecated USE_DL_EXPORT macro - please use Py_BUILD_CORE */
189 # define Py_BUILD_CORE
190 #endif /* USE_DL_EXPORT */
192 /* All windows compilers that use this header support __declspec */
193 #define HAVE_DECLSPEC_DLL
195 /* For an MSVC DLL, we can nominate the .lib files used by extensions */
197 # ifndef Py_BUILD_CORE /* not building the core - must be an ext */
198 # if defined(_MSC_VER)
199 /* So MSVC users need not specify the .lib file in
200 their Makefile (other compilers are generally
201 taken care of by distutils.) */
203 # pragma comment(lib,"python23_d.lib")
205 # pragma comment(lib,"python23.lib")
207 # endif /* _MSC_VER */
208 # endif /* Py_BUILD_CORE */
209 #endif /* MS_COREDLL */
211 #if defined(MS_WIN64)
212 /* maintain "win32" sys.platform for backward compatibility of Python code,
213 the Win64 API should be close enough to the Win32 API to make this
215 # define PLATFORM "win32"
216 # define SIZEOF_VOID_P 8
217 # define SIZEOF_TIME_T 8
218 # define SIZEOF_OFF_T 4
219 # define SIZEOF_FPOS_T 8
220 # define SIZEOF_HKEY 8
221 /* configure.in defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG,
222 sizeof(off_t) > sizeof(long), and sizeof(LONG_LONG) >= sizeof(off_t).
223 On Win64 the second condition is not true, but if fpos_t replaces off_t
224 then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64
225 should define this. */
226 # define HAVE_LARGEFILE_SUPPORT
227 #elif defined(MS_WIN32)
228 # define PLATFORM "win32"
229 # define HAVE_LARGEFILE_SUPPORT
231 # define SIZEOF_VOID_P 8
232 # define SIZEOF_TIME_T 8
234 # define SIZEOF_VOID_P 4
235 # define SIZEOF_TIME_T 4
236 # define SIZEOF_OFF_T 4
237 # define SIZEOF_FPOS_T 8
238 # define SIZEOF_HKEY 4
249 #define SIZEOF_SHORT 2
251 #define SIZEOF_LONG 4
252 #define SIZEOF_LONG_LONG 8
256 /* Fairly standard from here! */
258 /* Define if on AIX 3.
259 System headers sometimes define this.
260 We just want to avoid a redefinition error message. */
262 /* #undef _ALL_SOURCE */
265 /* Define to empty if the keyword does not work. */
268 /* Define if you have dirent.h. */
269 /* #define DIRENT 1 */
271 /* Define to the type of elements in the array set by `getgroups'.
272 Usually this is either `int' or `gid_t'. */
273 /* #undef GETGROUPS_T */
275 /* Define to `int' if <sys/types.h> doesn't define. */
278 /* Define if your struct tm has tm_zone. */
279 /* #undef HAVE_TM_ZONE */
281 /* Define if you don't have tm_zone but do have the external array
285 /* Define if on MINIX. */
288 /* Define to `int' if <sys/types.h> doesn't define. */
291 /* Define if you don't have dirent.h, but have ndir.h. */
294 /* Define to `long' if <sys/types.h> doesn't define. */
297 /* Define to `int' if <sys/types.h> doesn't define. */
300 /* Define if the system does not provide POSIX.1 features except
301 with this defined. */
302 /* #undef _POSIX_1_SOURCE */
304 /* Define if you need to in order for stat and other things to work. */
305 /* #undef _POSIX_SOURCE */
307 /* Define as the return type of signal handlers (int or void). */
308 #define RETSIGTYPE void
310 /* Define to `unsigned' if <sys/types.h> doesn't define. */
313 /* Define to `int' if <sys/types.h> doesn't define. */
314 #if _MSC_VER + 0 >= 1300
315 /* VC.NET typedefs socklen_t in ws2tcpip.h. */
317 #define socklen_t int
320 /* Define if you have the ANSI C header files. */
321 #define STDC_HEADERS 1
323 /* Define if you don't have dirent.h, but have sys/dir.h. */
326 /* Define if you don't have dirent.h, but have sys/ndir.h. */
329 /* Define if you can safely include both <sys/time.h> and <time.h>. */
330 /* #undef TIME_WITH_SYS_TIME */
332 /* Define if your <sys/time.h> declares struct tm. */
333 /* #define TM_IN_SYS_TIME 1 */
335 /* Define to `int' if <sys/types.h> doesn't define. */
338 /* Define if the closedir function returns void instead of int. */
339 /* #undef VOID_CLOSEDIR */
341 /* Define if your <unistd.h> contains bad prototypes for exec*()
342 (as it does on SGI IRIX 4.x) */
343 /* #undef BAD_EXEC_PROTOTYPES */
345 /* Define if getpgrp() must be called as getpgrp(0)
346 and (consequently) setpgrp() as setpgrp(0, 0). */
347 /* #undef GETPGRP_HAVE_ARGS */
349 /* Define this if your time.h defines altzone */
350 /* #define HAVE_ALTZONE */
352 /* Define if you have the putenv function. */
355 /* Define if your compiler supports function prototypes */
356 #define HAVE_PROTOTYPES
358 /* Define if you can safely include both <sys/select.h> and <sys/time.h>
359 (which you can't on SCO ODT 3.0). */
360 /* #undef SYS_SELECT_WITH_SYS_TIME */
362 /* Define if you want to use SGI (IRIX 4) dynamic linking.
363 This requires the "dl" library by Jack Jansen,
364 ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
365 Don't bother on IRIX 5, it already has dynamic linking using SunOS
366 style shared libraries */
367 /* #undef WITH_SGI_DL */
369 /* Define if you want to emulate SGI (IRIX 4) dynamic linking.
370 This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
371 Sequent Symmetry (Dynix), and Atari ST.
372 This requires the "dl-dld" library,
373 ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z,
374 as well as the "GNU dld" library,
375 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z.
376 Don't bother on SunOS 4 or 5, they already have dynamic linking using
378 /* #undef WITH_DL_DLD */
380 /* Define if you want documentation strings in extension modules */
381 #define WITH_DOC_STRINGS 1
383 /* Define if you want to compile in rudimentary thread support */
384 /* #undef WITH_THREAD */
386 /* Define if you want to use the GNU readline library */
387 /* #define WITH_READLINE 1 */
389 /* Define if you want to have a Unicode type. */
390 #define Py_USING_UNICODE
392 /* Define as the integral type used for Unicode representation. */
393 #define PY_UNICODE_TYPE unsigned short
395 /* Define as the size of the unicode type. */
396 #define Py_UNICODE_SIZE SIZEOF_SHORT
398 /* Define if you have a useable wchar_t type defined in wchar.h; useable
399 means wchar_t must be 16-bit unsigned type. (see
400 Include/unicodeobject.h). */
401 #if Py_UNICODE_SIZE == 2
402 #define HAVE_USABLE_WCHAR_T
405 /* Use Python's own small-block memory-allocator. */
406 #define WITH_PYMALLOC 1
408 /* Enable \n, \r, \r\n line ends on import; also the 'U' mode flag for open. */
409 #define WITH_UNIVERSAL_NEWLINES 1
411 /* Define if you have clock. */
412 /* #define HAVE_CLOCK */
414 /* Define when any dynamic module loading is enabled */
415 #define HAVE_DYNAMIC_LOADING
417 /* Define if you have ftime. */
420 /* Define if you have getpeername. */
421 #define HAVE_GETPEERNAME
423 /* Define if you have getpgrp. */
424 /* #undef HAVE_GETPGRP */
426 /* Define if you have getpid. */
429 /* Define if you have gettimeofday. */
430 /* #undef HAVE_GETTIMEOFDAY */
432 /* Define if you have getwd. */
433 /* #undef HAVE_GETWD */
435 /* Define if you have lstat. */
436 /* #undef HAVE_LSTAT */
438 /* Define if you have the mktime function. */
441 /* Define if you have nice. */
442 /* #undef HAVE_NICE */
444 /* Define if you have readlink. */
445 /* #undef HAVE_READLINK */
447 /* Define if you have select. */
448 /* #undef HAVE_SELECT */
450 /* Define if you have setpgid. */
451 /* #undef HAVE_SETPGID */
453 /* Define if you have setpgrp. */
454 /* #undef HAVE_SETPGRP */
456 /* Define if you have setsid. */
457 /* #undef HAVE_SETSID */
459 /* Define if you have setvbuf. */
462 /* Define if you have siginterrupt. */
463 /* #undef HAVE_SIGINTERRUPT */
465 /* Define if you have symlink. */
466 /* #undef HAVE_SYMLINK */
468 /* Define if you have tcgetpgrp. */
469 /* #undef HAVE_TCGETPGRP */
471 /* Define if you have tcsetpgrp. */
472 /* #undef HAVE_TCSETPGRP */
474 /* Define if you have times. */
475 /* #undef HAVE_TIMES */
477 /* Define if you have uname. */
478 /* #undef HAVE_UNAME */
480 /* Define if you have waitpid. */
481 /* #undef HAVE_WAITPID */
483 /* Define if you have the <dlfcn.h> header file. */
484 /* #undef HAVE_DLFCN_H */
486 /* Define if you have the <fcntl.h> header file. */
487 #define HAVE_FCNTL_H 1
489 /* Define if you have the <signal.h> header file. */
490 #define HAVE_SIGNAL_H 1
492 /* Define if you have the <stdarg.h> header file. */
493 #define HAVE_STDARG_H 1
495 /* Define if you have the <stdarg.h> prototypes. */
496 #define HAVE_STDARG_PROTOTYPES
498 /* Define if you have the <stddef.h> header file. */
499 #define HAVE_STDDEF_H 1
501 /* Define if you have the <stdlib.h> header file. */
502 #define HAVE_STDLIB_H 1
504 /* Define if you have the <sys/audioio.h> header file. */
505 /* #undef HAVE_SYS_AUDIOIO_H */
507 /* Define if you have the <sys/param.h> header file. */
508 /* #define HAVE_SYS_PARAM_H 1 */
510 /* Define if you have the <sys/select.h> header file. */
511 /* #define HAVE_SYS_SELECT_H 1 */
513 /* Define if you have the <sys/time.h> header file. */
514 /* #define HAVE_SYS_TIME_H 1 */
516 /* Define if you have the <sys/times.h> header file. */
517 /* #define HAVE_SYS_TIMES_H 1 */
519 /* Define if you have the <sys/un.h> header file. */
520 /* #define HAVE_SYS_UN_H 1 */
522 /* Define if you have the <sys/utime.h> header file. */
523 /* #define HAVE_SYS_UTIME_H 1 */
525 /* Define if you have the <sys/utsname.h> header file. */
526 /* #define HAVE_SYS_UTSNAME_H 1 */
528 /* Define if you have the <thread.h> header file. */
529 /* #undef HAVE_THREAD_H */
531 /* Define if you have the <unistd.h> header file. */
532 /* #define HAVE_UNISTD_H 1 */
534 /* Define if you have the <utime.h> header file. */
535 /* #define HAVE_UTIME_H 1 */
537 /* Define if you have the dl library (-ldl). */
538 /* #undef HAVE_LIBDL */
540 /* Define if you have the mpc library (-lmpc). */
541 /* #undef HAVE_LIBMPC */
543 /* Define if you have the nsl library (-lnsl). */
544 #define HAVE_LIBNSL 1
546 /* Define if you have the seq library (-lseq). */
547 /* #undef HAVE_LIBSEQ */
549 /* Define if you have the socket library (-lsocket). */
550 #define HAVE_LIBSOCKET 1
552 /* Define if you have the sun library (-lsun). */
553 /* #undef HAVE_LIBSUN */
555 /* Define if you have the termcap library (-ltermcap). */
556 /* #undef HAVE_LIBTERMCAP */
558 /* Define if you have the termlib library (-ltermlib). */
559 /* #undef HAVE_LIBTERMLIB */
561 /* Define if you have the thread library (-lthread). */
562 /* #undef HAVE_LIBTHREAD */
563 #endif /* !Py_CONFIG_H */