Whitespace normalization.
[python/dscho.git] / PC / pyconfig.h
blob79f5ddd52f9c5b8f7978b7c5602504b7db86f638
1 #ifndef Py_CONFIG_H
2 #define Py_CONFIG_H
4 /* pyconfig.h. NOT Generated automatically by configure.
6 This is a manually maintained version used for the Watcom,
7 Borland and Microsoft Visual C++ compilers. It is a
8 standard part of the Python distribution.
10 WINDOWS DEFINES:
11 The code specific to Windows should be wrapped around one of
12 the following #defines
14 MS_WIN64 - Code specific to the MS Win64 API
15 MS_WIN32 - Code specific to the MS Win32 (and Win64) API (obsolete, this covers all supported APIs)
16 MS_WINDOWS - Code specific to Windows, but all versions.
17 Py_ENABLE_SHARED - Code if the Python core is built as a DLL.
19 Also note that neither "_M_IX86" or "_MSC_VER" should be used for
20 any purpose other than "Windows Intel x86 specific" and "Microsoft
21 compiler specific". Therefore, these should be very rare.
24 NOTE: The following symbols are deprecated:
25 NT, WIN32, USE_DL_EXPORT, USE_DL_IMPORT, DL_EXPORT, DL_IMPORT
26 MS_CORE_DLL.
30 #include <io.h>
31 #define HAVE_SYS_UTIME_H
32 #define HAVE_HYPOT
33 #define HAVE_TEMPNAM
34 #define HAVE_TMPFILE
35 #define HAVE_TMPNAM
36 #define HAVE_CLOCK
37 #define HAVE_STRFTIME
38 #define HAVE_STRERROR
39 #define DONT_HAVE_SIG_ALARM
40 #define DONT_HAVE_SIG_PAUSE
41 #define LONG_BIT 32
42 #define WORD_BIT 32
43 #define PREFIX ""
44 #define EXEC_PREFIX ""
46 #define MS_WIN32 /* only support win32 and greater. */
47 #define MS_WINDOWS
48 #ifndef PYTHONPATH
49 # define PYTHONPATH ".\\DLLs;.\\lib;.\\lib\\plat-win;.\\lib\\lib-tk"
50 #endif
51 #define NT_THREADS
52 #define WITH_THREAD
53 #ifndef NETSCAPE_PI
54 #define USE_SOCKET
55 #endif
57 /* Compiler specific defines */
59 /* ------------------------------------------------------------------------*/
60 /* Microsoft C defines _MSC_VER */
61 #ifdef _MSC_VER
63 /* We want COMPILER to expand to a string containing _MSC_VER's *value*.
64 * This is horridly tricky, because the stringization operator only works
65 * on macro arguments, and doesn't evaluate macros passed *as* arguments.
66 * Attempts simpler than the following appear doomed to produce "_MSC_VER"
67 * literally in the string.
69 #define _Py_PASTE_VERSION(SUFFIX) \
70 ("[MSC v." _Py_STRINGIZE(_MSC_VER) " " SUFFIX "]")
71 /* e.g., this produces, after compile-time string catenation,
72 * ("[MSC v.1200 32 bit (Intel)]")
74 * _Py_STRINGIZE(_MSC_VER) expands to
75 * _Py_STRINGIZE1((_MSC_VER)) expands to
76 * _Py_STRINGIZE2(_MSC_VER) but as this call is the result of token-pasting
77 * it's scanned again for macros and so further expands to (under MSVC 6)
78 * _Py_STRINGIZE2(1200) which then expands to
79 * "1200"
81 #define _Py_STRINGIZE(X) _Py_STRINGIZE1((X))
82 #define _Py_STRINGIZE1(X) _Py_STRINGIZE2 ## X
83 #define _Py_STRINGIZE2(X) #X
85 /* MSVC defines _WINxx to differentiate the windows platform types
87 Note that for compatibility reasons _WIN32 is defined on Win32
88 *and* on Win64. For the same reasons, in Python, MS_WIN32 is
89 defined on Win32 *and* Win64. Win32 only code must therefore be
90 guarded as follows:
91 #if defined(MS_WIN32) && !defined(MS_WIN64)
93 #ifdef _WIN64
94 #define MS_WIN64
95 #endif
97 /* set the COMPILER */
98 #ifdef MS_WIN64
99 #ifdef _M_IX86
100 #define COMPILER _Py_PASTE_VERSION("64 bit (Intel)")
101 #else
102 #define COMPILER _Py_PASTE_VERSION("64 bit (Unknown)")
103 #endif
104 #endif /* MS_WIN64 */
106 #if defined(MS_WIN32) && !defined(MS_WIN64)
107 #ifdef _M_IX86
108 #define COMPILER _Py_PASTE_VERSION("32 bit (Intel)")
109 #else
110 #define COMPILER _Py_PASTE_VERSION("32 bit (Unknown)")
111 #endif
112 #endif /* MS_WIN32 && !MS_WIN64 */
114 typedef int pid_t;
115 #define hypot _hypot
117 #endif /* _MSC_VER */
119 /* define some ANSI types that are not defined in earlier Win headers */
120 #if defined(_MSC_VER) && _MSC_VER >= 1200
121 /* This file only exists in VC 6.0 or higher */
122 #include <basetsd.h>
123 #endif
125 /* ------------------------------------------------------------------------*/
126 /* The Borland compiler defines __BORLANDC__ */
127 /* XXX These defines are likely incomplete, but should be easy to fix. */
128 #ifdef __BORLANDC__
129 #define COMPILER "[Borland]"
131 #ifdef _WIN32
132 /* tested with BCC 5.5 (__BORLANDC__ >= 0x0550)
135 typedef int pid_t;
136 /* BCC55 seems to understand __declspec(dllimport), it is used in its
137 own header files (winnt.h, ...) - so we can do nothing and get the default*/
139 #undef HAVE_SYS_UTIME_H
140 #define HAVE_UTIME_H
141 #define HAVE_DIRENT_H
143 /* rename a few functions for the Borland compiler */
144 #include <io.h>
145 #define _chsize chsize
146 #define _setmode setmode
148 #else /* !_WIN32 */
149 #error "Only Win32 and later are supported"
150 #endif /* !_WIN32 */
152 #endif /* BORLANDC */
154 /* ------------------------------------------------------------------------*/
155 /* egcs/gnu-win32 defines __GNUC__ and _WIN32 */
156 #if defined(__GNUC__) && defined(_WIN32)
157 /* XXX These defines are likely incomplete, but should be easy to fix.
158 They should be complete enough to build extension modules. */
159 /* Suggested by Rene Liebscher <R.Liebscher@gmx.de> to avoid a GCC 2.91.*
160 bug that requires structure imports. More recent versions of the
161 compiler don't exhibit this bug.
163 #if (__GNUC__==2) && (__GNUC_MINOR__<=91)
164 #warning "Please use an up-to-date version of gcc! (>2.91 recommended)"
165 #endif
167 #define COMPILER "[gcc]"
168 #define hypot _hypot
169 #define PY_LONG_LONG long long
170 #endif /* GNUC */
172 /* ------------------------------------------------------------------------*/
173 /* lcc-win32 defines __LCC__ */
174 #if defined(__LCC__)
175 /* XXX These defines are likely incomplete, but should be easy to fix.
176 They should be complete enough to build extension modules. */
178 #define COMPILER "[lcc-win32]"
179 typedef int pid_t;
180 /* __declspec() is supported here too - do nothing to get the defaults */
182 #endif /* LCC */
184 /* ------------------------------------------------------------------------*/
185 /* End of compilers - finish up */
187 #ifndef NO_STDIO_H
188 # include <stdio.h>
189 #endif
191 /* 64 bit ints are usually spelt __int64 unless compiler has overridden */
192 #define HAVE_LONG_LONG 1
193 #ifndef PY_LONG_LONG
194 # define PY_LONG_LONG __int64
195 #endif
197 /* For Windows the Python core is in a DLL by default. Test
198 Py_NO_ENABLE_SHARED to find out. Also support MS_NO_COREDLL for b/w compat */
199 #if !defined(MS_NO_COREDLL) && !defined(Py_NO_ENABLE_SHARED)
200 # define Py_ENABLE_SHARED 1 /* standard symbol for shared library */
201 # define MS_COREDLL /* deprecated old symbol */
202 #endif /* !MS_NO_COREDLL && ... */
204 /* Deprecated USE_DL_EXPORT macro - please use Py_BUILD_CORE */
205 #ifdef USE_DL_EXPORT
206 # define Py_BUILD_CORE
207 #endif /* USE_DL_EXPORT */
209 /* All windows compilers that use this header support __declspec */
210 #define HAVE_DECLSPEC_DLL
212 /* For an MSVC DLL, we can nominate the .lib files used by extensions */
213 #ifdef MS_COREDLL
214 # ifndef Py_BUILD_CORE /* not building the core - must be an ext */
215 # if defined(_MSC_VER)
216 /* So MSVC users need not specify the .lib file in
217 their Makefile (other compilers are generally
218 taken care of by distutils.) */
219 # ifdef _DEBUG
220 # pragma comment(lib,"python24_d.lib")
221 # else
222 # pragma comment(lib,"python24.lib")
223 # endif /* _DEBUG */
224 # endif /* _MSC_VER */
225 # endif /* Py_BUILD_CORE */
226 #endif /* MS_COREDLL */
228 #if defined(MS_WIN64)
229 /* maintain "win32" sys.platform for backward compatibility of Python code,
230 the Win64 API should be close enough to the Win32 API to make this
231 preferable */
232 # define PLATFORM "win32"
233 # define SIZEOF_VOID_P 8
234 # define SIZEOF_TIME_T 8
235 # define SIZEOF_OFF_T 4
236 # define SIZEOF_FPOS_T 8
237 # define SIZEOF_HKEY 8
238 /* configure.in defines HAVE_LARGEFILE_SUPPORT iff HAVE_LONG_LONG,
239 sizeof(off_t) > sizeof(long), and sizeof(PY_LONG_LONG) >= sizeof(off_t).
240 On Win64 the second condition is not true, but if fpos_t replaces off_t
241 then this is true. The uses of HAVE_LARGEFILE_SUPPORT imply that Win64
242 should define this. */
243 # define HAVE_LARGEFILE_SUPPORT
244 #elif defined(MS_WIN32)
245 # define PLATFORM "win32"
246 # define HAVE_LARGEFILE_SUPPORT
247 # define SIZEOF_VOID_P 4
248 # define SIZEOF_TIME_T 4
249 # define SIZEOF_OFF_T 4
250 # define SIZEOF_FPOS_T 8
251 # define SIZEOF_HKEY 4
252 #endif
254 #ifdef _DEBUG
255 # define Py_DEBUG
256 #endif
259 #ifdef MS_WIN32
261 #define SIZEOF_SHORT 2
262 #define SIZEOF_INT 4
263 #define SIZEOF_LONG 4
264 #define SIZEOF_LONG_LONG 8
266 #endif
268 /* Fairly standard from here! */
270 /* Define if on AIX 3.
271 System headers sometimes define this.
272 We just want to avoid a redefinition error message. */
273 #ifndef _ALL_SOURCE
274 /* #undef _ALL_SOURCE */
275 #endif
277 /* Define to empty if the keyword does not work. */
278 /* #define const */
280 /* Define if you have dirent.h. */
281 /* #define DIRENT 1 */
283 /* Define to the type of elements in the array set by `getgroups'.
284 Usually this is either `int' or `gid_t'. */
285 /* #undef GETGROUPS_T */
287 /* Define to `int' if <sys/types.h> doesn't define. */
288 /* #undef gid_t */
290 /* Define if your struct tm has tm_zone. */
291 /* #undef HAVE_TM_ZONE */
293 /* Define if you don't have tm_zone but do have the external array
294 tzname. */
295 #define HAVE_TZNAME
297 /* Define to `int' if <sys/types.h> doesn't define. */
298 /* #undef mode_t */
300 /* Define if you don't have dirent.h, but have ndir.h. */
301 /* #undef NDIR */
303 /* Define to `long' if <sys/types.h> doesn't define. */
304 /* #undef off_t */
306 /* Define to `int' if <sys/types.h> doesn't define. */
307 /* #undef pid_t */
309 /* Define if the system does not provide POSIX.1 features except
310 with this defined. */
311 /* #undef _POSIX_1_SOURCE */
313 /* Define if you need to in order for stat and other things to work. */
314 /* #undef _POSIX_SOURCE */
316 /* Define as the return type of signal handlers (int or void). */
317 #define RETSIGTYPE void
319 /* Define to `unsigned' if <sys/types.h> doesn't define. */
320 /* #undef size_t */
322 /* Define to `int' if <sys/types.h> doesn't define. */
323 #if _MSC_VER + 0 >= 1300
324 /* VC.NET typedefs socklen_t in ws2tcpip.h. */
325 #else
326 #define socklen_t int
327 #endif
329 /* Define if you have the ANSI C header files. */
330 #define STDC_HEADERS 1
332 /* Define if you don't have dirent.h, but have sys/dir.h. */
333 /* #undef SYSDIR */
335 /* Define if you don't have dirent.h, but have sys/ndir.h. */
336 /* #undef SYSNDIR */
338 /* Define if you can safely include both <sys/time.h> and <time.h>. */
339 /* #undef TIME_WITH_SYS_TIME */
341 /* Define if your <sys/time.h> declares struct tm. */
342 /* #define TM_IN_SYS_TIME 1 */
344 /* Define to `int' if <sys/types.h> doesn't define. */
345 /* #undef uid_t */
347 /* Define if the closedir function returns void instead of int. */
348 /* #undef VOID_CLOSEDIR */
350 /* Define if getpgrp() must be called as getpgrp(0)
351 and (consequently) setpgrp() as setpgrp(0, 0). */
352 /* #undef GETPGRP_HAVE_ARGS */
354 /* Define this if your time.h defines altzone */
355 /* #define HAVE_ALTZONE */
357 /* Define if you have the putenv function. */
358 #define HAVE_PUTENV
360 /* Define if your compiler supports function prototypes */
361 #define HAVE_PROTOTYPES
363 /* Define if you can safely include both <sys/select.h> and <sys/time.h>
364 (which you can't on SCO ODT 3.0). */
365 /* #undef SYS_SELECT_WITH_SYS_TIME */
367 /* Define if you want documentation strings in extension modules */
368 #define WITH_DOC_STRINGS 1
370 /* Define if you want to compile in rudimentary thread support */
371 /* #undef WITH_THREAD */
373 /* Define if you want to use the GNU readline library */
374 /* #define WITH_READLINE 1 */
376 /* Define if you want to have a Unicode type. */
377 #define Py_USING_UNICODE
379 /* Define as the integral type used for Unicode representation. */
380 #define PY_UNICODE_TYPE unsigned short
382 /* Define as the size of the unicode type. */
383 #define Py_UNICODE_SIZE SIZEOF_SHORT
385 /* Define if you have a useable wchar_t type defined in wchar.h; useable
386 means wchar_t must be 16-bit unsigned type. (see
387 Include/unicodeobject.h). */
388 #if Py_UNICODE_SIZE == 2
389 #define HAVE_USABLE_WCHAR_T
391 /* Define to indicate that the Python Unicode representation can be passed
392 as-is to Win32 Wide API. */
393 #define Py_WIN_WIDE_FILENAMES
394 #endif
396 /* Use Python's own small-block memory-allocator. */
397 #define WITH_PYMALLOC 1
399 /* Define if you have clock. */
400 /* #define HAVE_CLOCK */
402 /* Define when any dynamic module loading is enabled */
403 #define HAVE_DYNAMIC_LOADING
405 /* Define if you have ftime. */
406 #define HAVE_FTIME
408 /* Define if you have getpeername. */
409 #define HAVE_GETPEERNAME
411 /* Define if you have getpgrp. */
412 /* #undef HAVE_GETPGRP */
414 /* Define if you have getpid. */
415 #define HAVE_GETPID
417 /* Define if you have gettimeofday. */
418 /* #undef HAVE_GETTIMEOFDAY */
420 /* Define if you have getwd. */
421 /* #undef HAVE_GETWD */
423 /* Define if you have lstat. */
424 /* #undef HAVE_LSTAT */
426 /* Define if you have the mktime function. */
427 #define HAVE_MKTIME
429 /* Define if you have nice. */
430 /* #undef HAVE_NICE */
432 /* Define if you have readlink. */
433 /* #undef HAVE_READLINK */
435 /* Define if you have select. */
436 /* #undef HAVE_SELECT */
438 /* Define if you have setpgid. */
439 /* #undef HAVE_SETPGID */
441 /* Define if you have setpgrp. */
442 /* #undef HAVE_SETPGRP */
444 /* Define if you have setsid. */
445 /* #undef HAVE_SETSID */
447 /* Define if you have setvbuf. */
448 #define HAVE_SETVBUF
450 /* Define if you have siginterrupt. */
451 /* #undef HAVE_SIGINTERRUPT */
453 /* Define if you have symlink. */
454 /* #undef HAVE_SYMLINK */
456 /* Define if you have tcgetpgrp. */
457 /* #undef HAVE_TCGETPGRP */
459 /* Define if you have tcsetpgrp. */
460 /* #undef HAVE_TCSETPGRP */
462 /* Define if you have times. */
463 /* #undef HAVE_TIMES */
465 /* Define if you have uname. */
466 /* #undef HAVE_UNAME */
468 /* Define if you have waitpid. */
469 /* #undef HAVE_WAITPID */
471 /* Define to 1 if you have the `wcscoll' function. */
472 #define HAVE_WCSCOLL 1
474 /* Define if you have the <dlfcn.h> header file. */
475 /* #undef HAVE_DLFCN_H */
477 /* Define if you have the <fcntl.h> header file. */
478 #define HAVE_FCNTL_H 1
480 /* Define if you have the <stdarg.h> prototypes. */
481 #define HAVE_STDARG_PROTOTYPES
483 /* Define if you have the <sys/audioio.h> header file. */
484 /* #undef HAVE_SYS_AUDIOIO_H */
486 /* Define if you have the <sys/param.h> header file. */
487 /* #define HAVE_SYS_PARAM_H 1 */
489 /* Define if you have the <sys/select.h> header file. */
490 /* #define HAVE_SYS_SELECT_H 1 */
492 /* Define if you have the <sys/time.h> header file. */
493 /* #define HAVE_SYS_TIME_H 1 */
495 /* Define if you have the <sys/times.h> header file. */
496 /* #define HAVE_SYS_TIMES_H 1 */
498 /* Define if you have the <sys/un.h> header file. */
499 /* #define HAVE_SYS_UN_H 1 */
501 /* Define if you have the <sys/utime.h> header file. */
502 /* #define HAVE_SYS_UTIME_H 1 */
504 /* Define if you have the <sys/utsname.h> header file. */
505 /* #define HAVE_SYS_UTSNAME_H 1 */
507 /* Define if you have the <thread.h> header file. */
508 /* #undef HAVE_THREAD_H */
510 /* Define if you have the <unistd.h> header file. */
511 /* #define HAVE_UNISTD_H 1 */
513 /* Define if you have the <utime.h> header file. */
514 /* #define HAVE_UTIME_H 1 */
516 /* Define if the compiler provides a wchar.h header file. */
517 #define HAVE_WCHAR_H 1
519 /* Define if you have the dl library (-ldl). */
520 /* #undef HAVE_LIBDL */
522 /* Define if you have the mpc library (-lmpc). */
523 /* #undef HAVE_LIBMPC */
525 /* Define if you have the nsl library (-lnsl). */
526 #define HAVE_LIBNSL 1
528 /* Define if you have the seq library (-lseq). */
529 /* #undef HAVE_LIBSEQ */
531 /* Define if you have the socket library (-lsocket). */
532 #define HAVE_LIBSOCKET 1
534 /* Define if you have the sun library (-lsun). */
535 /* #undef HAVE_LIBSUN */
537 /* Define if you have the termcap library (-ltermcap). */
538 /* #undef HAVE_LIBTERMCAP */
540 /* Define if you have the termlib library (-ltermlib). */
541 /* #undef HAVE_LIBTERMLIB */
543 /* Define if you have the thread library (-lthread). */
544 /* #undef HAVE_LIBTHREAD */
545 #endif /* !Py_CONFIG_H */