4 /* pyconfig.h. NOT Generated automatically by configure.
6 This is a manually maintained version used for the Watcom,
7 Borland 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 MS_WINCE - Code specific to Windows CE
18 Py_ENABLE_SHARED - Code if the Python core is built as a DLL.
20 Also note that neither "_M_IX86" or "_MSC_VER" should be used for
21 any purpose other than "Windows Intel x86 specific" and "Microsoft
22 compiler specific". Therefore, these should be very rare.
25 NOTE: The following symbols are deprecated:
26 NT, WIN32, USE_DL_EXPORT, USE_DL_IMPORT, DL_EXPORT, DL_IMPORT
35 /* Visual Studio 2005 introduces deprecation warnings for
36 "insecure" and POSIX functions. The insecure functions should
37 be replaced by *_s versions (according to Microsoft); the
38 POSIX functions by _* versions (which, according to Microsoft,
39 would be ISO C conforming). Neither renaming is feasible, so
40 we just silence the warnings. */
42 #ifndef _CRT_SECURE_NO_DEPRECATE
43 #define _CRT_SECURE_NO_DEPRECATE 1
45 #ifndef _CRT_NONSTDC_NO_DEPRECATE
46 #define _CRT_NONSTDC_NO_DEPRECATE 1
49 /* Windows CE does not have these */
52 #define HAVE_SYS_UTIME_H
66 #define DONT_HAVE_SIG_ALARM
67 #define DONT_HAVE_SIG_PAUSE
71 #define EXEC_PREFIX ""
73 #define MS_WIN32 /* only support win32 and greater. */
76 # define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
85 /* Python uses GetVersion() to distinguish between
86 * Windows NT and 9x/ME where OS Unicode support is concerned.
87 * Windows CE supports Unicode in the same way as NT so we
88 * define the missing GetVersion() accordingly.
90 #define GetVersion() (4)
91 /* Windows CE does not support environment variables */
92 #define getenv(v) (NULL)
93 #define environ (NULL)
96 /* Compiler specific defines */
98 /* ------------------------------------------------------------------------*/
99 /* Microsoft C defines _MSC_VER */
102 /* We want COMPILER to expand to a string containing _MSC_VER's *value*.
103 * This is horridly tricky, because the stringization operator only works
104 * on macro arguments, and doesn't evaluate macros passed *as* arguments.
105 * Attempts simpler than the following appear doomed to produce "_MSC_VER"
106 * literally in the string.
108 #define _Py_PASTE_VERSION(SUFFIX) \
109 ("[MSC v." _Py_STRINGIZE(_MSC_VER) " " SUFFIX "]")
110 /* e.g., this produces, after compile-time string catenation,
111 * ("[MSC v.1200 32 bit (Intel)]")
113 * _Py_STRINGIZE(_MSC_VER) expands to
114 * _Py_STRINGIZE1((_MSC_VER)) expands to
115 * _Py_STRINGIZE2(_MSC_VER) but as this call is the result of token-pasting
116 * it's scanned again for macros and so further expands to (under MSVC 6)
117 * _Py_STRINGIZE2(1200) which then expands to
120 #define _Py_STRINGIZE(X) _Py_STRINGIZE1((X))
121 #define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X
122 #define _Py_STRINGIZE2(X) #X
124 /* MSVC defines _WINxx to differentiate the windows platform types
126 Note that for compatibility reasons _WIN32 is defined on Win32
127 *and* on Win64. For the same reasons, in Python, MS_WIN32 is
128 defined on Win32 *and* Win64. Win32 only code must therefore be
130 #if defined(MS_WIN32) && !defined(MS_WIN64)
136 /* set the COMPILER */
139 #define COMPILER _Py_PASTE_VERSION("64 bit (Intel)")
140 #elif defined(_M_IA64)
141 #define COMPILER _Py_PASTE_VERSION("64 bit (Itanium)")
142 #elif defined(_M_AMD64)
143 #define COMPILER _Py_PASTE_VERSION("64 bit (AMD64)")
145 #define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)")
147 #endif /* MS_WIN64 */
149 /* _W64 is not defined for VC6 or eVC4 */
154 /* Define like size_t, omitting the "unsigned" */
156 typedef __int64 ssize_t
;
158 typedef _W64
int ssize_t
;
160 #define HAVE_SSIZE_T 1
162 #if defined(MS_WIN32) && !defined(MS_WIN64)
164 #define COMPILER _Py_PASTE_VERSION("32 bit (Intel)")
166 #define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)")
168 #endif /* MS_WIN32 && !MS_WIN64 */
174 #define Py_IS_NAN _isnan
175 #define Py_IS_INFINITY(X) (!_finite(X) && !_isnan(X))
176 #define Py_IS_FINITE(X) _finite(X)
178 /* Turn off warnings about deprecated C runtime functions in
179 VisualStudio .NET 2005 */
180 #if _MSC_VER >= 1400 && !defined _CRT_SECURE_NO_DEPRECATE
181 #define _CRT_SECURE_NO_DEPRECATE
184 #endif /* _MSC_VER */
186 /* define some ANSI types that are not defined in earlier Win headers */
187 #if defined(_MSC_VER) && _MSC_VER >= 1200
188 /* This file only exists in VC 6.0 or higher */
192 /* ------------------------------------------------------------------------*/
193 /* The Borland compiler defines __BORLANDC__ */
194 /* XXX These defines are likely incomplete, but should be easy to fix. */
196 #define COMPILER "[Borland]"
199 /* tested with BCC 5.5 (__BORLANDC__ >= 0x0550)
203 /* BCC55 seems to understand __declspec(dllimport), it is used in its
204 own header files (winnt.h, ...) - so we can do nothing and get the default*/
206 #undef HAVE_SYS_UTIME_H
208 #define HAVE_DIRENT_H
210 /* rename a few functions for the Borland compiler */
212 #define _chsize chsize
213 #define _setmode setmode
216 #error "Only Win32 and later are supported"
219 #endif /* BORLANDC */
221 /* ------------------------------------------------------------------------*/
222 /* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
223 #if defined(__GNUC__) && defined(_WIN32)
224 /* XXX These defines are likely incomplete, but should be easy to fix.
225 They should be complete enough to build extension modules. */
226 /* Suggested by Rene Liebscher <R.Liebscher@gmx.de> to avoid a GCC 2.91.*
227 bug that requires structure imports. More recent versions of the
228 compiler don't exhibit this bug.
230 #if (__GNUC__==2) && (__GNUC_MINOR__<=91)
231 #warning "Please use an up-to-date version of gcc! (>2.91 recommended)"
234 #define COMPILER "[gcc]"
236 #define PY_LONG_LONG long long
239 /* ------------------------------------------------------------------------*/
240 /* lcc-win32 defines __LCC__ */
242 /* XXX These defines are likely incomplete, but should be easy to fix.
243 They should be complete enough to build extension modules. */
245 #define COMPILER "[lcc-win32]"
247 /* __declspec() is supported here too - do nothing to get the defaults */
251 /* ------------------------------------------------------------------------*/
252 /* End of compilers - finish up */
258 /* 64 bit ints are usually spelt __int64 unless compiler has overridden */
259 #define HAVE_LONG_LONG 1
261 # define PY_LONG_LONG __int64
264 /* For Windows the Python core is in a DLL by default. Test
265 Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
266 #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED)
267 # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */
268 # define MS_COREDLL /* deprecated old symbol */
269 #endif /* !MS_NO_COREDLL && ... */
271 /* Deprecated USE_DL_EXPORT macro - please use Py_BUILD_CORE */
273 # define Py_BUILD_CORE
274 #endif /* USE_DL_EXPORT */
276 /* All windows compilers that use this header support __declspec */
277 #define HAVE_DECLSPEC_DLL
279 /* For an MSVC DLL, we can nominate the .lib files used by extensions */
281 # ifndef Py_BUILD_CORE /* not building the core - must be an ext */
282 # if defined(_MSC_VER)
283 /* So MSVC users need not specify the .lib file in
284 their Makefile (other compilers are generally
285 taken care of by distutils.) */
287 # pragma comment(lib,"python26_d.lib")
289 # pragma comment(lib,"python26.lib")
291 # endif /* _MSC_VER */
292 # endif /* Py_BUILD_CORE */
293 #endif /* MS_COREDLL */
295 #if defined(MS_WIN64)
296 /* maintain "win32" sys.platform for backward compatibility of Python code,
297 the Win64 API should be close enough to the Win32 API to make this
299 # define PLATFORM "win32"
300 # define SIZEOF_VOID_P 8
301 # define SIZEOF_TIME_T 8
302 # define SIZEOF_OFF_T 4
303 # define SIZEOF_FPOS_T 8
304 # define SIZEOF_HKEY 8
305 # define SIZEOF_SIZE_T 8
306 /* configure.in defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG,
307 sizeof(off_t) > sizeof(long), and sizeof(PY_LONG_LONG) >= sizeof(off_t).
308 On Win64 the second condition is not true, but if fpos_t replaces off_t
309 then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64
310 should define this. */
311 # define HAVE_LARGEFILE_SUPPORT
312 #elif defined(MS_WIN32)
313 # define PLATFORM "win32"
314 # define HAVE_LARGEFILE_SUPPORT
315 # define SIZEOF_VOID_P 4
316 # define SIZEOF_OFF_T 4
317 # define SIZEOF_FPOS_T 8
318 # define SIZEOF_HKEY 4
319 # define SIZEOF_SIZE_T 4
320 /* MS VS2005 changes time_t to an 64-bit type on all platforms */
321 # if defined(_MSC_VER) && _MSC_VER >= 1400
322 # define SIZEOF_TIME_T 8
324 # define SIZEOF_TIME_T 4
335 #define SIZEOF_SHORT 2
337 #define SIZEOF_LONG 4
338 #define SIZEOF_LONG_LONG 8
339 #define SIZEOF_DOUBLE 8
340 #define SIZEOF_FLOAT 4
342 /* VC 7.1 has them and VC 6.0 does not. VC 6.0 has a version number of 1200.
343 Microsoft eMbedded Visual C++ 4.0 has a version number of 1201 and doesn't
345 If some compiler does not provide them, modify the #if appropriately. */
346 #if defined(_MSC_VER)
348 #define HAVE_UINTPTR_T 1
349 #define HAVE_INTPTR_T 1
351 /* VC6 & eVC4 don't support the C99 LL suffix for 64-bit integer literals */
352 #define Py_LL(x) x##I64
353 #endif /* _MSC_VER > 1200 */
354 #endif /* _MSC_VER */
358 /* Fairly standard from here! */
360 /* Define if on AIX 3.
361 System headers sometimes define this.
362 We just want to avoid a redefinition error message. */
364 /* #undef _ALL_SOURCE */
367 /* Define to empty if the keyword does not work. */
370 /* Define to 1 if you have the <conio.h> header file. */
372 #define HAVE_CONIO_H 1
375 /* Define to 1 if you have the <direct.h> header file. */
377 #define HAVE_DIRECT_H 1
380 /* Define if you have dirent.h. */
381 /* #define DIRENT 1 */
383 /* Define to the type of elements in the array set by `getgroups'.
384 Usually this is either `int' or `gid_t'. */
385 /* #undef GETGROUPS_T */
387 /* Define to `int' if <sys/types.h> doesn't define. */
390 /* Define if your struct tm has tm_zone. */
391 /* #undef HAVE_TM_ZONE */
393 /* Define if you don't have tm_zone but do have the external array
397 /* Define to `int' if <sys/types.h> doesn't define. */
400 /* Define if you don't have dirent.h, but have ndir.h. */
403 /* Define to `long' if <sys/types.h> doesn't define. */
406 /* Define to `int' if <sys/types.h> doesn't define. */
409 /* Define if the system does not provide POSIX.1 features except
410 with this defined. */
411 /* #undef _POSIX_1_SOURCE */
413 /* Define if you need to in order for stat and other things to work. */
414 /* #undef _POSIX_SOURCE */
416 /* Define as the return type of signal handlers (int or void). */
417 #define RETSIGTYPE void
419 /* Define to `unsigned' if <sys/types.h> doesn't define. */
422 /* Define to `int' if <sys/types.h> doesn't define. */
423 #if _MSC_VER + 0 >= 1300
424 /* VC.NET typedefs socklen_t in ws2tcpip.h. */
426 #define socklen_t int
429 /* Define if you have the ANSI C header files. */
430 #define STDC_HEADERS 1
432 /* Define if you don't have dirent.h, but have sys/dir.h. */
435 /* Define if you don't have dirent.h, but have sys/ndir.h. */
438 /* Define if you can safely include both <sys/time.h> and <time.h>. */
439 /* #undef TIME_WITH_SYS_TIME */
441 /* Define if your <sys/time.h> declares struct tm. */
442 /* #define TM_IN_SYS_TIME 1 */
444 /* Define to `int' if <sys/types.h> doesn't define. */
447 /* Define if the closedir function returns void instead of int. */
448 /* #undef VOID_CLOSEDIR */
450 /* Define if getpgrp() must be called as getpgrp(0)
451 and (consequently) setpgrp() as setpgrp(0, 0). */
452 /* #undef GETPGRP_HAVE_ARGS */
454 /* Define this if your time.h defines altzone */
455 /* #define HAVE_ALTZONE */
457 /* Define if you have the putenv function. */
462 /* Define if your compiler supports function prototypes */
463 #define HAVE_PROTOTYPES
465 /* Define if you can safely include both <sys/select.h> and <sys/time.h>
466 (which you can't on SCO ODT 3.0). */
467 /* #undef SYS_SELECT_WITH_SYS_TIME */
469 /* Define if you want documentation strings in extension modules */
470 #define WITH_DOC_STRINGS 1
472 /* Define if you want to compile in rudimentary thread support */
473 /* #undef WITH_THREAD */
475 /* Define if you want to use the GNU readline library */
476 /* #define WITH_READLINE 1 */
478 /* Define if you want to have a Unicode type. */
479 #define Py_USING_UNICODE
481 /* Define as the integral type used for Unicode representation. */
482 #define PY_UNICODE_TYPE unsigned short
484 /* Define as the size of the unicode type. */
485 #define Py_UNICODE_SIZE SIZEOF_SHORT
487 /* Define if you have a useable wchar_t type defined in wchar.h; useable
488 means wchar_t must be 16-bit unsigned type. (see
489 Include/unicodeobject.h). */
490 #if Py_UNICODE_SIZE == 2
491 #define HAVE_USABLE_WCHAR_T
493 /* Define to indicate that the Python Unicode representation can be passed
494 as-is to Win32 Wide API. */
495 #define Py_WIN_WIDE_FILENAMES
498 /* Use Python's own small-block memory-allocator. */
499 #define WITH_PYMALLOC 1
501 /* Define if you have clock. */
502 /* #define HAVE_CLOCK */
504 /* Define when any dynamic module loading is enabled */
505 #define HAVE_DYNAMIC_LOADING
507 /* Define if you have ftime. */
512 /* Define if you have getpeername. */
513 #define HAVE_GETPEERNAME
515 /* Define if you have getpgrp. */
516 /* #undef HAVE_GETPGRP */
518 /* 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 to 1 if you have the `wcscoll' function. */
579 #define HAVE_WCSCOLL 1
582 /* Define if you have the <dlfcn.h> header file. */
583 /* #undef HAVE_DLFCN_H */
585 /* Define to 1 if you have the <errno.h> header file. */
587 #define HAVE_ERRNO_H 1
590 /* Define if you have the <fcntl.h> header file. */
592 #define HAVE_FCNTL_H 1
595 /* Define to 1 if you have the <process.h> header file. */
597 #define HAVE_PROCESS_H 1
600 /* Define to 1 if you have the <signal.h> header file. */
602 #define HAVE_SIGNAL_H 1
605 /* Define if you have the <stdarg.h> prototypes. */
606 #define HAVE_STDARG_PROTOTYPES
608 /* Define if you have the <stddef.h> header file. */
609 #define HAVE_STDDEF_H 1
611 /* Define if you have the <sys/audioio.h> header file. */
612 /* #undef HAVE_SYS_AUDIOIO_H */
614 /* Define if you have the <sys/param.h> header file. */
615 /* #define HAVE_SYS_PARAM_H 1 */
617 /* Define if you have the <sys/select.h> header file. */
618 /* #define HAVE_SYS_SELECT_H 1 */
620 /* Define to 1 if you have the <sys/stat.h> header file. */
622 #define HAVE_SYS_STAT_H 1
625 /* Define if you have the <sys/time.h> header file. */
626 /* #define HAVE_SYS_TIME_H 1 */
628 /* Define if you have the <sys/times.h> header file. */
629 /* #define HAVE_SYS_TIMES_H 1 */
631 /* Define to 1 if you have the <sys/types.h> header file. */
633 #define HAVE_SYS_TYPES_H 1
636 /* Define if you have the <sys/un.h> header file. */
637 /* #define HAVE_SYS_UN_H 1 */
639 /* Define if you have the <sys/utime.h> header file. */
640 /* #define HAVE_SYS_UTIME_H 1 */
642 /* Define if you have the <sys/utsname.h> header file. */
643 /* #define HAVE_SYS_UTSNAME_H 1 */
645 /* Define if you have the <thread.h> header file. */
646 /* #undef HAVE_THREAD_H */
648 /* Define if you have the <unistd.h> header file. */
649 /* #define HAVE_UNISTD_H 1 */
651 /* Define if you have the <utime.h> header file. */
652 /* #define HAVE_UTIME_H 1 */
654 /* Define if the compiler provides a wchar.h header file. */
655 #define HAVE_WCHAR_H 1
657 /* Define if you have the dl library (-ldl). */
658 /* #undef HAVE_LIBDL */
660 /* Define if you have the mpc library (-lmpc). */
661 /* #undef HAVE_LIBMPC */
663 /* Define if you have the nsl library (-lnsl). */
664 #define HAVE_LIBNSL 1
666 /* Define if you have the seq library (-lseq). */
667 /* #undef HAVE_LIBSEQ */
669 /* Define if you have the socket library (-lsocket). */
670 #define HAVE_LIBSOCKET 1
672 /* Define if you have the sun library (-lsun). */
673 /* #undef HAVE_LIBSUN */
675 /* Define if you have the termcap library (-ltermcap). */
676 /* #undef HAVE_LIBTERMCAP */
678 /* Define if you have the termlib library (-ltermlib). */
679 /* #undef HAVE_LIBTERMLIB */
681 /* Define if you have the thread library (-lthread). */
682 /* #undef HAVE_LIBTHREAD */
684 /* WinSock does not use a bitmask in select, and uses
685 socket handles greater than FD_SETSIZE */
686 #define Py_SOCKET_FD_CAN_BE_GE_FD_SETSIZE
688 #endif /* !Py_CONFIG_H */