From 35a201cc8ef0c3f5b2df88d2e528aabee1048348 Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 30 Apr 2021 18:47:09 +0200 Subject: Initial/Final commit --- libxml2-2.9.10/include/wsockcompat.h | 54 ++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 libxml2-2.9.10/include/wsockcompat.h (limited to 'libxml2-2.9.10/include/wsockcompat.h') diff --git a/libxml2-2.9.10/include/wsockcompat.h b/libxml2-2.9.10/include/wsockcompat.h new file mode 100644 index 0000000..e57ca8e --- /dev/null +++ b/libxml2-2.9.10/include/wsockcompat.h @@ -0,0 +1,54 @@ +/* include/wsockcompat.h + * Windows -> Berkeley Sockets compatibility things. + */ + +#if !defined __XML_WSOCKCOMPAT_H__ +#define __XML_WSOCKCOMPAT_H__ + +#ifdef _WIN32_WCE +#include +#else +#include +#include + +/* Fix for old MinGW. */ +#ifndef _WINSOCKAPI_ +#define _WINSOCKAPI_ +#endif + +/* the following is a workaround a problem for 'inline' keyword in said + header when compiled with Borland C++ 6 */ +#if defined(__BORLANDC__) && !defined(__cplusplus) +#define inline __inline +#define _inline __inline +#endif + +#include + +/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */ +#if defined(GetAddrInfo) +#include +#define HAVE_GETADDRINFO +#endif +#endif + +#undef XML_SOCKLEN_T +#define XML_SOCKLEN_T int + +#ifndef ECONNRESET +#define ECONNRESET WSAECONNRESET +#endif +#ifndef EINPROGRESS +#define EINPROGRESS WSAEINPROGRESS +#endif +#ifndef EINTR +#define EINTR WSAEINTR +#endif +#ifndef ESHUTDOWN +#define ESHUTDOWN WSAESHUTDOWN +#endif +#ifndef EWOULDBLOCK +#define EWOULDBLOCK WSAEWOULDBLOCK +#endif + +#endif /* __XML_WSOCKCOMPAT_H__ */ -- cgit v1.2.3