blob: d7271022d4aa0ba50acef09845f6160272c4bec0 [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#define main Py_Main
61#ifndef USE_DL_EXPORT
62#define USE_DL_IMPORT
63#endif /* !USE_DL_EXPORT */
Guido van Rossumeaf9b6c1996-08-22 00:06:59 +000064#endif /* !MS_NO_COREDLL */
Guido van Rossum950a1261996-07-30 17:38:17 +000065
Guido van Rossum87d5e701996-05-28 22:50:17 +000066#ifdef _M_IX86
67#define COMPILER "[MSC 32 bit (Intel)]"
68#else
69#define COMPILER "[MSC (Unknown)]"
70#endif
Guido van Rossum950a1261996-07-30 17:38:17 +000071#define PYTHONPATH ".\\lib;.\\lib\\win"
Guido van Rossum87d5e701996-05-28 22:50:17 +000072typedef int pid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +000073#define WORD_BIT 32
Guido van Rossum87d5e701996-05-28 22:50:17 +000074#pragma warning(disable:4113)
75#define hypot _hypot
76#include <stdio.h>
77#define HAVE_CLOCK
78#define HAVE_STRFTIME
79#define NT_THREADS
80#define WITH_THREAD
81#ifndef NETSCAPE_PI
82#define USE_SOCKET
Guido van Rossum87d5e701996-05-28 22:50:17 +000083#endif
84#ifdef USE_DL_IMPORT
85#define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
86#endif
87#ifdef USE_DL_EXPORT
88#define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
89#endif
Guido van Rossum950a1261996-07-30 17:38:17 +000090
91#endif /* _MSC_VER && > 850 */
Guido van Rossum87d5e701996-05-28 22:50:17 +000092
93#if defined(_MSC_VER) && _MSC_VER <= 850
94/* Start of defines for 16-bit Windows using VC++ 1.5 */
95#define COMPILER "[MSC 16-bit]"
Guido van Rossum1bc716f1996-06-28 19:12:06 +000096#ifdef _WINDOWS
Guido van Rossum87d5e701996-05-28 22:50:17 +000097#define MS_WIN16
Guido van Rossum1bc716f1996-06-28 19:12:06 +000098#define MS_WINDOWS
99#endif
Guido van Rossum950a1261996-07-30 17:38:17 +0000100#define PYTHONPATH ".;.\\lib;.\\lib\\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 Rossum87d5e701996-05-28 22:50:17 +0000104#pragma warning(disable:4113)
105#define memcpy memmove /* memcpy dangerous pointer wrap in Win 3.1 */
106#define hypot _hypot
107#define SIGINT 2
108#include <stdio.h>
109/* Windows 3.1 will not tolerate any console io in a dll */
110#ifdef _USRDLL
111#include <time.h>
112#define stdin ((FILE *)0)
113#define stdout ((FILE *)1)
114#define stderr ((FILE *)2)
115#define fflush Py_fflush
116int Py_fflush(FILE *);
117#define fgets Py_fgets
118char *Py_fgets(char *, int, FILE *);
119#define fileno Py_fileno
120int Py_fileno(FILE *);
121#define fprintf Py_fprintf
122int Py_fprintf(FILE *, const char *, ...);
123#define printf Py_printf
124int Py_printf(const char *, ...);
125#define sscanf Py_sscanf
126int Py_sscanf(const char *, const char *, ...);
127clock_t clock();
128void _exit(int);
129void exit(int);
130int sscanf(const char *, const char *, ...);
131#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 Rossum950a1261996-07-30 17:38:17 +0000141#define PYTHONPATH ".;.\\lib;.\\lib\\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__ */
174#ifdef __BORLANDC__
175#define COMPILER "[Borland]"
Guido van Rossum950a1261996-07-30 17:38:17 +0000176#define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +0000177#define IMPORT_8x3_NAMES
178#define HAVE_CLOCK
179#define HAVE_STRFTIME
180#ifdef USE_DL_IMPORT
181#define DL_IMPORT(RTYPE) RTYPE __import
182#endif
183#endif /* BORLANDC */
184
Guido van Rossum950a1261996-07-30 17:38:17 +0000185/* End of compilers - finish up */
186
187#ifdef MS_WIN32
188#define PLATFORM "win32"
189#else
190#ifdef MS_WIN16
191#define PLATFORM "win16"
192#else
193#define PLATFORM "dos"
194#endif /* !MS_WIN16 */
195#endif /* !MS_WIN32 */
196
Guido van Rossum87d5e701996-05-28 22:50:17 +0000197/* Fairly standard from here! */
198
199/* Define if on AIX 3.
200 System headers sometimes define this.
201 We just want to avoid a redefinition error message. */
202#ifndef _ALL_SOURCE
203/* #undef _ALL_SOURCE */
204#endif
205
206/* Define to empty if the keyword does not work. */
207/* #define const */
208
209/* Define if you have dirent.h. */
210/* #define DIRENT 1 */
211
212/* Define to the type of elements in the array set by `getgroups'.
213 Usually this is either `int' or `gid_t'. */
214/* #undef GETGROUPS_T */
215
216/* Define to `int' if <sys/types.h> doesn't define. */
217/* #undef gid_t */
218
219/* Define if your struct tm has tm_zone. */
220/* #undef HAVE_TM_ZONE */
221
222/* Define if you don't have tm_zone but do have the external array
223 tzname. */
224#define HAVE_TZNAME
225
226/* Define if on MINIX. */
227/* #undef _MINIX */
228
229/* Define to `int' if <sys/types.h> doesn't define. */
230/* #undef mode_t */
231
232/* Define if you don't have dirent.h, but have ndir.h. */
233/* #undef NDIR */
234
235/* Define to `long' if <sys/types.h> doesn't define. */
236/* #undef off_t */
237
238/* Define to `int' if <sys/types.h> doesn't define. */
239/* #undef pid_t */
240
241/* Define if the system does not provide POSIX.1 features except
242 with this defined. */
243/* #undef _POSIX_1_SOURCE */
244
245/* Define if you need to in order for stat and other things to work. */
246/* #undef _POSIX_SOURCE */
247
248/* Define as the return type of signal handlers (int or void). */
249#define RETSIGTYPE void
250
251/* Define to `unsigned' if <sys/types.h> doesn't define. */
252/* #undef size_t */
253
254/* Define if you have the ANSI C header files. */
255#define STDC_HEADERS 1
256
257/* Define if you don't have dirent.h, but have sys/dir.h. */
258/* #undef SYSDIR */
259
260/* Define if you don't have dirent.h, but have sys/ndir.h. */
261/* #undef SYSNDIR */
262
263/* Define if you can safely include both <sys/time.h> and <time.h>. */
264/* #undef TIME_WITH_SYS_TIME */
265
266/* Define if your <sys/time.h> declares struct tm. */
267/* #define TM_IN_SYS_TIME 1 */
268
269/* Define to `int' if <sys/types.h> doesn't define. */
270/* #undef uid_t */
271
272/* Define if the closedir function returns void instead of int. */
273/* #undef VOID_CLOSEDIR */
274
275/* Define if your <unistd.h> contains bad prototypes for exec*()
276 (as it does on SGI IRIX 4.x) */
277/* #undef BAD_EXEC_PROTOTYPES */
278
279/* Define if your compiler botches static forward declarations
280 (as it does on SCI ODT 3.0) */
281#define BAD_STATIC_FORWARD 1
282
283/* Define if getpgrp() must be called as getpgrp(0)
284 and (consequently) setpgrp() as setpgrp(0, 0). */
285/* #undef GETPGRP_HAVE_ARGS */
286
287/* Define this if your time.h defines altzone */
288/* #define HAVE_ALTZONE */
289
Guido van Rossumeaf9b6c1996-08-22 00:06:59 +0000290/* Define if you have the putenv function. */
291#ifdef MS_WIN32
292/* Does this exist on Win16? */
293#define HAVE_PUTENV
294#endif
295
Guido van Rossum87d5e701996-05-28 22:50:17 +0000296/* Define if your compiler supports function prototypes */
297#define HAVE_PROTOTYPES
298
299/* Define if you can safely include both <sys/select.h> and <sys/time.h>
300 (which you can't on SCO ODT 3.0). */
301/* #undef SYS_SELECT_WITH_SYS_TIME */
302
303/* Define if you want to use SGI (IRIX 4) dynamic linking.
304 This requires the "dl" library by Jack Jansen,
305 ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
306 Don't bother on IRIX 5, it already has dynamic linking using SunOS
Guido van Rossum950a1261996-07-30 17:38:17 +0000307 style shared libraries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000308/* #undef WITH_SGI_DL */
309
310/* Define if you want to emulate SGI (IRIX 4) dynamic linking.
311 This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
312 Sequent Symmetry (Dynix), and Atari ST.
313 This requires the "dl-dld" library,
314 ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z,
315 as well as the "GNU dld" library,
316 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z.
317 Don't bother on SunOS 4 or 5, they already have dynamic linking using
Guido van Rossum950a1261996-07-30 17:38:17 +0000318 shared libraries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000319/* #undef WITH_DL_DLD */
320
321/* Define if you want to compile in rudimentary thread support */
322/* #undef WITH_THREAD */
323
324/* Define if you want to use the GNU readline library */
325/* #define WITH_READLINE 1 */
326
327/* Define if you have clock. */
328/* #define HAVE_CLOCK */
329
330/* Define if you have ftime. */
331#define HAVE_FTIME
332
333/* Define if you have getpeername. */
334/* #undef HAVE_GETPEERNAME */
335
336/* Define if you have getpgrp. */
337/* #undef HAVE_GETPGRP */
338
339/* Define if you have getpid. */
340/* #undef HAVE_GETPID */
341
342/* Define if you have gettimeofday. */
343/* #undef HAVE_GETTIMEOFDAY */
344
345/* Define if you have getwd. */
346/* #undef HAVE_GETWD */
347
348/* Define if you have lstat. */
349/* #undef HAVE_LSTAT */
350
351/* Define if you have nice. */
352/* #undef HAVE_NICE */
353
354/* Define if you have readlink. */
355/* #undef HAVE_READLINK */
356
357/* Define if you have select. */
358/* #undef HAVE_SELECT */
359
360/* Define if you have setpgid. */
361/* #undef HAVE_SETPGID */
362
363/* Define if you have setpgrp. */
364/* #undef HAVE_SETPGRP */
365
366/* Define if you have setsid. */
367/* #undef HAVE_SETSID */
368
369/* Define if you have siginterrupt. */
370/* #undef HAVE_SIGINTERRUPT */
371
372/* Define if you have symlink. */
373/* #undef HAVE_SYMLINK */
374
375/* Define if you have tcgetpgrp. */
376/* #undef HAVE_TCGETPGRP */
377
378/* Define if you have tcsetpgrp. */
379/* #undef HAVE_TCSETPGRP */
380
381/* Define if you have times. */
382/* #undef HAVE_TIMES */
383
384/* Define if you have uname. */
385/* #undef HAVE_UNAME */
386
387/* Define if you have waitpid. */
388/* #undef HAVE_WAITPID */
389
390/* Define if you have the <dlfcn.h> header file. */
391/* #undef HAVE_DLFCN_H */
392
393/* Define if you have the <fcntl.h> header file. */
394#define HAVE_FCNTL_H 1
395
396/* Define if you have the <signal.h> header file. */
397#define HAVE_SIGNAL_H 1
398
399/* Define if you have the <stdarg.h> header file. */
400#define HAVE_STDARG_H 1
401
402/* Define if you have the <stdarg.h> prototypes. */
403#define HAVE_STDARG_PROTOTYPES
404
405/* Define if you have the <stdlib.h> header file. */
406#define HAVE_STDLIB_H 1
407
408/* Define if you have the <sys/audioio.h> header file. */
409/* #undef HAVE_SYS_AUDIOIO_H */
410
411/* Define if you have the <sys/param.h> header file. */
412/* #define HAVE_SYS_PARAM_H 1 */
413
414/* Define if you have the <sys/select.h> header file. */
415/* #define HAVE_SYS_SELECT_H 1 */
416
417/* Define if you have the <sys/time.h> header file. */
418/* #define HAVE_SYS_TIME_H 1 */
419
420/* Define if you have the <sys/times.h> header file. */
421/* #define HAVE_SYS_TIMES_H 1 */
422
423/* Define if you have the <sys/un.h> header file. */
424/* #define HAVE_SYS_UN_H 1 */
425
426/* Define if you have the <sys/utime.h> header file. */
427#define HAVE_SYS_UTIME_H 1
428
429/* Define if you have the <sys/utsname.h> header file. */
430/* #define HAVE_SYS_UTSNAME_H 1 */
431
432/* Define if you have the <thread.h> header file. */
433/* #undef HAVE_THREAD_H */
434
435/* Define if you have the <unistd.h> header file. */
436/* #define HAVE_UNISTD_H 1 */
437
438/* Define if you have the <utime.h> header file. */
439/* #define HAVE_UTIME_H 1 */
440
441/* Define if you have the dl library (-ldl). */
442/* #undef HAVE_LIBDL */
443
444/* Define if you have the mpc library (-lmpc). */
445/* #undef HAVE_LIBMPC */
446
447/* Define if you have the nsl library (-lnsl). */
448#define HAVE_LIBNSL 1
449
450/* Define if you have the seq library (-lseq). */
451/* #undef HAVE_LIBSEQ */
452
453/* Define if you have the socket library (-lsocket). */
454#define HAVE_LIBSOCKET 1
455
456/* Define if you have the sun library (-lsun). */
457/* #undef HAVE_LIBSUN */
458
459/* Define if you have the termcap library (-ltermcap). */
460/* #undef HAVE_LIBTERMCAP */
461
462/* Define if you have the termlib library (-ltermlib). */
463/* #undef HAVE_LIBTERMLIB */
464
465/* Define if you have the thread library (-lthread). */
466/* #undef HAVE_LIBTHREAD */
467#ifdef __cplusplus
468}
469#endif
470#endif /* !Py_CONFIG_H */