#ifdef _WIN32 #define EWOULDBLOCK WSAEWOULDBLOCK #define EMSGSIZE WSAEMSGSIZE #define ECONNRESET WSAECONNRESET #define ECONNABORTED WSAECONNABORTED #define ECONNREFUSED WSAECONNREFUSED #define EADDRNOTAVAIL WSAEADDRNOTAVAIL #define EAFNOSUPPORT WSAEAFNOSUPPORT #ifdef IPPROTO_IPV6 #include #endif #else #include #include #include #include #include #include #include #include #include #include #ifdef sun #include #endif #ifdef NeXT #include #endif #if defined(__MORPHOS__) && !defined(ixemul) #define closesocket CloseSocket #define ioctlsocket IoctlSocket #else #define closesocket close #define ioctlsocket ioctl #endif #endif #if defined(_WIN32) #define qerrno WSAGetLastError() #elif defined(__MORPHOS__) && !defined(ixemul) #define qerrno Errno() #else #define qerrno errno #endif #ifndef INVALID_SOCKET #define INVALID_SOCKET -1 #endif