mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-26 00:37:43 +03:00
Fix the Windows header mess
Don't include windows.h and wsockcompat.h from config.h but only when needed. Don't define _WINSOCKAPI_ manually. This was apparently done to stop windows.h from including winsock.h which is a problem if winsock2.h wasn't included first. But on MinGW, this causes compiler warnings. Define WIN32_LEAN_AND_MEAN instead which has the same effect. Always use the compiler-defined _WIN32 macro instead of WIN32.
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
#ifdef LIBXML_FTP_ENABLED
|
||||
|
||||
/* Needed for portability to Windows 64 bits */
|
||||
#if defined(__MINGW32__) || defined(_WIN32_WCE)
|
||||
#if defined(_WIN32) && !defined(__CYGWIN__)
|
||||
#include <winsock2.h>
|
||||
#else
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user