diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2017-10-09 00:20:01 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2017-10-09 14:35:40 +0200 |
commit | e3890546d798927aeabdb471985b4afd9f74bbec (patch) | |
tree | 7bb7fe82edc495987d3f385f9947b764c61e7262 /nanoftp.c | |
parent | bee8f1e47b0072e8ea216ed08ed819df96812a25 (diff) | |
download | libxml2-e3890546d798927aeabdb471985b4afd9f74bbec.tar.gz |
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.
Diffstat (limited to 'nanoftp.c')
-rw-r--r-- | nanoftp.c | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -12,8 +12,6 @@ #define HAVE_NETINET_IN_H #define HAVE_NETDB_H #define HAVE_SYS_TIME_H -#else /* TESTING */ -#define NEED_SOCKETS #endif /* TESTING */ #define IN_LIBXML @@ -77,12 +75,8 @@ #endif -#if defined(__MINGW32__) || defined(_WIN32_WCE) -#ifndef _WINSOCKAPI_ -#define _WINSOCKAPI_ -#endif +#if defined(_WIN32) && !defined(__CYGWIN__) #include <wsockcompat.h> -#include <winsock2.h> #endif /** |