From: wessels <> Date: Tue, 13 Dec 2005 07:01:02 +0000 (+0000) Subject: I get compile errors on many tests because Squid defines its own assert() X-Git-Tag: SQUID_3_0_PRE4~457 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66c437991066fa6f20b1057332d5fea0a3a3089c;p=thirdparty%2Fsquid.git I get compile errors on many tests because Squid defines its own assert() macro. I find that it works better (ie compiles on FreeBSD) when squid.h is the first include. Then the compiler won't define its own assert macro if Squid gets there first. --- diff --git a/src/tests/testCoss.cc b/src/tests/testCoss.cc index ee49993e12..89a51aa000 100644 --- a/src/tests/testCoss.cc +++ b/src/tests/testCoss.cc @@ -1,8 +1,7 @@ -#include "config.h" +#include "squid.h" #include #include "testCoss.h" -#include "squid.h" #include "Store.h" #include "SwapDir.h" #include "DiskIO/DiskIOModule.h" diff --git a/src/tests/testNull.cc b/src/tests/testNull.cc index 6ec350776b..2fef3fe770 100644 --- a/src/tests/testNull.cc +++ b/src/tests/testNull.cc @@ -1,8 +1,7 @@ -#include "config.h" +#include "squid.h" #include #include "testNull.h" -#include "squid.h" #include "Store.h" #include "SwapDir.h" #include "DiskIO/DiskIOModule.h" diff --git a/src/tests/testStore.cc b/src/tests/testStore.cc index bc78a90086..76ea9736a4 100644 --- a/src/tests/testStore.cc +++ b/src/tests/testStore.cc @@ -1,7 +1,5 @@ -#include "config.h" - -#include "testStore.h" #include "squid.h" +#include "testStore.h" #include "Store.h" CPPUNIT_TEST_SUITE_REGISTRATION( testStore ); diff --git a/src/tests/testStoreController.cc b/src/tests/testStoreController.cc index adf3aa678a..0f99ab8940 100644 --- a/src/tests/testStoreController.cc +++ b/src/tests/testStoreController.cc @@ -1,7 +1,6 @@ -#include "config.h" +#include "squid.h" #include "testStoreController.h" -#include "squid.h" #include "Store.h" #include "SwapDir.h" #include "TestSwapDir.h" diff --git a/src/tests/testStoreHashIndex.cc b/src/tests/testStoreHashIndex.cc index b599cd7dd1..e53fc7609b 100644 --- a/src/tests/testStoreHashIndex.cc +++ b/src/tests/testStoreHashIndex.cc @@ -1,7 +1,6 @@ -#include "config.h" +#include "squid.h" #include "testStoreHashIndex.h" -#include "squid.h" #include "Store.h" #include "SwapDir.h" #include "TestSwapDir.h" diff --git a/src/tests/testUfs.cc b/src/tests/testUfs.cc index adb318a62e..578e3af405 100644 --- a/src/tests/testUfs.cc +++ b/src/tests/testUfs.cc @@ -1,8 +1,7 @@ -#include "config.h" +#include "squid.h" #include #include "testUfs.h" -#include "squid.h" #include "Store.h" #include "SwapDir.h" #include "DiskIO/DiskIOModule.h"