Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Fix an unnecessary ifdef in the include of VersionHelpers.h in socketmodule
on Windows.
10 changes: 0 additions & 10 deletions Modules/socketmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,8 @@ if_indextoname(index) -- return the corresponding interface name\n\
# include <fcntl.h>
# endif

#if defined(_MSC_VER) && _MSC_VER >= 1800
/* Provides the IsWindows7SP1OrGreater() function */
#include <VersionHelpers.h>
#endif

#endif

Expand Down Expand Up @@ -6510,15 +6508,7 @@ PyInit__socket(void)

#ifdef MS_WINDOWS
if (support_wsa_no_inherit == -1) {
#if defined(_MSC_VER) && _MSC_VER >= 1800
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

Expand Down