diff options
author | Mark Hammond <mhammond@skippinet.com.au> | 2007-07-27 04:52:32 (GMT) |
---|---|---|
committer | Mark Hammond <mhammond@skippinet.com.au> | 2007-07-27 04:52:32 (GMT) |
commit | d0aabc03c6ed37358dd6bbc726e72ce4fdc72405 (patch) | |
tree | db2d196939fc4c5606cb765af66c0a7208dc76a5 /PC | |
parent | 00f2029cd57ded3be287041b527c84cd8442afd5 (diff) | |
download | cpython-d0aabc03c6ed37358dd6bbc726e72ce4fdc72405.zip cpython-d0aabc03c6ed37358dd6bbc726e72ce4fdc72405.tar.gz cpython-d0aabc03c6ed37358dd6bbc726e72ce4fdc72405.tar.bz2 |
In consultation with Kristjan Jonsson, only define WINVER and _WINNT_WIN32
if (a) we are building Python itself and (b) no one previously defined them
Diffstat (limited to 'PC')
-rw-r--r-- | PC/pyconfig.h | 22 |
1 files changed, 18 insertions, 4 deletions
diff --git a/PC/pyconfig.h b/PC/pyconfig.h index cc3c3dd..302b9af 100644 --- a/PC/pyconfig.h +++ b/PC/pyconfig.h @@ -151,12 +151,26 @@ MS_CORE_DLL. /* set the version macros for the windows headers */ #ifdef MS_WINX64 /* 64 bit only runs on XP or greater */ -#define _WIN32_WINNT 0x0501 -#define WINVER 0x0501 +#define Py_WINVER 0x0501 #else /* NT 4.0 or greater required otherwise */ -#define _WIN32_WINNT 0x0400 -#define WINVER 0x0400 +#define Py_WINVER 0x0400 +#endif + +/* We only set these values when building Python - we don't want to force + these values on extensions, as that will affect the prototypes and + structures exposed in the Windows headers. Even when building Python, we + allow a single source file to override this - they may need access to + structures etc so it can optionally use new Windows features if it + determines at runtime they are available. +*/ +#ifdef Py_BUILD_CORE +#ifndef WINVER +#define WINVER Py_WINVER +#endif +#ifndef _WINNT_WIN32 +#define _WINNT_WIN32 Py_WINVER +#endif #endif /* _W64 is not defined for VC6 or eVC4 */ |