--------------------- PatchSet 7345 Date: 2008/03/05 11:13:04 Author: amosjeffries Branch: cleanup Tag: (none) Log: .h cleanups Members: src/HttpRequestMethod.h:1.6.2.3->1.6.2.4 src/Makefile.am:1.138.2.8->1.138.2.9 src/SwapDir.h:1.16.10.1->1.16.10.2 src/debug.cc:1.23.4.1->1.23.4.2 src/defines.h:1.17.4.1->1.17.4.2 src/globals.h:1.33.4.3->1.33.4.4 src/icp_v2.cc:1.35.4.1->1.35.4.2 src/snmp_core.cc:1.25->1.25.2.1 src/squid.h:1.43.2.2->1.43.2.3 src/structs.h:1.127.2.4->1.127.2.5 src/typedefs.h:1.47.4.5->1.47.4.6 Index: squid3/src/HttpRequestMethod.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpRequestMethod.h,v retrieving revision 1.6.2.3 retrieving revision 1.6.2.4 diff -u -r1.6.2.3 -r1.6.2.4 --- squid3/src/HttpRequestMethod.h 27 Feb 2008 04:28:57 -0000 1.6.2.3 +++ squid3/src/HttpRequestMethod.h 5 Mar 2008 11:13:04 -0000 1.6.2.4 @@ -1,5 +1,5 @@ /* - * $Id: HttpRequestMethod.h,v 1.6.2.3 2008/02/27 04:28:57 amosjeffries Exp $ + * $Id: HttpRequestMethod.h,v 1.6.2.4 2008/03/05 11:13:04 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -72,9 +72,6 @@ METHOD_ENUM_END // MUST be last, (yuck) this is used as an array-initialization index constant! }; -/* forward decls */ -typedef struct _SquidConfig SquidConfig; - /** * This class represents an HTTP Request METHOD Index: squid3/src/Makefile.am =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Makefile.am,v retrieving revision 1.138.2.8 retrieving revision 1.138.2.9 diff -u -r1.138.2.8 -r1.138.2.9 --- squid3/src/Makefile.am 4 Mar 2008 01:08:47 -0000 1.138.2.8 +++ squid3/src/Makefile.am 5 Mar 2008 11:13:04 -0000 1.138.2.9 @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.138.2.8 2008/03/04 01:08:47 amosjeffries Exp $ +# $Id: Makefile.am,v 1.138.2.9 2008/03/05 11:13:04 amosjeffries Exp $ # # Uncomment and customize the following to suit your needs: # @@ -239,7 +239,7 @@ $(UNLINKD) cf_gen_SOURCES = cf_gen.cc defines.h debug.cc time.cc -nodist_cf_gen_SOURCES = globals.cc +nodist_cf_gen_SOURCES = SquidConfig.cc globals.cc nodist_cf_gen_HEADER = cf_gen_defines.h cf_gen.$(OBJEXT): cf_gen_defines.h @@ -740,6 +740,7 @@ pinger.cc \ debug.cc \ time.cc \ + SquidConfig.cc \ SquidNew.cc dnsserver_SOURCES = dnsserver.cc SquidNew.cc Index: squid3/src/SwapDir.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/SwapDir.h,v retrieving revision 1.16.10.1 retrieving revision 1.16.10.2 diff -u -r1.16.10.1 -r1.16.10.2 --- squid3/src/SwapDir.h 20 Feb 2008 11:38:44 -0000 1.16.10.1 +++ squid3/src/SwapDir.h 5 Mar 2008 11:13:04 -0000 1.16.10.2 @@ -1,5 +1,5 @@ /* - * $Id: SwapDir.h,v 1.16.10.1 2008/02/20 11:38:44 amosjeffries Exp $ + * $Id: SwapDir.h,v 1.16.10.2 2008/03/05 11:13:04 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -90,8 +90,8 @@ }; /* migrating from the Config based list of swapdirs */ -extern void allocate_new_swapdir(_SquidConfig::_cacheSwap *); -extern void free_cachedir(_SquidConfig::_cacheSwap * swap); +extern void allocate_new_swapdir(SquidConfig::_cacheSwap *); +extern void free_cachedir(SquidConfig::_cacheSwap * swap); SQUIDCEXTERN OBJH storeDirStats; SQUIDCEXTERN char *storeDirSwapLogFile(int, const char *); SQUIDCEXTERN char *storeSwapFullPath(int, char *); Index: squid3/src/debug.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/debug.cc,v retrieving revision 1.23.4.1 retrieving revision 1.23.4.2 diff -u -r1.23.4.1 -r1.23.4.2 --- squid3/src/debug.cc 27 Feb 2008 04:28:59 -0000 1.23.4.1 +++ squid3/src/debug.cc 5 Mar 2008 11:13:04 -0000 1.23.4.2 @@ -1,5 +1,5 @@ /* - * $Id: debug.cc,v 1.23.4.1 2008/02/27 04:28:59 amosjeffries Exp $ + * $Id: debug.cc,v 1.23.4.2 2008/03/05 11:13:04 amosjeffries Exp $ * * DEBUG: section 0 Debug Routines * AUTHOR: Harvest Derived @@ -31,12 +31,17 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * */ - +#if 0 #include "squid.h" +#endif + #include "Debug.h" #include "SquidTime.h" #include +/* for Config */ +#include "structs.h" + int Debug::Levels[MAX_DEBUG_SECTIONS]; int Debug::level; Index: squid3/src/defines.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/defines.h,v retrieving revision 1.17.4.1 retrieving revision 1.17.4.2 diff -u -r1.17.4.1 -r1.17.4.2 --- squid3/src/defines.h 4 Mar 2008 03:43:17 -0000 1.17.4.1 +++ squid3/src/defines.h 5 Mar 2008 11:13:04 -0000 1.17.4.2 @@ -1,6 +1,5 @@ - /* - * $Id: defines.h,v 1.17.4.1 2008/03/04 03:43:17 amosjeffries Exp $ + * $Id: defines.h,v 1.17.4.2 2008/03/05 11:13:04 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_DEFINES_H #define SQUID_DEFINES_H @@ -41,6 +39,10 @@ #define FALSE 0 #endif +#ifndef BUFSIZ +#define BUFSIZ 4096 /* make unreasonable guess */ +#endif + #define ACL_NAME_SZ 32 #define BROWSERNAMELEN 128 Index: squid3/src/globals.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/globals.h,v retrieving revision 1.33.4.3 retrieving revision 1.33.4.4 diff -u -r1.33.4.3 -r1.33.4.4 --- squid3/src/globals.h 4 Mar 2008 01:08:47 -0000 1.33.4.3 +++ squid3/src/globals.h 5 Mar 2008 11:13:04 -0000 1.33.4.4 @@ -1,6 +1,5 @@ - /* - * $Id: globals.h,v 1.33.4.3 2008/03/04 01:08:47 amosjeffries Exp $ + * $Id: globals.h,v 1.33.4.4 2008/03/05 11:13:04 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -30,26 +29,34 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * */ - #ifndef SQUID_GLOBALS_H #define SQUID_GLOBALS_H +#if HAVE_STDIO_H +#include +#endif + +#include "rfc2181.h" + +/* for ERROR_BUF_SZ, BUFSIZ, MAXHTTPPORTS */ +#include "defines.h" + #ifdef __cplusplus extern "C" { #endif extern FILE *debug_log; /* NULL */ - extern SquidConfig Config; - extern SquidConfig2 Config2; +//MOVED:structs.h extern SquidConfig Config; +//MOVED:structs.h extern SquidConfig2 Config2; extern char *ConfigFile; /* NULL */ extern char *IcpOpcodeStr[]; extern const char *dns_error_message; /* NULL */ extern const char *log_tags[]; extern char tmp_error_buf[ERROR_BUF_SZ]; extern char *volatile debug_options; /* NULL */ - extern char ThisCache[SQUIDHOSTNAMELEN << 1]; - extern char ThisCache2[SQUIDHOSTNAMELEN << 1]; + extern char ThisCache[RFC2181_MAXHOSTNAMELEN << 1]; + extern char ThisCache2[RFC2181_MAXHOSTNAMELEN << 1]; extern char config_input_line[BUFSIZ]; extern const char *DefaultConfigFile; /* DEFAULT_CONFIG_FILE */ extern const char *cfg_filename; /* NULL */ @@ -112,9 +119,8 @@ extern struct acl_deny_info_list *DenyInfoList; /* NULL */ - extern IPAddress theOutICPAddr; - - extern IPAddress theOutSNMPAddr; +//MOVED:icp_v2.cc extern IPAddress theOutICPAddr; +//MOVED:snmp_core.cc extern IPAddress theOutSNMPAddr; extern struct timeval squid_start; extern int shutting_down; /* 0 */ Index: squid3/src/icp_v2.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/icp_v2.cc,v retrieving revision 1.35.4.1 retrieving revision 1.35.4.2 diff -u -r1.35.4.1 -r1.35.4.2 --- squid3/src/icp_v2.cc 27 Feb 2008 04:28:59 -0000 1.35.4.1 +++ squid3/src/icp_v2.cc 5 Mar 2008 11:13:04 -0000 1.35.4.2 @@ -1,5 +1,5 @@ /* - * $Id: icp_v2.cc,v 1.35.4.1 2008/02/27 04:28:59 amosjeffries Exp $ + * $Id: icp_v2.cc,v 1.35.4.2 2008/03/05 11:13:04 amosjeffries Exp $ * * DEBUG: section 12 Internet Cache Protocol (ICP) * AUTHOR: Duane Wessels @@ -48,6 +48,7 @@ #include "wordlist.h" #include "SquidTime.h" #include "SwapDir.h" +#include "IPAddress.h" /// \ingroup ServerProtocolICPInternal2 static void icpLogIcp(const IPAddress &, log_type, int, const char *, int); @@ -67,6 +68,9 @@ /// \ingroup ServerProtocolICPInternal2 static icpUdpData *IcpQueueTail = NULL; +/// \ingroup ServerProtocolICPInternal2 +IPAddress theOutICPAddr; + /* icp_common_t */ _icp_common_t::_icp_common_t() : opcode(ICP_INVALID), version(0), length(0), reqnum(0), flags(0), pad(0), shostid(0) {} Index: squid3/src/snmp_core.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/snmp_core.cc,v retrieving revision 1.25 retrieving revision 1.25.2.1 diff -u -r1.25 -r1.25.2.1 --- squid3/src/snmp_core.cc 22 Jan 2008 21:50:57 -0000 1.25 +++ squid3/src/snmp_core.cc 5 Mar 2008 11:13:04 -0000 1.25.2.1 @@ -1,6 +1,5 @@ - /* - * $Id: snmp_core.cc,v 1.25 2008/01/22 21:50:57 squidadm Exp $ + * $Id: snmp_core.cc,v 1.25.2.1 2008/03/05 11:13:04 amosjeffries Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Glenn Chisholm @@ -36,10 +35,13 @@ #include "comm.h" #include "cache_snmp.h" #include "ACLChecklist.h" +#include "IPAddress.h" #define SNMP_REQUEST_SIZE 4096 #define MAX_PROTOSTAT 5 +IPAddress theOutSNMPAddr; + typedef struct _mib_tree_entry mib_tree_entry; typedef oid *(instance_Fn) (oid * name, snint * len, mib_tree_entry * current, oid_ParseFn ** Fn); Index: squid3/src/squid.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/squid.h,v retrieving revision 1.43.2.2 retrieving revision 1.43.2.3 diff -u -r1.43.2.2 -r1.43.2.3 --- squid3/src/squid.h 27 Feb 2008 04:29:00 -0000 1.43.2.2 +++ squid3/src/squid.h 5 Mar 2008 11:13:05 -0000 1.43.2.3 @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.43.2.2 2008/02/27 04:29:00 amosjeffries Exp $ + * $Id: squid.h,v 1.43.2.3 2008/03/05 11:13:05 amosjeffries Exp $ * * AUTHOR: Duane Wessels * @@ -301,11 +301,6 @@ SQUIDCEXTERN size_t getpagesize(void); #endif /* _SQUID_MSWIN_ */ -#ifndef BUFSIZ -#define BUFSIZ 4096 /* make reasonable guess */ -#endif - - #ifndef SA_RESTART #define SA_RESTART 0 #endif Index: squid3/src/structs.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/structs.h,v retrieving revision 1.127.2.4 retrieving revision 1.127.2.5 diff -u -r1.127.2.4 -r1.127.2.5 --- squid3/src/structs.h 2 Mar 2008 11:26:58 -0000 1.127.2.4 +++ squid3/src/structs.h 5 Mar 2008 11:13:05 -0000 1.127.2.5 @@ -1,5 +1,5 @@ /* - * $Id: structs.h,v 1.127.2.4 2008/03/02 11:26:58 amosjeffries Exp $ + * $Id: structs.h,v 1.127.2.5 2008/03/05 11:13:05 amosjeffries Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -29,7 +29,6 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA. * */ - #ifndef SQUID_STRUCTS_H #define SQUID_STRUCTS_H @@ -137,13 +136,10 @@ /* forward decl for SquidConfig, see RemovalPolicy.h */ class RemovalPolicySettings; - - class external_acl; - class Store; -struct _SquidConfig +struct SquidConfig { struct @@ -696,9 +692,10 @@ char *accept_filter; }; -struct _SquidConfig2 -{ +SQUIDCEXTERN SquidConfig Config; +struct SquidConfig2 +{ struct { int enable_purge; @@ -710,6 +707,8 @@ gid_t effectiveGroupID; }; +SQUIDCEXTERN SquidConfig2 Config2; + struct _close_handler { PF *handler; Index: squid3/src/typedefs.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/typedefs.h,v retrieving revision 1.47.4.5 retrieving revision 1.47.4.6 diff -u -r1.47.4.5 -r1.47.4.6 --- squid3/src/typedefs.h 2 Mar 2008 11:26:58 -0000 1.47.4.5 +++ squid3/src/typedefs.h 5 Mar 2008 11:13:05 -0000 1.47.4.6 @@ -1,5 +1,5 @@ /* - * $Id: typedefs.h,v 1.47.4.5 2008/03/02 11:26:58 amosjeffries Exp $ + * $Id: typedefs.h,v 1.47.4.6 2008/03/05 11:13:05 amosjeffries Exp $ * * SQUID Web Proxy Cache http://www.squid-cache.org/ * ---------------------------------------------------------- @@ -79,9 +79,8 @@ struct http_port_list; struct https_port_list; -typedef struct _SquidConfig SquidConfig; - -typedef struct _SquidConfig2 SquidConfig2; +//UNUSED typedef struct _SquidConfig SquidConfig; +//UNUSED typedef struct _SquidConfig2 SquidConfig2; typedef struct _close_handler close_handler;