From: Amos Jeffries Date: Thu, 16 Oct 2008 04:55:23 +0000 (+1300) Subject: Shuffle debug_log into Debug.h X-Git-Tag: SQUID_3_2_0_1~1401 X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=f76d2f97f9a5b87d1a22bf3a030d1eed130db2d0;p=thirdparty%2Fsquid.git Shuffle debug_log into Debug.h --- diff --git a/src/Debug.h b/src/Debug.h index 0409dac2f4..61c7b69823 100644 --- a/src/Debug.h +++ b/src/Debug.h @@ -78,6 +78,8 @@ private: static int TheDepth; // level of nested debugging calls }; +extern FILE *debug_log; + /* Debug stream */ #define debugs(SECTION, LEVEL, CONTENT) \ do { \ diff --git a/src/debug.cc b/src/debug.cc index 28bd0d37bc..622036f0d9 100644 --- a/src/debug.cc +++ b/src/debug.cc @@ -40,7 +40,7 @@ int Debug::Levels[MAX_DEBUG_SECTIONS]; int Debug::level; - +FILE *debug_log = NULL; static char *debug_log_file = NULL; static int Ctx_Lock = 0; static const char *debugLogTime(void); diff --git a/src/fd.cc b/src/fd.cc index cc98eb9fec..a14a1b9785 100644 --- a/src/fd.cc +++ b/src/fd.cc @@ -36,6 +36,7 @@ #include "squid.h" #include "fde.h" #include "SquidTime.h" +#include "Debug.h" int default_read_method(int, char *, int); int default_write_method(int, const char *, int); diff --git a/test-suite/test_tools.cc b/test-suite/test_tools.cc index 6e10b651a1..953573b0a3 100644 --- a/test-suite/test_tools.cc +++ b/test-suite/test_tools.cc @@ -10,6 +10,13 @@ #include #include +/* AYJ: the debug stuff here should really be in a stub_debug.cc file for tests to link */ + +/* for correct pre-definitions of debug objects */ +#include "Debug.h" + +FILE *debug_log = NULL; + void xassert(const char *msg, const char *file, int line) {