blob: c1e4f848ebec63e7687c4f1b010e0e0b9dcc3ca4 [file] [log] [blame]
Guido van Rossum87d5e701996-05-28 22:50:17 +00001#ifndef Py_CONFIG_H
2#define Py_CONFIG_H
Guido van Rossum87d5e701996-05-28 22:50:17 +00003
4/* config.h. NOT Generated automatically by configure.
5
6This is a manually maintained version used for the Watcom,
7Borland and and Microsoft Visual C++ compilers. It is a
8standard part of the Python distribution.
9
Guido van Rossum950a1261996-07-30 17:38:17 +000010WINDOWS DEFINES:
11The code specific to Windows should be wrapped around one of
12the following #defines
13
14MS_WIN32 - Code specific to the MS Win32 API
15MS_WIN16 - Code specific to the old 16 bit Windows API.
16MS_WINDOWS - Code specific to Windows, but all versions.
17MS_COREDLL - Code if the Python core is built as a DLL.
18
19Note that the old defines "NT" and "WIN32" are still supported, but
20will soon be dropped.
21
22Also note that neither "_M_IX86" or "_MSC_VER" should be used for
23any purpose other than "Windows Intel x86 specific" and "Microsoft
24compiler specific". Therefore, these should be very rare.
25
Guido van Rossum87d5e701996-05-28 22:50:17 +000026*/
27
28/*
29 Some systems require special declarations for data items imported
30 or exported from dynamic link libraries. Note that the definition
31 of DL_IMPORT covers both cases. Define USE_DL_IMPORT for the client
32 of a DLL. Define USE_DL_EXPORT when making a DLL.
33*/
34
35#include <io.h>
36#define HAVE_LIMITS_H
37#define HAVE_HYPOT
38#define DONT_HAVE_SIG_ALARM
39#define DONT_HAVE_SIG_PAUSE
Guido van Rossum1bc716f1996-06-28 19:12:06 +000040#define LONG_BIT 32
Guido van Rossum950a1261996-07-30 17:38:17 +000041#define PREFIX ""
42#define EXEC_PREFIX ""
Guido van Rossum87d5e701996-05-28 22:50:17 +000043
44/* Microsoft C defines _MSC_VER */
45
46#if defined(_MSC_VER) && _MSC_VER > 850
Guido van Rossum1bc716f1996-06-28 19:12:06 +000047/* Start of defines for MS_WIN32 using VC++ 2.0 and up */
48#define NT /* NT is obsolete - please use MS_WIN32 instead */
49#define MS_WIN32
50#define MS_WINDOWS
Guido van Rossum950a1261996-07-30 17:38:17 +000051
Guido van Rossumeaf9b6c1996-08-22 00:06:59 +000052/* For NT the Python core is in a DLL by default. Test the
53standard macro MS_COREDLL to find out. If you have an exception
54you must define MS_NO_COREDLL (do not test this macro) */
55#ifndef MS_NO_COREDLL
56#define MS_COREDLL /* Python core is in a DLL */
Guido van Rossum950a1261996-07-30 17:38:17 +000057#ifndef USE_DL_EXPORT
58#define USE_DL_IMPORT
59#endif /* !USE_DL_EXPORT */
Guido van Rossumeaf9b6c1996-08-22 00:06:59 +000060#endif /* !MS_NO_COREDLL */
Guido van Rossum950a1261996-07-30 17:38:17 +000061
Guido van Rossum87d5e701996-05-28 22:50:17 +000062#ifdef _M_IX86
63#define COMPILER "[MSC 32 bit (Intel)]"
Guido van Rossumbffd6832000-01-20 22:32:56 +000064#elif defined(_M_ALPHA)
65#define COMPILER "[MSC 32 bit (Alpha)]"
Guido van Rossum87d5e701996-05-28 22:50:17 +000066#else
67#define COMPILER "[MSC (Unknown)]"
68#endif
Guido van Rossum52f49151998-04-11 02:31:30 +000069#define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
Guido van Rossum87d5e701996-05-28 22:50:17 +000070typedef int pid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +000071#define WORD_BIT 32
Guido van Rossum87d5e701996-05-28 22:50:17 +000072#pragma warning(disable:4113)
73#define hypot _hypot
74#include <stdio.h>
75#define HAVE_CLOCK
76#define HAVE_STRFTIME
Guido van Rossum9b499d21998-08-12 02:10:05 +000077#define HAVE_STRERROR
Guido van Rossum87d5e701996-05-28 22:50:17 +000078#define NT_THREADS
79#define WITH_THREAD
80#ifndef NETSCAPE_PI
81#define USE_SOCKET
Guido van Rossum87d5e701996-05-28 22:50:17 +000082#endif
83#ifdef USE_DL_IMPORT
84#define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
85#endif
86#ifdef USE_DL_EXPORT
87#define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
Guido van Rossum9df827f1998-12-10 16:50:49 +000088#define DL_EXPORT(RTYPE) __declspec(dllexport) RTYPE
Guido van Rossum87d5e701996-05-28 22:50:17 +000089#endif
Guido van Rossum950a1261996-07-30 17:38:17 +000090
Guido van Rossum3293b071998-08-25 16:07:15 +000091#define HAVE_LONG_LONG 1
92#define LONG_LONG __int64
Guido van Rossum950a1261996-07-30 17:38:17 +000093#endif /* _MSC_VER && > 850 */
Guido van Rossum87d5e701996-05-28 22:50:17 +000094
95#if defined(_MSC_VER) && _MSC_VER <= 850
96/* Start of defines for 16-bit Windows using VC++ 1.5 */
97#define COMPILER "[MSC 16-bit]"
98#define MS_WIN16
Guido van Rossum1bc716f1996-06-28 19:12:06 +000099#define MS_WINDOWS
Guido van Rossumd3af2f31997-11-22 21:56:10 +0000100#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\dos-8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +0000101#define IMPORT_8x3_NAMES
102typedef int pid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +0000103#define WORD_BIT 16
Guido van Rossum3d37f431999-01-14 18:51:53 +0000104#define SIZEOF_INT 2
105#define SIZEOF_LONG 4
106#define SIZEOF_VOID_P 4
Guido van Rossum87d5e701996-05-28 22:50:17 +0000107#pragma warning(disable:4113)
108#define memcpy memmove /* memcpy dangerous pointer wrap in Win 3.1 */
109#define hypot _hypot
110#define SIGINT 2
111#include <stdio.h>
112/* Windows 3.1 will not tolerate any console io in a dll */
113#ifdef _USRDLL
114#include <time.h>
Guido van Rossumf57c1701997-09-29 23:36:42 +0000115#ifdef __cplusplus
116extern "C" {
117#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000118#define stdin ((FILE *)0)
119#define stdout ((FILE *)1)
120#define stderr ((FILE *)2)
121#define fflush Py_fflush
122int Py_fflush(FILE *);
123#define fgets Py_fgets
124char *Py_fgets(char *, int, FILE *);
125#define fileno Py_fileno
126int Py_fileno(FILE *);
127#define fprintf Py_fprintf
128int Py_fprintf(FILE *, const char *, ...);
129#define printf Py_printf
130int Py_printf(const char *, ...);
131#define sscanf Py_sscanf
132int Py_sscanf(const char *, const char *, ...);
133clock_t clock();
134void _exit(int);
135void exit(int);
136int sscanf(const char *, const char *, ...);
Guido van Rossumf57c1701997-09-29 23:36:42 +0000137#ifdef __cplusplus
138}
139#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000140#endif /* _USRDLL */
141#ifndef NETSCAPE_PI
142/* use sockets, but not in a Netscape dll */
143#define USE_SOCKET
144#endif
145#endif /* MS_WIN16 */
146
147/* The Watcom compiler defines __WATCOMC__ */
148#ifdef __WATCOMC__
149#define COMPILER "[Watcom]"
Guido van Rossumd3af2f31997-11-22 21:56:10 +0000150#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\dos-8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +0000151#define IMPORT_8x3_NAMES
152#include <ctype.h>
153#include <direct.h>
154typedef int mode_t;
155typedef int uid_t;
156typedef int gid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +0000157typedef int pid_t;
158#if defined(__NT__)
159#define NT /* NT is obsolete - please use MS_WIN32 instead */
160#define MS_WIN32
161#define MS_WINDOWS
162#define NT_THREADS
163#define USE_SOCKET
164#define WITH_THREAD
165#elif defined(__WINDOWS__)
166#define MS_WIN16
167#define MS_WINDOWS
168#endif
169#ifdef M_I386
170#define WORD_BIT 32
Guido van Rossum3d37f431999-01-14 18:51:53 +0000171#define SIZEOF_INT 4
172#define SIZEOF_LONG 4
173#define SIZEOF_VOID_P 4
Guido van Rossum1bc716f1996-06-28 19:12:06 +0000174#else
175#define WORD_BIT 16
Guido van Rossum3d37f431999-01-14 18:51:53 +0000176#define SIZEOF_INT 2
177#define SIZEOF_LONG 4
178#define SIZEOF_VOID_P 4
Guido van Rossum1bc716f1996-06-28 19:12:06 +0000179#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000180#define VA_LIST_IS_ARRAY
181#define HAVE_CLOCK
182#define HAVE_STRFTIME
183#ifdef USE_DL_EXPORT
184#define DL_IMPORT(RTYPE) RTYPE __export
185#endif
186#endif /* __WATCOMC__ */
187
188/* The Borland compiler defines __BORLANDC__ */
Guido van Rossumcf6c0ea1996-10-21 14:52:24 +0000189/* XXX These defines are likely incomplete, but should be easy to fix. */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000190#ifdef __BORLANDC__
191#define COMPILER "[Borland]"
Guido van Rossumd3af2f31997-11-22 21:56:10 +0000192#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\dos-8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +0000193#define IMPORT_8x3_NAMES
194#define HAVE_CLOCK
195#define HAVE_STRFTIME
196#ifdef USE_DL_IMPORT
197#define DL_IMPORT(RTYPE) RTYPE __import
198#endif
199#endif /* BORLANDC */
200
Guido van Rossum950a1261996-07-30 17:38:17 +0000201/* End of compilers - finish up */
202
203#ifdef MS_WIN32
204#define PLATFORM "win32"
205#else
206#ifdef MS_WIN16
207#define PLATFORM "win16"
208#else
209#define PLATFORM "dos"
210#endif /* !MS_WIN16 */
211#endif /* !MS_WIN32 */
212
Guido van Rossumf4aeb841998-02-19 20:59:23 +0000213#ifdef MS_WIN32
Guido van Rossumd3ab1011998-05-29 02:53:29 +0000214
Guido van Rossum1a87be11998-08-08 18:25:43 +0000215#ifndef USE_DL_EXPORT
Guido van Rossum446f0331998-08-07 15:32:00 +0000216/* So nobody needs to specify the .lib in their Makefile any more */
217#ifdef _DEBUG
218#pragma comment(lib,"python15_d.lib")
219#else
220#pragma comment(lib,"python15.lib")
221#endif
Guido van Rossum1a87be11998-08-08 18:25:43 +0000222#endif /* USE_DL_EXPORT */
Guido van Rossum446f0331998-08-07 15:32:00 +0000223
Guido van Rossumbffd6832000-01-20 22:32:56 +0000224#ifdef _DEBUG
225#define Py_DEBUG
226#endif
227
Guido van Rossumd3ab1011998-05-29 02:53:29 +0000228#define SIZEOF_INT 4
229#define SIZEOF_LONG 4
Guido van Rossumb00d2521998-09-17 13:19:36 +0000230#define SIZEOF_LONG_LONG 8
Guido van Rossumd3ab1011998-05-29 02:53:29 +0000231
Guido van Rossum78694d91998-09-18 14:14:13 +0000232#ifdef _M_ALPHA
233#define SIZEOF_VOID_P 8
234#else
235#define SIZEOF_VOID_P 4
236#endif
237
Guido van Rossumc87f5f41999-06-09 15:36:37 +0000238/* Smaller stack size limit. (9500 would work too, but we're conservative.) */
239
240#ifndef MAX_RECURSION_DEPTH
241#define MAX_RECURSION_DEPTH 5000
242#endif
243
244
Guido van Rossumf4aeb841998-02-19 20:59:23 +0000245/* EXPERIMENTAL FEATURE: When CHECK_IMPORT_CASE is defined, check case of
246 imported modules against case of file; this causes "import String" to fail
247 with a NameError exception when it finds "string.py". Normally, you set
248 the environment variable PYTHONCASEOK (to anything) to disable this
249 feature; to permanently disable it, #undef it here. This only works on
250 case-preserving filesystems; otherwise you definitely want it off. */
251#define CHECK_IMPORT_CASE
252#endif
253
Guido van Rossum87d5e701996-05-28 22:50:17 +0000254/* Fairly standard from here! */
255
256/* Define if on AIX 3.
257 System headers sometimes define this.
258 We just want to avoid a redefinition error message. */
259#ifndef _ALL_SOURCE
260/* #undef _ALL_SOURCE */
261#endif
262
263/* Define to empty if the keyword does not work. */
264/* #define const */
265
266/* Define if you have dirent.h. */
267/* #define DIRENT 1 */
268
269/* Define to the type of elements in the array set by `getgroups'.
270 Usually this is either `int' or `gid_t'. */
271/* #undef GETGROUPS_T */
272
273/* Define to `int' if <sys/types.h> doesn't define. */
274/* #undef gid_t */
275
276/* Define if your struct tm has tm_zone. */
277/* #undef HAVE_TM_ZONE */
278
279/* Define if you don't have tm_zone but do have the external array
280 tzname. */
281#define HAVE_TZNAME
282
283/* Define if on MINIX. */
284/* #undef _MINIX */
285
286/* Define to `int' if <sys/types.h> doesn't define. */
287/* #undef mode_t */
288
289/* Define if you don't have dirent.h, but have ndir.h. */
290/* #undef NDIR */
291
292/* Define to `long' if <sys/types.h> doesn't define. */
293/* #undef off_t */
294
295/* Define to `int' if <sys/types.h> doesn't define. */
296/* #undef pid_t */
297
298/* Define if the system does not provide POSIX.1 features except
299 with this defined. */
300/* #undef _POSIX_1_SOURCE */
301
302/* Define if you need to in order for stat and other things to work. */
303/* #undef _POSIX_SOURCE */
304
305/* Define as the return type of signal handlers (int or void). */
306#define RETSIGTYPE void
307
308/* Define to `unsigned' if <sys/types.h> doesn't define. */
309/* #undef size_t */
310
311/* Define if you have the ANSI C header files. */
312#define STDC_HEADERS 1
313
314/* Define if you don't have dirent.h, but have sys/dir.h. */
315/* #undef SYSDIR */
316
317/* Define if you don't have dirent.h, but have sys/ndir.h. */
318/* #undef SYSNDIR */
319
320/* Define if you can safely include both <sys/time.h> and <time.h>. */
321/* #undef TIME_WITH_SYS_TIME */
322
323/* Define if your <sys/time.h> declares struct tm. */
324/* #define TM_IN_SYS_TIME 1 */
325
326/* Define to `int' if <sys/types.h> doesn't define. */
327/* #undef uid_t */
328
329/* Define if the closedir function returns void instead of int. */
330/* #undef VOID_CLOSEDIR */
331
332/* Define if your <unistd.h> contains bad prototypes for exec*()
333 (as it does on SGI IRIX 4.x) */
334/* #undef BAD_EXEC_PROTOTYPES */
335
336/* Define if your compiler botches static forward declarations
337 (as it does on SCI ODT 3.0) */
338#define BAD_STATIC_FORWARD 1
339
340/* Define if getpgrp() must be called as getpgrp(0)
341 and (consequently) setpgrp() as setpgrp(0, 0). */
342/* #undef GETPGRP_HAVE_ARGS */
343
344/* Define this if your time.h defines altzone */
345/* #define HAVE_ALTZONE */
346
Guido van Rossumeaf9b6c1996-08-22 00:06:59 +0000347/* Define if you have the putenv function. */
348#ifdef MS_WIN32
349/* Does this exist on Win16? */
350#define HAVE_PUTENV
351#endif
352
Guido van Rossum87d5e701996-05-28 22:50:17 +0000353/* Define if your compiler supports function prototypes */
354#define HAVE_PROTOTYPES
355
356/* Define if you can safely include both <sys/select.h> and <sys/time.h>
357 (which you can't on SCO ODT 3.0). */
358/* #undef SYS_SELECT_WITH_SYS_TIME */
359
360/* Define if you want to use SGI (IRIX 4) dynamic linking.
361 This requires the "dl" library by Jack Jansen,
362 ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
363 Don't bother on IRIX 5, it already has dynamic linking using SunOS
Guido van Rossum950a1261996-07-30 17:38:17 +0000364 style shared libraries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000365/* #undef WITH_SGI_DL */
366
367/* Define if you want to emulate SGI (IRIX 4) dynamic linking.
368 This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
369 Sequent Symmetry (Dynix), and Atari ST.
370 This requires the "dl-dld" library,
371 ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z,
372 as well as the "GNU dld" library,
373 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z.
374 Don't bother on SunOS 4 or 5, they already have dynamic linking using
Guido van Rossum950a1261996-07-30 17:38:17 +0000375 shared libraries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000376/* #undef WITH_DL_DLD */
377
378/* Define if you want to compile in rudimentary thread support */
379/* #undef WITH_THREAD */
380
381/* Define if you want to use the GNU readline library */
382/* #define WITH_READLINE 1 */
383
384/* Define if you have clock. */
385/* #define HAVE_CLOCK */
386
Guido van Rossum9f9fa6d1999-12-20 22:57:41 +0000387/* Define when any dynamic module loading is enabled */
388#define HAVE_DYNAMIC_LOADING
389
Guido van Rossum87d5e701996-05-28 22:50:17 +0000390/* Define if you have ftime. */
391#define HAVE_FTIME
392
393/* Define if you have getpeername. */
Guido van Rossumc3397531997-05-06 15:58:18 +0000394#define HAVE_GETPEERNAME
Guido van Rossum87d5e701996-05-28 22:50:17 +0000395
396/* Define if you have getpgrp. */
397/* #undef HAVE_GETPGRP */
398
399/* Define if you have getpid. */
Guido van Rossumc3397531997-05-06 15:58:18 +0000400#define HAVE_GETPID
Guido van Rossum87d5e701996-05-28 22:50:17 +0000401
402/* Define if you have gettimeofday. */
403/* #undef HAVE_GETTIMEOFDAY */
404
405/* Define if you have getwd. */
406/* #undef HAVE_GETWD */
407
408/* Define if you have lstat. */
409/* #undef HAVE_LSTAT */
410
Guido van Rossum63096d41998-04-10 21:28:49 +0000411/* Define if you have the mktime function. */
412#define HAVE_MKTIME
413
Guido van Rossum87d5e701996-05-28 22:50:17 +0000414/* Define if you have nice. */
415/* #undef HAVE_NICE */
416
417/* Define if you have readlink. */
418/* #undef HAVE_READLINK */
419
420/* Define if you have select. */
421/* #undef HAVE_SELECT */
422
423/* Define if you have setpgid. */
424/* #undef HAVE_SETPGID */
425
426/* Define if you have setpgrp. */
427/* #undef HAVE_SETPGRP */
428
429/* Define if you have setsid. */
430/* #undef HAVE_SETSID */
431
Guido van Rossumc3397531997-05-06 15:58:18 +0000432/* Define if you have setvbuf. */
433#define HAVE_SETVBUF
434
Guido van Rossum87d5e701996-05-28 22:50:17 +0000435/* Define if you have siginterrupt. */
436/* #undef HAVE_SIGINTERRUPT */
437
438/* Define if you have symlink. */
439/* #undef HAVE_SYMLINK */
440
441/* Define if you have tcgetpgrp. */
442/* #undef HAVE_TCGETPGRP */
443
444/* Define if you have tcsetpgrp. */
445/* #undef HAVE_TCSETPGRP */
446
447/* Define if you have times. */
448/* #undef HAVE_TIMES */
449
450/* Define if you have uname. */
451/* #undef HAVE_UNAME */
452
453/* Define if you have waitpid. */
454/* #undef HAVE_WAITPID */
455
456/* Define if you have the <dlfcn.h> header file. */
457/* #undef HAVE_DLFCN_H */
458
459/* Define if you have the <fcntl.h> header file. */
460#define HAVE_FCNTL_H 1
461
462/* Define if you have the <signal.h> header file. */
463#define HAVE_SIGNAL_H 1
464
465/* Define if you have the <stdarg.h> header file. */
466#define HAVE_STDARG_H 1
467
468/* Define if you have the <stdarg.h> prototypes. */
469#define HAVE_STDARG_PROTOTYPES
470
Guido van Rossum4da55f01998-09-23 13:35:45 +0000471/* Define if you have the <stddef.h> header file. */
472#define HAVE_STDDEF_H 1
473
Guido van Rossum87d5e701996-05-28 22:50:17 +0000474/* Define if you have the <stdlib.h> header file. */
475#define HAVE_STDLIB_H 1
476
477/* Define if you have the <sys/audioio.h> header file. */
478/* #undef HAVE_SYS_AUDIOIO_H */
479
480/* Define if you have the <sys/param.h> header file. */
481/* #define HAVE_SYS_PARAM_H 1 */
482
483/* Define if you have the <sys/select.h> header file. */
484/* #define HAVE_SYS_SELECT_H 1 */
485
486/* Define if you have the <sys/time.h> header file. */
487/* #define HAVE_SYS_TIME_H 1 */
488
489/* Define if you have the <sys/times.h> header file. */
490/* #define HAVE_SYS_TIMES_H 1 */
491
492/* Define if you have the <sys/un.h> header file. */
493/* #define HAVE_SYS_UN_H 1 */
494
495/* Define if you have the <sys/utime.h> header file. */
496#define HAVE_SYS_UTIME_H 1
497
498/* Define if you have the <sys/utsname.h> header file. */
499/* #define HAVE_SYS_UTSNAME_H 1 */
500
501/* Define if you have the <thread.h> header file. */
502/* #undef HAVE_THREAD_H */
503
504/* Define if you have the <unistd.h> header file. */
505/* #define HAVE_UNISTD_H 1 */
506
507/* Define if you have the <utime.h> header file. */
508/* #define HAVE_UTIME_H 1 */
509
510/* Define if you have the dl library (-ldl). */
511/* #undef HAVE_LIBDL */
512
513/* Define if you have the mpc library (-lmpc). */
514/* #undef HAVE_LIBMPC */
515
516/* Define if you have the nsl library (-lnsl). */
517#define HAVE_LIBNSL 1
518
519/* Define if you have the seq library (-lseq). */
520/* #undef HAVE_LIBSEQ */
521
522/* Define if you have the socket library (-lsocket). */
523#define HAVE_LIBSOCKET 1
524
525/* Define if you have the sun library (-lsun). */
526/* #undef HAVE_LIBSUN */
527
528/* Define if you have the termcap library (-ltermcap). */
529/* #undef HAVE_LIBTERMCAP */
530
531/* Define if you have the termlib library (-ltermlib). */
532/* #undef HAVE_LIBTERMLIB */
533
534/* Define if you have the thread library (-lthread). */
535/* #undef HAVE_LIBTHREAD */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000536#endif /* !Py_CONFIG_H */