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
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.
20 Note that the old defines "NT" and "WIN32" are still supported, but
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.
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.
39 #define HAVE_SYS_UTIME_H
44 #define DONT_HAVE_SIG_ALARM
45 #define DONT_HAVE_SIG_PAUSE
48 #define EXEC_PREFIX ""
50 /* Microsoft C defines _MSC_VER */
53 /* MSVC defines _WINxx to differentiate the windows platform types
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
59 #if defined(MS_WIN32) && !defined(MS_WIN64)
65 #define NT /* NT is obsolete - please use MS_WIN32 instead */
73 /* set the COMPILER */
76 #define COMPILER "[MSC 64 bit (Intel)]"
77 #elif defined(_M_ALPHA)
78 #define COMPILER "[MSC 64 bit (Alpha)]"
80 #define COMPILER "[MSC 64 bit (Unknown)]"
84 #if defined(MS_WIN32) && !defined(MS_WIN64)
86 #define COMPILER "[MSC 32 bit (Intel)]"
87 #elif defined(_M_ALPHA)
88 #define COMPILER "[MSC 32 bit (Alpha)]"
90 #define COMPILER "[MSC (Unknown)]"
92 #endif /* MS_WIN32 && !MS_WIN64 */
96 #if defined(_MSC_VER) && _MSC_VER > 850
97 /* Start of defines for MS_WIN32 using VC++ 2.0 and up */
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 */
104 #ifndef USE_DL_EXPORT
105 #define USE_DL_IMPORT
106 #endif /* !USE_DL_EXPORT */
107 #endif /* !MS_NO_COREDLL */
109 #define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
112 #pragma warning(disable:4113)
116 #define HAVE_STRFTIME
117 #define HAVE_STRERROR
124 #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
127 #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
128 #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
131 #define HAVE_LONG_LONG 1
132 #define LONG_LONG __int64
133 #endif /* _MSC_VER && > 850 */
135 /* The Borland compiler defines __BORLANDC__ */
136 /* XXX These defines are likely incomplete, but should be easy to fix. */
138 #define COMPILER "[Borland]"
140 #define HAVE_STRFTIME
144 /* tested with BCC 5.5 (__BORLANDC__ >= 0x0550)
146 #define NT /* NT is obsolete - please use MS_WIN32 instead */
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 */
160 #define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
164 #define HAVE_STRERROR
170 /* BCC55 seems to understand __declspec(dllimport), it is used in its
171 own header files (winnt.h, ...) */
173 #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
176 #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
177 #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
180 #define HAVE_LONG_LONG 1
181 #define LONG_LONG __int64
183 #undef HAVE_SYS_UTIME_H
185 #define HAVE_DIRENT_H
189 #error "Only Win32 and later are supported"
192 #endif /* BORLANDC */
194 /* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
195 #if defined(__GNUC__) && defined(_WIN32)
196 /* XXX These defines are likely incomplete, but should be easy to fix.
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.
202 #if (__GNUC__==2) && (__GNUC_MINOR__<=91)
203 #warning "Please use an up-to-date version of gcc! (>2.91 recommended)"
206 #define NT /* NT is obsolete - please use MS_WIN32 instead */
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 */
220 #define COMPILER "[gcc]"
221 #define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
226 #define HAVE_STRFTIME
227 #define HAVE_STRERROR
234 #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
237 #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
238 #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
241 #define HAVE_LONG_LONG 1
242 #define LONG_LONG long long
245 /* lcc-win32 defines __LCC__ */
248 /* XXX These defines are likely incomplete, but should be easy to fix.
249 They should be complete enough to build extension modules. */
251 #define NT /* NT is obsolete - please use MS_WIN32 instead */
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 */
265 #define COMPILER "[lcc-win32]"
266 #define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
271 #define HAVE_STRFTIME
272 #define HAVE_STRERROR
279 #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
282 #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
283 #define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
286 #define HAVE_LONG_LONG 1
287 #define LONG_LONG __int64
290 /* End of compilers - finish up */
292 /* define some ANSI types that are not defined in earlier Win headers */
293 #if _MSC_VER >= 1200 /* This file only exists in VC 6.0 or higher */
297 #if defined(MS_WIN64)
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
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
313 #elif defined(MS_WIN32)
314 # define PLATFORM "win32"
315 # define HAVE_LARGEFILE_SUPPORT
317 # define SIZEOF_VOID_P 8
318 # define SIZEOF_TIME_T 8
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
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). */
336 #pragma comment(lib,"python22_d.lib")
338 #pragma comment(lib,"python22.lib")
340 #endif /* USE_DL_EXPORT */
346 #define SIZEOF_SHORT 2
348 #define SIZEOF_LONG 4
349 #define SIZEOF_LONG_LONG 8
353 /* Fairly standard from here! */
355 /* Define if on AIX 3.
356 System headers sometimes define this.
357 We just want to avoid a redefinition error message. */
359 /* #undef _ALL_SOURCE */
362 /* Define to empty if the keyword does not work. */
365 /* Define if you have dirent.h. */
366 /* #define DIRENT 1 */
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 */
372 /* Define to `int' if <sys/types.h> doesn't define. */
375 /* Define if your struct tm has tm_zone. */
376 /* #undef HAVE_TM_ZONE */
378 /* Define if you don't have tm_zone but do have the external array
382 /* Define if on MINIX. */
385 /* Define to `int' if <sys/types.h> doesn't define. */
388 /* Define if you don't have dirent.h, but have ndir.h. */
391 /* Define to `long' if <sys/types.h> doesn't define. */
394 /* Define to `int' if <sys/types.h> doesn't define. */
397 /* Define if the system does not provide POSIX.1 features except
398 with this defined. */
399 /* #undef _POSIX_1_SOURCE */
401 /* Define if you need to in order for stat and other things to work. */
402 /* #undef _POSIX_SOURCE */
404 /* Define as the return type of signal handlers (int or void). */
405 #define RETSIGTYPE void
407 /* Define to `unsigned' if <sys/types.h> doesn't define. */
410 /* Define to `int' if <sys/types.h> doesn't define. */
411 #define socklen_t int
413 /* Define if you have the ANSI C header files. */
414 #define STDC_HEADERS 1
416 /* Define if you don't have dirent.h, but have sys/dir.h. */
419 /* Define if you don't have dirent.h, but have sys/ndir.h. */
422 /* Define if you can safely include both <sys/time.h> and <time.h>. */
423 /* #undef TIME_WITH_SYS_TIME */
425 /* Define if your <sys/time.h> declares struct tm. */
426 /* #define TM_IN_SYS_TIME 1 */
428 /* Define to `int' if <sys/types.h> doesn't define. */
431 /* Define if the closedir function returns void instead of int. */
432 /* #undef VOID_CLOSEDIR */
434 /* Define if your <unistd.h> contains bad prototypes for exec*()
435 (as it does on SGI IRIX 4.x) */
436 /* #undef BAD_EXEC_PROTOTYPES */
438 /* Define if your compiler botches static forward declarations
439 (as it does on SCI ODT 3.0) */
440 #define BAD_STATIC_FORWARD 1
442 /* Define if getpgrp() must be called as getpgrp(0)
443 and (consequently) setpgrp() as setpgrp(0, 0). */
444 /* #undef GETPGRP_HAVE_ARGS */
446 /* Define this if your time.h defines altzone */
447 /* #define HAVE_ALTZONE */
449 /* Define if you have the putenv function. */
451 /* Does this exist on Win16? */
455 /* Define if your compiler supports function prototypes */
456 #define HAVE_PROTOTYPES
458 /* Define if you can safely include both <sys/select.h> and <sys/time.h>
459 (which you can't on SCO ODT 3.0). */
460 /* #undef SYS_SELECT_WITH_SYS_TIME */
462 /* Define if you want to use SGI (IRIX 4) dynamic linking.
463 This requires the "dl" library by Jack Jansen,
464 ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
465 Don't bother on IRIX 5, it already has dynamic linking using SunOS
466 style shared libraries */
467 /* #undef WITH_SGI_DL */
469 /* Define if you want to emulate SGI (IRIX 4) dynamic linking.
470 This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
471 Sequent Symmetry (Dynix), and Atari ST.
472 This requires the "dl-dld" library,
473 ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z,
474 as well as the "GNU dld" library,
475 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z.
476 Don't bother on SunOS 4 or 5, they already have dynamic linking using
478 /* #undef WITH_DL_DLD */
480 /* Define if you want to compile in rudimentary thread support */
481 /* #undef WITH_THREAD */
483 /* Define if you want to use the GNU readline library */
484 /* #define WITH_READLINE 1 */
486 /* Define if you want to have a Unicode type. */
487 #define Py_USING_UNICODE
489 /* Define as the integral type used for Unicode representation. */
490 #define PY_UNICODE_TYPE unsigned short
492 /* Define as the size of the unicode type. */
493 #define Py_UNICODE_SIZE SIZEOF_SHORT
495 /* Define if you have a useable wchar_t type defined in wchar.h; useable
496 means wchar_t must be 16-bit unsigned type. (see
497 Include/unicodeobject.h). */
498 #if Py_UNICODE_SIZE == 2
499 #define HAVE_USABLE_WCHAR_T
502 /* Define if you want cycle garbage collection */
503 #define WITH_CYCLE_GC 1
505 /* Define if you have clock. */
506 /* #define HAVE_CLOCK */
508 /* Define when any dynamic module loading is enabled */
509 #define HAVE_DYNAMIC_LOADING
511 /* Define if you have ftime. */
514 /* Define if you have getpeername. */
515 #define HAVE_GETPEERNAME
517 /* Define if you have getpgrp. */
518 /* #undef HAVE_GETPGRP */
520 /* Define if you have getpid. */
523 /* Define if you have gettimeofday. */
524 /* #undef HAVE_GETTIMEOFDAY */
526 /* Define if you have getwd. */
527 /* #undef HAVE_GETWD */
529 /* Define if you have lstat. */
530 /* #undef HAVE_LSTAT */
532 /* Define if you have the mktime function. */
535 /* Define if you have nice. */
536 /* #undef HAVE_NICE */
538 /* Define if you have readlink. */
539 /* #undef HAVE_READLINK */
541 /* Define if you have select. */
542 /* #undef HAVE_SELECT */
544 /* Define if you have setpgid. */
545 /* #undef HAVE_SETPGID */
547 /* Define if you have setpgrp. */
548 /* #undef HAVE_SETPGRP */
550 /* Define if you have setsid. */
551 /* #undef HAVE_SETSID */
553 /* Define if you have setvbuf. */
556 /* Define if you have siginterrupt. */
557 /* #undef HAVE_SIGINTERRUPT */
559 /* Define if you have symlink. */
560 /* #undef HAVE_SYMLINK */
562 /* Define if you have tcgetpgrp. */
563 /* #undef HAVE_TCGETPGRP */
565 /* Define if you have tcsetpgrp. */
566 /* #undef HAVE_TCSETPGRP */
568 /* Define if you have times. */
569 /* #undef HAVE_TIMES */
571 /* Define if you have uname. */
572 /* #undef HAVE_UNAME */
574 /* Define if you have waitpid. */
575 /* #undef HAVE_WAITPID */
577 /* Define if you have the <dlfcn.h> header file. */
578 /* #undef HAVE_DLFCN_H */
580 /* Define if you have the <fcntl.h> header file. */
581 #define HAVE_FCNTL_H 1
583 /* Define if you have the <signal.h> header file. */
584 #define HAVE_SIGNAL_H 1
586 /* Define if you have the <stdarg.h> header file. */
587 #define HAVE_STDARG_H 1
589 /* Define if you have the <stdarg.h> prototypes. */
590 #define HAVE_STDARG_PROTOTYPES
592 /* Define if you have the <stddef.h> header file. */
593 #define HAVE_STDDEF_H 1
595 /* Define if you have the <stdlib.h> header file. */
596 #define HAVE_STDLIB_H 1
598 /* Define if you have the <sys/audioio.h> header file. */
599 /* #undef HAVE_SYS_AUDIOIO_H */
601 /* Define if you have the <sys/param.h> header file. */
602 /* #define HAVE_SYS_PARAM_H 1 */
604 /* Define if you have the <sys/select.h> header file. */
605 /* #define HAVE_SYS_SELECT_H 1 */
607 /* Define if you have the <sys/time.h> header file. */
608 /* #define HAVE_SYS_TIME_H 1 */
610 /* Define if you have the <sys/times.h> header file. */
611 /* #define HAVE_SYS_TIMES_H 1 */
613 /* Define if you have the <sys/un.h> header file. */
614 /* #define HAVE_SYS_UN_H 1 */
616 /* Define if you have the <sys/utime.h> header file. */
617 /* #define HAVE_SYS_UTIME_H 1 */
619 /* Define if you have the <sys/utsname.h> header file. */
620 /* #define HAVE_SYS_UTSNAME_H 1 */
622 /* Define if you have the <thread.h> header file. */
623 /* #undef HAVE_THREAD_H */
625 /* Define if you have the <unistd.h> header file. */
626 /* #define HAVE_UNISTD_H 1 */
628 /* Define if you have the <utime.h> header file. */
629 /* #define HAVE_UTIME_H 1 */
631 /* Define if you have the dl library (-ldl). */
632 /* #undef HAVE_LIBDL */
634 /* Define if you have the mpc library (-lmpc). */
635 /* #undef HAVE_LIBMPC */
637 /* Define if you have the nsl library (-lnsl). */
638 #define HAVE_LIBNSL 1
640 /* Define if you have the seq library (-lseq). */
641 /* #undef HAVE_LIBSEQ */
643 /* Define if you have the socket library (-lsocket). */
644 #define HAVE_LIBSOCKET 1
646 /* Define if you have the sun library (-lsun). */
647 /* #undef HAVE_LIBSUN */
649 /* Define if you have the termcap library (-ltermcap). */
650 /* #undef HAVE_LIBTERMCAP */
652 /* Define if you have the termlib library (-ltermlib). */
653 /* #undef HAVE_LIBTERMLIB */
655 /* Define if you have the thread library (-lthread). */
656 /* #undef HAVE_LIBTHREAD */
657 #endif /* !Py_CONFIG_H */