Skip to content

Commit af11a15

Browse files
maxbelangerzooba
authored andcommitted
bpo-32282: Remove unnecessary check for VersionHelpers.h in socketmodule.c on Windows
1 parent d80b443 commit af11a15

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix an unnecessary ifdef in the include of VersionHelpers.h in socketmodule
2+
on Windows.

Modules/socketmodule.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -297,10 +297,8 @@ if_indextoname(index) -- return the corresponding interface name\n\
297297
# include <fcntl.h>
298298
# endif
299299

300-
#if defined(_MSC_VER) && _MSC_VER >= 1800
301300
/* Provides the IsWindows7SP1OrGreater() function */
302301
#include <VersionHelpers.h>
303-
#endif
304302

305303
#endif
306304

@@ -6552,15 +6550,7 @@ PyInit__socket(void)
65526550

65536551
#ifdef MS_WINDOWS
65546552
if (support_wsa_no_inherit == -1) {
6555-
#if defined(_MSC_VER) && _MSC_VER >= 1800
65566553
support_wsa_no_inherit = IsWindows7SP1OrGreater();
6557-
#else
6558-
DWORD version = GetVersion();
6559-
DWORD major = (DWORD)LOBYTE(LOWORD(version));
6560-
DWORD minor = (DWORD)HIBYTE(LOWORD(version));
6561-
/* need Windows 7 SP1, 2008 R2 SP1 or later */
6562-
support_wsa_no_inherit = major > 6 || (major == 6 && minor >= 1);
6563-
#endif
65646554
}
65656555
#endif
65666556

0 commit comments

Comments
 (0)