blob: 5010cc01df041def0f30577c376176410b13058b [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)]"
64#else
65#define COMPILER "[MSC (Unknown)]"
66#endif
Guido van Rossumccf0a441997-09-30 22:14:39 +000067#define PYTHONPATH ".\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
Guido van Rossum87d5e701996-05-28 22:50:17 +000068typedef int pid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +000069#define WORD_BIT 32
Guido van Rossum87d5e701996-05-28 22:50:17 +000070#pragma warning(disable:4113)
71#define hypot _hypot
72#include <stdio.h>
73#define HAVE_CLOCK
74#define HAVE_STRFTIME
75#define NT_THREADS
76#define WITH_THREAD
77#ifndef NETSCAPE_PI
78#define USE_SOCKET
Guido van Rossum87d5e701996-05-28 22:50:17 +000079#endif
80#ifdef USE_DL_IMPORT
81#define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
82#endif
83#ifdef USE_DL_EXPORT
84#define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
85#endif
Guido van Rossum950a1261996-07-30 17:38:17 +000086
87#endif /* _MSC_VER && > 850 */
Guido van Rossum87d5e701996-05-28 22:50:17 +000088
89#if defined(_MSC_VER) && _MSC_VER <= 850
90/* Start of defines for 16-bit Windows using VC++ 1.5 */
91#define COMPILER "[MSC 16-bit]"
92#define MS_WIN16
Guido van Rossum1bc716f1996-06-28 19:12:06 +000093#define MS_WINDOWS
Guido van Rossumd3af2f31997-11-22 21:56:10 +000094#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\dos-8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +000095#define IMPORT_8x3_NAMES
96typedef int pid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +000097#define WORD_BIT 16
Guido van Rossum87d5e701996-05-28 22:50:17 +000098#pragma warning(disable:4113)
99#define memcpy memmove /* memcpy dangerous pointer wrap in Win 3.1 */
100#define hypot _hypot
101#define SIGINT 2
102#include <stdio.h>
103/* Windows 3.1 will not tolerate any console io in a dll */
104#ifdef _USRDLL
105#include <time.h>
Guido van Rossumf57c1701997-09-29 23:36:42 +0000106#ifdef __cplusplus
107extern "C" {
108#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000109#define stdin ((FILE *)0)
110#define stdout ((FILE *)1)
111#define stderr ((FILE *)2)
112#define fflush Py_fflush
113int Py_fflush(FILE *);
114#define fgets Py_fgets
115char *Py_fgets(char *, int, FILE *);
116#define fileno Py_fileno
117int Py_fileno(FILE *);
118#define fprintf Py_fprintf
119int Py_fprintf(FILE *, const char *, ...);
120#define printf Py_printf
121int Py_printf(const char *, ...);
122#define sscanf Py_sscanf
123int Py_sscanf(const char *, const char *, ...);
124clock_t clock();
125void _exit(int);
126void exit(int);
127int sscanf(const char *, const char *, ...);
Guido van Rossumf57c1701997-09-29 23:36:42 +0000128#ifdef __cplusplus
129}
130#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000131#endif /* _USRDLL */
132#ifndef NETSCAPE_PI
133/* use sockets, but not in a Netscape dll */
134#define USE_SOCKET
135#endif
136#endif /* MS_WIN16 */
137
138/* The Watcom compiler defines __WATCOMC__ */
139#ifdef __WATCOMC__
140#define COMPILER "[Watcom]"
Guido van Rossumd3af2f31997-11-22 21:56:10 +0000141#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\dos-8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +0000142#define IMPORT_8x3_NAMES
143#include <ctype.h>
144#include <direct.h>
145typedef int mode_t;
146typedef int uid_t;
147typedef int gid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +0000148typedef int pid_t;
149#if defined(__NT__)
150#define NT /* NT is obsolete - please use MS_WIN32 instead */
151#define MS_WIN32
152#define MS_WINDOWS
153#define NT_THREADS
154#define USE_SOCKET
155#define WITH_THREAD
156#elif defined(__WINDOWS__)
157#define MS_WIN16
158#define MS_WINDOWS
159#endif
160#ifdef M_I386
161#define WORD_BIT 32
162#else
163#define WORD_BIT 16
164#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000165#define VA_LIST_IS_ARRAY
166#define HAVE_CLOCK
167#define HAVE_STRFTIME
168#ifdef USE_DL_EXPORT
169#define DL_IMPORT(RTYPE) RTYPE __export
170#endif
171#endif /* __WATCOMC__ */
172
173/* The Borland compiler defines __BORLANDC__ */
Guido van Rossumcf6c0ea1996-10-21 14:52:24 +0000174/* XXX These defines are likely incomplete, but should be easy to fix. */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000175#ifdef __BORLANDC__
176#define COMPILER "[Borland]"
Guido van Rossumd3af2f31997-11-22 21:56:10 +0000177#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\dos-8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +0000178#define IMPORT_8x3_NAMES
179#define HAVE_CLOCK
180#define HAVE_STRFTIME
181#ifdef USE_DL_IMPORT
182#define DL_IMPORT(RTYPE) RTYPE __import
183#endif
184#endif /* BORLANDC */
185
Guido van Rossum950a1261996-07-30 17:38:17 +0000186/* End of compilers - finish up */
187
188#ifdef MS_WIN32
189#define PLATFORM "win32"
190#else
191#ifdef MS_WIN16
192#define PLATFORM "win16"
193#else
194#define PLATFORM "dos"
195#endif /* !MS_WIN16 */
196#endif /* !MS_WIN32 */
197
Guido van Rossumf4aeb841998-02-19 20:59:23 +0000198#ifdef MS_WIN32
199/* EXPERIMENTAL FEATURE: When CHECK_IMPORT_CASE is defined, check case of
200 imported modules against case of file; this causes "import String" to fail
201 with a NameError exception when it finds "string.py". Normally, you set
202 the environment variable PYTHONCASEOK (to anything) to disable this
203 feature; to permanently disable it, #undef it here. This only works on
204 case-preserving filesystems; otherwise you definitely want it off. */
205#define CHECK_IMPORT_CASE
206#endif
207
Guido van Rossum87d5e701996-05-28 22:50:17 +0000208/* Fairly standard from here! */
209
210/* Define if on AIX 3.
211 System headers sometimes define this.
212 We just want to avoid a redefinition error message. */
213#ifndef _ALL_SOURCE
214/* #undef _ALL_SOURCE */
215#endif
216
217/* Define to empty if the keyword does not work. */
218/* #define const */
219
220/* Define if you have dirent.h. */
221/* #define DIRENT 1 */
222
223/* Define to the type of elements in the array set by `getgroups'.
224 Usually this is either `int' or `gid_t'. */
225/* #undef GETGROUPS_T */
226
227/* Define to `int' if <sys/types.h> doesn't define. */
228/* #undef gid_t */
229
230/* Define if your struct tm has tm_zone. */
231/* #undef HAVE_TM_ZONE */
232
233/* Define if you don't have tm_zone but do have the external array
234 tzname. */
235#define HAVE_TZNAME
236
237/* Define if on MINIX. */
238/* #undef _MINIX */
239
240/* Define to `int' if <sys/types.h> doesn't define. */
241/* #undef mode_t */
242
243/* Define if you don't have dirent.h, but have ndir.h. */
244/* #undef NDIR */
245
246/* Define to `long' if <sys/types.h> doesn't define. */
247/* #undef off_t */
248
249/* Define to `int' if <sys/types.h> doesn't define. */
250/* #undef pid_t */
251
252/* Define if the system does not provide POSIX.1 features except
253 with this defined. */
254/* #undef _POSIX_1_SOURCE */
255
256/* Define if you need to in order for stat and other things to work. */
257/* #undef _POSIX_SOURCE */
258
259/* Define as the return type of signal handlers (int or void). */
260#define RETSIGTYPE void
261
262/* Define to `unsigned' if <sys/types.h> doesn't define. */
263/* #undef size_t */
264
265/* Define if you have the ANSI C header files. */
266#define STDC_HEADERS 1
267
268/* Define if you don't have dirent.h, but have sys/dir.h. */
269/* #undef SYSDIR */
270
271/* Define if you don't have dirent.h, but have sys/ndir.h. */
272/* #undef SYSNDIR */
273
274/* Define if you can safely include both <sys/time.h> and <time.h>. */
275/* #undef TIME_WITH_SYS_TIME */
276
277/* Define if your <sys/time.h> declares struct tm. */
278/* #define TM_IN_SYS_TIME 1 */
279
280/* Define to `int' if <sys/types.h> doesn't define. */
281/* #undef uid_t */
282
283/* Define if the closedir function returns void instead of int. */
284/* #undef VOID_CLOSEDIR */
285
286/* Define if your <unistd.h> contains bad prototypes for exec*()
287 (as it does on SGI IRIX 4.x) */
288/* #undef BAD_EXEC_PROTOTYPES */
289
290/* Define if your compiler botches static forward declarations
291 (as it does on SCI ODT 3.0) */
292#define BAD_STATIC_FORWARD 1
293
294/* Define if getpgrp() must be called as getpgrp(0)
295 and (consequently) setpgrp() as setpgrp(0, 0). */
296/* #undef GETPGRP_HAVE_ARGS */
297
298/* Define this if your time.h defines altzone */
299/* #define HAVE_ALTZONE */
300
Guido van Rossumeaf9b6c1996-08-22 00:06:59 +0000301/* Define if you have the putenv function. */
302#ifdef MS_WIN32
303/* Does this exist on Win16? */
304#define HAVE_PUTENV
305#endif
306
Guido van Rossum87d5e701996-05-28 22:50:17 +0000307/* Define if your compiler supports function prototypes */
308#define HAVE_PROTOTYPES
309
310/* Define if you can safely include both <sys/select.h> and <sys/time.h>
311 (which you can't on SCO ODT 3.0). */
312/* #undef SYS_SELECT_WITH_SYS_TIME */
313
314/* Define if you want to use SGI (IRIX 4) dynamic linking.
315 This requires the "dl" library by Jack Jansen,
316 ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
317 Don't bother on IRIX 5, it already has dynamic linking using SunOS
Guido van Rossum950a1261996-07-30 17:38:17 +0000318 style shared libraries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000319/* #undef WITH_SGI_DL */
320
321/* Define if you want to emulate SGI (IRIX 4) dynamic linking.
322 This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
323 Sequent Symmetry (Dynix), and Atari ST.
324 This requires the "dl-dld" library,
325 ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z,
326 as well as the "GNU dld" library,
327 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z.
328 Don't bother on SunOS 4 or 5, they already have dynamic linking using
Guido van Rossum950a1261996-07-30 17:38:17 +0000329 shared libraries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000330/* #undef WITH_DL_DLD */
331
332/* Define if you want to compile in rudimentary thread support */
333/* #undef WITH_THREAD */
334
335/* Define if you want to use the GNU readline library */
336/* #define WITH_READLINE 1 */
337
338/* Define if you have clock. */
339/* #define HAVE_CLOCK */
340
341/* Define if you have ftime. */
342#define HAVE_FTIME
343
344/* Define if you have getpeername. */
Guido van Rossumc3397531997-05-06 15:58:18 +0000345#define HAVE_GETPEERNAME
Guido van Rossum87d5e701996-05-28 22:50:17 +0000346
347/* Define if you have getpgrp. */
348/* #undef HAVE_GETPGRP */
349
350/* Define if you have getpid. */
Guido van Rossumc3397531997-05-06 15:58:18 +0000351#define HAVE_GETPID
Guido van Rossum87d5e701996-05-28 22:50:17 +0000352
353/* Define if you have gettimeofday. */
354/* #undef HAVE_GETTIMEOFDAY */
355
356/* Define if you have getwd. */
357/* #undef HAVE_GETWD */
358
359/* Define if you have lstat. */
360/* #undef HAVE_LSTAT */
361
362/* Define if you have nice. */
363/* #undef HAVE_NICE */
364
365/* Define if you have readlink. */
366/* #undef HAVE_READLINK */
367
368/* Define if you have select. */
369/* #undef HAVE_SELECT */
370
371/* Define if you have setpgid. */
372/* #undef HAVE_SETPGID */
373
374/* Define if you have setpgrp. */
375/* #undef HAVE_SETPGRP */
376
377/* Define if you have setsid. */
378/* #undef HAVE_SETSID */
379
Guido van Rossumc3397531997-05-06 15:58:18 +0000380/* Define if you have setvbuf. */
381#define HAVE_SETVBUF
382
Guido van Rossum87d5e701996-05-28 22:50:17 +0000383/* Define if you have siginterrupt. */
384/* #undef HAVE_SIGINTERRUPT */
385
386/* Define if you have symlink. */
387/* #undef HAVE_SYMLINK */
388
389/* Define if you have tcgetpgrp. */
390/* #undef HAVE_TCGETPGRP */
391
392/* Define if you have tcsetpgrp. */
393/* #undef HAVE_TCSETPGRP */
394
395/* Define if you have times. */
396/* #undef HAVE_TIMES */
397
398/* Define if you have uname. */
399/* #undef HAVE_UNAME */
400
401/* Define if you have waitpid. */
402/* #undef HAVE_WAITPID */
403
404/* Define if you have the <dlfcn.h> header file. */
405/* #undef HAVE_DLFCN_H */
406
407/* Define if you have the <fcntl.h> header file. */
408#define HAVE_FCNTL_H 1
409
410/* Define if you have the <signal.h> header file. */
411#define HAVE_SIGNAL_H 1
412
413/* Define if you have the <stdarg.h> header file. */
414#define HAVE_STDARG_H 1
415
416/* Define if you have the <stdarg.h> prototypes. */
417#define HAVE_STDARG_PROTOTYPES
418
419/* Define if you have the <stdlib.h> header file. */
420#define HAVE_STDLIB_H 1
421
422/* Define if you have the <sys/audioio.h> header file. */
423/* #undef HAVE_SYS_AUDIOIO_H */
424
425/* Define if you have the <sys/param.h> header file. */
426/* #define HAVE_SYS_PARAM_H 1 */
427
428/* Define if you have the <sys/select.h> header file. */
429/* #define HAVE_SYS_SELECT_H 1 */
430
431/* Define if you have the <sys/time.h> header file. */
432/* #define HAVE_SYS_TIME_H 1 */
433
434/* Define if you have the <sys/times.h> header file. */
435/* #define HAVE_SYS_TIMES_H 1 */
436
437/* Define if you have the <sys/un.h> header file. */
438/* #define HAVE_SYS_UN_H 1 */
439
440/* Define if you have the <sys/utime.h> header file. */
441#define HAVE_SYS_UTIME_H 1
442
443/* Define if you have the <sys/utsname.h> header file. */
444/* #define HAVE_SYS_UTSNAME_H 1 */
445
446/* Define if you have the <thread.h> header file. */
447/* #undef HAVE_THREAD_H */
448
449/* Define if you have the <unistd.h> header file. */
450/* #define HAVE_UNISTD_H 1 */
451
452/* Define if you have the <utime.h> header file. */
453/* #define HAVE_UTIME_H 1 */
454
455/* Define if you have the dl library (-ldl). */
456/* #undef HAVE_LIBDL */
457
458/* Define if you have the mpc library (-lmpc). */
459/* #undef HAVE_LIBMPC */
460
461/* Define if you have the nsl library (-lnsl). */
462#define HAVE_LIBNSL 1
463
464/* Define if you have the seq library (-lseq). */
465/* #undef HAVE_LIBSEQ */
466
467/* Define if you have the socket library (-lsocket). */
468#define HAVE_LIBSOCKET 1
469
470/* Define if you have the sun library (-lsun). */
471/* #undef HAVE_LIBSUN */
472
473/* Define if you have the termcap library (-ltermcap). */
474/* #undef HAVE_LIBTERMCAP */
475
476/* Define if you have the termlib library (-ltermlib). */
477/* #undef HAVE_LIBTERMLIB */
478
479/* Define if you have the thread library (-lthread). */
480/* #undef HAVE_LIBTHREAD */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000481#endif /* !Py_CONFIG_H */