mirror of https://github.com/python/cpython
Drop support for Windows 2000; allow any XP API (but not Vista+).
Drop SDK version configuration for Tk compilation, to not bind it to W2k anymore. Binding it to XP would conflict with Tk's own binding of tkMenu to W2k.
This commit is contained in:
parent
6951fea3ab
commit
3f50bf652b
|
@ -746,6 +746,8 @@ Tests
|
|||
Build
|
||||
-----
|
||||
|
||||
- Drop support for Windows 2000.
|
||||
|
||||
- Issue #17029: Let h2py search the multiarch system include directory.
|
||||
|
||||
- Issue #16953: Fix socket module compilation on platforms with
|
||||
|
|
|
@ -156,15 +156,9 @@ WIN32 is still required for the locale module.
|
|||
#endif /* MS_WIN64 */
|
||||
|
||||
/* set the version macros for the windows headers */
|
||||
#ifdef MS_WINX64
|
||||
/* 64 bit only runs on XP or greater */
|
||||
/* Python 3.4+ requires Windows XP or greater */
|
||||
#define Py_WINVER 0x0501 /* _WIN32_WINNT_WINXP */
|
||||
#define Py_NTDDI NTDDI_WINXP
|
||||
#else
|
||||
/* Python 2.6+ requires Windows 2000 or greater */
|
||||
#define Py_WINVER 0x0500 /* _WIN32_WINNT_WIN2K */
|
||||
#define Py_NTDDI NTDDI_WIN2KSP4
|
||||
#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
|
||||
|
|
|
@ -16,11 +16,7 @@ TK = "tk8.5.11"
|
|||
TIX = "tix-8.4.3.x"
|
||||
|
||||
ROOT = os.path.abspath(os.path.join(here, par, par))
|
||||
# Windows 2000 compatibility: WINVER 0x0500
|
||||
# http://msdn2.microsoft.com/en-us/library/aa383745.aspx
|
||||
NMAKE = ('nmake /nologo /f %s '
|
||||
'COMPILERFLAGS=\"-DWINVER=0x0500 -D_WIN32_WINNT=0x0500 -DNTDDI_VERSION=NTDDI_WIN2KSP4\" '
|
||||
'%s %s')
|
||||
NMAKE = ('nmake /nologo /f %s %s %s')
|
||||
|
||||
def nmake(makefile, command="", **kw):
|
||||
defines = ' '.join(k+'='+str(v) for k, v in kw.items())
|
||||
|
|
|
@ -12,13 +12,6 @@ static int _Py_HashSecret_Initialized = 0;
|
|||
#endif
|
||||
|
||||
#ifdef MS_WINDOWS
|
||||
typedef BOOL (WINAPI *CRYPTACQUIRECONTEXTA)(HCRYPTPROV *phProv,\
|
||||
LPCSTR pszContainer, LPCSTR pszProvider, DWORD dwProvType,\
|
||||
DWORD dwFlags );
|
||||
typedef BOOL (WINAPI *CRYPTGENRANDOM)(HCRYPTPROV hProv, DWORD dwLen,\
|
||||
BYTE *pbBuffer );
|
||||
|
||||
static CRYPTGENRANDOM pCryptGenRandom = NULL;
|
||||
/* This handle is never explicitly released. Instead, the operating
|
||||
system will release it when the process terminates. */
|
||||
static HCRYPTPROV hCryptProv = 0;
|
||||
|
@ -26,29 +19,9 @@ static HCRYPTPROV hCryptProv = 0;
|
|||
static int
|
||||
win32_urandom_init(int raise)
|
||||
{
|
||||
HINSTANCE hAdvAPI32 = NULL;
|
||||
CRYPTACQUIRECONTEXTA pCryptAcquireContext = NULL;
|
||||
|
||||
/* Obtain handle to the DLL containing CryptoAPI. This should not fail. */
|
||||
hAdvAPI32 = GetModuleHandle("advapi32.dll");
|
||||
if(hAdvAPI32 == NULL)
|
||||
goto error;
|
||||
|
||||
/* Obtain pointers to the CryptoAPI functions. This will fail on some early
|
||||
versions of Win95. */
|
||||
pCryptAcquireContext = (CRYPTACQUIRECONTEXTA)GetProcAddress(
|
||||
hAdvAPI32, "CryptAcquireContextA");
|
||||
if (pCryptAcquireContext == NULL)
|
||||
goto error;
|
||||
|
||||
pCryptGenRandom = (CRYPTGENRANDOM)GetProcAddress(hAdvAPI32,
|
||||
"CryptGenRandom");
|
||||
if (pCryptGenRandom == NULL)
|
||||
goto error;
|
||||
|
||||
/* Acquire context */
|
||||
if (! pCryptAcquireContext(&hCryptProv, NULL, NULL,
|
||||
PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
|
||||
if (!CryptAcquireContext(&hCryptProv, NULL, NULL,
|
||||
PROV_RSA_FULL, CRYPT_VERIFYCONTEXT))
|
||||
goto error;
|
||||
|
||||
return 0;
|
||||
|
@ -77,7 +50,7 @@ win32_urandom(unsigned char *buffer, Py_ssize_t size, int raise)
|
|||
while (size > 0)
|
||||
{
|
||||
chunk = size > INT_MAX ? INT_MAX : size;
|
||||
if (!pCryptGenRandom(hCryptProv, chunk, buffer))
|
||||
if (!CryptGenRandom(hCryptProv, chunk, buffer))
|
||||
{
|
||||
/* CryptGenRandom() failed */
|
||||
if (raise)
|
||||
|
|
|
@ -6,16 +6,16 @@ call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
|
|||
|
||||
if not exist tcltk64\bin\tcl85g.dll (
|
||||
cd tcl-8.5.11.0\win
|
||||
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all
|
||||
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 install
|
||||
nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 clean all
|
||||
nmake -f makefile.vc DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 install
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
if not exist tcltk64\bin\tk85g.dll (
|
||||
cd tk-8.5.11.0\win
|
||||
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 clean
|
||||
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 all
|
||||
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 install
|
||||
nmake -f makefile.vc OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 clean
|
||||
nmake -f makefile.vc OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 all
|
||||
nmake -f makefile.vc OPTS=noxp DEBUG=1 MACHINE=AMD64 INSTALLDIR=..\..\tcltk64 TCLDIR=..\..\tcl-8.5.11.0 install
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
|
|
|
@ -7,15 +7,15 @@ call "%VS100COMNTOOLS%\vsvars32.bat"
|
|||
if not exist tcltk\bin\tcl85g.dll (
|
||||
@rem all and install need to be separate invocations, otherwise nmakehlp is not found on install
|
||||
cd tcl-8.5.11.0\win
|
||||
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 DEBUG=1 INSTALLDIR=..\..\tcltk clean all
|
||||
nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk clean all
|
||||
nmake -f makefile.vc DEBUG=1 INSTALLDIR=..\..\tcltk install
|
||||
cd ..\..
|
||||
)
|
||||
|
||||
if not exist tcltk\bin\tk85g.dll (
|
||||
cd tk-8.5.11.0\win
|
||||
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 clean
|
||||
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 all
|
||||
nmake -f makefile.vc COMPILERFLAGS=-DWINVER=0x0500 OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 install
|
||||
nmake -f makefile.vc OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 clean
|
||||
nmake -f makefile.vc OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 all
|
||||
nmake -f makefile.vc OPTS=noxp DEBUG=1 INSTALLDIR=..\..\tcltk TCLDIR=..\..\tcl-8.5.11.0 install
|
||||
cd ..\..
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue