mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* 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
This commit is contained in:
parent
e41936441b
commit
727371f88a
3 changed files with 148 additions and 38 deletions
|
@ -1,3 +1,11 @@
|
||||||
|
Tue Apr 6 14:53:17 2010 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
|
* 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]
|
||||||
|
|
||||||
Tue Apr 6 11:21:23 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Apr 6 11:21:23 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* template/fake.rb.in: hooks for extconf.rb.
|
* template/fake.rb.in: hooks for extconf.rb.
|
||||||
|
|
|
@ -401,45 +401,113 @@ extern char *rb_w32_strerror(int);
|
||||||
/* #undef va_end */
|
/* #undef va_end */
|
||||||
|
|
||||||
/* winsock error map */
|
/* winsock error map */
|
||||||
#ifndef EWOULDBLOCK /* VC10 has this */
|
#ifndef EWOULDBLOCK
|
||||||
# define EWOULDBLOCK WSAEWOULDBLOCK
|
# define EWOULDBLOCK WSAEWOULDBLOCK
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef EINPROGRESS
|
||||||
# define EINPROGRESS WSAEINPROGRESS
|
# define EINPROGRESS WSAEINPROGRESS
|
||||||
|
#endif
|
||||||
|
#ifndef EALREADY
|
||||||
# define EALREADY WSAEALREADY
|
# define EALREADY WSAEALREADY
|
||||||
|
#endif
|
||||||
|
#ifndef ENOTSOCK
|
||||||
# define ENOTSOCK WSAENOTSOCK
|
# define ENOTSOCK WSAENOTSOCK
|
||||||
|
#endif
|
||||||
|
#ifndef EDESTADDRREQ
|
||||||
# define EDESTADDRREQ WSAEDESTADDRREQ
|
# define EDESTADDRREQ WSAEDESTADDRREQ
|
||||||
|
#endif
|
||||||
|
#ifndef EMSGSIZE
|
||||||
# define EMSGSIZE WSAEMSGSIZE
|
# define EMSGSIZE WSAEMSGSIZE
|
||||||
|
#endif
|
||||||
|
#ifndef EPROTOTYPE
|
||||||
# define EPROTOTYPE WSAEPROTOTYPE
|
# define EPROTOTYPE WSAEPROTOTYPE
|
||||||
|
#endif
|
||||||
|
#ifndef ENOPROTOOPT
|
||||||
# define ENOPROTOOPT WSAENOPROTOOPT
|
# define ENOPROTOOPT WSAENOPROTOOPT
|
||||||
|
#endif
|
||||||
|
#ifndef EPROTONOSUPPORT
|
||||||
# define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
# define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
||||||
|
#endif
|
||||||
|
#ifndef ESOCKTNOSUPPORT
|
||||||
# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
||||||
|
#endif
|
||||||
|
#ifndef EOPNOTSUPP
|
||||||
# define EOPNOTSUPP WSAEOPNOTSUPP
|
# define EOPNOTSUPP WSAEOPNOTSUPP
|
||||||
|
#endif
|
||||||
|
#ifndef EPFNOSUPPORT
|
||||||
# define EPFNOSUPPORT WSAEPFNOSUPPORT
|
# define EPFNOSUPPORT WSAEPFNOSUPPORT
|
||||||
|
#endif
|
||||||
|
#ifndef EAFNOSUPPORT
|
||||||
# define EAFNOSUPPORT WSAEAFNOSUPPORT
|
# define EAFNOSUPPORT WSAEAFNOSUPPORT
|
||||||
|
#endif
|
||||||
|
#ifndef EADDRINUSE
|
||||||
# define EADDRINUSE WSAEADDRINUSE
|
# define EADDRINUSE WSAEADDRINUSE
|
||||||
|
#endif
|
||||||
|
#ifndef EADDRNOTAVAIL
|
||||||
# define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
# define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
||||||
|
#endif
|
||||||
|
#ifndef ENETDOWN
|
||||||
# define ENETDOWN WSAENETDOWN
|
# define ENETDOWN WSAENETDOWN
|
||||||
|
#endif
|
||||||
|
#ifndef ENETUNREACH
|
||||||
# define ENETUNREACH WSAENETUNREACH
|
# define ENETUNREACH WSAENETUNREACH
|
||||||
|
#endif
|
||||||
|
#ifndef ENETRESET
|
||||||
# define ENETRESET WSAENETRESET
|
# define ENETRESET WSAENETRESET
|
||||||
|
#endif
|
||||||
|
#ifndef ECONNABORTED
|
||||||
# define ECONNABORTED WSAECONNABORTED
|
# define ECONNABORTED WSAECONNABORTED
|
||||||
|
#endif
|
||||||
|
#ifndef ECONNRESET
|
||||||
# define ECONNRESET WSAECONNRESET
|
# define ECONNRESET WSAECONNRESET
|
||||||
|
#endif
|
||||||
|
#ifndef ENOBUFS
|
||||||
# define ENOBUFS WSAENOBUFS
|
# define ENOBUFS WSAENOBUFS
|
||||||
|
#endif
|
||||||
|
#ifndef EISCONN
|
||||||
# define EISCONN WSAEISCONN
|
# define EISCONN WSAEISCONN
|
||||||
|
#endif
|
||||||
|
#ifndef ENOTCONN
|
||||||
# define ENOTCONN WSAENOTCONN
|
# define ENOTCONN WSAENOTCONN
|
||||||
|
#endif
|
||||||
|
#ifndef ESHUTDOWN
|
||||||
# define ESHUTDOWN WSAESHUTDOWN
|
# define ESHUTDOWN WSAESHUTDOWN
|
||||||
|
#endif
|
||||||
|
#ifndef ETOOMANYREFS
|
||||||
# define ETOOMANYREFS WSAETOOMANYREFS
|
# define ETOOMANYREFS WSAETOOMANYREFS
|
||||||
|
#endif
|
||||||
|
#ifndef ETIMEDOUT
|
||||||
# define ETIMEDOUT WSAETIMEDOUT
|
# define ETIMEDOUT WSAETIMEDOUT
|
||||||
|
#endif
|
||||||
|
#ifndef ECONNREFUSED
|
||||||
# define ECONNREFUSED WSAECONNREFUSED
|
# define ECONNREFUSED WSAECONNREFUSED
|
||||||
|
#endif
|
||||||
|
#ifndef ELOOP
|
||||||
# define ELOOP WSAELOOP
|
# define ELOOP WSAELOOP
|
||||||
|
#endif
|
||||||
/*#define ENAMETOOLONG WSAENAMETOOLONG*/
|
/*#define ENAMETOOLONG WSAENAMETOOLONG*/
|
||||||
|
#ifndef EHOSTDOWN
|
||||||
# define EHOSTDOWN WSAEHOSTDOWN
|
# define EHOSTDOWN WSAEHOSTDOWN
|
||||||
|
#endif
|
||||||
|
#ifndef EHOSTUNREACH
|
||||||
# define EHOSTUNREACH WSAEHOSTUNREACH
|
# define EHOSTUNREACH WSAEHOSTUNREACH
|
||||||
|
#endif
|
||||||
/*#define ENOTEMPTY WSAENOTEMPTY*/
|
/*#define ENOTEMPTY WSAENOTEMPTY*/
|
||||||
|
#ifndef EPROCLIM
|
||||||
# define EPROCLIM WSAEPROCLIM
|
# define EPROCLIM WSAEPROCLIM
|
||||||
|
#endif
|
||||||
|
#ifndef EUSERS
|
||||||
# define EUSERS WSAEUSERS
|
# define EUSERS WSAEUSERS
|
||||||
|
#endif
|
||||||
|
#ifndef EDQUOT
|
||||||
# define EDQUOT WSAEDQUOT
|
# define EDQUOT WSAEDQUOT
|
||||||
|
#endif
|
||||||
|
#ifndef ESTALE
|
||||||
# define ESTALE WSAESTALE
|
# define ESTALE WSAESTALE
|
||||||
|
#endif
|
||||||
|
#ifndef EREMOTE
|
||||||
# define EREMOTE WSAEREMOTE
|
# define EREMOTE WSAEREMOTE
|
||||||
|
#endif
|
||||||
|
|
||||||
#define F_SETFL 1
|
#define F_SETFL 1
|
||||||
#define O_NONBLOCK 1
|
#define O_NONBLOCK 1
|
||||||
|
|
|
@ -162,8 +162,6 @@ static struct {
|
||||||
{ ERROR_OPERATION_ABORTED, EINTR },
|
{ ERROR_OPERATION_ABORTED, EINTR },
|
||||||
{ ERROR_NOT_ENOUGH_QUOTA, ENOMEM },
|
{ ERROR_NOT_ENOUGH_QUOTA, ENOMEM },
|
||||||
{ ERROR_MOD_NOT_FOUND, ENOENT },
|
{ ERROR_MOD_NOT_FOUND, ENOENT },
|
||||||
{ WSAENAMETOOLONG, ENAMETOOLONG },
|
|
||||||
{ WSAENOTEMPTY, ENOTEMPTY },
|
|
||||||
{ WSAEINTR, EINTR },
|
{ WSAEINTR, EINTR },
|
||||||
{ WSAEBADF, EBADF },
|
{ WSAEBADF, EBADF },
|
||||||
{ WSAEACCES, EACCES },
|
{ WSAEACCES, EACCES },
|
||||||
|
@ -171,6 +169,42 @@ static struct {
|
||||||
{ WSAEINVAL, EINVAL },
|
{ WSAEINVAL, EINVAL },
|
||||||
{ WSAEMFILE, EMFILE },
|
{ WSAEMFILE, EMFILE },
|
||||||
{ WSAEWOULDBLOCK, EWOULDBLOCK },
|
{ 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
|
int
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue