mirror of
https://github.com/python/cpython.git
synced 2025-07-30 14:44:10 +00:00
Restore support for Microsoft VC6 compiler.
Some functions in the msvcrt module are skipped, and socket.ioctl is enabled only when using a more recent Platform SDK. (and yes, there are still companies that use a 10-years old compiler)
This commit is contained in:
parent
114f7e5fff
commit
a4dd2e20e2
8 changed files with 35 additions and 26 deletions
|
@ -13,19 +13,23 @@
|
|||
# endif
|
||||
|
||||
#else /* MS_WINDOWS */
|
||||
#if _MSC_VER >= 1300
|
||||
# include <winsock2.h>
|
||||
# include <ws2tcpip.h>
|
||||
# include <MSTcpIP.h> /* for SIO_RCVALL */
|
||||
# define HAVE_ADDRINFO
|
||||
# define HAVE_SOCKADDR_STORAGE
|
||||
# define HAVE_GETADDRINFO
|
||||
# define HAVE_GETNAMEINFO
|
||||
# define ENABLE_IPV6
|
||||
#else
|
||||
# include <winsock.h>
|
||||
#endif
|
||||
#endif
|
||||
/* VC6 is shipped with old platform headers, and does not have MSTcpIP.h
|
||||
* Separate SDKs have all the functions we want, but older ones don't have
|
||||
* any version information. I use IPPROTO_IPV6 to detect a decent SDK.
|
||||
*/
|
||||
# ifdef IPPROTO_IPV6
|
||||
# include <MSTcpIP.h> /* for SIO_RCVALL */
|
||||
# define HAVE_ADDRINFO
|
||||
# define HAVE_SOCKADDR_STORAGE
|
||||
# define HAVE_GETADDRINFO
|
||||
# define HAVE_GETNAMEINFO
|
||||
# define ENABLE_IPV6
|
||||
# else
|
||||
typedef int socklen_t;
|
||||
# endif /* IPPROTO_IPV6 */
|
||||
#endif /* MS_WINDOWS */
|
||||
|
||||
#ifdef HAVE_SYS_UN_H
|
||||
# include <sys/un.h>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue