From: Francesco Chemolli Date: Thu, 20 Sep 2012 11:28:21 +0000 (+0200) Subject: Removed some useless includes X-Git-Tag: SQUID_3_3_0_1~33^2~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=314782d45e3d059a2f5a772d53e70e11e6dcf78e;p=thirdparty%2Fsquid.git Removed some useless includes Changed some linkage from C to default (extern c++) --- diff --git a/src/EventLoop.cc b/src/EventLoop.cc index 465fdc159d..03baa13ba7 100644 --- a/src/EventLoop.cc +++ b/src/EventLoop.cc @@ -31,9 +31,12 @@ */ #include "squid.h" +#include "AsyncEngine.h" #include "Debug.h" #include "EventLoop.h" #include "base/AsyncCallQueue.h" +#include "SquidTime.h" + EventLoop::EventLoop() : errcount(0), last_loop(false), timeService(NULL), primaryEngine(NULL) diff --git a/src/EventLoop.h b/src/EventLoop.h index bf1bda4744..63736ddd94 100644 --- a/src/EventLoop.h +++ b/src/EventLoop.h @@ -32,11 +32,12 @@ #define SQUID_EVENTLOOP_H #include "Array.h" -#include "AsyncEngine.h" -#include "SquidTime.h" #define EVENT_LOOP_TIMEOUT 1000 /* 1s timeout */ +class AsyncEngine; +class TimeEngine; + /** An event loop. An event loop is the core inner loop of squid. * The event loop can be run until exit, or once. After it finishes control * returns to the caller. If desired it can be run again. diff --git a/src/ExternalACL.h b/src/ExternalACL.h index 8878f3e5c6..7d5e3c8a8a 100644 --- a/src/ExternalACL.h +++ b/src/ExternalACL.h @@ -33,8 +33,8 @@ #define SQUID_EXTERNALACL_H #include "acl/Checklist.h" - class external_acl; +class StoreEntry; /** \todo CLEANUP: kill this typedef. */ typedef struct _external_acl_data external_acl_data; @@ -93,15 +93,12 @@ protected: MEMPROXY_CLASS_INLINE(ACLExternal); -class ACLChecklist; -class StoreEntry; - -extern void parse_externalAclHelper(external_acl **); -extern void dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl *); -extern void free_externalAclHelper(external_acl **); +void parse_externalAclHelper(external_acl **); +void dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl *); +void free_externalAclHelper(external_acl **); typedef void EAH(void *data, void *result); -extern void externalAclLookup(ACLChecklist * ch, void *acl_data, EAH * handler, void *data); -extern void externalAclInit(void); -extern void externalAclShutdown(void); +void externalAclLookup(ACLChecklist * ch, void *acl_data, EAH * handler, void *data); +void externalAclInit(void); +void externalAclShutdown(void); #endif /* SQUID_EXTERNALACL_H */ diff --git a/src/base/AsyncCall.cc b/src/base/AsyncCall.cc index eae5c72abf..4a76d76cad 100644 --- a/src/base/AsyncCall.cc +++ b/src/base/AsyncCall.cc @@ -3,6 +3,7 @@ */ #include "squid.h" +#include "AsyncCall.h" #include "base/AsyncCall.h" #include "base/AsyncCallQueue.h" #include "cbdata.h" diff --git a/src/base/AsyncCall.h b/src/base/AsyncCall.h index 4099408044..b7055645da 100644 --- a/src/base/AsyncCall.h +++ b/src/base/AsyncCall.h @@ -5,10 +5,9 @@ #ifndef SQUID_ASYNCCALL_H #define SQUID_ASYNCCALL_H -//#include "cbdata.h" #include "base/InstanceId.h" #include "event.h" -//#include "TextException.h" +#include "RefCount.h" /** \defgroup AsynCallsAPI Async-Calls API diff --git a/src/errorpage.h b/src/errorpage.h index c2d49dcab9..0103f4a123 100644 --- a/src/errorpage.h +++ b/src/errorpage.h @@ -38,6 +38,7 @@ #include "comm/forward.h" #include "err_detail_type.h" #include "err_type.h" +#include "HttpStatusCode.h" #include "ip/Address.h" #include "SquidString.h" /* auth/UserRequest.h is empty unless USE_AUTH is defined */ diff --git a/src/event.h b/src/event.h index 23e4d11bba..aa269292a2 100644 --- a/src/event.h +++ b/src/event.h @@ -35,9 +35,6 @@ #include "Array.h" #include "AsyncEngine.h" #include "MemPool.h" -#include "RefCount.h" - -/* forward decls */ class StoreEntry; @@ -45,12 +42,12 @@ class StoreEntry; typedef void EVH(void *); -extern void eventAdd(const char *name, EVH * func, void *arg, double when, int, bool cbdata=true); -SQUIDCEXTERN void eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int); -SQUIDCEXTERN void eventDelete(EVH * func, void *arg); -SQUIDCEXTERN void eventInit(void); -SQUIDCEXTERN void eventFreeMemory(void); -SQUIDCEXTERN int eventFind(EVH *, void *); +void eventAdd(const char *name, EVH * func, void *arg, double when, int, bool cbdata=true); +void eventAddIsh(const char *name, EVH * func, void *arg, double delta_ish, int); +void eventDelete(EVH * func, void *arg); +void eventInit(void); +void eventFreeMemory(void); +int eventFind(EVH *, void *); class ev_entry { diff --git a/src/fd.h b/src/fd.h index 316f244f1d..8948341563 100644 --- a/src/fd.h +++ b/src/fd.h @@ -33,12 +33,12 @@ #ifndef SQUID_FD_H_ #define SQUID_FD_H_ -extern void fd_close(int fd); -extern void fd_open(int fd, unsigned int type, const char *); -extern void fd_note(int fd, const char *); -extern void fd_bytes(int fd, int len, unsigned int type); -extern void fdDumpOpen(void); -extern int fdUsageHigh(void); -extern void fdAdjustReserved(void); +void fd_close(int fd); +void fd_open(int fd, unsigned int type, const char *); +void fd_note(int fd, const char *); +void fd_bytes(int fd, int len, unsigned int type); +void fdDumpOpen(void); +int fdUsageHigh(void); +void fdAdjustReserved(void); #endif /* SQUID_FD_H_ */ diff --git a/src/htcp.h b/src/htcp.h index 2907d3f774..631d1c0f5e 100644 --- a/src/htcp.h +++ b/src/htcp.h @@ -61,10 +61,10 @@ public: typedef class HtcpReplyData htcpReplyData; /// \ingroup ServerProtocolHTCP -SQUIDCEXTERN void neighborsHtcpReply(const cache_key *, htcpReplyData *, const Ip::Address &); +void neighborsHtcpReply(const cache_key *, htcpReplyData *, const Ip::Address &); /// \ingroup ServerProtocolHTCP -SQUIDCEXTERN void htcpOpenPorts(void); +void htcpOpenPorts(void); /** * \ingroup ServerProtocolHTCP @@ -79,16 +79,16 @@ SQUIDCEXTERN void htcpOpenPorts(void); * Don't wait for a reply or count in stats as sent. * \retval -1 Error sending request. */ -SQUIDCEXTERN int htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p); +int htcpQuery(StoreEntry * e, HttpRequest * req, CachePeer * p); /// \ingroup ServerProtocolHTCP -SQUIDCEXTERN void htcpClear(StoreEntry * e, const char *uri, HttpRequest * req, const HttpRequestMethod &method, CachePeer * p, htcp_clr_reason reason); +void htcpClear(StoreEntry * e, const char *uri, HttpRequest * req, const HttpRequestMethod &method, CachePeer * p, htcp_clr_reason reason); /// \ingroup ServerProtocolHTCP -SQUIDCEXTERN void htcpSocketShutdown(void); +void htcpSocketShutdown(void); /// \ingroup ServerProtocolHTCP -SQUIDCEXTERN void htcpClosePorts(void); +void htcpClosePorts(void); #endif /* USE_HTCP */ diff --git a/src/http.cc b/src/http.cc index da06ef7576..0122d6bf21 100644 --- a/src/http.cc +++ b/src/http.cc @@ -40,6 +40,7 @@ #include "base/AsyncJobCalls.h" #include "base/TextException.h" #include "CachePeer.h" +#include "ChunkedCodingParser.h" #include "client_side.h" #include "comm/Connection.h" #include "comm/Write.h" diff --git a/src/http.h b/src/http.h index 1c78faf4c3..73b6ce8900 100644 --- a/src/http.h +++ b/src/http.h @@ -32,12 +32,11 @@ #ifndef SQUID_HTTP_H #define SQUID_HTTP_H -#include "StoreIOBuffer.h" #include "comm.h" -#include "comm/forward.h" -#include "forward.h" #include "Server.h" -#include "ChunkedCodingParser.h" + +class ChunkedCodingParser; +class FwdState; class HttpStateData : public ServerStateData { diff --git a/src/tests/testEventLoop.cc b/src/tests/testEventLoop.cc index 51c077a17c..0d0ac4f956 100644 --- a/src/tests/testEventLoop.cc +++ b/src/tests/testEventLoop.cc @@ -4,8 +4,10 @@ #include #include "testEventLoop.h" +#include "AsyncEngine.h" #include "EventLoop.h" #include "Mem.h" +#include "SquidTime.h" #include "stat.h" CPPUNIT_TEST_SUITE_REGISTRATION( testEventLoop ); diff --git a/src/tests/testStoreSupport.h b/src/tests/testStoreSupport.h index dfa6025c4f..915ac92dfe 100644 --- a/src/tests/testStoreSupport.h +++ b/src/tests/testStoreSupport.h @@ -35,6 +35,7 @@ #define SQUID_TESTSTORESUPPORT_H #include "EventLoop.h" +#include "SquidTime.h" /* construct a stock loop with event dispatching, a time service that advances * 1 second a tick