From: Amos Jeffries Date: Fri, 9 Jan 2009 13:12:24 +0000 (+1300) Subject: Fix all build errors non-ZPH builds X-Git-Tag: SQUID_3_2_0_1~1269^2~2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9fb4efaddb17cd82a7f4605cfdcc7730760dacd7;p=thirdparty%2Fsquid.git Fix all build errors non-ZPH builds --- diff --git a/Makefile.am b/Makefile.am index ff3a26b936..f90fc200bb 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,11 +1,9 @@ ## Process this file with automake to produce Makefile.in # -# $Id: Makefile.am,v 1.27 2006/05/11 01:36:57 hno Exp $ -# AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 foreign DIST_SUBDIRS = lib snmplib scripts src icons errors contrib doc helpers test-suite tools -SUBDIRS = lib @makesnmplib@ scripts src icons errors doc helpers test-suite tools +SUBDIRS = lib @makesnmplib@ scripts src/ip src icons errors doc helpers test-suite tools DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]* DEFAULT_PINGER = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'` diff --git a/src/ACLIP.cc b/src/ACLIP.cc index 6ce3f27c08..0e44e903cb 100644 --- a/src/ACLIP.cc +++ b/src/ACLIP.cc @@ -462,4 +462,4 @@ ACLIP::match(IpAddress &clientip) acl_ip_data::acl_ip_data () :addr1(), addr2(), mask(), next (NULL) {} -acl_ip_data::acl_ip_data (IpAddress const &anAddress1, IpAddress const &anAddress2, IPAddress const &aMask, acl_ip_data *aNext) : addr1(anAddress1), addr2(anAddress2), mask(aMask), next(aNext) {} +acl_ip_data::acl_ip_data (IpAddress const &anAddress1, IpAddress const &anAddress2, IpAddress const &aMask, acl_ip_data *aNext) : addr1(anAddress1), addr2(anAddress2), mask(aMask), next(aNext) {} diff --git a/src/ACLIP.h b/src/ACLIP.h index a0fc76260f..74f8975757 100644 --- a/src/ACLIP.h +++ b/src/ACLIP.h @@ -47,7 +47,7 @@ public: acl_ip_data (); - acl_ip_data (IpAddress const &, IpAddress const &, IPAddress const &, acl_ip_data *); + acl_ip_data (IpAddress const &, IpAddress const &, IpAddress const &, acl_ip_data *); void toStr(char *buf, int len) const; IpAddress addr1; diff --git a/src/Makefile.am b/src/Makefile.am index 1bc4044d29..9e16c4ebb2 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,8 +1,6 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.201 2008/02/26 00:19:29 rousskov Exp $ -# # Uncomment and customize the following to suit your needs: # @@ -247,11 +245,18 @@ cf_gen_SOURCES = \ cf_gen.cc \ defines.h \ debug.cc \ - ip/stubQosConfig.cc \ time.cc nodist_cf_gen_SOURCES = globals.cc nodist_cf_gen_HEADER = cf_gen_defines.h +cf_gen_LDADD= \ + libsquid.la \ + libauth.la \ + ip/libip.la \ + -L../lib -lmiscutil \ + @XTRA_LIBS@ \ + @EPOLL_LIBS@ \ + @MINGW_LIBS@ cf_gen.$(OBJEXT): cf_gen_defines.h all_FSMODULES = \ @@ -747,8 +752,8 @@ recv_announce_SOURCES = recv-announce.cc SquidNew.cc ## client_db wants SNMP_SOURCE ## snmp_core wants ACLStringData ## SwapDir wants ConfigOption -## tools.cc wants libip.la -## client_side.cc wants libip.la +## tools.cc wants ip/libip.la +## client_side.cc wants ip/libip.la ufsdump_SOURCES = \ debug.cc \ int.cc \ @@ -958,7 +963,7 @@ sysconf_DATA = \ data_DATA = \ mib.txt -LDADD = libsquid.la libauth.la -L../lib -lmiscutil @XTRA_LIBS@ @EPOLL_LIBS@ @MINGW_LIBS@ +LDADD = libsquid.la libauth.la ip/libip.la -L../lib -lmiscutil @XTRA_LIBS@ @EPOLL_LIBS@ @MINGW_LIBS@ EXTRA_DIST = \ cf_gen_defines \ @@ -1217,7 +1222,6 @@ tests_testAuth_SOURCES = \ tests/stub_store.cc HttpHeaderTools.cc HttpHeader.cc acl.cc mem.cc \ MemBuf.cc HttpHdrContRange.cc Packer.cc ACLChecklist.cc HttpHdrCc.cc HttpHdrSc.cc \ HttpHdrScTarget.cc url.cc ACLProxyAuth.cc ACLRegexData.cc ACLUserData.cc \ - ip/stubQosConfig.cc \ StatHist.cc HttpHdrRange.cc ETag.cc tests/stub_errorpage.cc \ tests/stub_HttpRequest.cc tests/stub_DelayId.cc \ tests/stub_MemObject.cc mem_node.cc \ @@ -1243,6 +1247,7 @@ nodist_tests_testAuth_SOURCES = \ tests_testAuth_LDADD= \ libsquid.la \ libauth.la \ + ip/libip.la \ @AUTH_LINKOBJS@ @AUTH_OBJS@ \ -L../lib -lmiscutil \ @REGEXLIB@ \ @@ -1294,7 +1299,6 @@ tests_testACLMaxUserIP_SOURCES= \ mem_node.cc \ Packer.cc \ Parsing.cc \ - ip/stubQosConfig.cc \ StatHist.cc \ stmem.cc \ String.cc \ @@ -1317,6 +1321,7 @@ nodist_tests_testACLMaxUserIP_SOURCES= \ tests_testACLMaxUserIP_LDADD= \ libsquid.la \ libauth.la \ + ip/libip.la \ -L../lib -lmiscutil \ @REGEXLIB@ \ @SQUID_CPPUNIT_LIBS@ \ @@ -1506,6 +1511,7 @@ tests_testDiskIO_SOURCES = \ nodist_tests_testDiskIO_SOURCES= \ $(SWAP_TEST_GEN_SOURCES) tests_testDiskIO_LDADD = \ + ip/libip.la \ @DISK_LIBS@ \ $(SWAP_TEST_LDADD) \ SquidConfig.o @@ -2215,6 +2221,7 @@ nodist_tests_testStore_SOURCES= \ tests_testStore_LDADD= \ libsquid.la \ libauth.la \ + ip/libip.la \ -L../lib -lmiscutil \ @REGEXLIB@ \ @SQUID_CPPUNIT_LIBS@ \ @@ -2227,7 +2234,6 @@ tests_testStore_DEPENDENCIES = $(top_builddir)/lib/libmiscutil.a \ # libsquid pulls in SquidConfig and children. stub them. tests_testString_SOURCES = \ mem.cc \ - ip/stubQosConfig.cc \ String.cc \ tests/testMain.cc \ tests/testString.cc \ @@ -2238,6 +2244,7 @@ nodist_tests_testString_SOURCES = \ $(TESTSOURCES) tests_testString_LDADD = \ libsquid.la \ + ip/libip.la \ -L../lib -lmiscutil \ @REGEXLIB@ \ @SQUID_CPPUNIT_LIBS@ \ @@ -2309,6 +2316,7 @@ nodist_tests_testUfs_SOURCES = \ $(SWAP_TEST_GEN_SOURCES) tests_testUfs_LDADD = \ libsquid.la \ + ip/libip.la \ $(SWAP_TEST_LDADD) \ @SSLLIB@ tests_testUfs_LDFLAGS = $(LIBADD_DL) diff --git a/src/SquidTime.h b/src/SquidTime.h index 21dbe11c4b..b9a3d43f40 100644 --- a/src/SquidTime.h +++ b/src/SquidTime.h @@ -1,6 +1,4 @@ /* - * $Id: SquidTime.h,v 1.4 2007/12/14 23:11:45 amosjeffries Exp $ - * * DEBUG: section 21 Time Functions * AUTHOR: Harvest Derived * @@ -34,7 +32,15 @@ #ifndef SQUID_TIME_H #define SQUID_TIME_H -#include "squid.h" +#include "config.h" + +#if HAVE_TIME_H +#include +#endif +#if HAVE_SYS_TIME_H +#include +#endif + /* globals for accessing time */ extern struct timeval current_time; diff --git a/src/cf.data.depend b/src/cf.data.depend index 6a459ccb77..bb2754d77e 100644 --- a/src/cf.data.depend +++ b/src/cf.data.depend @@ -42,7 +42,7 @@ QosConfig refreshpattern removalpolicy size_t -IPAddress_list +IpAddress_list string string time_t diff --git a/src/cf.data.pre b/src/cf.data.pre index 9777ca777b..16ecdf8014 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -4024,7 +4024,7 @@ DOC_START DOC_END NAME: wccp2_router -TYPE: IPAddress_list +TYPE: IpAddress_list LOC: Config.Wccp2.router DEFAULT: none IFDEF: USE_WCCPv2 diff --git a/src/cf_gen.cc b/src/cf_gen.cc index 587f7c74a7..d3a991321c 100644 --- a/src/cf_gen.cc +++ b/src/cf_gen.cc @@ -1,7 +1,4 @@ - /* - * $Id: cf_gen.cc,v 1.62 2007/09/17 20:21:23 hno Exp $ - * * DEBUG: none Generate squid.conf.default and cf_parser.h * AUTHOR: Max Okumoto * @@ -48,9 +45,19 @@ * administrator. *****************************************************************************/ -#include "squid.h" -#include "SquidTime.h" +//#include "squid.h" +#include "config.h" +#include "assert.h" +//#include "SquidTime.h" #include "cf_gen_defines.h" +#include "util.h" + +#if HAVE_STRING_H +#include +#endif +#if HAVE_STRING_H +#include +#endif #define MAX_LINE 1024 /* longest configuration line */ #define _PATH_PARSER "cf_parser.h" diff --git a/src/ip/IpAddress.cc b/src/ip/IpAddress.cc index 5477e6a58d..f9f3a17449 100644 --- a/src/ip/IpAddress.cc +++ b/src/ip/IpAddress.cc @@ -466,7 +466,7 @@ bool IpAddress::GetReverseString(char buf[MAX_IPSTRLEN], int show_type) const return false; } -IpAddress& IpAddress::operator =(const IPAddress &s) +IpAddress& IpAddress::operator =(const IpAddress &s) { memcpy(this, &s, sizeof(IpAddress)); return *this; @@ -642,19 +642,19 @@ IpAddress& IpAddress::operator =(struct in6_addr const &s) #endif -IpAddress::IpAddress(const IPAddress &s) +IpAddress::IpAddress(const IpAddress &s) { SetEmpty(); operator=(s); } -IpAddress::IpAddress(IPAddress *s) +IpAddress::IpAddress(IpAddress *s) { SetEmpty(); operator=(s); } -IpAddress& IpAddress::operator =(IPAddress *s) +IpAddress& IpAddress::operator =(IpAddress *s) { IpAddress *tmp = NULL; if (!s) return *this; diff --git a/src/ip/IpIntercept.cc b/src/ip/IpIntercept.cc index c37f74491a..8120c4ff11 100644 --- a/src/ip/IpIntercept.cc +++ b/src/ip/IpIntercept.cc @@ -196,7 +196,7 @@ IpIntercept::IpfwInterception(int fd, const IpAddress &me, IpAddress &dst, int s } int -IpIntercept::NatLookup(int fd, const IpAddress &me, const IpAddress &peer, IPAddress &client, IPAddress &dst) +IpIntercept::NatLookup(int fd, const IpAddress &me, const IpAddress &peer, IpAddress &client, IpAddress &dst) { #if IPF_TRANSPARENT /* --enable-ipf-transparent */ client = me; diff --git a/src/ip/IpIntercept.h b/src/ip/IpIntercept.h index fe38eeb650..8e459a27ec 100644 --- a/src/ip/IpIntercept.h +++ b/src/ip/IpIntercept.h @@ -27,7 +27,7 @@ public: ~IpIntercept() {}; /** Perform NAT lookups */ - int NatLookup(int fd, const IpAddress &me, const IpAddress &peer, IPAddress &client, IPAddress &dst); + int NatLookup(int fd, const IpAddress &me, const IpAddress &peer, IpAddress &client, IpAddress &dst); #if LINUX_TPROXY2 // only relevant to TPROXY v2 connections. diff --git a/src/ip/Makefile.am b/src/ip/Makefile.am index 2acb99912f..e36db69f4b 100644 --- a/src/ip/Makefile.am +++ b/src/ip/Makefile.am @@ -47,6 +47,7 @@ nodist_testIpAddress_SOURCES= \ ../tests/testMain.cc testIpAddress_LDADD= \ libip.la \ + -L$(top_builddir)/lib -lmiscutil \ @SQUID_CPPUNIT_LA@ \ @SQUID_CPPUNIT_LIBS@ testIpAddress_LDFLAGS= $(LIBADD_DL) diff --git a/tools/Makefile.am b/tools/Makefile.am index 2fde95afc9..e898cc11c6 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am @@ -1,15 +1,13 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.2 2006/05/11 12:25:39 hno Exp $ -# # Uncomment and customize the following to suit your needs: # AUTOMAKE_OPTIONS = subdir-objects -INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/lib/libTrie/include +INCLUDES = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/lib/libTrie/include -I$(top_srcdir)/src INCLUDES += @SQUID_CPPUNIT_INC@ TESTS=$(check_PROGRAMS) @@ -38,7 +36,7 @@ squidclient_SOURCES = squidclient.cc cachemgr__CGIEXT__SOURCES = cachemgr.cc cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS) -LDADD = -L../lib -lmiscutil $(XTRA_LIBS) +LDADD = ../src/ip/libip.la -L../lib -lmiscutil $(XTRA_LIBS) EXTRA_DIST = \ cachemgr.conf