]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Shuffled fatal family of functions into own implementation.
authorFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 5 Oct 2012 13:10:15 +0000 (15:10 +0200)
committerFrancesco Chemolli <kinkie@squid-cache.org>
Fri, 5 Oct 2012 13:10:15 +0000 (15:10 +0200)
Created stub for fatal.cc.
Move all files to src/ due to their dependencies.

lib/Makefile.am
src/Makefile.am
src/fatal.cc [moved from lib/fatal.cc with 100% similarity]
src/fatal.h [moved from include/fatal.h with 100% similarity]
src/tests/stub_fatal.cc [new file with mode: 0644]
src/tests/stub_tools.cc
test-suite/Makefile.am

index a0a9840e715782ce1d9b0febed2de7020ed99f8c..913013879983960b8172f6720c0ad3c1cb18f090 100644 (file)
@@ -69,8 +69,7 @@ libmiscutil_la_SOURCES = \
        Splay.cc \
        stub_memaccount.c \
        util.c \
-       xusleep.c \
-       fatal.cc
+       xusleep.c
 
 # $(top_srcdir)/include/version.h should be a dependency
 libsspwin32_la_SOURCES = \
index 926a931929206786f6b2158fecba90e6d43db630..935d2c9ca6a9073c4b20f9963bdd2b39d5843c17 100644 (file)
@@ -342,6 +342,8 @@ squid_SOURCES = \
        ExternalACLEntry.h \
        FadingCounter.h \
        FadingCounter.cc \
+       fatal.h \
+       fatal.cc \
        fd.h \
        fd.cc \
        fde.cc \
@@ -1116,6 +1118,8 @@ tests_testHttpReply_SOURCES=\
        cbdata.cc \
        cbdata.h \
        ETag.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        HttpBody.h \
        HttpBody.cc \
        HttpHeaderFieldStat.h \
@@ -1217,6 +1221,8 @@ tests_testACLMaxUserIP_SOURCES= \
        DiskIO/WriteRequest.cc \
        ETag.cc \
        event.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        FileMap.h \
        filemap.cc \
        HelperChildConfig.h \
@@ -1423,6 +1429,8 @@ tests_testCacheManager_SOURCES = \
        event.cc \
        external_acl.cc \
        ExternalACLEntry.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        fd.h \
        fd.cc \
        fde.cc \
@@ -1616,6 +1624,8 @@ tests_testDiskIO_SOURCES = \
        ETag.cc \
        EventLoop.cc \
        event.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        fd.h \
        fd.cc \
        FileMap.h \
@@ -1821,6 +1831,8 @@ tests_testEvent_SOURCES = \
        external_acl.cc \
        ExternalACLEntry.cc \
        FadingCounter.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        fd.h \
        fd.cc \
        fde.cc \
@@ -2061,6 +2073,8 @@ tests_testEventLoop_SOURCES = \
        external_acl.cc \
        ExternalACLEntry.cc \
        FadingCounter.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        fd.h \
        fd.cc \
        fde.cc \
@@ -2298,6 +2312,8 @@ tests_test_http_range_SOURCES = \
        external_acl.cc \
        ExternalACLEntry.cc \
        FadingCounter.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        fd.h \
        fd.cc \
        fde.cc \
@@ -2586,6 +2602,8 @@ tests_testHttpRequest_SOURCES = \
        ETag.cc \
        external_acl.cc \
        ExternalACLEntry.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        fd.h \
        fd.cc \
        fde.cc \
@@ -2775,6 +2793,8 @@ tests_testStore_SOURCES= \
        ETag.cc \
        event.cc \
        EventLoop.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        FileMap.h \
        filemap.cc \
        HttpHeaderFieldStat.h \
@@ -3001,6 +3021,8 @@ tests_testUfs_SOURCES = \
        store_rebuild.h \
        tests/stub_store_rebuild.cc \
        tests/stub_store_stats.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        fd.h \
        fd.cc \
        client_db.h \
@@ -3162,6 +3184,8 @@ tests_testRock_SOURCES = \
        ETag.cc \
        EventLoop.cc \
        event.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        fd.h \
        fd.cc \
        FileMap.h \
