From: serassio <> Date: Sun, 10 Feb 2008 17:43:09 +0000 (+0000) Subject: Windows port: fix Visual Studio build problems when ESI, Delay Pools and SSL support... X-Git-Tag: SQUID_3_0_STABLE2~66 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10a17736f55cb613fdee5ae9c3a2d663b7c87700;p=thirdparty%2Fsquid.git Windows port: fix Visual Studio build problems when ESI, Delay Pools and SSL support are not enabled MS Visual Studio Projects are monolithic, so we need some #if/#ifdef to exclude the not needed code at build time. --- diff --git a/src/ACLCertificate.cc b/src/ACLCertificate.cc index cb9a893561..9e0ba65b23 100644 --- a/src/ACLCertificate.cc +++ b/src/ACLCertificate.cc @@ -1,5 +1,5 @@ /* - * $Id: ACLCertificate.cc,v 1.2 2003/03/04 01:40:25 robertc Exp $ + * $Id: ACLCertificate.cc,v 1.2.4.1 2008/02/10 10:43:09 serassio Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -35,6 +35,12 @@ */ #include "squid.h" + +/* MS Visual Studio Projects are monolithic, so we need the following + * #if to exclude the SSL code from compile process when not needed. + */ +#if USE_SSL + #include "ACLCertificate.h" #include "ACLChecklist.h" #include "ACLCertificateData.h" @@ -60,3 +66,5 @@ ACLCertificateStrategy::Instance() } ACLCertificateStrategy ACLCertificateStrategy::Instance_; + +#endif /* USE_SSL */ diff --git a/src/DelayId.cc b/src/DelayId.cc index 85e2fea3d9..94541d4e98 100644 --- a/src/DelayId.cc +++ b/src/DelayId.cc @@ -1,6 +1,6 @@ /* - * $Id: DelayId.cc,v 1.23 2007/09/21 11:41:52 amosjeffries Exp $ + * $Id: DelayId.cc,v 1.23.2.1 2008/02/10 10:43:09 serassio Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: Robert Collins @@ -39,9 +39,11 @@ #include "config.h" -#if !DELAY_POOLS -#error DELAY_POOLS not enabled -#endif +/* MS Visual Studio Projects are monolithic, so we need the following + * #if to exclude the delay pools code from compile process when not needed. + */ +#if DELAY_POOLS + #include "squid.h" #include "DelayId.h" #include "client_side_request.h" @@ -187,3 +189,5 @@ DelayId::delayRead(DeferredRead const &aRead) compositeId->delayRead(aRead); } + +#endif /* DELAY_POOLS */ diff --git a/src/ESI.cc b/src/ESI.cc index 6bfbd70732..bbefa3232d 100644 --- a/src/ESI.cc +++ b/src/ESI.cc @@ -1,6 +1,6 @@ /* - * $Id: ESI.cc,v 1.26 2007/08/27 12:50:42 hno Exp $ + * $Id: ESI.cc,v 1.26.2.1 2008/02/10 10:43:09 serassio Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -35,6 +35,12 @@ */ #include "squid.h" + +/* MS Visual Studio Projects are monolithic, so we need the following + * #if to exclude the ESI code from compile process when not needed. + */ +#if (USE_SQUID_ESI == 1) + #include "ESI.h" #include "clientStream.h" #include "client_side_request.h" @@ -2459,4 +2465,4 @@ esiEnableProcessing (HttpReply *rep) return rv; } - +#endif /* USE_SQUID_ESI == 1 */ diff --git a/src/ESIAssign.cc b/src/ESIAssign.cc index dbf04abd46..ce69369229 100644 --- a/src/ESIAssign.cc +++ b/src/ESIAssign.cc @@ -1,6 +1,6 @@ /* - * $Id: ESIAssign.cc,v 1.6 2007/05/29 13:31:37 amosjeffries Exp $ + * $Id: ESIAssign.cc,v 1.6.4.1 2008/02/10 10:43:09 serassio Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -34,6 +34,12 @@ */ #include "squid.h" + +/* MS Visual Studio Projects are monolithic, so we need the following + * #if to exclude the ESI code from compile process when not needed. + */ +#if (USE_SQUID_ESI == 1) + #include "ESIAssign.h" #include "ESIContext.h" #include "ESISequence.h" @@ -190,3 +196,5 @@ ESIVariableExpression::eval (ESIVarState &state, char const *subref, char const /* XXX: Implement evaluation of the expression */ ESISegment::ListAppend (state.getOutput(), expression.buf(), expression.size()); } + +#endif /* USE_SQUID_ESI == 1 */ diff --git a/src/ESIContext.cc b/src/ESIContext.cc index 8bd35a5dfe..e9aabcacaa 100644 --- a/src/ESIContext.cc +++ b/src/ESIContext.cc @@ -1,6 +1,6 @@ /* - * $Id: ESIContext.cc,v 1.3 2007/04/28 22:26:37 hno Exp $ + * $Id: ESIContext.cc,v 1.3.4.1 2008/02/10 10:43:09 serassio Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -34,6 +34,12 @@ */ #include "squid.h" + +/* MS Visual Studio Projects are monolithic, so we need the following + * #if to exclude the ESI code from compile process when not needed. + */ +#if (USE_SQUID_ESI == 1) + #include "ESIContext.h" #include "Store.h" #include "client_side_request.h" @@ -106,3 +112,5 @@ ESIContext::setErrorMessage(char const *anError) if (!errormessage) errormessage = xstrdup (anError); } + +#endif /* USE_SQUID_ESI == 1 */ diff --git a/src/ESIInclude.cc b/src/ESIInclude.cc index e31baa0d42..7e6bb5c529 100644 --- a/src/ESIInclude.cc +++ b/src/ESIInclude.cc @@ -1,6 +1,6 @@ /* - * $Id: ESIInclude.cc,v 1.14 2007/08/27 12:50:42 hno Exp $ + * $Id: ESIInclude.cc,v 1.14.2.1 2008/02/10 10:43:09 serassio Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -35,6 +35,12 @@ */ #include "squid.h" + +/* MS Visual Studio Projects are monolithic, so we need the following + * #if to exclude the ESI code from compile process when not needed. + */ +#if (USE_SQUID_ESI == 1) + #include "ESIInclude.h" #include "ESIVarState.h" #include "client_side_request.h" @@ -591,3 +597,4 @@ ESIInclude::subRequestDone (ESIStreamContext::Pointer stream, bool success) } } +#endif /* USE_SQUID_ESI == 1 */ diff --git a/src/ESISequence.cc b/src/ESISequence.cc index 3f2222827b..466f6e96b1 100644 --- a/src/ESISequence.cc +++ b/src/ESISequence.cc @@ -1,5 +1,5 @@ /* - * $Id: ESISequence.cc,v 1.6 2007/04/28 22:26:37 hno Exp $ + * $Id: ESISequence.cc,v 1.6.4.1 2008/02/10 10:43:09 serassio Exp $ * * DEBUG: section 86 ESI processing * AUTHOR: Robert Collins @@ -34,6 +34,12 @@ */ #include "squid.h" + +/* MS Visual Studio Projects are monolithic, so we need the following + * #if to exclude the ESI code from compile process when not needed. + */ +#if (USE_SQUID_ESI == 1) + #include "ESISequence.h" #include "ESILiteral.h" #include "ESIAttempt.h" @@ -392,3 +398,4 @@ esiSequence::makeUsable(esiTreeParentPtr newParent, ESIVarState &newVarState) co return result; } +#endif /* USE_SQUID_ESI == 1 */ diff --git a/src/dns_internal.cc b/src/dns_internal.cc index f927147477..771f1e5619 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.101 2007/06/23 21:08:39 hno Exp $ + * $Id: dns_internal.cc,v 1.101.4.1 2008/02/10 10:43:09 serassio Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -51,7 +51,7 @@ #include #endif -/* MS VisualStudio Projects are monolithic, so we need the following +/* MS Visual Studio Projects are monolithic, so we need the following #ifndef to exclude the internal DNS code from compile process when using external DNS process. */ diff --git a/src/ssl_support.cc b/src/ssl_support.cc index 3267df06a5..462f04e4bd 100644 --- a/src/ssl_support.cc +++ b/src/ssl_support.cc @@ -1,6 +1,6 @@ /* - * $Id: ssl_support.cc,v 1.35 2007/04/28 22:26:37 hno Exp $ + * $Id: ssl_support.cc,v 1.35.4.1 2008/02/10 10:43:09 serassio Exp $ * * AUTHOR: Benno Rice * DEBUG: section 83 SSL accelerator support @@ -34,6 +34,12 @@ */ #include "squid.h" + +/* MS Visual Studio Projects are monolithic, so we need the following + * #if to exclude the SSL code from compile process when not needed. + */ +#if USE_SSL + #include "fde.h" static int @@ -1058,3 +1064,5 @@ sslGetUserCertificateChainPEM(SSL *ssl) return str; } + +#endif /* USE_SSL */