#ifdef WIN32
#include <winsock2.h>
#include <ws2tcpip.h>
+#ifndef _WIN32_IE
#define _WIN32_IE 0x400
+#endif
#include <shlobj.h>
#endif
/* For int types. */
#include <event2/util.h>
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#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 */
/* For struct event */
#include <event2/event_struct.h>
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#endif
-
struct event_watermark {
size_t low;
size_t high;
/* For int types. */
#include <event2/util.h>
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#endif
-
struct event_base;
struct event;
struct event_config;
/* For int types. */
#include <event2/util.h>
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#endif
-
/**
Initialize the event API.
/* For int types. */
#include <event2/util.h>
-#ifdef WIN32
-#include <winsock2.h>
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#endif
-
#define EVLIST_TIMEOUT 0x01
#define EVLIST_INSERTED 0x02
#define EVLIST_SIGNAL 0x04
extern "C" {
#endif
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <winsock2.h>
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#endif
-
/* In case we haven't included the right headers yet. */
struct evbuffer;
struct event_base;
/* For int types. */
#include <event2/util.h>
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#endif
-
/**
* Start an HTTP server on the specified address and port
*
/* For int types. */
#include <event2/util.h>
-#ifdef WIN32
-#define WIN32_LEAN_AND_MEAN
-#include <windows.h>
-#undef WIN32_LEAN_AND_MEAN
-#endif
-
struct evbuffer;
/*
#include <netdb.h>
#endif
+#ifdef WIN32
+#include <winsock2.h>
+#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,