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