Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 762681b

Browse files
committed
Slowly apply part of #2065: py3k can be compiled with VS8.0
1 parent 6166717 commit 762681b

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Modules/socketmodule.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5001,8 +5001,12 @@ PyInit__socket(void)
50015001
PyModule_AddIntConstant(m, "RCVALL_OFF", RCVALL_OFF);
50025002
PyModule_AddIntConstant(m, "RCVALL_ON", RCVALL_ON);
50035003
PyModule_AddIntConstant(m, "RCVALL_SOCKETLEVELONLY", RCVALL_SOCKETLEVELONLY);
5004+
#ifdef RCVALL_IPLEVEL
50045005
PyModule_AddIntConstant(m, "RCVALL_IPLEVEL", RCVALL_IPLEVEL);
5006+
#endif
5007+
#ifdef RCVALL_MAX
50055008
PyModule_AddIntConstant(m, "RCVALL_MAX", RCVALL_MAX);
5009+
#endif
50065010
#endif /* _MSTCPIP_ */
50075011

50085012
/* Initialize gethostbyname lock */

PC/pyconfig.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,11 +158,11 @@ WIN32 is still required for the locale module.
158158
/* set the version macros for the windows headers */
159159
#ifdef MS_WINX64
160160
/* 64 bit only runs on XP or greater */
161-
#define Py_WINVER _WIN32_WINNT_WINXP
161+
#define Py_WINVER 0x0501 /* _WIN32_WINNT_WINXP */
162162
#define Py_NTDDI NTDDI_WINXP
163163
#else
164164
/* Python 2.6+ requires Windows 2000 or greater */
165-
#define Py_WINVER _WIN32_WINNT_WIN2K
165+
#define Py_WINVER 0x0500 /* _WIN32_WINNT_WIN2K */
166166
#define Py_NTDDI NTDDI_WIN2KSP4
167167
#endif
168168

0 commit comments

Comments
 (0)