From 3d17a5c5aec27ad483f68f36855ee9761181857f Mon Sep 17 00:00:00 2001 From: Amaury Forgeot d'Arc Date: Fri, 13 Jun 2008 01:09:34 +0000 Subject: Merged revisions 64214 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r64214 | amaury.forgeotdarc | 2008-06-13 02:42:22 +0200 (ven., 13 juin 2008) | 6 lines 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) ........ --- Modules/socketmodule.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'Modules/socketmodule.h') diff --git a/Modules/socketmodule.h b/Modules/socketmodule.h index 114084cea7..a24110f76d 100644 --- a/Modules/socketmodule.h +++ b/Modules/socketmodule.h @@ -13,20 +13,23 @@ # endif #else /* MS_WINDOWS */ -#if _MSC_VER >= 1300 # include # include -# include /* for SIO_RCVALL */ -# define HAVE_ADDRINFO -# define HAVE_SOCKADDR_STORAGE -# define HAVE_GETADDRINFO -# define HAVE_GETNAMEINFO -# define ENABLE_IPV6 -#else -# define WIN32_LEAN_AND_MEAN -# include -#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 /* 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 -- cgit v1.2.1