blob: 48d90a5e3e7a77f57b075a2267e73213cabde157 [file] [log] [blame]
Guido van Rossum87d5e701996-05-28 22:50:17 +00001#ifndef Py_CONFIG_H
2#define Py_CONFIG_H
3#ifdef __cplusplus
4extern "C" {
5#endif
6
7/* config.h. NOT Generated automatically by configure.
8
9This is a manually maintained version used for the Watcom,
10Borland and and Microsoft Visual C++ compilers. It is a
11standard part of the Python distribution.
12
Guido van Rossum950a1261996-07-30 17:38:17 +000013WINDOWS DEFINES:
14The code specific to Windows should be wrapped around one of
15the following #defines
16
17MS_WIN32 - Code specific to the MS Win32 API
18MS_WIN16 - Code specific to the old 16 bit Windows API.
19MS_WINDOWS - Code specific to Windows, but all versions.
20MS_COREDLL - Code if the Python core is built as a DLL.
21
22Note that the old defines "NT" and "WIN32" are still supported, but
23will soon be dropped.
24
25Also note that neither "_M_IX86" or "_MSC_VER" should be used for
26any purpose other than "Windows Intel x86 specific" and "Microsoft
27compiler specific". Therefore, these should be very rare.
28
Guido van Rossum87d5e701996-05-28 22:50:17 +000029*/
30
31/*
32 Some systems require special declarations for data items imported
33 or exported from dynamic link libraries. Note that the definition
34 of DL_IMPORT covers both cases. Define USE_DL_IMPORT for the client
35 of a DLL. Define USE_DL_EXPORT when making a DLL.
36*/
37
38#include <io.h>
39#define HAVE_LIMITS_H
40#define HAVE_HYPOT
41#define DONT_HAVE_SIG_ALARM
42#define DONT_HAVE_SIG_PAUSE
Guido van Rossum1bc716f1996-06-28 19:12:06 +000043#define LONG_BIT 32
Guido van Rossum950a1261996-07-30 17:38:17 +000044#define PREFIX ""
45#define EXEC_PREFIX ""
Guido van Rossum87d5e701996-05-28 22:50:17 +000046
47/* Microsoft C defines _MSC_VER */
48
49#if defined(_MSC_VER) && _MSC_VER > 850
Guido van Rossum1bc716f1996-06-28 19:12:06 +000050/* Start of defines for MS_WIN32 using VC++ 2.0 and up */
51#define NT /* NT is obsolete - please use MS_WIN32 instead */
52#define MS_WIN32
53#define MS_WINDOWS
Guido van Rossum950a1261996-07-30 17:38:17 +000054
Guido van Rossumeaf9b6c1996-08-22 00:06:59 +000055/* For NT the Python core is in a DLL by default. Test the
56standard macro MS_COREDLL to find out. If you have an exception
57you must define MS_NO_COREDLL (do not test this macro) */
58#ifndef MS_NO_COREDLL
59#define MS_COREDLL /* Python core is in a DLL */
Guido van Rossum950a1261996-07-30 17:38:17 +000060#ifndef USE_DL_EXPORT
61#define USE_DL_IMPORT
62#endif /* !USE_DL_EXPORT */
Guido van Rossumeaf9b6c1996-08-22 00:06:59 +000063#endif /* !MS_NO_COREDLL */
Guido van Rossum950a1261996-07-30 17:38:17 +000064
Guido van Rossum87d5e701996-05-28 22:50:17 +000065#ifdef _M_IX86
66#define COMPILER "[MSC 32 bit (Intel)]"
67#else
68#define COMPILER "[MSC (Unknown)]"
69#endif
Guido van Rossum5137ea91997-08-13 19:52:26 +000070#define PYTHONPATH ".\\lib;.\\lib\\win;.\\lib\\test;.\\lib\\tkinter"
Guido van Rossum87d5e701996-05-28 22:50:17 +000071typedef int pid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +000072#define WORD_BIT 32
Guido van Rossum87d5e701996-05-28 22:50:17 +000073#pragma warning(disable:4113)
74#define hypot _hypot
75#include <stdio.h>
76#define HAVE_CLOCK
77#define HAVE_STRFTIME
78#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
88#endif
Guido van Rossum950a1261996-07-30 17:38:17 +000089
90#endif /* _MSC_VER && > 850 */
Guido van Rossum87d5e701996-05-28 22:50:17 +000091
92#if defined(_MSC_VER) && _MSC_VER <= 850
93/* Start of defines for 16-bit Windows using VC++ 1.5 */
94#define COMPILER "[MSC 16-bit]"
95#define MS_WIN16
Guido van Rossum1bc716f1996-06-28 19:12:06 +000096#define MS_WINDOWS
Guido van Rossum950a1261996-07-30 17:38:17 +000097#define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +000098#define IMPORT_8x3_NAMES
99typedef int pid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +0000100#define WORD_BIT 16
Guido van Rossum87d5e701996-05-28 22:50:17 +0000101#pragma warning(disable:4113)
102#define memcpy memmove /* memcpy dangerous pointer wrap in Win 3.1 */
103#define hypot _hypot
104#define SIGINT 2
105#include <stdio.h>
106/* Windows 3.1 will not tolerate any console io in a dll */
107#ifdef _USRDLL
108#include <time.h>
109#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 *, ...);
128#endif /* _USRDLL */
129#ifndef NETSCAPE_PI
130/* use sockets, but not in a Netscape dll */
131#define USE_SOCKET
132#endif
133#endif /* MS_WIN16 */
134
135/* The Watcom compiler defines __WATCOMC__ */
136#ifdef __WATCOMC__
137#define COMPILER "[Watcom]"
Guido van Rossum950a1261996-07-30 17:38:17 +0000138#define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +0000139#define IMPORT_8x3_NAMES
140#include <ctype.h>
141#include <direct.h>
142typedef int mode_t;
143typedef int uid_t;
144typedef int gid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +0000145typedef int pid_t;
146#if defined(__NT__)
147#define NT /* NT is obsolete - please use MS_WIN32 instead */
148#define MS_WIN32
149#define MS_WINDOWS
150#define NT_THREADS
151#define USE_SOCKET
152#define WITH_THREAD
153#elif defined(__WINDOWS__)
154#define MS_WIN16
155#define MS_WINDOWS
156#endif
157#ifdef M_I386
158#define WORD_BIT 32
159#else
160#define WORD_BIT 16
161#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000162#define VA_LIST_IS_ARRAY
163#define HAVE_CLOCK
164#define HAVE_STRFTIME
165#ifdef USE_DL_EXPORT
166#define DL_IMPORT(RTYPE) RTYPE __export
167#endif
168#endif /* __WATCOMC__ */
169
170/* The Borland compiler defines __BORLANDC__ */
Guido van Rossumcf6c0ea1996-10-21 14:52:24 +0000171/* XXX These defines are likely incomplete, but should be easy to fix. */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000172#ifdef __BORLANDC__
173#define COMPILER "[Borland]"
Guido van Rossum950a1261996-07-30 17:38:17 +0000174#define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +0000175#define IMPORT_8x3_NAMES
176#define HAVE_CLOCK
177#define HAVE_STRFTIME
178#ifdef USE_DL_IMPORT
179#define DL_IMPORT(RTYPE) RTYPE __import
180#endif
181#endif /* BORLANDC */
182
Guido van Rossum950a1261996-07-30 17:38:17 +0000183/* End of compilers - finish up */
184
185#ifdef MS_WIN32
186#define PLATFORM "win32"
187#else
188#ifdef MS_WIN16
189#define PLATFORM "win16"
190#else
191#define PLATFORM "dos"
192#endif /* !MS_WIN16 */
193#endif /* !MS_WIN32 */
194
Guido van Rossum87d5e701996-05-28 22:50:17 +0000195/* Fairly standard from here! */
196
197/* Define if on AIX 3.
198 System headers sometimes define this.
199 We just want to avoid a redefinition error message. */
200#ifndef _ALL_SOURCE
201/* #undef _ALL_SOURCE */
202#endif
203
204/* Define to empty if the keyword does not work. */
205/* #define const */
206
207/* Define if you have dirent.h. */
208/* #define DIRENT 1 */
209
210/* Define to the type of elements in the array set by `getgroups'.
211 Usually this is either `int' or `gid_t'. */
212/* #undef GETGROUPS_T */
213
214/* Define to `int' if <sys/types.h> doesn't define. */
215/* #undef gid_t */
216
217/* Define if your struct tm has tm_zone. */
218/* #undef HAVE_TM_ZONE */
219
220/* Define if you don't have tm_zone but do have the external array
221 tzname. */
222#define HAVE_TZNAME
223
224/* Define if on MINIX. */
225/* #undef _MINIX */
226
227/* Define to `int' if <sys/types.h> doesn't define. */
228/* #undef mode_t */
229
230/* Define if you don't have dirent.h, but have ndir.h. */
231/* #undef NDIR */
232
233/* Define to `long' if <sys/types.h> doesn't define. */
234/* #undef off_t */
235
236/* Define to `int' if <sys/types.h> doesn't define. */
237/* #undef pid_t */
238
239/* Define if the system does not provide POSIX.1 features except
240 with this defined. */
241/* #undef _POSIX_1_SOURCE */
242
243/* Define if you need to in order for stat and other things to work. */
244/* #undef _POSIX_SOURCE */
245
246/* Define as the return type of signal handlers (int or void). */
247#define RETSIGTYPE void
248
249/* Define to `unsigned' if <sys/types.h> doesn't define. */
250/* #undef size_t */
251
252/* Define if you have the ANSI C header files. */
253#define STDC_HEADERS 1
254
255/* Define if you don't have dirent.h, but have sys/dir.h. */
256/* #undef SYSDIR */
257
258/* Define if you don't have dirent.h, but have sys/ndir.h. */
259/* #undef SYSNDIR */
260
261/* Define if you can safely include both <sys/time.h> and <time.h>. */
262/* #undef TIME_WITH_SYS_TIME */
263
264/* Define if your <sys/time.h> declares struct tm. */
265/* #define TM_IN_SYS_TIME 1 */
266
267/* Define to `int' if <sys/types.h> doesn't define. */
268/* #undef uid_t */
269
270/* Define if the closedir function returns void instead of int. */
271/* #undef VOID_CLOSEDIR */
272
273/* Define if your <unistd.h> contains bad prototypes for exec*()
274 (as it does on SGI IRIX 4.x) */
275/* #undef BAD_EXEC_PROTOTYPES */
276
277/* Define if your compiler botches static forward declarations
278 (as it does on SCI ODT 3.0) */
279#define BAD_STATIC_FORWARD 1
280
281/* Define if getpgrp() must be called as getpgrp(0)
282 and (consequently) setpgrp() as setpgrp(0, 0). */
283/* #undef GETPGRP_HAVE_ARGS */
284
285/* Define this if your time.h defines altzone */
286/* #define HAVE_ALTZONE */
287
Guido van Rossumeaf9b6c1996-08-22 00:06:59 +0000288/* Define if you have the putenv function. */
289#ifdef MS_WIN32
290/* Does this exist on Win16? */
291#define HAVE_PUTENV
292#endif
293
Guido van Rossum87d5e701996-05-28 22:50:17 +0000294/* Define if your compiler supports function prototypes */
295#define HAVE_PROTOTYPES
296
297/* Define if you can safely include both <sys/select.h> and <sys/time.h>
298 (which you can't on SCO ODT 3.0). */
299/* #undef SYS_SELECT_WITH_SYS_TIME */
300
301/* Define if you want to use SGI (IRIX 4) dynamic linking.
302 This requires the "dl" library by Jack Jansen,
303 ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
304 Don't bother on IRIX 5, it already has dynamic linking using SunOS
Guido van Rossum950a1261996-07-30 17:38:17 +0000305 style shared libraries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000306/* #undef WITH_SGI_DL */
307
308/* Define if you want to emulate SGI (IRIX 4) dynamic linking.
309 This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
310 Sequent Symmetry (Dynix), and Atari ST.
311 This requires the "dl-dld" library,
312 ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z,
313 as well as the "GNU dld" library,
314 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z.
315 Don't bother on SunOS 4 or 5, they already have dynamic linking using
Guido van Rossum950a1261996-07-30 17:38:17 +0000316 shared libraries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000317/* #undef WITH_DL_DLD */
318
319/* Define if you want to compile in rudimentary thread support */
320/* #undef WITH_THREAD */
321
322/* Define if you want to use the GNU readline library */
323/* #define WITH_READLINE 1 */
324
325/* Define if you have clock. */
326/* #define HAVE_CLOCK */
327
328/* Define if you have ftime. */
329#define HAVE_FTIME
330
331/* Define if you have getpeername. */
Guido van Rossumc3397531997-05-06 15:58:18 +0000332#define HAVE_GETPEERNAME
Guido van Rossum87d5e701996-05-28 22:50:17 +0000333
334/* Define if you have getpgrp. */
335/* #undef HAVE_GETPGRP */
336
337/* Define if you have getpid. */
Guido van Rossumc3397531997-05-06 15:58:18 +0000338#define HAVE_GETPID
Guido van Rossum87d5e701996-05-28 22:50:17 +0000339
340/* Define if you have gettimeofday. */
341/* #undef HAVE_GETTIMEOFDAY */
342
343/* Define if you have getwd. */
344/* #undef HAVE_GETWD */
345
346/* Define if you have lstat. */
347/* #undef HAVE_LSTAT */
348
349/* Define if you have nice. */
350/* #undef HAVE_NICE */
351
352/* Define if you have readlink. */
353/* #undef HAVE_READLINK */
354
355/* Define if you have select. */
356/* #undef HAVE_SELECT */
357
358/* Define if you have setpgid. */
359/* #undef HAVE_SETPGID */
360
361/* Define if you have setpgrp. */
362/* #undef HAVE_SETPGRP */
363
364/* Define if you have setsid. */
365/* #undef HAVE_SETSID */
366
Guido van Rossumc3397531997-05-06 15:58:18 +0000367/* Define if you have setvbuf. */
368#define HAVE_SETVBUF
369
Guido van Rossum87d5e701996-05-28 22:50:17 +0000370/* Define if you have siginterrupt. */
371/* #undef HAVE_SIGINTERRUPT */
372
373/* Define if you have symlink. */
374/* #undef HAVE_SYMLINK */
375
376/* Define if you have tcgetpgrp. */
377/* #undef HAVE_TCGETPGRP */
378
379/* Define if you have tcsetpgrp. */
380/* #undef HAVE_TCSETPGRP */
381
382/* Define if you have times. */
383/* #undef HAVE_TIMES */
384
385/* Define if you have uname. */
386/* #undef HAVE_UNAME */
387
388/* Define if you have waitpid. */
389/* #undef HAVE_WAITPID */
390
391/* Define if you have the <dlfcn.h> header file. */
392/* #undef HAVE_DLFCN_H */
393
394/* Define if you have the <fcntl.h> header file. */
395#define HAVE_FCNTL_H 1
396
397/* Define if you have the <signal.h> header file. */
398#define HAVE_SIGNAL_H 1
399
400/* Define if you have the <stdarg.h> header file. */
401#define HAVE_STDARG_H 1
402
403/* Define if you have the <stdarg.h> prototypes. */
404#define HAVE_STDARG_PROTOTYPES
405
406/* Define if you have the <stdlib.h> header file. */
407#define HAVE_STDLIB_H 1
408
409/* Define if you have the <sys/audioio.h> header file. */
410/* #undef HAVE_SYS_AUDIOIO_H */
411
412/* Define if you have the <sys/param.h> header file. */
413/* #define HAVE_SYS_PARAM_H 1 */
414
415/* Define if you have the <sys/select.h> header file. */
416/* #define HAVE_SYS_SELECT_H 1 */
417
418/* Define if you have the <sys/time.h> header file. */
419/* #define HAVE_SYS_TIME_H 1 */
420
421/* Define if you have the <sys/times.h> header file. */
422/* #define HAVE_SYS_TIMES_H 1 */
423
424/* Define if you have the <sys/un.h> header file. */
425/* #define HAVE_SYS_UN_H 1 */
426
427/* Define if you have the <sys/utime.h> header file. */
428#define HAVE_SYS_UTIME_H 1
429
430/* Define if you have the <sys/utsname.h> header file. */
431/* #define HAVE_SYS_UTSNAME_H 1 */
432
433/* Define if you have the <thread.h> header file. */
434/* #undef HAVE_THREAD_H */
435
436/* Define if you have the <unistd.h> header file. */
437/* #define HAVE_UNISTD_H 1 */
438
439/* Define if you have the <utime.h> header file. */
440/* #define HAVE_UTIME_H 1 */
441
442/* Define if you have the dl library (-ldl). */
443/* #undef HAVE_LIBDL */
444
445/* Define if you have the mpc library (-lmpc). */
446/* #undef HAVE_LIBMPC */
447
448/* Define if you have the nsl library (-lnsl). */
449#define HAVE_LIBNSL 1
450
451/* Define if you have the seq library (-lseq). */
452/* #undef HAVE_LIBSEQ */
453
454/* Define if you have the socket library (-lsocket). */
455#define HAVE_LIBSOCKET 1
456
457/* Define if you have the sun library (-lsun). */
458/* #undef HAVE_LIBSUN */
459
460/* Define if you have the termcap library (-ltermcap). */
461/* #undef HAVE_LIBTERMCAP */
462
463/* Define if you have the termlib library (-ltermlib). */
464/* #undef HAVE_LIBTERMLIB */
465
466/* Define if you have the thread library (-lthread). */
467/* #undef HAVE_LIBTHREAD */
468#ifdef __cplusplus
469}
470#endif
471#endif /* !Py_CONFIG_H */