diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-26 20:17:18 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2003-08-26 20:17:18 +0000 |
commit | 92dbabb0a49b57aa8651ff7922fcbcdb0e77b5aa (patch) | |
tree | 399804b3ed13bc41e85c32196700433e8ae92f41 /win32/win32.h | |
parent | 1cece7f80fec00f3b1d39e549d081501c48213f4 (diff) | |
download | ruby-92dbabb0a49b57aa8651ff7922fcbcdb0e77b5aa.tar.gz |
* win32/win32.c (map_errno): support winsock error.
* win32/win32.c (pipe_exec, CreateChild, poll_child_status, waitpid,
kill, link, rb_w32_rename, unixtime_to_filetime, rb_w32_utime):
pass errno to map_errno().
* win32/win32.c (rb_w32_select, rb_w32_accept, rb_w32_bind,
rb_w32_connect, rb_w32_getpeername, rb_w32_getsockname,
rb_w32_getsockopt, rb_w32_ioctlsocket, rb_w32_listen, rb_w32_recv,
rb_w32_recvfrom, rb_w32_send, rb_w32_sendto, rb_w32_setsockopt,
rb_w32_shutdown, rb_w32_socket, rb_w32_gethostbyaddr,
rb_w32_gethostbyname, rb_w32_gethostname, rb_w32_getprotobyname,
rb_w32_getprotobynumber, rb_w32_getservbyname, rb_w32_getservbyport,
rb_w32_fclose, rb_w32_close): use map_errno().
* win32/win32.h: add winsock errors.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4447 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.h')
-rw-r--r-- | win32/win32.h | 42 |
1 files changed, 39 insertions, 3 deletions
diff --git a/win32/win32.h b/win32/win32.h index eb13e2b3a1..0cf4dc2e06 100644 --- a/win32/win32.h +++ b/win32/win32.h @@ -261,9 +261,6 @@ extern char *rb_w32_strerror(int); #define LOCK_EX 2 #define LOCK_NB 4 #define LOCK_UN 8 -#ifndef EWOULDBLOCK -#define EWOULDBLOCK 10035 /* EBASEERR + 35 (winsock.h) */ -#endif #ifndef SIGINT @@ -277,6 +274,45 @@ extern char *rb_w32_strerror(int); /* #undef va_start */ /* #undef va_end */ +/* winsock error map */ +#define EWOULDBLOCK WSAEWOULDBLOCK +#define EINPROGRESS WSAEINPROGRESS +#define EALREADY WSAEALREADY +#define ENOTSOCK WSAENOTSOCK +#define EDESTADDRREQ WSAEDESTADDRREQ +#define EMSGSIZE WSAEMSGSIZE +#define EPROTOTYPE WSAEPROTOTYPE +#define ENOPROTOOPT WSAENOPROTOOPT +#define EPROTONOSUPPORT WSAEPROTONOSUPPORT +#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT +#define EOPNOTSUPP WSAEOPNOTSUPP +#define EPFNOSUPPORT WSAEPFNOSUPPORT +#define EAFNOSUPPORT WSAEAFNOSUPPORT +#define EADDRINUSE WSAEADDRINUSE +#define EADDRNOTAVAIL WSAEADDRNOTAVAIL +#define ENETDOWN WSAENETDOWN +#define ENETUNREACH WSAENETUNREACH +#define ENETRESET WSAENETRESET +#define ECONNABORTED WSAECONNABORTED +#define ECONNRESET WSAECONNRESET +#define ENOBUFS WSAENOBUFS +#define EISCONN WSAEISCONN +#define ENOTCONN WSAENOTCONN +#define ESHUTDOWN WSAESHUTDOWN +#define ETOOMANYREFS WSAETOOMANYREFS +#define ETIMEDOUT WSAETIMEDOUT +#define ECONNREFUSED WSAECONNREFUSED +#define ELOOP WSAELOOP +/*#define ENAMETOOLONG WSAENAMETOOLONG*/ +#define EHOSTDOWN WSAEHOSTDOWN +#define EHOSTUNREACH WSAEHOSTUNREACH +/*#define ENOTEMPTY WSAENOTEMPTY*/ +#define EPROCLIM WSAEPROCLIM +#define EUSERS WSAEUSERS +#define EDQUOT WSAEDQUOT +#define ESTALE WSAESTALE +#define EREMOTE WSAEREMOTE + #ifdef accept #undef accept #endif |