From 7defe4cbc16a53b10e8b03ed618140121cc91144 Mon Sep 17 00:00:00 2001 From: Nick Mathewson Date: Thu, 8 May 2008 15:55:09 +0000 Subject: [PATCH] r15549@tombo: nickm | 2008-05-08 11:53:11 -0400 Make new http headers include minimal parts of event2/ tree; make old evhttp.h incldue event.h, since the old one did too. svn:r798 --- evhttp.h | 1 + evrpc.c | 2 ++ evrpc.h | 2 ++ http-internal.h | 6 ++++-- http.c | 6 ++++-- include/event2/http.h | 12 ++++++------ 6 files changed, 19 insertions(+), 10 deletions(-) diff --git a/evhttp.h b/evhttp.h index 60151cbd..dee49fea 100644 --- a/evhttp.h +++ b/evhttp.h @@ -27,6 +27,7 @@ #ifndef _EVHTTP_H_ #define _EVHTTP_H_ +#include #include #include #include diff --git a/evrpc.c b/evrpc.c index be5c2fe7..e82c1bb4 100644 --- a/evrpc.c +++ b/evrpc.c @@ -58,6 +58,8 @@ #include "evrpc.h" #include "evrpc-internal.h" #include "event2/http.h" +#include "event2/buffer.h" +#include "event2/tag.h" #include "event2/http_struct.h" #include "event2/http_compat.h" #include "evutil.h" diff --git a/evrpc.h b/evrpc.h index b3f81769..96a658da 100644 --- a/evrpc.h +++ b/evrpc.h @@ -31,6 +31,8 @@ extern "C" { #endif +#include + /** @file evrpc.h * * This header files provides basic support for an RPC server and client. diff --git a/http-internal.h b/http-internal.h index 272a2a1c..1ce58f84 100644 --- a/http-internal.h +++ b/http-internal.h @@ -7,8 +7,10 @@ * need to know about these. */ -#ifndef _HTTP_H_ -#define _HTTP_H_ +#ifndef _HTTP_INTERNAL_H_ +#define _HTTP_INTERNAL_H_ + +#include "event2/event_struct.h" #define HTTP_CONNECT_TIMEOUT 45 #define HTTP_WRITE_TIMEOUT 50 diff --git a/http.c b/http.c index 4ef750a4..f5d6169b 100644 --- a/http.c +++ b/http.c @@ -88,11 +88,13 @@ #undef timeout_initialized #include "strlcpy-internal.h" -#include "event2/event.h" #include "event2/http.h" +#include "event2/event.h" +#include "event2/buffer.h" +#include "event2/bufferevent.h" #include "event2/http_struct.h" #include "event2/http_compat.h" -#include "evutil.h" +#include "event2/util.h" #include "log.h" #include "http-internal.h" #include "mm-internal.h" diff --git a/include/event2/http.h b/include/event2/http.h index 33d4b7c2..ad089b83 100644 --- a/include/event2/http.h +++ b/include/event2/http.h @@ -27,9 +27,8 @@ #ifndef _EVENT2_HTTP_H_ #define _EVENT2_HTTP_H_ -#include -#include -#include +/* For int types. */ +#include #ifdef __cplusplus extern "C" { @@ -42,8 +41,9 @@ extern "C" { #undef WIN32_LEAN_AND_MEAN #endif -/* For int types. */ -#include +/* In case we haven't included the right headers yet. */ +struct evbuffer; +struct event_base; /** @file evhttp.h * @@ -64,7 +64,7 @@ extern "C" { #define HTTP_NOTMODIFIED 304 /**< page was not modified from last */ #define HTTP_BADREQUEST 400 /**< invalid http request was made */ #define HTTP_NOTFOUND 404 /**< could not find content for uri */ -#define HTTP_SERVUNAVAIL 503 /**< the server is not available */ +#define HTTP_SERVUNAVAIL 503 /**< the server is not available */ struct evhttp; struct evhttp_request;