diff --git a/evdns.c b/evdns.c index 6afe7557..3611bc63 100644 --- a/evdns.c +++ b/evdns.c @@ -101,7 +101,9 @@ #ifdef WIN32 #include #include +#ifndef _WIN32_IE #define _WIN32_IE 0x400 +#endif #include #endif diff --git a/include/event2/bufferevent.h b/include/event2/bufferevent.h index 5ca707fa..795607b0 100644 --- a/include/event2/bufferevent.h +++ b/include/event2/bufferevent.h @@ -65,13 +65,6 @@ extern "C" { /* For int types. */ #include -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#endif - - /* Just for error reporting - use other constants otherwise */ #define BEV_EVENT_READING 0x01 /**< error encountered while reading */ #define BEV_EVENT_WRITING 0x02 /**< error encountered while writing */ diff --git a/include/event2/bufferevent_struct.h b/include/event2/bufferevent_struct.h index 44986315..3eef9f2f 100644 --- a/include/event2/bufferevent_struct.h +++ b/include/event2/bufferevent_struct.h @@ -51,12 +51,6 @@ extern "C" { /* For struct event */ #include -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#endif - struct event_watermark { size_t low; size_t high; diff --git a/include/event2/event.h b/include/event2/event.h index d2153e1b..2a57a6ba 100644 --- a/include/event2/event.h +++ b/include/event2/event.h @@ -50,12 +50,6 @@ extern "C" { /* For int types. */ #include -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#endif - struct event_base; struct event; struct event_config; diff --git a/include/event2/event_compat.h b/include/event2/event_compat.h index eacb1cab..2356aa04 100644 --- a/include/event2/event_compat.h +++ b/include/event2/event_compat.h @@ -49,12 +49,6 @@ extern "C" { /* For int types. */ #include -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#endif - /** Initialize the event API. diff --git a/include/event2/event_struct.h b/include/event2/event_struct.h index 02b06691..b8e438cc 100644 --- a/include/event2/event_struct.h +++ b/include/event2/event_struct.h @@ -49,13 +49,6 @@ extern "C" { /* For int types. */ #include -#ifdef WIN32 -#include -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#endif - #define EVLIST_TIMEOUT 0x01 #define EVLIST_INSERTED 0x02 #define EVLIST_SIGNAL 0x04 diff --git a/include/event2/http.h b/include/event2/http.h index 0edaf7e7..d5dff821 100644 --- a/include/event2/http.h +++ b/include/event2/http.h @@ -34,13 +34,6 @@ extern "C" { #endif -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#include -#undef WIN32_LEAN_AND_MEAN -#endif - /* In case we haven't included the right headers yet. */ struct evbuffer; struct event_base; diff --git a/include/event2/http_compat.h b/include/event2/http_compat.h index 8f2b8082..c8f048b5 100644 --- a/include/event2/http_compat.h +++ b/include/event2/http_compat.h @@ -49,12 +49,6 @@ extern "C" { /* For int types. */ #include -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#endif - /** * Start an HTTP server on the specified address and port * diff --git a/include/event2/tag.h b/include/event2/tag.h index ebed1a61..67687ee9 100644 --- a/include/event2/tag.h +++ b/include/event2/tag.h @@ -48,12 +48,6 @@ extern "C" { /* For int types. */ #include -#ifdef WIN32 -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#endif - struct evbuffer; /* diff --git a/include/event2/util.h b/include/event2/util.h index 12817802..c14783e7 100644 --- a/include/event2/util.h +++ b/include/event2/util.h @@ -63,6 +63,10 @@ extern "C" { #include #endif +#ifdef WIN32 +#include +#endif + /* Integer type definitions for types that are supposed to be defined in the * C99-specified stdint.h. Shamefully, some platforms do not include * stdint.h, so we need to replace it. (If you are on a platform like this,