1 /* include/wsockcompat.h
2 * Windows -> Berkeley Sockets compatibility things.
5 #if !defined __XML_WSOCKCOMPAT_H__
6 #define __XML_WSOCKCOMPAT_H__
14 /* the following is a workaround a problem for 'inline' keyword in said
15 header when compiled with Borland C++ 6 */
16 #if defined(__BORLANDC__) && !defined(__cplusplus)
17 #define inline __inline
18 #define _inline __inline
23 /* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */
24 #if defined(GetAddrInfo)
26 #define HAVE_GETADDRINFO
31 /* Include <errno.h> here to ensure that it doesn't get included later
32 * (e.g. by iconv.h) and overwrites the definition of EWOULDBLOCK. */
37 #if !defined SOCKLEN_T
41 #define EWOULDBLOCK WSAEWOULDBLOCK
42 #define EINPROGRESS WSAEINPROGRESS
43 #define EALREADY WSAEALREADY
44 #define ENOTSOCK WSAENOTSOCK
45 #define EDESTADDRREQ WSAEDESTADDRREQ
46 #define EMSGSIZE WSAEMSGSIZE
47 #define EPROTOTYPE WSAEPROTOTYPE
48 #define ENOPROTOOPT WSAENOPROTOOPT
49 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
50 #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
51 #define EOPNOTSUPP WSAEOPNOTSUPP
52 #define EPFNOSUPPORT WSAEPFNOSUPPORT
53 #define EAFNOSUPPORT WSAEAFNOSUPPORT
54 #define EADDRINUSE WSAEADDRINUSE
55 #define EADDRNOTAVAIL WSAEADDRNOTAVAIL
56 #define ENETDOWN WSAENETDOWN
57 #define ENETUNREACH WSAENETUNREACH
58 #define ENETRESET WSAENETRESET
59 #define ECONNABORTED WSAECONNABORTED
60 #define ECONNRESET WSAECONNRESET
61 #define ENOBUFS WSAENOBUFS
62 #define EISCONN WSAEISCONN
63 #define ENOTCONN WSAENOTCONN
64 #define ESHUTDOWN WSAESHUTDOWN
65 #define ETOOMANYREFS WSAETOOMANYREFS
66 #define ETIMEDOUT WSAETIMEDOUT
67 #define ECONNREFUSED WSAECONNREFUSED
68 #define ELOOP WSAELOOP
69 #define EHOSTDOWN WSAEHOSTDOWN
70 #define EHOSTUNREACH WSAEHOSTUNREACH
71 #define EPROCLIM WSAEPROCLIM
72 #define EUSERS WSAEUSERS
73 #define EDQUOT WSAEDQUOT
74 #define ESTALE WSAESTALE
75 #define EREMOTE WSAEREMOTE
76 /* These cause conflicts with the codes from errno.h. Since they are
77 not used in the relevant code (nanoftp, nanohttp), we can leave
79 #define ENAMETOOLONG WSAENAMETOOLONG
80 #define ENOTEMPTY WSAENOTEMPTY
83 #endif /* __XML_WSOCKCOMPAT_H__ */