@@ -3320,6 +3344,8 @@ tests_testCoss_SOURCES = \
        store_rebuild.h \
        tests/stub_store_rebuild.cc \
        tests/stub_store_stats.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        fd.h \
        fd.cc \
        disk.h \
@@ -3655,6 +3681,8 @@ tests_testURL_SOURCES = \
        event.cc \
        external_acl.cc \
        ExternalACLEntry.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        fd.h \
        fd.cc \
        fde.cc \
@@ -3856,6 +3884,8 @@ tests_testConfigParser_SOURCES = \
        MemBuf.cc \
        String.cc \
        ConfigParser.cc \
+       fatal.h \
+       tests/stub_fatal.cc \
        tests/testMain.cc \
        tests/testConfigParser.cc \
        tests/testConfigParser.h \
similarity index 100%
rename from lib/fatal.cc
rename to src/fatal.cc
similarity index 100%
rename from include/fatal.h
rename to src/fatal.h
diff --git a/src/tests/stub_fatal.cc b/src/tests/stub_fatal.cc
new file mode 100644 (file)
index 0000000..89241cc
--- /dev/null
@@ -0,0 +1,39 @@
+/*
+ * SQUID Web Proxy Cache          http://www.squid-cache.org/
+ * ----------------------------------------------------------
+ *
+ *  Squid is the result of efforts by numerous individuals from
+ *  the Internet community; see the CONTRIBUTORS file for full
+ *  details.   Many organizations have provided support for Squid's
+ *  development; see the SPONSORS file for full details.  Squid is
+ *  Copyrighted (C) 2001 by the Regents of the University of
+ *  California; see the COPYRIGHT file for full details.  Squid
+ *  incorporates software developed and/or copyrighted by other
+ *  sources; see the CREDITS file for full details.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
+ *
+ */
+
+#include "squid.h"
+
+#define STUB_API "fatal.cc"
+#include "tests/STUB.h"
+
+void fatal(const char *message) STUB
+void fatal_common(const char *message) STUB
+void fatalf(const char *fmt,...) STUB
+void fatalvf(const char *fmt, va_list args) STUB
+void fatal_dump(const char *message) STUB
index 2c3e1a312db2ab1963e458f7148f6ea271be08e2..4c0af9d0382b9010e263680cdca050c28e1c7f39 100644 (file)
@@ -17,11 +17,6 @@ void PrintRusage(void) STUB
 void death(int sig) STUB
 void BroadcastSignalIfAny(int& sig) STUB
 void sigusr2_handle(int sig) STUB
-void fatal(const char *message) STUB
-void fatal_common(const char *message) STUB
-void fatalf(const char *fmt,...) STUB
-void fatalvf(const char *fmt, va_list args) STUB
-void fatal_dump(const char *message) STUB
 void debug_trap(const char *message) STUB
 void sig_child(int sig) STUB
 void sig_shutdown(int sig) STUB
index e47b659e2c2e2d5ac5dadbca3b0daaacd5f1c51d..5818f3502b11be35a6ec9d59e83c4c6a3b5ec319 100644 (file)
@@ -53,7 +53,7 @@ check_PROGRAMS += debug \
 tcp_banger2_LDADD = $(top_builddir)/lib/libmiscutil.la
 
 
-DEBUG_SOURCE = test_tools.cc stub_debug.cc stub_tools.cc
+DEBUG_SOURCE = test_tools.cc stub_debug.cc stub_tools.cc stub_fatal.cc
 
 stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc
        cp $(top_srcdir)/src/tests/stub_debug.cc .
@@ -61,7 +61,10 @@ stub_debug.cc: $(top_srcdir)/src/tests/stub_debug.cc
 stub_tools.cc: $(top_srcdir)/src/tests/stub_tools.cc
        cp $(top_srcdir)/src/tests/stub_tools.cc .
 
-CLEANFILES += stub_debug.cc stub_tools.cc
+stub_fatal.cc: $(top_srcdir)/src/tests/stub_fatal.cc
+       cp $(top_srcdir)/src/tests/stub_fatal.cc .
+
+CLEANFILES += stub_debug.cc stub_tools.cc stub_fatal.cc
 
 ## XXX: somewhat broken. Its meant to test our debugs() implementation.
 ## but it has never been linked to the actual src/debug.cc implementation !!