diff options
author | Nick Mathewson <nickm@torproject.org> | 2010-02-03 02:09:19 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2010-02-03 02:09:19 -0500 |
commit | da6135e356b4ff8489b7810682a70d5a70ac7197 (patch) | |
tree | de6b1552fac16a87fd17068b9fbabd324fceb321 /include/event2/util.h | |
parent | 27c9a40f15701244bca209f05abc07792499dbb4 (diff) | |
download | libevent-da6135e356b4ff8489b7810682a70d5a70ac7197.tar.gz |
Reduce windows header includes in our own headers.
It turns out that absolutely everything that was including
windows.h was doing so needlessly; our headers don't need it,
so we should just include winsock2.h (since that's where
struct timeval is defined).
Pre-2.0 code will use the old headers, which include windows.h
for them, so we aren't breaking source compatibility with 1.4.
This solves the bug where we were leaving WIN32_LEAN_AND_MEAN
defined, in roughly the same way that buying an automobile
solves the question of what to give your coachman for boxing
day.
Diffstat (limited to 'include/event2/util.h')
-rw-r--r-- | include/event2/util.h | 4 |
1 files changed, 4 insertions, 0 deletions
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 <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, |