From: robertc <> Date: Wed, 16 Jul 2003 11:27:17 +0000 (+0000) Subject: Summary: More MSVC compatability tweaks. X-Git-Tag: SQUID_3_0_PRE1~12 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a8d99c600a3e858543f6c38efe7f4dc06c4f16ee;p=thirdparty%2Fsquid.git Summary: More MSVC compatability tweaks. Keywords: More pointer construction to pointer assignment replacements. Add a test case for delete - checking that the correct delete operator is used in a class hierarchy. Partly fix g++ 2.95 builds - there sstream includes the system assert, which breaks our custom assert macro. So, a couple of undefs and we have an ugly fix. --- diff --git a/src/Debug.h b/src/Debug.h index 902c5a11a5..0cc3f1d1b8 100644 --- a/src/Debug.h +++ b/src/Debug.h @@ -1,6 +1,6 @@ /* - * $Id: Debug.h,v 1.5 2003/07/08 23:01:46 robertc Exp $ + * $Id: Debug.h,v 1.6 2003/07/16 05:27:17 robertc Exp $ * * DEBUG: section 0 Debug Routines * AUTHOR: Harvest Derived @@ -37,7 +37,20 @@ #define SQUID_DEBUG #include +#undef assert #include +#if defined assert +#undef assert +#endif +#if PURIFY +#define assert(EX) ((void)0) +#elif defined(NODEBUG) +#define assert(EX) ((void)0) +#elif STDC_HEADERS +#define assert(EX) ((EX)?((void)0):xassert( # EX , __FILE__, __LINE__)) +#else +#define assert(EX) ((EX)?((void)0):xassert("EX", __FILE__, __LINE__)) +#endif class Debug { diff --git a/src/acl.cc b/src/acl.cc index 3757652053..bc04dfcf0e 100644 --- a/src/acl.cc +++ b/src/acl.cc @@ -1,5 +1,5 @@ /* - * $Id: acl.cc,v 1.308 2003/07/14 08:21:56 robertc Exp $ + * $Id: acl.cc,v 1.309 2003/07/16 05:27:17 robertc Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -345,7 +345,7 @@ aclParseAclList(acl_list ** head) * by '!' for negation */ while ((t = strtok(NULL, w_space))) { - acl_list *L (new ACLList); + acl_list *L = new ACLList; if (*t == '!') { L->negated (true); diff --git a/test-suite/Makefile.am b/test-suite/Makefile.am index 0be0a89ec9..ff3cec1583 100644 --- a/test-suite/Makefile.am +++ b/test-suite/Makefile.am @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.am,v 1.15 2003/07/14 15:07:22 robertc Exp $ +# $Id: Makefile.am,v 1.16 2003/07/16 05:27:17 robertc Exp $ # AUTOMAKE_OPTIONS = subdir-objects @@ -25,6 +25,7 @@ endif ## Sort by dependencies - test lowest layers first TESTS = debug \ syntheticoperators \ + VirtualDeleteOperator \ StackTest \ rfc1738 \ refcount\ @@ -46,7 +47,8 @@ check_PROGRAMS= debug \ rfc1738\ splay \ StackTest \ - syntheticoperators + syntheticoperators \ + VirtualDeleteOperator LDADD = -L$(top_builddir)/lib -lmiscutil DEBUG_SOURCE = test_tools.cc @@ -79,6 +81,7 @@ splay_SOURCES = splay.cc StackTest_SOURCES = StackTest.cc $(DEBUG_SOURCE) syntheticoperators_SOURCES = syntheticoperators.cc $(DEBUG_SOURCE) +VirtualDeleteOperator_SOURCES = VirtualDeleteOperator.cc $(DEBUG_SOURCE) rfc1738_SOURCES = rfc1738.cc