From 269cf69f424a0471ab92c8e6c88e87d621446fef Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Fri, 23 Sep 2011 09:06:02 -0400 Subject: [PATCH] roken: posix errnos for windows Several additional posix errnos are now used within Heimdal. Add definitions for them. With the introduction of VS2010 VC errno.h now includes definitions for the full posix error number list. Instead of mapping errno values to Winsock errors, use the new VS2010 assignments. Change-Id: Ieb7c5efbcbedb1c10d56e5c8a63ddd58a15df9b1 --- lib/roken/roken.h.in | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/lib/roken/roken.h.in b/lib/roken/roken.h.in index a6299aee8..ab8c8741a 100644 --- a/lib/roken/roken.h.in +++ b/lib/roken/roken.h.in @@ -79,9 +79,22 @@ typedef SOCKET rk_socket_t; ROKEN_LIB_FUNCTION int ROKEN_LIB_CALL rk_SOCK_IOCTL(SOCKET s, long cmd, int * argp); -#define ETIMEDOUT WSAETIMEDOUT -#define EWOULDBLOCK WSAEWOULDBLOCK -#define ENOTSOCK WSAENOTSOCK +/* Microsoft VC 2010 POSIX definitions */ +#ifndef ENOTSOCK +#define ENOTSOCK 128 +#endif +#ifndef ENOTSUP +#define ENOTSUP 129 +#endif +#ifndef EOVERFLOW +#define EOVERFLOW 132 +#endif +#ifndef ETIMEDOUT +#define ETIMEDOUT 138 +#endif +#ifndef EWOULDBLOCK +#define EWOULDBLOCK 140 +#endif #define rk_SOCK_INIT() rk_WSAStartup() #define rk_SOCK_EXIT() rk_WSACleanup()