From 727371f88ac06fcb1e5417492f5ab17f5d58d886 Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 6 Apr 2010 05:58:07 +0000 Subject: * include/ruby/win32.h: check definition existance before defining errno macros. * win32/win32.c (errmap): define winsock errors mappings. these are VC++10 support. see [ruby-core:29278] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27236 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- win32/win32.c | 38 ++++++++++++++++++++++++++++++++++++-- 1 file changed, 36 insertions(+), 2 deletions(-) (limited to 'win32/win32.c') diff --git a/win32/win32.c b/win32/win32.c index 020eb6bab8..70b49769a2 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -162,8 +162,6 @@ static struct { { ERROR_OPERATION_ABORTED, EINTR }, { ERROR_NOT_ENOUGH_QUOTA, ENOMEM }, { ERROR_MOD_NOT_FOUND, ENOENT }, - { WSAENAMETOOLONG, ENAMETOOLONG }, - { WSAENOTEMPTY, ENOTEMPTY }, { WSAEINTR, EINTR }, { WSAEBADF, EBADF }, { WSAEACCES, EACCES }, @@ -171,6 +169,42 @@ static struct { { WSAEINVAL, EINVAL }, { WSAEMFILE, EMFILE }, { WSAEWOULDBLOCK, EWOULDBLOCK }, + { WSAEINPROGRESS, EINPROGRESS }, + { WSAEALREADY, EALREADY }, + { WSAENOTSOCK, ENOTSOCK }, + { WSAEDESTADDRREQ, EDESTADDRREQ }, + { WSAEMSGSIZE, EMSGSIZE }, + { WSAEPROTOTYPE, EPROTOTYPE }, + { WSAENOPROTOOPT, ENOPROTOOPT }, + { WSAEPROTONOSUPPORT, EPROTONOSUPPORT }, + { WSAESOCKTNOSUPPORT, ESOCKTNOSUPPORT }, + { WSAEOPNOTSUPP, EOPNOTSUPP }, + { WSAEPFNOSUPPORT, EPFNOSUPPORT }, + { WSAEAFNOSUPPORT, EAFNOSUPPORT }, + { WSAEADDRINUSE, EADDRINUSE }, + { WSAEADDRNOTAVAIL, EADDRNOTAVAIL }, + { WSAENETDOWN, ENETDOWN }, + { WSAENETUNREACH, ENETUNREACH }, + { WSAENETRESET, ENETRESET }, + { WSAECONNABORTED, ECONNABORTED }, + { WSAECONNRESET, ECONNRESET }, + { WSAENOBUFS, ENOBUFS }, + { WSAEISCONN, EISCONN }, + { WSAENOTCONN, ENOTCONN }, + { WSAESHUTDOWN, ESHUTDOWN }, + { WSAETOOMANYREFS, ETOOMANYREFS }, + { WSAETIMEDOUT, ETIMEDOUT }, + { WSAECONNREFUSED, ECONNREFUSED }, + { WSAELOOP, ELOOP }, + { WSAENAMETOOLONG, ENAMETOOLONG }, + { WSAEHOSTDOWN, EHOSTDOWN }, + { WSAEHOSTUNREACH, EHOSTUNREACH }, + { WSAEPROCLIM, EPROCLIM }, + { WSAENOTEMPTY, ENOTEMPTY }, + { WSAEUSERS, EUSERS }, + { WSAEDQUOT, EDQUOT }, + { WSAESTALE, ESTALE }, + { WSAEREMOTE, EREMOTE }, }; int -- cgit v1.2.3