[1/2] include: Also define the WSAxxx error codes in winerror.h.
Francois Gouget
fgouget at codeweavers.com
Fri Mar 19 04:12:46 CDT 2010
This matches the PSK.
---
I just did a copy/paste. The other option would be to #include
winerror.h in winsock.h which would avoid duplication, but that would
cause winsock.h to define stuff it's not supposed to.
include/winerror.h | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++
include/winsock.h | 2 +-
2 files changed, 82 insertions(+), 1 deletions(-)
diff --git a/include/winerror.h b/include/winerror.h
index 0bab882..7809dc5 100644
--- a/include/winerror.h
+++ b/include/winerror.h
@@ -1550,6 +1550,85 @@ static inline HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define DNS_STATUS_CONTINUE_NEEDED 9801
#define DNS_ERROR_NO_TCPIP 9851
#define DNS_ERROR_NO_DNS_SERVERS 9852
+
+/*
+ * Also defined in winsock.h.
+ *
+ * All Windows Sockets error constants are biased by WSABASEERR from
+ * the "normal"
+ */
+#define WSABASEERR 10000
+/*
+ * Windows Sockets definitions of regular Microsoft C error constants
+ */
+#define WSAEINTR (WSABASEERR+4)
+#define WSAEBADF (WSABASEERR+9)
+#define WSAEACCES (WSABASEERR+13)
+#define WSAEFAULT (WSABASEERR+14)
+#define WSAEINVAL (WSABASEERR+22)
+#define WSAEMFILE (WSABASEERR+24)
+
+/*
+ * Windows Sockets definitions of regular Berkeley error constants
+ */
+#define WSAEWOULDBLOCK (WSABASEERR+35)
+#define WSAEINPROGRESS (WSABASEERR+36)
+#define WSAEALREADY (WSABASEERR+37)
+#define WSAENOTSOCK (WSABASEERR+38)
+#define WSAEDESTADDRREQ (WSABASEERR+39)
+#define WSAEMSGSIZE (WSABASEERR+40)
+#define WSAEPROTOTYPE (WSABASEERR+41)
+#define WSAENOPROTOOPT (WSABASEERR+42)
+#define WSAEPROTONOSUPPORT (WSABASEERR+43)
+#define WSAESOCKTNOSUPPORT (WSABASEERR+44)
+#define WSAEOPNOTSUPP (WSABASEERR+45)
+#define WSAEPFNOSUPPORT (WSABASEERR+46)
+#define WSAEAFNOSUPPORT (WSABASEERR+47)
+#define WSAEADDRINUSE (WSABASEERR+48)
+#define WSAEADDRNOTAVAIL (WSABASEERR+49)
+#define WSAENETDOWN (WSABASEERR+50)
+#define WSAENETUNREACH (WSABASEERR+51)
+#define WSAENETRESET (WSABASEERR+52)
+#define WSAECONNABORTED (WSABASEERR+53)
+#define WSAECONNRESET (WSABASEERR+54)
+#define WSAENOBUFS (WSABASEERR+55)
+#define WSAEISCONN (WSABASEERR+56)
+#define WSAENOTCONN (WSABASEERR+57)
+#define WSAESHUTDOWN (WSABASEERR+58)
+#define WSAETOOMANYREFS (WSABASEERR+59)
+#define WSAETIMEDOUT (WSABASEERR+60)
+#define WSAECONNREFUSED (WSABASEERR+61)
+#define WSAELOOP (WSABASEERR+62)
+#define WSAENAMETOOLONG (WSABASEERR+63)
+#define WSAEHOSTDOWN (WSABASEERR+64)
+#define WSAEHOSTUNREACH (WSABASEERR+65)
+#define WSAENOTEMPTY (WSABASEERR+66)
+#define WSAEPROCLIM (WSABASEERR+67)
+#define WSAEUSERS (WSABASEERR+68)
+#define WSAEDQUOT (WSABASEERR+69)
+#define WSAESTALE (WSABASEERR+70)
+#define WSAEREMOTE (WSABASEERR+71)
+
+/*
+ * Extended Windows Sockets error constant definitions
+ */
+#define WSASYSNOTREADY (WSABASEERR+91)
+#define WSAVERNOTSUPPORTED (WSABASEERR+92)
+#define WSANOTINITIALISED (WSABASEERR+93)
+#define WSAEDISCON (WSABASEERR+101)
+#define WSAENOMORE (WSABASEERR+102)
+#define WSAECANCELLED (WSABASEERR+103)
+#define WSAEINVALIDPROCTABLE (WSABASEERR+104)
+#define WSAEINVALIDPROVIDER (WSABASEERR+105)
+#define WSAEPROVIDERFAILEDINIT (WSABASEERR+106)
+#define WSASYSCALLFAILURE (WSABASEERR+107)
+#define WSASERVICE_NOT_FOUND (WSABASEERR+108)
+#define WSATYPE_NOT_FOUND (WSABASEERR+109)
+#define WSA_E_NO_MORE (WSABASEERR+110)
+#define WSA_E_CANCELLED (WSABASEERR+111)
+#define WSAEREFUSED (WSABASEERR+112)
+
+
#define ERROR_SXS_SECTION_NOT_FOUND 14000
#define ERROR_SXS_CANT_GEN_ACTCTX 14001
#define ERROR_SXS_INVALID_ACTCTXDATA_FORMAT 14002
@@ -1572,6 +1651,8 @@ static inline HRESULT HRESULT_FROM_WIN32(unsigned int x)
#define ERROR_MUI_INTLSETTINGS_UILANG_NOT_INSTALLED 15107
#define ERROR_MUI_INTLSETTINGS_INVALID_LOCALE_NAME 15108
+
+
/* HRESULT values for OLE, SHELL and other Interface stuff */
/* the codes 4000-40ff are reserved for OLE */
#undef NOERROR /* arpa/nameser_compat.h defines this */
diff --git a/include/winsock.h b/include/winsock.h
index 69819d5..95b4a51 100644
--- a/include/winsock.h
+++ b/include/winsock.h
@@ -853,7 +853,7 @@ typedef struct WS(WSAData)
/*
* All Windows Sockets error constants are biased by WSABASEERR from
- * the "normal"
+ * the "normal". They are also defined in winerror.h.
*/
#define WSABASEERR 10000
/*
--
1.6.5
More information about the wine-patches
mailing list