blob: 495b98574fe3fcce48f10181303585e7a9d0de59 [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
Guido van Rossum3293b071998-08-25 16:07:15 +000088#define HAVE_LONG_LONG 1
89#define LONG_LONG __int64
Guido van Rossum950a1261996-07-30 17:38:17 +000090#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 Rossumd3af2f31997-11-22 21:56:10 +000097#define PYTHONPATH ".;.\\lib;.\\lib\\plat-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>
Guido van Rossumf57c1701997-09-29 23:36:42 +0000109#ifdef __cplusplus
110extern "C" {
111#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000112#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 *, ...);
Guido van Rossumf57c1701997-09-29 23:36:42 +0000131#ifdef __cplusplus
132}
133#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000134#endif /* _USRDLL */
135#ifndef NETSCAPE_PI
136/* use sockets, but not in a Netscape dll */
137#define USE_SOCKET
138#endif
139#endif /* MS_WIN16 */
140
141/* The Watcom compiler defines __WATCOMC__ */
142#ifdef __WATCOMC__
143#define COMPILER "[Watcom]"
Guido van Rossumd3af2f31997-11-22 21:56:10 +0000144#define PYTHONPATH ".;.\\lib;.\\lib\\plat-win;.\\lib\\dos-8x3"
Guido van Rossum87d5e701996-05-28 22:50:17 +0000145#define IMPORT_8x3_NAMES
146#include <ctype.h>
147#include <direct.h>
148typedef int mode_t;
149typedef int uid_t;
150typedef int gid_t;
Guido van Rossum1bc716f1996-06-28 19:12:06 +0000151typedef int pid_t;
152#if defined(__NT__)
153#define NT /* NT is obsolete - please use MS_WIN32 instead */
154#define MS_WIN32
155#define MS_WINDOWS
156#define NT_THREADS
157#define USE_SOCKET
158#define WITH_THREAD
159#elif defined(__WINDOWS__)
160#define MS_WIN16
161#define MS_WINDOWS
162#endif
163#ifdef M_I386
164#define WORD_BIT 32
165#else
166#define WORD_BIT 16
167#endif
Guido van Rossum87d5e701996-05-28 22:50:17 +0000168#define VA_LIST_IS_ARRAY
169#define HAVE_CLOCK
170#define HAVE_STRFTIME
171#ifdef USE_DL_EXPORT
172#define DL_IMPORT(RTYPE) RTYPE __export
173#endif
174#endif /* __WATCOMC__ */
175
176/* The Borland compiler defines __BORLANDC__ */
Guido van Rossumcf6c0ea1996-10-21 14:52:24 +0000177/* XXX These defines are likely incomplete, but should be easy to fix. */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000178#ifdef __BORLANDC__
179#define COMPILER "[Borland]"
Guido van Rossumd3af2f31997-11-22 21:56:10 +0000180#define PYTHONPATH ".;.\\lib;.\\lib\\plat-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 Rossumf4aeb841998-02-19 20:59:23 +0000201#ifdef MS_WIN32
Guido van Rossumd3ab1011998-05-29 02:53:29 +0000202
Guido van Rossum1a87be11998-08-08 18:25:43 +0000203#ifndef USE_DL_EXPORT
Guido van Rossum446f0331998-08-07 15:32:00 +0000204/* So nobody needs to specify the .lib in their Makefile any more */
205#ifdef _DEBUG
206#pragma comment(lib,"python15_d.lib")
207#else
208#pragma comment(lib,"python15.lib")
209#endif
Guido van Rossum1a87be11998-08-08 18:25:43 +0000210#endif /* USE_DL_EXPORT */
Guido van Rossum446f0331998-08-07 15:32:00 +0000211
Guido van Rossumd3ab1011998-05-29 02:53:29 +0000212#define SIZEOF_INT 4
213#define SIZEOF_LONG 4
214
Guido van Rossumf4aeb841998-02-19 20:59:23 +0000215/* EXPERIMENTAL FEATURE: When CHECK_IMPORT_CASE is defined, check case of
216 imported modules against case of file; this causes "import String" to fail
217 with a NameError exception when it finds "string.py". Normally, you set
218 the environment variable PYTHONCASEOK (to anything) to disable this
219 feature; to permanently disable it, #undef it here. This only works on
220 case-preserving filesystems; otherwise you definitely want it off. */
221#define CHECK_IMPORT_CASE
222#endif
223
Guido van Rossum87d5e701996-05-28 22:50:17 +0000224/* Fairly standard from here! */
225
226/* Define if on AIX 3.
227 System headers sometimes define this.
228 We just want to avoid a redefinition error message. */
229#ifndef _ALL_SOURCE
230/* #undef _ALL_SOURCE */
231#endif
232
233/* Define to empty if the keyword does not work. */
234/* #define const */
235
236/* Define if you have dirent.h. */
237/* #define DIRENT 1 */
238
239/* Define to the type of elements in the array set by `getgroups'.
240 Usually this is either `int' or `gid_t'. */
241/* #undef GETGROUPS_T */
242
243/* Define to `int' if <sys/types.h> doesn't define. */
244/* #undef gid_t */
245
246/* Define if your struct tm has tm_zone. */
247/* #undef HAVE_TM_ZONE */
248
249/* Define if you don't have tm_zone but do have the external array
250 tzname. */
251#define HAVE_TZNAME
252
253/* Define if on MINIX. */
254/* #undef _MINIX */
255
256/* Define to `int' if <sys/types.h> doesn't define. */
257/* #undef mode_t */
258
259/* Define if you don't have dirent.h, but have ndir.h. */
260/* #undef NDIR */
261
262/* Define to `long' if <sys/types.h> doesn't define. */
263/* #undef off_t */
264
265/* Define to `int' if <sys/types.h> doesn't define. */
266/* #undef pid_t */
267
268/* Define if the system does not provide POSIX.1 features except
269 with this defined. */
270/* #undef _POSIX_1_SOURCE */
271
272/* Define if you need to in order for stat and other things to work. */
273/* #undef _POSIX_SOURCE */
274
275/* Define as the return type of signal handlers (int or void). */
276#define RETSIGTYPE void
277
278/* Define to `unsigned' if <sys/types.h> doesn't define. */
279/* #undef size_t */
280
281/* Define if you have the ANSI C header files. */
282#define STDC_HEADERS 1
283
284/* Define if you don't have dirent.h, but have sys/dir.h. */
285/* #undef SYSDIR */
286
287/* Define if you don't have dirent.h, but have sys/ndir.h. */
288/* #undef SYSNDIR */
289
290/* Define if you can safely include both <sys/time.h> and <time.h>. */
291/* #undef TIME_WITH_SYS_TIME */
292
293/* Define if your <sys/time.h> declares struct tm. */
294/* #define TM_IN_SYS_TIME 1 */
295
296/* Define to `int' if <sys/types.h> doesn't define. */
297/* #undef uid_t */
298
299/* Define if the closedir function returns void instead of int. */
300/* #undef VOID_CLOSEDIR */
301
302/* Define if your <unistd.h> contains bad prototypes for exec*()
303 (as it does on SGI IRIX 4.x) */
304/* #undef BAD_EXEC_PROTOTYPES */
305
306/* Define if your compiler botches static forward declarations
307 (as it does on SCI ODT 3.0) */
308#define BAD_STATIC_FORWARD 1
309
310/* Define if getpgrp() must be called as getpgrp(0)
311 and (consequently) setpgrp() as setpgrp(0, 0). */
312/* #undef GETPGRP_HAVE_ARGS */
313
314/* Define this if your time.h defines altzone */
315/* #define HAVE_ALTZONE */
316
Guido van Rossumeaf9b6c1996-08-22 00:06:59 +0000317/* Define if you have the putenv function. */
318#ifdef MS_WIN32
319/* Does this exist on Win16? */
320#define HAVE_PUTENV
321#endif
322
Guido van Rossum87d5e701996-05-28 22:50:17 +0000323/* Define if your compiler supports function prototypes */
324#define HAVE_PROTOTYPES
325
326/* Define if you can safely include both <sys/select.h> and <sys/time.h>
327 (which you can't on SCO ODT 3.0). */
328/* #undef SYS_SELECT_WITH_SYS_TIME */
329
330/* Define if you want to use SGI (IRIX 4) dynamic linking.
331 This requires the "dl" library by Jack Jansen,
332 ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
333 Don't bother on IRIX 5, it already has dynamic linking using SunOS
Guido van Rossum950a1261996-07-30 17:38:17 +0000334 style shared libraries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000335/* #undef WITH_SGI_DL */
336
337/* Define if you want to emulate SGI (IRIX 4) dynamic linking.
338 This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
339 Sequent Symmetry (Dynix), and Atari ST.
340 This requires the "dl-dld" library,
341 ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z,
342 as well as the "GNU dld" library,
343 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z.
344 Don't bother on SunOS 4 or 5, they already have dynamic linking using
Guido van Rossum950a1261996-07-30 17:38:17 +0000345 shared libraries */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000346/* #undef WITH_DL_DLD */
347
348/* Define if you want to compile in rudimentary thread support */
349/* #undef WITH_THREAD */
350
351/* Define if you want to use the GNU readline library */
352/* #define WITH_READLINE 1 */
353
354/* Define if you have clock. */
355/* #define HAVE_CLOCK */
356
357/* Define if you have ftime. */
358#define HAVE_FTIME
359
360/* Define if you have getpeername. */
Guido van Rossumc3397531997-05-06 15:58:18 +0000361#define HAVE_GETPEERNAME
Guido van Rossum87d5e701996-05-28 22:50:17 +0000362
363/* Define if you have getpgrp. */
364/* #undef HAVE_GETPGRP */
365
366/* Define if you have getpid. */
Guido van Rossumc3397531997-05-06 15:58:18 +0000367#define HAVE_GETPID
Guido van Rossum87d5e701996-05-28 22:50:17 +0000368
369/* Define if you have gettimeofday. */
370/* #undef HAVE_GETTIMEOFDAY */
371
372/* Define if you have getwd. */
373/* #undef HAVE_GETWD */
374
375/* Define if you have lstat. */
376/* #undef HAVE_LSTAT */
377
Guido van Rossum63096d41998-04-10 21:28:49 +0000378/* Define if you have the mktime function. */
379#define HAVE_MKTIME
380
Guido van Rossum87d5e701996-05-28 22:50:17 +0000381/* Define if you have nice. */
382/* #undef HAVE_NICE */
383
384/* Define if you have readlink. */
385/* #undef HAVE_READLINK */
386
387/* Define if you have select. */
388/* #undef HAVE_SELECT */
389
390/* Define if you have setpgid. */
391/* #undef HAVE_SETPGID */
392
393/* Define if you have setpgrp. */
394/* #undef HAVE_SETPGRP */
395
396/* Define if you have setsid. */
397/* #undef HAVE_SETSID */
398
Guido van Rossumc3397531997-05-06 15:58:18 +0000399/* Define if you have setvbuf. */
400#define HAVE_SETVBUF
401
Guido van Rossum87d5e701996-05-28 22:50:17 +0000402/* Define if you have siginterrupt. */
403/* #undef HAVE_SIGINTERRUPT */
404
405/* Define if you have symlink. */
406/* #undef HAVE_SYMLINK */
407
408/* Define if you have tcgetpgrp. */
409/* #undef HAVE_TCGETPGRP */
410
411/* Define if you have tcsetpgrp. */
412/* #undef HAVE_TCSETPGRP */
413
414/* Define if you have times. */
415/* #undef HAVE_TIMES */
416
417/* Define if you have uname. */
418/* #undef HAVE_UNAME */
419
420/* Define if you have waitpid. */
421/* #undef HAVE_WAITPID */
422
423/* Define if you have the <dlfcn.h> header file. */
424/* #undef HAVE_DLFCN_H */
425
426/* Define if you have the <fcntl.h> header file. */
427#define HAVE_FCNTL_H 1
428
429/* Define if you have the <signal.h> header file. */
430#define HAVE_SIGNAL_H 1
431
432/* Define if you have the <stdarg.h> header file. */
433#define HAVE_STDARG_H 1
434
435/* Define if you have the <stdarg.h> prototypes. */
436#define HAVE_STDARG_PROTOTYPES
437
438/* Define if you have the <stdlib.h> header file. */
439#define HAVE_STDLIB_H 1
440
441/* Define if you have the <sys/audioio.h> header file. */
442/* #undef HAVE_SYS_AUDIOIO_H */
443
444/* Define if you have the <sys/param.h> header file. */
445/* #define HAVE_SYS_PARAM_H 1 */
446
447/* Define if you have the <sys/select.h> header file. */
448/* #define HAVE_SYS_SELECT_H 1 */
449
450/* Define if you have the <sys/time.h> header file. */
451/* #define HAVE_SYS_TIME_H 1 */
452
453/* Define if you have the <sys/times.h> header file. */
454/* #define HAVE_SYS_TIMES_H 1 */
455
456/* Define if you have the <sys/un.h> header file. */
457/* #define HAVE_SYS_UN_H 1 */
458
459/* Define if you have the <sys/utime.h> header file. */
460#define HAVE_SYS_UTIME_H 1
461
462/* Define if you have the <sys/utsname.h> header file. */
463/* #define HAVE_SYS_UTSNAME_H 1 */
464
465/* Define if you have the <thread.h> header file. */
466/* #undef HAVE_THREAD_H */
467
468/* Define if you have the <unistd.h> header file. */
469/* #define HAVE_UNISTD_H 1 */
470
471/* Define if you have the <utime.h> header file. */
472/* #define HAVE_UTIME_H 1 */
473
474/* Define if you have the dl library (-ldl). */
475/* #undef HAVE_LIBDL */
476
477/* Define if you have the mpc library (-lmpc). */
478/* #undef HAVE_LIBMPC */
479
480/* Define if you have the nsl library (-lnsl). */
481#define HAVE_LIBNSL 1
482
483/* Define if you have the seq library (-lseq). */
484/* #undef HAVE_LIBSEQ */
485
486/* Define if you have the socket library (-lsocket). */
487#define HAVE_LIBSOCKET 1
488
489/* Define if you have the sun library (-lsun). */
490/* #undef HAVE_LIBSUN */
491
492/* Define if you have the termcap library (-ltermcap). */
493/* #undef HAVE_LIBTERMCAP */
494
495/* Define if you have the termlib library (-ltermlib). */
496/* #undef HAVE_LIBTERMLIB */
497
498/* Define if you have the thread library (-lthread). */
499/* #undef HAVE_LIBTHREAD */
Guido van Rossum87d5e701996-05-28 22:50:17 +0000500#endif /* !Py_CONFIG_H */