--------------------- PatchSet 7212 Date: 2008/03/02 11:26:57 Author: amosjeffries Branch: cleanup Tag: (none) Log: .h dependency fixes. Members: include/GNUregex.h:1.2.52.1->1.2.52.2 include/MemPool.h:1.14.2.1->1.14.2.2 include/cache_snmp.h:1.4.4.1->1.4.4.2 include/hash.h:1.2.72.1->1.2.72.2 src/ACLData.h:1.6.44.1->1.6.44.2 src/ACLHTTPHeaderData.h:1.4.20.1->1.4.20.2 src/ACLRegexData.h:1.6.44.1->1.6.44.2 src/ACLReplyMIMEType.h:1.6->1.6.38.1 src/ExternalACL.h:1.9.38.1->1.9.38.2 src/HttpHeader.h:1.25.2.1->1.25.2.2 src/PeerDigest.h:1.4->1.4.10.1 src/SquidString.h:1.15.2.1->1.15.2.2 src/protos.h:1.95.2.2->1.95.2.3 src/structs.h:1.127.2.3->1.127.2.4 src/typedefs.h:1.47.4.4->1.47.4.5 src/wordlist.h:1.1->1.1.48.1 Index: squid3/include/GNUregex.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/include/GNUregex.h,v retrieving revision 1.2.52.1 retrieving revision 1.2.52.2 diff -u -r1.2.52.1 -r1.2.52.2 --- squid3/include/GNUregex.h 19 Feb 2008 10:27:14 -0000 1.2.52.1 +++ squid3/include/GNUregex.h 2 Mar 2008 11:26:57 -0000 1.2.52.2 @@ -1,10 +1,9 @@ /* - * $Id: GNUregex.h,v 1.2.52.1 2008/02/19 10:27:14 amosjeffries Exp $ + * $Id: GNUregex.h,v 1.2.52.2 2008/03/02 11:26:57 amosjeffries Exp $ */ #ifndef SQUID_REGEXP_LIBRARY_H #define SQUID_REGEXP_LIBRARY_H -/* Squid auto-conf definitions */ #include "config.h" /* Definitions for data structures and routines for the regular Index: squid3/include/MemPool.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/include/MemPool.h,v retrieving revision 1.14.2.1 retrieving revision 1.14.2.2 diff -u -r1.14.2.1 -r1.14.2.2 --- squid3/include/MemPool.h 27 Feb 2008 04:28:57 -0000 1.14.2.1 +++ squid3/include/MemPool.h 2 Mar 2008 11:26:57 -0000 1.14.2.2 @@ -1,4 +1,3 @@ - #ifndef _MEM_POOLS_H_ #define _MEM_POOLS_H_ Index: squid3/include/cache_snmp.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/include/cache_snmp.h,v retrieving revision 1.4.4.1 retrieving revision 1.4.4.2 diff -u -r1.4.4.1 -r1.4.4.2 --- squid3/include/cache_snmp.h 19 Feb 2008 12:18:54 -0000 1.4.4.1 +++ squid3/include/cache_snmp.h 2 Mar 2008 11:26:57 -0000 1.4.4.2 @@ -1,7 +1,6 @@ /* - * $Id: cache_snmp.h,v 1.4.4.1 2008/02/19 12:18:54 amosjeffries Exp $ + * $Id: cache_snmp.h,v 1.4.4.2 2008/03/02 11:26:57 amosjeffries Exp $ */ - #ifndef SQUID_CACHE_SNMP_H #define SQUID_CACHE_SNMP_H @@ -19,7 +18,9 @@ #include "snmp.h" #include "snmp_impl.h" -/* #include "asn1.h" */ +#if 0 +#include "asn1.h" +#endif #include "snmp_api.h" #include "snmp_vars.h" Index: squid3/include/hash.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/include/hash.h,v retrieving revision 1.2.72.1 retrieving revision 1.2.72.2 diff -u -r1.2.72.1 -r1.2.72.2 --- squid3/include/hash.h 19 Feb 2008 10:27:14 -0000 1.2.72.1 +++ squid3/include/hash.h 2 Mar 2008 11:26:57 -0000 1.2.72.2 @@ -1,10 +1,9 @@ /* - * $Id: hash.h,v 1.2.72.1 2008/02/19 10:27:14 amosjeffries Exp $ + * $Id: hash.h,v 1.2.72.2 2008/03/02 11:26:57 amosjeffries Exp $ */ #ifndef SQUID_HASH_H #define SQUID_HASH_H -/* Squid auto-conf definitions */ #include "config.h" typedef void HASHFREE(void *); Index: squid3/src/ACLData.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLData.h,v retrieving revision 1.6.44.1 retrieving revision 1.6.44.2 diff -u -r1.6.44.1 -r1.6.44.2 --- squid3/src/ACLData.h 27 Feb 2008 04:28:57 -0000 1.6.44.1 +++ squid3/src/ACLData.h 2 Mar 2008 11:26:57 -0000 1.6.44.2 @@ -1,5 +1,5 @@ /* - * $Id: ACLData.h,v 1.6.44.1 2008/02/27 04:28:57 amosjeffries Exp $ + * $Id: ACLData.h,v 1.6.44.2 2008/03/02 11:26:57 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -31,10 +31,11 @@ * * Copyright (c) 2003, Robert Collins */ - #ifndef SQUID_ACLDATA_H #define SQUID_ACLDATA_H +class wordlist; + /// \ingroup ACLAPI template class ACLData Index: squid3/src/ACLHTTPHeaderData.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLHTTPHeaderData.h,v retrieving revision 1.4.20.1 retrieving revision 1.4.20.2 diff -u -r1.4.20.1 -r1.4.20.2 --- squid3/src/ACLHTTPHeaderData.h 27 Feb 2008 04:28:57 -0000 1.4.20.1 +++ squid3/src/ACLHTTPHeaderData.h 2 Mar 2008 11:26:57 -0000 1.4.20.2 @@ -1,5 +1,5 @@ /* - * $Id: ACLHTTPHeaderData.h,v 1.4.20.1 2008/02/27 04:28:57 amosjeffries Exp $ + * $Id: ACLHTTPHeaderData.h,v 1.4.20.2 2008/03/02 11:26:57 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -31,11 +31,20 @@ * * Copyright (c) 2003, Robert Collins */ - #ifndef SQUID_ACLHTTPHEADERDATA_H #define SQUID_ACLHTTPHEADERDATA_H +class HttpHeader; +class wordlist; + +/* becaue we inherit from it */ #include "ACLData.h" +/* for String field */ +#include "SquidString.h" +/* for http_hdr_type field */ +#include "HttpHeader.h" +/* because weuse its MEMPROXY_CLASS() macros */ +#include "MemPool.h" /// \ingroup ACLAPI class ACLHTTPHeaderData : public ACLData @@ -53,11 +62,11 @@ virtual ACLData *clone() const; private: - http_hdr_type hdrId; // set if header is known - String hdrName; // always set + http_hdr_type hdrId; /**< set if header is known */ + String hdrName; /**< always set */ ACLData * regex_rule; }; -MEMPROXY_CLASS_INLINE(ACLHTTPHeaderData) /**DOCS_NOSEMI*/ +MEMPROXY_CLASS_INLINE(ACLHTTPHeaderData); #endif /* SQUID_ACLHTTPHEADERDATA_H */ Index: squid3/src/ACLRegexData.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLRegexData.h,v retrieving revision 1.6.44.1 retrieving revision 1.6.44.2 diff -u -r1.6.44.1 -r1.6.44.2 --- squid3/src/ACLRegexData.h 27 Feb 2008 04:28:57 -0000 1.6.44.1 +++ squid3/src/ACLRegexData.h 2 Mar 2008 11:26:57 -0000 1.6.44.2 @@ -1,5 +1,5 @@ /* - * $Id: ACLRegexData.h,v 1.6.44.1 2008/02/27 04:28:57 amosjeffries Exp $ + * $Id: ACLRegexData.h,v 1.6.44.2 2008/03/02 11:26:57 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -31,10 +31,14 @@ * * Copyright (c) 2003, Robert Collins */ - #ifndef SQUID_ACLREGEXDATA_H #define SQUID_ACLREGEXDATA_H + #include "ACLData.h" +#include "MemPool.h" + +/** \todo CLEANUP: break out relist, we don't need the rest. */ +#include "structs.h" class ACLRegexData : public ACLData { @@ -53,6 +57,6 @@ relist *data; }; -MEMPROXY_CLASS_INLINE(ACLRegexData) /**DOCS_NOSEMI*/ +MEMPROXY_CLASS_INLINE(ACLRegexData); #endif /* SQUID_ACLREGEXDATA_H */ Index: squid3/src/ACLReplyMIMEType.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ACLReplyMIMEType.h,v retrieving revision 1.6 retrieving revision 1.6.38.1 diff -u -r1.6 -r1.6.38.1 --- squid3/src/ACLReplyMIMEType.h 6 May 2006 22:50:34 -0000 1.6 +++ squid3/src/ACLReplyMIMEType.h 2 Mar 2008 11:26:57 -0000 1.6.38.1 @@ -1,6 +1,5 @@ - /* - * $Id: ACLReplyMIMEType.h,v 1.6 2006/05/06 22:50:34 squidadm Exp $ + * $Id: ACLReplyMIMEType.h,v 1.6.38.1 2008/03/02 11:26:57 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -32,15 +31,11 @@ * * Copyright (c) 2003, Robert Collins */ - #ifndef SQUID_ACLREPLYMIMETYPE_H #define SQUID_ACLREPLYMIMETYPE_H + #include "ACL.h" -#include "ACLData.h" -#include "ACLReplyHeaderStrategy.h" #include "ACLStrategised.h" -#include "ACLChecklist.h" -#include "HttpReply.h" class ACLReplyMIMEType { @@ -52,9 +47,15 @@ /* partial specialisation */ +#include "ACLData.h" +#include "ACLReplyHeaderStrategy.h" +#include "HttpHeader.h" +#include "ACLChecklist.h" +#include "HttpReply.h" + template <> int -ACLReplyHeaderStrategy::match (ACLData * &data, ACLChecklist *checklist) +ACLReplyHeaderStrategy::match(ACLData * &data, ACLChecklist *checklist) { char const *theHeader = checklist->reply->header.getStr(HDR_CONTENT_TYPE); Index: squid3/src/ExternalACL.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ExternalACL.h,v retrieving revision 1.9.38.1 retrieving revision 1.9.38.2 diff -u -r1.9.38.1 -r1.9.38.2 --- squid3/src/ExternalACL.h 27 Feb 2008 04:28:57 -0000 1.9.38.1 +++ squid3/src/ExternalACL.h 2 Mar 2008 11:26:57 -0000 1.9.38.2 @@ -1,6 +1,5 @@ - /* - * $Id: ExternalACL.h,v 1.9.38.1 2008/02/27 04:28:57 amosjeffries Exp $ + * $Id: ExternalACL.h,v 1.9.38.2 2008/03/02 11:26:57 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -32,10 +31,9 @@ * * Copyright (c) 2003, Robert Collins */ - #ifndef SQUID_EXTERNALACL_H #define SQUID_EXTERNALACL_H -#include "ACL.h" + #include "ACLChecklist.h" class external_acl; @@ -52,8 +50,11 @@ static void LookupDone(void *data, void *result); }; +/** \todo CLEANUP: kill this typedef. */ typedef struct _external_acl_data external_acl_data; +#include "ACL.h" + class ACLExternal : public ACL { @@ -89,7 +90,7 @@ char const *class_; }; -MEMPROXY_CLASS_INLINE(ACLExternal) /**DOCS_NOSEMI*/ +MEMPROXY_CLASS_INLINE(ACLExternal); extern void externalAclRegisterWithCacheManager(CacheManager & manager); Index: squid3/src/HttpHeader.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpHeader.h,v retrieving revision 1.25.2.1 retrieving revision 1.25.2.2 diff -u -r1.25.2.1 -r1.25.2.2 --- squid3/src/HttpHeader.h 27 Feb 2008 04:28:57 -0000 1.25.2.1 +++ squid3/src/HttpHeader.h 2 Mar 2008 11:26:57 -0000 1.25.2.2 @@ -1,5 +1,5 @@ /* - * $Id: HttpHeader.h,v 1.25.2.1 2008/02/27 04:28:57 amosjeffries Exp $ + * $Id: HttpHeader.h,v 1.25.2.2 2008/03/02 11:26:57 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -36,6 +36,7 @@ /* forward decls */ class CacheManager; + /* because we pass a spec by value */ #include "HttpHeaderRange.h" /* HttpHeader holds a HttpHeaderMask */ @@ -167,8 +168,10 @@ /* these two are defined in structs.h */ +/// \todo CLEANUP: Kill this. typedef struct _TimeOrTag TimeOrTag; +/// \todo CLEANUP: Kill this. typedef struct _ETag ETag; class HttpHeaderEntry @@ -234,7 +237,10 @@ int getInt(http_hdr_type id) const; int64_t getInt64(http_hdr_type id) const; time_t getTime(http_hdr_type id) const; + + /** \todo getStr(...) is used by ACLMIMEType template method. It needs to be defined in headers. */ const char *getStr(http_hdr_type id) const; + const char *getLastStr(http_hdr_type id) const; HttpHdrCc *getCc() const; HttpHdrRange *getRange() const; Index: squid3/src/PeerDigest.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/PeerDigest.h,v retrieving revision 1.4 retrieving revision 1.4.10.1 diff -u -r1.4 -r1.4.10.1 --- squid3/src/PeerDigest.h 21 Sep 2007 11:51:35 -0000 1.4 +++ squid3/src/PeerDigest.h 2 Mar 2008 11:26:57 -0000 1.4.10.1 @@ -1,6 +1,6 @@ /* - * $Id: PeerDigest.h,v 1.4 2007/09/21 11:51:35 squidadm Exp $ + * $Id: PeerDigest.h,v 1.4.10.1 2008/03/02 11:26:57 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -95,24 +95,17 @@ void *operator new (size_t); void operator delete(void *); - struct _peer *peer; /* pointer back to peer structure, argh */ - CacheDigest *cd; /* actual digest structure */ - String host; /* copy of peer->host */ - const char *req_result; /* text status of the last request */ + struct peer *peer; /**< pointer back to peer structure, argh */ + CacheDigest *cd; /**< actual digest structure */ + String host; /**< copy of peer->host */ + const char *req_result; /**< text status of the last request */ struct { - -unsigned int needed: - 1; /* there were requests for this digest */ - -unsigned int usable: - 1; /* can be used for lookups */ - -unsigned int requested: - 1; /* in process of receiving [fresh] digest */ + unsigned int needed:1; /**< there were requests for this digest */ + unsigned int usable:1; /**< can be used for lookups */ + unsigned int requested:1; /**< in process of receiving [fresh] digest */ } - flags; struct @@ -127,7 +120,6 @@ time_t received; /* received the current copy of a digest */ time_t disabled; /* disabled for good */ } - times; struct @@ -143,7 +135,6 @@ sent, recv; } - stats; private: @@ -151,6 +142,7 @@ }; extern const Version CacheDigestVer; -#endif + +#endif /* USE_CACHE_DIGESTS */ #endif /* SQUID_PEERDIGEST_H */ Index: squid3/src/SquidString.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/SquidString.h,v retrieving revision 1.15.2.1 retrieving revision 1.15.2.2 diff -u -r1.15.2.1 -r1.15.2.2 --- squid3/src/SquidString.h 12 Feb 2008 02:15:20 -0000 1.15.2.1 +++ squid3/src/SquidString.h 2 Mar 2008 11:26:57 -0000 1.15.2.2 @@ -1,5 +1,5 @@ /* - * $Id: SquidString.h,v 1.15.2.1 2008/02/12 02:15:20 amosjeffries Exp $ + * $Id: SquidString.h,v 1.15.2.2 2008/03/02 11:26:57 amosjeffries Exp $ * * DEBUG: section 67 String * AUTHOR: Duane Wessels @@ -41,6 +41,10 @@ class CacheManager; +/** todo checks to wrap this include properly */ +#include + + #define DEBUGSTRINGS 0 #if DEBUGSTRINGS #include "splay.h" Index: squid3/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/protos.h,v retrieving revision 1.95.2.2 retrieving revision 1.95.2.3 diff -u -r1.95.2.2 -r1.95.2.3 --- squid3/src/protos.h 27 Feb 2008 04:29:00 -0000 1.95.2.2 +++ squid3/src/protos.h 2 Mar 2008 11:26:58 -0000 1.95.2.3 @@ -1,5 +1,5 @@ /* - * $Id: protos.h,v 1.95.2.2 2008/02/27 04:29:00 amosjeffries Exp $ + * $Id: protos.h,v 1.95.2.3 2008/03/02 11:26:58 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -59,6 +59,7 @@ * cache_cf.c */ SQUIDCEXTERN void configFreeMemory(void); +class MemBuf; SQUIDCEXTERN void wordlistCat(const wordlist *, MemBuf * mb); SQUIDCEXTERN void self_destruct(void); SQUIDCEXTERN void add_http_port(char *portspec); @@ -213,6 +214,8 @@ /* http.c */ +/* for http_hdr_type field */ +#include "HttpHeader.h" SQUIDCEXTERN int httpCachable(const HttpRequestMethod&); SQUIDCEXTERN void httpStart(FwdState *); SQUIDCEXTERN mb_size_t httpBuildRequestPrefix(HttpRequest * request, @@ -257,6 +260,7 @@ SQUIDCEXTERN void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count); /* Http Header Tools */ +class HttpHeaderFieldInfo; SQUIDCEXTERN HttpHeaderFieldInfo *httpHeaderBuildFieldsInfo(const HttpHeaderFieldAttrs * attrs, int count); SQUIDCEXTERN void httpHeaderDestroyFieldsInfo(HttpHeaderFieldInfo * info, int count); SQUIDCEXTERN http_hdr_type httpHeaderIdByName(const char *name, int name_len, const HttpHeaderFieldInfo * attrs, int end); @@ -435,6 +439,7 @@ SQUIDCEXTERN void peerSelectInit(void); /* peer_digest.c */ +class PeerDigest; SQUIDCEXTERN PeerDigest *peerDigestCreate(peer * p); SQUIDCEXTERN void peerDigestNeeded(PeerDigest * pd); SQUIDCEXTERN void peerDigestNotePeerGone(PeerDigest * pd); @@ -670,6 +675,7 @@ SQUIDCEXTERN peer_t parseNeighborType(const char *s); /* tools.c */ +#include "dlink.h" SQUIDCEXTERN void dlinkAdd(void *data, dlink_node *, dlink_list *); SQUIDCEXTERN void dlinkAddAfter(void *, dlink_node *, dlink_node *, dlink_list *); SQUIDCEXTERN void dlinkAddTail(void *data, dlink_node *, dlink_list *); @@ -801,6 +807,7 @@ #endif /* external_acl.c */ +class external_acl; SQUIDCEXTERN void parse_externalAclHelper(external_acl **); SQUIDCEXTERN void dump_externalAclHelper(StoreEntry * sentry, const char *name, const external_acl *); @@ -808,7 +815,7 @@ SQUIDCEXTERN void free_externalAclHelper(external_acl **); typedef void EAH(void *data, void *result); - +class ACLChecklist; SQUIDCEXTERN void externalAclLookup(ACLChecklist * ch, void *acl_data, EAH * handler, void *data); SQUIDCEXTERN void externalAclInit(void); Index: squid3/src/structs.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/structs.h,v retrieving revision 1.127.2.3 retrieving revision 1.127.2.4 diff -u -r1.127.2.3 -r1.127.2.4 --- squid3/src/structs.h 27 Feb 2008 04:10:07 -0000 1.127.2.3 +++ squid3/src/structs.h 2 Mar 2008 11:26:58 -0000 1.127.2.4 @@ -1,5 +1,5 @@ /* - * $Id: structs.h,v 1.127.2.3 2008/02/27 04:10:07 amosjeffries Exp $ + * $Id: structs.h,v 1.127.2.4 2008/03/02 11:26:58 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -921,7 +921,7 @@ class PeerDigest; -struct _peer +struct peer { u_int index; char *name; Index: squid3/src/typedefs.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/typedefs.h,v retrieving revision 1.47.4.4 retrieving revision 1.47.4.5 diff -u -r1.47.4.4 -r1.47.4.5 --- squid3/src/typedefs.h 27 Feb 2008 04:29:00 -0000 1.47.4.4 +++ squid3/src/typedefs.h 2 Mar 2008 11:26:58 -0000 1.47.4.5 @@ -1,5 +1,5 @@ /* - * $Id: typedefs.h,v 1.47.4.4 2008/02/27 04:29:00 amosjeffries Exp $ + * $Id: typedefs.h,v 1.47.4.5 2008/03/02 11:26:58 amosjeffries Exp $ * * SQUID Web Proxy Cache http://www.squid-cache.org/ * ---------------------------------------------------------- @@ -125,7 +125,7 @@ //UNUSED class PeerDigest; -typedef struct _peer peer; +//UNUSED typedef struct _peer peer; typedef struct _net_db_name net_db_name; @@ -205,7 +205,7 @@ typedef void FQDNH(const char *, void *); typedef void IDCB(const char *ident, void *data); typedef void IPH(const ipcache_addrs *, void *); -typedef void IRCB(peer *, peer_t, protocol_t, void *, void *data); +typedef void IRCB(struct peer *, peer_t, protocol_t, void *, void *data); class FwdServer; typedef void PSC(FwdServer *, void *); Index: squid3/src/wordlist.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/wordlist.h,v retrieving revision 1.1 retrieving revision 1.1.48.1 diff -u -r1.1 -r1.1.48.1 --- squid3/src/wordlist.h 23 Apr 2006 11:27:38 -0000 1.1 +++ squid3/src/wordlist.h 2 Mar 2008 11:26:58 -0000 1.1.48.1 @@ -1,6 +1,5 @@ - /* - * $Id: wordlist.h,v 1.1 2006/04/23 11:27:38 squidadm Exp $ + * $Id: wordlist.h,v 1.1.48.1 2008/03/02 11:26:58 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -30,7 +29,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * */ - #ifndef SQUID_WORDLIST_H #define SQUID_WORDLIST_H