mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
bpo-32282: Remove unnecessary check for VersionHelpers.h
in socketmodule.c
on Windows
This commit is contained in:
parent
d80b443f02
commit
af11a15c58
2 changed files with 2 additions and 10 deletions
|
@ -0,0 +1,2 @@
|
||||||
|
Fix an unnecessary ifdef in the include of VersionHelpers.h in socketmodule
|
||||||
|
on Windows.
|
|
@ -297,10 +297,8 @@ http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/net/getaddrinfo.c.diff?r1=1.82&
|
||||||
# include <fcntl.h>
|
# include <fcntl.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && _MSC_VER >= 1800
|
|
||||||
/* Provides the IsWindows7SP1OrGreater() function */
|
/* Provides the IsWindows7SP1OrGreater() function */
|
||||||
#include <VersionHelpers.h>
|
#include <VersionHelpers.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -6552,15 +6550,7 @@ PyInit__socket(void)
|
||||||
|
|
||||||
#ifdef MS_WINDOWS
|
#ifdef MS_WINDOWS
|
||||||
if (support_wsa_no_inherit == -1) {
|
if (support_wsa_no_inherit == -1) {
|
||||||
#if defined(_MSC_VER) && _MSC_VER >= 1800
|
|
||||||
support_wsa_no_inherit = IsWindows7SP1OrGreater();
|
support_wsa_no_inherit = IsWindows7SP1OrGreater();
|
||||||
#else
|
|
||||||
DWORD version = GetVersion();
|
|
||||||
DWORD major = (DWORD)LOBYTE(LOWORD(version));
|
|
||||||
DWORD minor = (DWORD)HIBYTE(LOWORD(version));
|
|
||||||
/* need Windows 7 SP1, 2008 R2 SP1 or later */
|
|
||||||
support_wsa_no_inherit = major > 6 || (major == 6 && minor >= 1);
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue