@@ -19,10 +19,51 @@ @class OFString; @class OFArray; @class OFMutableArray; #define OF_BACKTRACE_SIZE 32 + +#if defined(_WIN32) && defined(OF_HAVE_SOCKETS) +# define EADDRINUSE WSAEADDRINUSE +# define EADDRNOTAVAIL WSAEADDRNOTAVAIL +# define EAFNOSUPPORT WSAEAFNOSUPPORT +# define EALREADY WSAEALREADY +# define ECONNABORTED WSAECONNABORTED +# define ECONNABORTED WSAECONNABORTED +# define ECONNREFUSED WSAECONNREFUSED +# define ECONNRESET WSAECONNRESET +# define ECONNRESET WSAECONNRESET +# define EDESTADDRREQ WSAEDESTADDRREQ +# define EDQUOT WSAEDQUOT +# define EHOSTDOWN WSAEHOSTDOWN +# define EHOSTUNREACH WSAEHOSTUNREACH +# define EINPROGRESS WSAEINPROGRESS +# define EISCONN WSAEISCONN +# define ELOOP WSAELOOP +# define EMSGSIZE WSAEMSGSIZE +# define ENETDOWN WSAENETDOWN +# define ENETRESET WSAENETRESET +# define ENETUNREACH WSAENETUNREACH +# define ENOBUFS WSAENOBUFS +# define ENOPROTOOPT WSAENOPROTOOPT +# define ENOTCONN WSAENOTCONN +# define ENOTSOCK WSAENOTSOCK +# define EOPNOTSUPP WSAEOPNOTSUPP +# define EPFNOSUPPORT WSAEPFNOSUPPORT +# define EPROCLIM WSAEPROCLIM +# define EPROTONOSUPPORT WSAEPROTONOSUPPORT +# define EPROTOTYPE WSAEPROTOTYPE +# define EREMOTE WSAEREMOTE +# define ESHUTDOWN WSAESHUTDOWN +# define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT +# define ESTALE WSAESTALE +# define ETIMEDOUT WSAETIMEDOUT +# define ETOOMANYREFS WSAETOOMANYREFS +# define EUSERS WSAEUSERS +# define EWOULDBLOCK WSAEWOULDBLOCK +extern int of_wsaerr_to_errno(int); +#endif /*! * @brief The base class for all exceptions in ObjFW * * The OFException class is the base class for all exceptions in ObjFW, except