X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;ds=sidebyside;f=win32%2Fwrappers.h;h=976303cb32ef00b85f3c37bf2accf405f097cab5;hb=7acbb1495e0aaa29df7ffb09b90ec97fc949c48d;hp=80b44651c4b29aa8162f8d48a3f982a442077c41;hpb=286723eef769e0598ea428c522c07f868b92ca1b;p=awesomized%2Flibmemcached diff --git a/win32/wrappers.h b/win32/wrappers.h index 80b44651..976303cb 100644 --- a/win32/wrappers.h +++ b/win32/wrappers.h @@ -29,17 +29,42 @@ * WinSock use a separate range for error codes. Let's just map to the * WinSock ones. */ -#define EADDRINUSE WSAEADDRINUSE -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EINPROGRESS WSAEINPROGRESS -#define EALREADY WSAEALREADY -#define EISCONN WSAEISCONN -#define ENOTCONN WSAENOTCONN -#define ENOBUFS WSAENOBUFS -#define SHUT_RDWR SD_BOTH +#ifndef EADDRINUSE +# define EADDRINUSE WSAEADDRINUSE +#endif + +#ifndef EWOULDBLOCK +# define EWOULDBLOCK WSAEWOULDBLOCK +#endif + +#ifndef EINPROGRESS +# define EINPROGRESS WSAEINPROGRESS +#endif + +#ifndef EALREADY +# define EALREADY WSAEALREADY +#endif + +#ifndef EISCONN +# define EISCONN WSAEISCONN +#endif + +#ifndef ENOTCONN +# define ENOTCONN WSAENOTCONN +#endif + +#ifndef ENOBUFS +# define ENOBUFS WSAENOBUFS +#endif + +#ifndef SHUT_RDWR +# define SHUT_RDWR SD_BOTH +#endif /* EAI_SYSTEM isn't defined anywhere... just set it to... 11? */ -#define EAI_SYSTEM 11 +#ifndef EAI_SYSTEM +# define EAI_SYSTEM 11 +#endif /* Best effort mapping of functions to alternative functions */ #define index(a,b) strchr(a,b)