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