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
30 #if defined( __MINGW32__ ) || defined( _MSC_VER )
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 ESHUTDOWN WSAESHUTDOWN
44 #if (!defined(_MSC_VER) || (_MSC_VER < 1600))
45 #define EINPROGRESS WSAEINPROGRESS
46 #define EALREADY WSAEALREADY
47 #define ENOTSOCK WSAENOTSOCK
48 #define EDESTADDRREQ WSAEDESTADDRREQ
49 #define EMSGSIZE WSAEMSGSIZE
50 #define EPROTOTYPE WSAEPROTOTYPE
51 #define ENOPROTOOPT WSAENOPROTOOPT
52 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
53 #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
54 #define EOPNOTSUPP WSAEOPNOTSUPP
55 #define EPFNOSUPPORT WSAEPFNOSUPPORT
56 #define EAFNOSUPPORT WSAEAFNOSUPPORT
57 #define EADDRINUSE WSAEADDRINUSE
58 #define EADDRNOTAVAIL WSAEADDRNOTAVAIL
59 #define ENETDOWN WSAENETDOWN
60 #define ENETUNREACH WSAENETUNREACH
61 #define ENETRESET WSAENETRESET
62 #define ECONNABORTED WSAECONNABORTED
63 #define ECONNRESET WSAECONNRESET
64 #define ENOBUFS WSAENOBUFS
65 #define EISCONN WSAEISCONN
66 #define ENOTCONN WSAENOTCONN
67 #define ETOOMANYREFS WSAETOOMANYREFS
68 #define ETIMEDOUT WSAETIMEDOUT
69 #define ECONNREFUSED WSAECONNREFUSED
70 #define ELOOP WSAELOOP
71 #define EHOSTDOWN WSAEHOSTDOWN
72 #define EHOSTUNREACH WSAEHOSTUNREACH
73 #define EPROCLIM WSAEPROCLIM
74 #define EUSERS WSAEUSERS
75 #define EDQUOT WSAEDQUOT
76 #define ESTALE WSAESTALE
77 #define EREMOTE WSAEREMOTE
78 /* These cause conflicts with the codes from errno.h. Since they are
79 not used in the relevant code (nanoftp, nanohttp), we can leave
81 #define ENAMETOOLONG WSAENAMETOOLONG
82 #define ENOTEMPTY WSAENOTEMPTY
86 #endif /* __XML_WSOCKCOMPAT_H__ */