blob: 19438f512d635d73796f031c65ab7993e42b2443 [file] [log] [blame]
Guido van Rossum50d4cc21997-11-22 21:59:45 +00001#ifndef Py_CONFIG_H
2#define Py_CONFIG_H
3
4/**********************************************************************
5 * config.h. NOT Generated automatically by configure.
6 *
7 * This is a manually maintained version used for the Watcom,
8 * Borland and Microsoft Visual C++ compilers on the MS Windows
9 * platform, and the IBM VisualAge C/C++ compiler on the OS/2
10 * platform. It is a standard part of the Python distribution.
11 *
12 * FILESYSTEM DEFINES:
13 * The code specific to a particular way of naming files and
14 * directory paths should be wrapped around one of the following
15 * #defines:
16 *
17 * DOSFILESYS PCDOS-Style (for PCDOS, Windows and OS/2)
18 * MACFILESYS Macintosh-Style
19 * UNIXFILESYS Unix-Style
20 * AMIGAFILESYS AmigaDOS-Style (to-be-supported)
21 *
22 * Because of the different compilers and operating systems in
23 * use on the Intel platform, neither the compiler name nor
24 * the operating system name is sufficient.
25 *
26 * WINDOWS DEFINES:
27 * The code specific to Windows should be wrapped around one of
28 * the following #defines
29 *
30 * MS_WIN32 - Code specific to the MS Win32 API
31 * MS_WIN16 - Code specific to the old 16 bit Windows API.
32 * MS_WINDOWS - Code specific to Windows, but all versions.
33 * MS_COREDLL - Code if the Python core is built as a DLL.
34 *
35 * Note that the old defines "NT" and "WIN32" are still supported, but
36 * will soon be dropped.
37 *
38 * Also note that neither "_M_IX86" or "_MSC_VER" should be used for
39 * any purpose other than "Windows Intel x86 specific" and "Microsoft
40 * compiler specific". Therefore, these should be very rare.
41 *
42 * OS/2 DEFINES:
43 * The code specific to OS/2's Program API should be wrapped around
44 *
45 * __TOS_OS2__ Target Operating System, OS/2
46 *
47 * Any code specific to the compiler itself should be wrapped with
48 *
49 * __IBMC__ IBM C Compiler
50 * __IBMCPP__ IBM C++ Compiler
51 *
52 * Note that since the VisualAge C/C++ compiler is also available
53 * for the Windows platform, it may be necessary to use both a
54 * __TOS_OS2__ and a __IBMC__ to select a very specific environment.
55 *
56 **********************************************************************/
57
58/*
59 * Some systems require special declarations for data items imported
60 * or exported from dynamic link libraries. Note that the definition
61 * of DL_IMPORT covers both cases. Define USE_DL_IMPORT for the client
62 * of a DLL. Define USE_DL_EXPORT when making a DLL.
63 */
64
65#include <io.h>
66
67#define HAVE_LIMITS_H
68#define HAVE_HYPOT
69#define DONT_HAVE_SIG_ALARM
70#define DONT_HAVE_SIG_PAUSE
71
72#define LONG_BIT 32
73
74/* Configuration Options for Finding Modules */
75#define PREFIX ""
76#define EXEC_PREFIX ""
77//#define VPATH "."
78
79//#define PYTHONPATH PREFIX "/lib/python" VERSION DELIM \
80// PREFIX "/lib/python" VERSION "/test" DELIM \
81// EXEC_PREFIX "/lib/python" VERSION "/sharedmodules"
82
83/***************************************************/
84/* 32-Bit IBM VisualAge C/C++ v3.0 for OS/2 */
85/* (Convert Compiler Flags into Useful Switches) */
86/***************************************************/
87#if (defined(__IBMC__) || defined(__IBMCPP__)) && defined(__OS2__)
88
89 #define COMPILER "[VisualAge C/C++]"
90 #define PYOS_OS2 /* Define Indicator of Operating System */
91 #define PYCC_VACPP /* Define Indicator of C Compiler */
92
93 /* Platform Filesystem */
94 #define PYTHONPATH ".;.\\lib;.\\lib\\plat-os2;.\\lib\\dos_8x3;.\\lib\\lib-tk"
95 #define DOSFILESYS /* OS/2 Uses the DOS File Naming Conventions */
96 /* #define IMPORT_8x3_NAMES */
97
98 /* Platform CPU-Mode Dependencies */
99 #define WORD_BIT 32 /* OS/2 is a 32-Bit Operating System */
100
101 typedef int mode_t;
102 typedef int uid_t;
103 typedef int gid_t;
104 typedef int pid_t;
105
106 #if defined(__MULTI__) /* If Compiler /Gt+ Multithread Option Enabled, */
107 #define WITH_THREAD /* Then Enable Threading Throughout Python */
108 #define OS2_THREADS /* And Use the OS/2 Flavor of Threads */
109 #endif
110
111 /* Compiler Runtime Library Capabilities */
112#include <ctype.h>
113#include <direct.h>
114
115 /* #define VA_LIST_IS_ARRAY */
116 #define HAVE_CLOCK /* We support all of the Unix clock() API */
117 #define HAVE_STRFTIME /* We have a strftime() formatting function */
118 #define HAVE_PUTENV /* We have a putenv() function */
119 #define HAVE_SYS_SELECT_H /* We have sys/select.h (under TCP/IP dirs) */
120 #define HAVE_PROTOTYPES /* Our Compiler Supports C Function Prototypes */
121
122 #ifdef USE_DL_EXPORT
123 #define DL_IMPORT(RTYPE) RTYPE _Export
124 #endif
125
126#endif /* VAC++ for OS/2 */
127
128/***************************************************/
129/* 32-Bit Microsoft Visual C/C++ v2.0+ for Windows */
130/* (Convert Compiler Flags into Useful Switches) */
131/***************************************************/
132#if defined(_MSC_VER) && _MSC_VER > 850
133 /* Start of defines for MS_WIN32 using VC++ 2.0 and up */
134 #define NT /* NT is obsolete - please use MS_WIN32 instead */
135 #define MS_WIN32
136 #define MS_WINDOWS
137
138 /* For NT the Python core is in a DLL by default. Test the
139 * standard macro MS_COREDLL to find out. If you have an exception
140 * you must define MS_NO_COREDLL (do not test this macro)
141 */
142 #ifndef MS_NO_COREDLL
143 #define MS_COREDLL /* Python core is in a DLL */
144 #ifndef USE_DL_EXPORT
145 #define USE_DL_IMPORT
146 #endif /* !USE_DL_EXPORT */
147 #endif /* !MS_NO_COREDLL */
148
149 #ifdef _M_IX86
150 #define COMPILER "[MSC 32 bit (Intel)]"
151 #else
152 #define COMPILER "[MSC (Unknown)]"
153 #endif
154
155 /* Platform Filesystem */
156 #define PYTHONPATH ".\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
157 #define DOSFILESYS /* Windows Uses the DOS File Naming Conventions */
158
159 /* Platform CPU-Mode Dependencies */
160 #define WORD_BIT 32
161
162 typedef int pid_t;
163 #define hypot _hypot
164
165 /* Compiler Runtime Library Capabilities */
166 #pragma warning(disable:4113)
167 #include <stdio.h>
168
169 #define HAVE_CLOCK /* We support all of the Unix clock() API */
170 #define HAVE_STRFTIME /* We have a strftime() formatting function */
171 #define NT_THREADS
172 #define WITH_THREAD
173
174 #ifndef NETSCAPE_PI
175 #define USE_SOCKET
176 #endif
177
178 #ifdef USE_DL_IMPORT
179 #define DL_IMPORT(RTYPE) __declspec(dllimport) RTYPE
180 #endif
181
182 #ifdef USE_DL_EXPORT
183 #define DL_IMPORT(RTYPE) __declspec(dllexport) RTYPE
184 #endif
185#endif /* _MSC_VER && > 850 */
186
187/***************************************************/
188/* 16-Bit Microsoft Visual C/C++ v1.5+ for Windows */
189/* (Convert Compiler Flags into Useful Switches) */
190/***************************************************/
191#if defined(_MSC_VER) && _MSC_VER <= 850
192 #define COMPILER "[MSC 16-bit]"
193 #define MS_WIN16
194 #define MS_WINDOWS
195
196 /* Platform Filesystem */
197 #define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
198 #define IMPORT_8x3_NAMES
199 #define DOSFILESYS /* Windows Uses the DOS File Naming Conventions */
200
201 /* Platform CPU-Mode Dependencies */
202 #define WORD_BIT 16
203
204 typedef int pid_t;
205
206 /* Compiler Runtime Library Capabilities */
207 #pragma warning(disable:4113)
208 #define memcpy memmove /* memcpy dangerous pointer wrap in Win 3.1 */
209 #define hypot _hypot
210 #define SIGINT 2
211
212#include <stdio.h>
213
214 /* Windows 3.1 will not tolerate any console io in a dll */
215
216 #ifdef _USRDLL
217 #include <time.h>
218
219 #ifdef __cplusplus
220 extern "C" {
221 #endif
222
223 #define stdin ((FILE *)0)
224 #define stdout ((FILE *)1)
225 #define stderr ((FILE *)2)
226
227 #define fflush Py_fflush
228 int Py_fflush(FILE *);
229
230 #define fgets Py_fgets
231 char *Py_fgets(char *, int, FILE *);
232
233 #define fileno Py_fileno
234 int Py_fileno(FILE *);
235
236 #define fprintf Py_fprintf
237 int Py_fprintf(FILE *, const char *, ...);
238
239 #define printf Py_printf
240 int Py_printf(const char *, ...);
241
242 #define sscanf Py_sscanf
243 int Py_sscanf(const char *, const char *, ...);
244
245 clock_t clock();
246 void _exit(int);
247 void exit(int);
248 int sscanf(const char *, const char *, ...);
249
250 #ifdef __cplusplus
251 }
252 #endif
253 #endif /* _USRDLL */
254
255 #ifndef NETSCAPE_PI
256 /* use sockets, but not in a Netscape dll */
257 #define USE_SOCKET
258 #endif
259#endif /* MS_WIN16 */
260
261/***************************************************/
262/* 32-Bit Watcom C/C++ v?.? for Windows */
263/* (Convert Compiler Flags into Useful Switches) */
264/***************************************************/
265#ifdef __WATCOMC__
266 #define COMPILER "[Watcom]"
267
268 /* Platform Filesystem */
269 #define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
270 #define IMPORT_8x3_NAMES
271 #define DOSFILESYS /* Watcom Uses the DOS File Naming Conventions */
272
273 typedef int mode_t;
274 typedef int uid_t;
275 typedef int gid_t;
276 typedef int pid_t;
277
278 #if defined(__NT__)
279 #define NT /* NT is obsolete - please use MS_WIN32 instead */
280 #define MS_WIN32
281 #define MS_WINDOWS
282 #define NT_THREADS
283 #define USE_SOCKET
284 #define WITH_THREAD
285 #elif defined(__WINDOWS__)
286 #define MS_WIN16
287 #define MS_WINDOWS
288 #endif
289
290 #ifdef M_I386
291 #define WORD_BIT 32
292 #else
293 #define WORD_BIT 16
294 #endif
295
296 /* Compiler Runtime Library Capabilities */
297 #include <ctype.h>
298 #include <direct.h>
299
300 #define VA_LIST_IS_ARRAY
301 #define HAVE_CLOCK
302 #define HAVE_STRFTIME
303
304 #ifdef USE_DL_EXPORT
305 #define DL_IMPORT(RTYPE) RTYPE __export
306 #endif
307#endif /* __WATCOMC__ */
308
309/***************************************************/
310/* 32-Bit Borland C/C++ v?.? for Windows */
311/* (Convert Compiler Flags into Useful Switches) */
312/***************************************************/
313/* The Borland compiler defines __BORLANDC__ */
314/* XXX These defines are likely incomplete, but should be easy to fix. */
315#ifdef __BORLANDC__
316 #define COMPILER "[Borland]"
317
318 /* Platform Filesystem */
319 #define PYTHONPATH ".;.\\lib;.\\lib\\win;.\\lib\\dos_8x3"
320 #define IMPORT_8x3_NAMES
321 #define DOSFILESYS /* Borland Uses the DOS File Naming Conventions */
322
323 /* Compiler Runtime Library Capabilities */
324 #define HAVE_CLOCK
325 #define HAVE_STRFTIME
326
327 #ifdef USE_DL_IMPORT
328 #define DL_IMPORT(RTYPE) RTYPE __import
329 #endif
330#endif /* BORLANDC */
331
332/********************************/
333/* End of compilers - finish up */
334/********************************/
335
336/****************************************
337 * Adjustments for the Operating System
338 ****************************************/
339#ifdef MS_WIN32
340 #define PLATFORM "win32"
341#else
342 #ifdef MS_WIN16
343 #define PLATFORM "win16"
344 #else
345 #ifdef PYOS_OS2
346 #define PLATFORM "os2"
347 #else
348 #define PLATFORM "dos"
349 #endif
350 #endif /* !MS_WIN16 */
351#endif /* !MS_WIN32 */
352
353/****************************************
354 * Supported Features in Runtime API
355 ****************************************/
356
357/* Define if on AIX 3.
358 System headers sometimes define this.
359 We just want to avoid a redefinition error message. */
360#ifndef _ALL_SOURCE
361/* #undef _ALL_SOURCE */
362#endif
363
364/* Define to empty if the keyword does not work. */
365/* #define const */
366
367/* Define if you have dirent.h. */
368/* #define DIRENT 1 */
369
370/* Define to the type of elements in the array set by `getgroups'.
371 Usually this is either `int' or `gid_t'. */
372/* #undef GETGROUPS_T */
373
374/* Define to `int' if <sys/types.h> doesn't define. */
375/* #undef gid_t */
376
377/* Define if your struct tm has tm_zone. */
378/* #undef HAVE_TM_ZONE */
379
380/* Define if you don't have tm_zone but do have the external array
381 tzname. */
382#define HAVE_TZNAME
383
384/* Define if on MINIX. */
385/* #undef _MINIX */
386
387/* Define to `int' if <sys/types.h> doesn't define. */
388/* #undef mode_t */
389
390/* Define if you don't have dirent.h, but have ndir.h. */
391/* #undef NDIR */
392
393/* Define to `long' if <sys/types.h> doesn't define. */
394/* #undef off_t */
395
396/* Define to `int' if <sys/types.h> doesn't define. */
397/* #undef pid_t */
398
399/* Define if the system does not provide POSIX.1 features except
400 with this defined. */
401/* #undef _POSIX_1_SOURCE */
402
403/* Define if you need to in order for stat and other things to work. */
404/* #undef _POSIX_SOURCE */
405
406/* Define as the return type of signal handlers (int or void). */
407#define RETSIGTYPE void
408
409/* Define to `unsigned' if <sys/types.h> doesn't define. */
410/* #undef size_t */
411
412/* Define if you have the ANSI C header files. */
413#define STDC_HEADERS 1
414
415/* Define if you don't have dirent.h, but have sys/dir.h. */
416/* #undef SYSDIR */
417
418/* Define if you don't have dirent.h, but have sys/ndir.h. */
419/* #undef SYSNDIR */
420
421/* Define if you can safely include both <sys/time.h> and <time.h>. */
422/* #undef TIME_WITH_SYS_TIME */
423
424/* Define if your <sys/time.h> declares struct tm. */
425/* #define TM_IN_SYS_TIME 1 */
426
427/* Define to `int' if <sys/types.h> doesn't define. */
428/* #undef uid_t */
429
430/* Define if the closedir function returns void instead of int. */
431/* #undef VOID_CLOSEDIR */
432
433/* Define if your <unistd.h> contains bad prototypes for exec*()
434 (as it does on SGI IRIX 4.x) */
435/* #undef BAD_EXEC_PROTOTYPES */
436
437/* Define if your compiler botches static forward declarations
438 (as it does on SCI ODT 3.0) */
439/* #define BAD_STATIC_FORWARD 1 */
440
441/* Define if getpgrp() must be called as getpgrp(0)
442 and (consequently) setpgrp() as setpgrp(0, 0). */
443/* #undef GETPGRP_HAVE_ARGS */
444
445/* Define this if your time.h defines altzone */
446/* #define HAVE_ALTZONE */
447
448/* Define if you have the putenv function. */
449#ifdef MS_WIN32
450/* Does this exist on Win16? */
451#define HAVE_PUTENV
452#endif
453
454/* Define if your compiler supports function prototypes */
455#define HAVE_PROTOTYPES
456
457/* Define if you can safely include both <sys/select.h> and <sys/time.h>
458 (which you can't on SCO ODT 3.0). */
459/* #undef SYS_SELECT_WITH_SYS_TIME */
460
461/* Define if you want to use SGI (IRIX 4) dynamic linking.
462 This requires the "dl" library by Jack Jansen,
463 ftp://ftp.cwi.nl/pub/dynload/dl-1.6.tar.Z.
464 Don't bother on IRIX 5, it already has dynamic linking using SunOS
465 style shared libraries */
466/* #undef WITH_SGI_DL */
467
468/* Define if you want to emulate SGI (IRIX 4) dynamic linking.
469 This is rumoured to work on VAX (Ultrix), Sun3 (SunOS 3.4),
470 Sequent Symmetry (Dynix), and Atari ST.
471 This requires the "dl-dld" library,
472 ftp://ftp.cwi.nl/pub/dynload/dl-dld-1.1.tar.Z,
473 as well as the "GNU dld" library,
474 ftp://ftp.cwi.nl/pub/dynload/dld-3.2.3.tar.Z.
475 Don't bother on SunOS 4 or 5, they already have dynamic linking using
476 shared libraries */
477/* #undef WITH_DL_DLD */
478
479/* Define if you want to compile in rudimentary thread support */
480/* #undef WITH_THREAD */
481
482/* Define if you want to use the GNU readline library */
483/* #define WITH_READLINE 1 */
484
485/* Define if you have clock. */
486/* #define HAVE_CLOCK */
487
488/* Define if you have ftime. */
489#define HAVE_FTIME
490
491/* Define if you have getpeername. */
492#define HAVE_GETPEERNAME
493
494/* Define if you have getpgrp. */
495/* #undef HAVE_GETPGRP */
496
497/* Define if you have getpid. */
498#define HAVE_GETPID
499
500/* Define if you have gettimeofday. */
501/* #undef HAVE_GETTIMEOFDAY */
502
503/* Define if you have getwd. */
504/* #undef HAVE_GETWD */
505
506/* Define if you have lstat. */
507/* #undef HAVE_LSTAT */
508
509/* Define if you have nice. */
510/* #undef HAVE_NICE */
511
512/* Define if you have readlink. */
513/* #undef HAVE_READLINK */
514
515/* Define if you have select. */
516/* #undef HAVE_SELECT */
517
518/* Define if you have setpgid. */
519/* #undef HAVE_SETPGID */
520
521/* Define if you have setpgrp. */
522/* #undef HAVE_SETPGRP */
523
524/* Define if you have setsid. */
525/* #undef HAVE_SETSID */
526
527/* Define if you have setvbuf. */
528#define HAVE_SETVBUF
529
530/* Define if you have siginterrupt. */
531/* #undef HAVE_SIGINTERRUPT */
532
533/* Define if you have symlink. */
534/* #undef HAVE_SYMLINK */
535
536/* Define if you have tcgetpgrp. */
537/* #undef HAVE_TCGETPGRP */
538
539/* Define if you have tcsetpgrp. */
540/* #undef HAVE_TCSETPGRP */
541
542/* Define if you have times. */
543/* #undef HAVE_TIMES */
544
545/* Define if you have uname. */
546/* #undef HAVE_UNAME */
547
548/* Define if you have waitpid. */
549/* #undef HAVE_WAITPID */
550
551/* Define if you have the <dlfcn.h> header file. */
552/* #undef HAVE_DLFCN_H */
553
554/* Define if you have the <fcntl.h> header file. */
555#define HAVE_FCNTL_H 1
556
557/* Define if you have the <signal.h> header file. */
558#define HAVE_SIGNAL_H 1
559
560/* Define if you have the <stdarg.h> header file. */
561#define HAVE_STDARG_H 1
562
563/* Define if you have the <stdarg.h> prototypes. */
564#define HAVE_STDARG_PROTOTYPES
565
566/* Define if you have the <stdlib.h> header file. */
567#define HAVE_STDLIB_H 1
568
569/* Define if you have the <sys/audioio.h> header file. */
570/* #undef HAVE_SYS_AUDIOIO_H */
571
572/* Define if you have the <sys/param.h> header file. */
573/* #define HAVE_SYS_PARAM_H 1 */
574
575/* Define if you have the <sys/select.h> header file. */
576/* #define HAVE_SYS_SELECT_H 1 */
577
578/* Define if you have the <sys/time.h> header file. */
579/* #define HAVE_SYS_TIME_H 1 */
580
581/* Define if you have the <sys/times.h> header file. */
582/* #define HAVE_SYS_TIMES_H 1 */
583
584/* Define if you have the <sys/un.h> header file. */
585/* #define HAVE_SYS_UN_H 1 */
586
587/* Define if you have the <sys/utime.h> header file. */
588#define HAVE_SYS_UTIME_H 1
589
590/* Define if you have the <sys/utsname.h> header file. */
591/* #define HAVE_SYS_UTSNAME_H 1 */
592
593/* Define if you have the <thread.h> header file. */
594/* #undef HAVE_THREAD_H */
595
596/* Define if you have the <unistd.h> header file. */
597/* #define HAVE_UNISTD_H 1 */
598
599/* Define if you have the <utime.h> header file. */
600/* #define HAVE_UTIME_H 1 */
601
602/* Define if you have the dl library (-ldl). */
603/* #undef HAVE_LIBDL */
604
605/* Define if you have the mpc library (-lmpc). */
606/* #undef HAVE_LIBMPC */
607
608/* Define if you have the nsl library (-lnsl). */
609#define HAVE_LIBNSL 1
610
611/* Define if you have the seq library (-lseq). */
612/* #undef HAVE_LIBSEQ */
613
614/* Define if you have the socket library (-lsocket). */
615#define HAVE_LIBSOCKET 1
616
617/* Define if you have the sun library (-lsun). */
618/* #undef HAVE_LIBSUN */
619
620/* Define if you have the termcap library (-ltermcap). */
621/* #undef HAVE_LIBTERMCAP */
622
623/* Define if you have the termlib library (-ltermlib). */
624/* #undef HAVE_LIBTERMLIB */
625
626/* Define if you have the thread library (-lthread). */
627/* #undef HAVE_LIBTHREAD */
628
629#endif /* !Py_CONFIG_H */
630