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