mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-01-26 10:03:34 +03:00
30c8d9bb23
This should also enable IPv6 support on Windows. Untested and mostly useless anyway, since we don't support HTTPS.
54 lines
1.0 KiB
C
54 lines
1.0 KiB
C
/* include/wsockcompat.h
|
|
* Windows -> Berkeley Sockets compatibility things.
|
|
*/
|
|
|
|
#if !defined __XML_WSOCKCOMPAT_H__
|
|
#define __XML_WSOCKCOMPAT_H__
|
|
|
|
#include <errno.h>
|
|
#include <winsock2.h>
|
|
|
|
/* 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 <ws2tcpip.h>
|
|
|
|
/* Check if ws2tcpip.h is a recent version which provides getaddrinfo() */
|
|
#if defined(GetAddrInfo)
|
|
#include <wspiapi.h>
|
|
#ifndef SUPPORT_IP6
|
|
#define SUPPORT_IP6
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef XML_SOCKLEN_T
|
|
#define XML_SOCKLEN_T int
|
|
#endif
|
|
|
|
#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__ */
|