[issue13210] Support Visual Studio 2010

Kristján Valur Jónsson report at bugs.python.org
Thu Apr 26 17:19:48 CEST 2012


Kristján Valur Jónsson <kristjan at ccpgames.com> added the comment:

> Except that Microsoft's C library also uses some of the non-WSA
> versions.  For instance read() (or _read()) is documented to set
> errno to EBADF or EINVAL on error.  So EBADF and EINVAL are just as
> "native" as WSAEBADF and WSAEINVAL.
read() is a posix function, so of course they set errno for it.  You'll probably find that GetLastError() will some native error codes.


> It is also quite common for python's C code to do stuff like
>    errno = EINVAL;
>    PyErr_SetFromErrno(PyExc_OSError);
This doesn't change that, and as far as I know, this has worked and continues to work.  "errno" is supported.

> errnomap in Objects/exceptions.c is used to convert some OSError
> exceptions to subclasses like PermissionError.  It shouldn't be hard
> to use it to also convert WSAEINVAL to EINVAL etc.
Why would we get different errors codes for e.g. connection reset events because we build with a different compiler?
Python has always used the native error codes for socket io on windows, why change that?

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13210>
_______________________________________


More information about the Python-bugs-list mailing list