00001
00002
00003
00004
00005 #if !defined __XML_WSOCKCOMPAT_H__
00006 #define __XML_WSOCKCOMPAT_H__
00007
00008 #ifdef _WIN32_WCE
00009 #include <winsock.h>
00010 #else
00011 #undef HAVE_ERRNO_H
00012 #include <winsock2.h>
00013
00014
00015
00016 #if defined(__BORLANDC__) && !defined(__cplusplus)
00017 #define inline __inline
00018 #endif
00019
00020 #include <ws2tcpip.h>
00021
00022
00023 #if defined(GetAddrInfo)
00024 #define HAVE_GETADDRINFO
00025 #endif
00026 #endif
00027
00028 #ifdef __MINGW32__
00029
00030
00031 #include <errno.h>
00032 #undef EWOULDBLOCK
00033 #endif
00034
00035 #if !defined SOCKLEN_T
00036 #define SOCKLEN_T int
00037 #endif
00038
00039 #define EWOULDBLOCK WSAEWOULDBLOCK
00040 #define EINPROGRESS WSAEINPROGRESS
00041 #define EALREADY WSAEALREADY
00042 #define ENOTSOCK WSAENOTSOCK
00043 #define EDESTADDRREQ WSAEDESTADDRREQ
00044 #define EMSGSIZE WSAEMSGSIZE
00045 #define EPROTOTYPE WSAEPROTOTYPE
00046 #define ENOPROTOOPT WSAENOPROTOOPT
00047 #define EPROTONOSUPPORT WSAEPROTONOSUPPORT
00048 #define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
00049 #define EOPNOTSUPP WSAEOPNOTSUPP
00050 #define EPFNOSUPPORT WSAEPFNOSUPPORT
00051 #define EAFNOSUPPORT WSAEAFNOSUPPORT
00052 #define EADDRINUSE WSAEADDRINUSE
00053 #define EADDRNOTAVAIL WSAEADDRNOTAVAIL
00054 #define ENETDOWN WSAENETDOWN
00055 #define ENETUNREACH WSAENETUNREACH
00056 #define ENETRESET WSAENETRESET
00057 #define ECONNABORTED WSAECONNABORTED
00058 #define ECONNRESET WSAECONNRESET
00059 #define ENOBUFS WSAENOBUFS
00060 #define EISCONN WSAEISCONN
00061 #define ENOTCONN WSAENOTCONN
00062 #define ESHUTDOWN WSAESHUTDOWN
00063 #define ETOOMANYREFS WSAETOOMANYREFS
00064 #define ETIMEDOUT WSAETIMEDOUT
00065 #define ECONNREFUSED WSAECONNREFUSED
00066 #define ELOOP WSAELOOP
00067 #define EHOSTDOWN WSAEHOSTDOWN
00068 #define EHOSTUNREACH WSAEHOSTUNREACH
00069 #define EPROCLIM WSAEPROCLIM
00070 #define EUSERS WSAEUSERS
00071 #define EDQUOT WSAEDQUOT
00072 #define ESTALE WSAESTALE
00073 #define EREMOTE WSAEREMOTE
00074
00075
00076
00077
00078
00079
00080
00081 #endif