librb: rb_lib: undefine any previous errno consts on win32

This commit is contained in:
William Pitcock 2016-03-20 03:41:25 -05:00
parent 09f528c24c
commit 38b68802a3

View file

@ -88,38 +88,29 @@ typedef int rb_platform_fd_t;
#define strerror(x) rb_strerror(x) #define strerror(x) rb_strerror(x)
char *rb_strerror(int error); char *rb_strerror(int error);
#undef ENOBUFS
#ifndef ENOBUFS
#define ENOBUFS WSAENOBUFS #define ENOBUFS WSAENOBUFS
#endif
#ifndef EINPROGRESS #undef EINPROGRESS
#define EINPROGRESS WSAEINPROGRESS #define EINPROGRESS WSAEINPROGRESS
#endif
#ifndef EWOULDBLOCK #undef EWOULDBLOCK
#define EWOULDBLOCK WSAEWOULDBLOCK #define EWOULDBLOCK WSAEWOULDBLOCK
#endif
#ifndef EMSGSIZE #undef EMSGSIZE
#define EMSGSIZE WSAEMSGSIZE #define EMSGSIZE WSAEMSGSIZE
#endif
#ifndef EALREADY #undef EALREADY
#define EALREADY WSAEALREADY #define EALREADY WSAEALREADY
#endif
#ifndef EISCONN #undef EISCONN
#define EISCONN WSAEISCONN #define EISCONN WSAEISCONN
#endif
#ifndef EADDRINUSE #undef EADDRINUSE
#define EADDRINUSE WSAEADDRINUSE #define EADDRINUSE WSAEADDRINUSE
#endif
#ifndef EAFNOSUPPORT #undef EAFNOSUPPORT
#define EAFNOSUPPORT WSAEAFNOSUPPORT #define EAFNOSUPPORT WSAEAFNOSUPPORT
#endif
#define pipe(x) _pipe(x, 1024, O_BINARY) #define pipe(x) _pipe(x, 1024, O_BINARY)
#define ioctl(x,y,z) ioctlsocket(x,y, (u_long *)z) #define ioctl(x,y,z) ioctlsocket(x,y, (u_long *)z)