diff -r e3ab8aa0216c Modules/errnomodule.c --- a/Modules/errnomodule.c Thu Apr 19 00:57:45 2012 +0200 +++ b/Modules/errnomodule.c Fri Apr 27 05:42:56 2012 +0100 @@ -7,6 +7,33 @@ #ifdef MS_WINDOWS #define WIN32_LEAN_AND_MEAN #include +/* The following constants were added to errno.h in VS2010 but have + preferred WSA equivalents. */ +#undef EADDRINUSE +#undef EADDRNOTAVAIL +#undef EAFNOSUPPORT +#undef EALREADY +#undef ECONNABORTED +#undef ECONNREFUSED +#undef ECONNRESET +#undef EDESTADDRREQ +#undef EHOSTUNREACH +#undef EINPROGRESS +#undef EISCONN +#undef ELOOP +#undef EMSGSIZE +#undef ENETDOWN +#undef ENETRESET +#undef ENETUNREACH +#undef ENOBUFS +#undef ENOPROTOOPT +#undef ENOTCONN +#undef ENOTSOCK +#undef EOPNOTSUPP +#undef EPROTONOSUPPORT +#undef EPROTOTYPE +#undef ETIMEDOUT +#undef EWOULDBLOCK #endif /* diff -r e3ab8aa0216c Objects/exceptions.c --- a/Objects/exceptions.c Thu Apr 19 00:57:45 2012 +0200 +++ b/Objects/exceptions.c Fri Apr 27 05:42:56 2012 +0100 @@ -2317,6 +2317,34 @@ #ifdef MS_WINDOWS #include +/* The following constants were added to errno.h in VS2010 but have + preferred WSA equivalents. */ +#undef EADDRINUSE +#undef EADDRNOTAVAIL +#undef EAFNOSUPPORT +#undef EALREADY +#undef ECONNABORTED +#undef ECONNREFUSED +#undef ECONNRESET +#undef EDESTADDRREQ +#undef EHOSTUNREACH +#undef EINPROGRESS +#undef EISCONN +#undef ELOOP +#undef EMSGSIZE +#undef ENETDOWN +#undef ENETRESET +#undef ENETUNREACH +#undef ENOBUFS +#undef ENOPROTOOPT +#undef ENOTCONN +#undef ENOTSOCK +#undef EOPNOTSUPP +#undef EPROTONOSUPPORT +#undef EPROTOTYPE +#undef ETIMEDOUT +#undef EWOULDBLOCK + #if defined(WSAEALREADY) && !defined(EALREADY) #define EALREADY WSAEALREADY #endif