From e6b98d315254788e8fabceba840da3f6dfd6fbd5 Mon Sep 17 00:00:00 2001 From: Yang Tse <yangsita@gmail.com> Date: Mon, 19 Dec 2005 00:15:04 +0000 Subject: [PATCH] Undo previous change. This header file belongs to the public interface and the change could break the compilation of thrid party apps which link against this library. --- ares/ares.h | 5 ++++- ares/nameser.h | 1 + include/curl/multi.h | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ares/ares.h b/ares/ares.h index 695f8aafbc..7f76112f71 100644 --- a/ares/ares.h +++ b/ares/ares.h @@ -31,7 +31,10 @@ #include <netinet/in.h> #include <sys/socket.h> #include <tcp.h> -#elif !defined(WIN32) +#elif defined(WIN32) + #include <winsock2.h> + #include <windows.h> +#else #include <netinet/in.h> #include <sys/socket.h> #endif diff --git a/ares/nameser.h b/ares/nameser.h index 0ccbfd1c03..7127c26402 100644 --- a/ares/nameser.h +++ b/ares/nameser.h @@ -7,6 +7,7 @@ port build */ #ifndef NETWARE +#include <windows.h> #include <process.h> /* for the _getpid() proto */ #endif /* !NETWARE */ #include <sys/types.h> diff --git a/include/curl/multi.h b/include/curl/multi.h index 35cf348852..96c2763eff 100644 --- a/include/curl/multi.h +++ b/include/curl/multi.h @@ -45,7 +45,11 @@ #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) || \ defined(__MINGW32__) - +#if !(defined(_WINSOCKAPI_) || defined(_WINSOCK_H)) +/* The check above prevents the winsock2 inclusion if winsock.h already was + included, since they can't co-exist without problems */ +#include <winsock2.h> +#endif #else /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish -- GitLab