]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: More MSVC compatability tweaks.
authorrobertc <>
Wed, 16 Jul 2003 11:27:17 +0000 (11:27 +0000)
committerrobertc <>
Wed, 16 Jul 2003 11:27:17 +0000 (11:27 +0000)
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.

src/Debug.h
src/acl.cc
test-suite/Makefile.am

index 902c5a11a561041b003fe127c244b7e00ef4dbf6..0cc3f1d1b8d643b8040e5efa558c4ed286de49ff 100644 (file)
@@ -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
 #define SQUID_DEBUG
 
 #include <iostream>
+#undef assert
 #include <sstream>
+#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
 {
index 3757652053d920d8c193588ee0b8aecc0a71a7e4..bc04dfcf0e6de7616884aabac459e369d7bae9d9 100644 (file)
@@ -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);
index 0be0a89ec9115069a65e492aa0acb554d4a6f2f9..ff3cec15834a6506819c15ce83314ceafec79beb 100644 (file)
@@ -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