[issue13210] Support Visual Studio 2010
Richard Oudkerk
report at bugs.python.org
Fri Apr 27 13:12:10 CEST 2012
Richard Oudkerk <shibturn at gmail.com> added the comment:
The problems with error numbers seem to be caused by the addition of a new section in errno.h:
/* POSIX SUPPLEMENT */
#define EADDRINUSE 100
#define EADDRNOTAVAIL 101
...
#define ETXTBSY 139
#define EWOULDBLOCK 140
Of these the only ones which clash with WSA equivalents are
EADDRINUSE
EADDRNOTAVAIL
EAFNOSUPPORT
EALREADY
ECONNABORTED
ECONNREFUSED
ECONNRESET
EDESTADDRREQ
EHOSTUNREACH
EINPROGRESS
EISCONN
ELOOP
EMSGSIZE
ENETDOWN
ENETRESET
ENETUNREACH
ENOBUFS
ENOPROTOOPT
ENOTCONN
ENOTSOCK
EOPNOTSUPP
EPROTONOSUPPORT
EPROTOTYPE
ETIMEDOUT
EWOULDBLOCK
I think the simplest solution is just to undefine these new "clashing" constants near the top of Modules/errnomodule.c and Objects/exceptions.c so that we fall back to the preferred WSA equivalents later.
I have tried this by cloning sandbox/vs2010port, reverting
Objects/exceptions.c
Modules/posixmodule.c
Modules/errnomodule.c
Modules/_io/fileio.c
to "ancestor(vs2010,default)" and then applying the attached patch. I get four failures:
test_distutils
test_email
test_import
test_packaging
This is an improvement over the tip of vs2010 (2fc5398b3115) where I get two additional failures
test_importlib
test_subprocess
----------
Added file: http://bugs.python.org/file25379/wsa_undef.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13210>
_______________________________________
More information about the Python-bugs-list
mailing list