changeset: 81711:e52df05b496a user: Martin v. Löwis date: Fri Jan 25 14:06:18 2013 +0100 files: Misc/NEWS PC/pyconfig.h PCbuild/build_tkinter.py Python/random.c Tools/buildbot/external-amd64.bat Tools/buildbot/external.bat description: 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. diff -r f69eced9ff9d -r e52df05b496a Misc/NEWS --- a/Misc/NEWS Fri Jan 25 13:20:46 2013 +0100 +++ b/Misc/NEWS Fri Jan 25 14:06:18 2013 +0100 @@ -746,6 +746,8 @@ 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 diff -r f69eced9ff9d -r e52df05b496a PC/pyconfig.h --- a/PC/pyconfig.h Fri Jan 25 13:20:46 2013 +0100 +++ b/PC/pyconfig.h Fri Jan 25 14:06:18 2013 +0100 @@ -156,15 +156,9 @@ #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 diff -r f69eced9ff9d -r e52df05b496a PCbuild/build_tkinter.py --- a/PCbuild/build_tkinter.py Fri Jan 25 13:20:46 2013 +0100 +++ b/PCbuild/build_tkinter.py Fri Jan 25 14:06:18 2013 +0100 @@ -16,11 +16,7 @@ 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()) diff -r f69eced9ff9d -r e52df05b496a Python/random.c --- a/Python/random.c Fri Jan 25 13:20:46 2013 +0100 +++ b/Python/random.c Fri Jan 25 14:06:18 2013 +0100 @@ -12,13 +12,6 @@ #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 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 @@ while (size > 0) { chunk = size > INT_MAX ? INT_MAX : size; - if (!pCryptGenRandom(hCryptProv, chunk, buffer)) + if (!CryptGenRandom(hCryptProv, chunk, buffer)) { /* CryptGenRandom() failed */ if (raise) diff -r f69eced9ff9d -r e52df05b496a Tools/buildbot/external-amd64.bat --- a/Tools/buildbot/external-amd64.bat Fri Jan 25 13:20:46 2013 +0100 +++ b/Tools/buildbot/external-amd64.bat Fri Jan 25 14:06:18 2013 +0100 @@ -6,16 +6,16 @@ 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 ..\.. ) diff -r f69eced9ff9d -r e52df05b496a Tools/buildbot/external.bat --- a/Tools/buildbot/external.bat Fri Jan 25 13:20:46 2013 +0100 +++ b/Tools/buildbot/external.bat Fri Jan 25 14:06:18 2013 +0100 @@ -7,15 +7,15 @@ 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 ..\.. )