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