]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Remove duplicate assert.h, and bad includes of compat/* headers.
authorAmos Jeffries <squid3@treenet.co.nz>
Wed, 18 Feb 2009 00:18:43 +0000 (13:18 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Wed, 18 Feb 2009 00:18:43 +0000 (13:18 +1300)
18 files changed:
compat/GnuRegex.c
compat/Makefile.am
compat/assert.cc [moved from lib/assert.c with 94% similarity]
include/Array.h
include/MemPool.h
include/assert.h [deleted file]
lib/Makefile.am
lib/rfc1123.c
src/AuthUser.cci
src/String.cci
src/acl.cc
src/cf_gen.cc
src/eCAP/ServiceRep.cc
src/eCAP/XactionRep.cc
src/squid.h
test-suite/Makefile.am
tools/Makefile.am
tools/cachemgr.cc

index 4018e1716d78ac35d931d5ef718db246a353ca95..b5ba9eb6b544c4c0c490b4ed4b14fc9423d9c98f 100644 (file)
@@ -104,9 +104,8 @@ init_syntax_once(void)
 
 #define SYNTAX(c) re_syntax_table[c]
 
-\f
 /* Get the interface, including the syntax bits.  */
-#include "GnuRegex.h"
+#include "compat/GnuRegex.h"
 
 /* Compile a fastmap for the compiled pattern in BUFFER; used to
  * accelerate searches.  Return 0 if successful and -2 if was an
index 10150cf5a6fb68292def5c69dae4177861528b59..3336941c8886519c22703b9efcaeddd55c2b7fae 100644 (file)
@@ -25,11 +25,12 @@ $(OBJS): $(top_srcdir)/include/version.h $(top_srcdir)/include/autoconf.h
 noinst_LTLIBRARIES = libcompat.la
 
 libcompat_la_SOURCES = \
+       assert.h \
        compat.h \
-       osdetect.h \
        compat_shared.h \
        fdsetsize.h \
        gnuregex.h \
+       osdetect.h \
        stdvarargs.h \
        valgrind.h \
        \
@@ -46,6 +47,7 @@ libcompat_la_SOURCES = \
        os/sunos.h \
        os/windows.h \
        \
+       assert.cc \
        compat.cc \
        GnuRegex.c
 
similarity index 94%
rename from lib/assert.c
rename to compat/assert.cc
index 229dbd46c618727457c41f7e9ebaae19032574a8..b1e06e331533a6c396363df3e50e29915e637e0a 100644 (file)
@@ -1,4 +1,3 @@
-
 /*
  * $Id$
  *
 
 #include "config.h"
 
+#if HAVE_STDIO_H
 #include <stdio.h>
+#endif
+#if HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
 
-#include "assert.h"
+#if 0
+#include "compat/assert.h"
+#endif
 
 void xassert(const char *expr, const char *file, int line)
 {
index f687e4c206cf7fdf64d6ad26908feb8be10fd6a8..052545d92ed5bb97f6f930572bb67e13a8824e4e 100644 (file)
@@ -41,7 +41,7 @@
 #include "util.h"
 
 /* users of this template also need assert() */
-#include "assert.h"
+#include "compat/assert.h"
 
 /* iterator support */
 
index 95b773b9c88a74460396b3a5e2fae69dd472519c..4abd92dac66760db247c473b60bfad1a119503de 100644 (file)
@@ -21,7 +21,6 @@
  */
 
 #include "config.h"
-#include "assert.h"
 #include "util.h"
 
 #include "memMeter.h"
diff --git a/include/assert.h b/include/assert.h
deleted file mode 100644 (file)
index 651bf7c..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-/*
- * $Id$
- *
- * AUTHOR: Duane Wessels
- *
- * 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.
- *
- */
-#ifndef SQUID_ASSERT_H
-#define SQUID_ASSERT_H
-
-#include "config.h"
-
-#if 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
-SQUIDCEXTERN void xassert(const char *, const char *, int);
-
-#endif
index d11bc80367b42331dba1fd2fc07d1d5e6c5af467..46525be49c57ded4f831a1b3ec57817ea85118f5 100644 (file)
@@ -89,7 +89,6 @@ libmiscutil_a_SOURCES = \
        stub_memaccount.c \
        util.c \
        uudecode.c \
-       assert.c \
        xusleep.c \
        $(XPROF_STATS_SOURCE) \
        $(WIN32SRC)
@@ -135,7 +134,7 @@ tests_testAll_SOURCES= \
        tests/testMain.cc \
        $(XPROF_STATS_SOURCE) \
        $(WIN32SRC) \
-       util.c assert.c
+       util.c
 
 tests_testAll_LDADD= @SQUID_CPPUNIT_LA@ @SQUID_CPPUNIT_LIBS@
 
index 074b9e83d849c5b6af5d115fda8beee0b197e9c0..5797646f9caf0fe183e155b769787b76be6565e2 100644 (file)
@@ -61,7 +61,6 @@
 #if HAVE_SYS_TIME_H
 #include <sys/time.h>
 #endif
-#include "assert.h"
 
 #include "util.h"
 
index 497f99577511b288672da0238276186888fdcfc9..38ce96511f8966960785bb752671a87aa0903d26 100644 (file)
@@ -33,8 +33,8 @@
  * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
  */
 
-/* for assert() */
-#include "assert.h"
+#include "config.h"
+
 /* for xstrdup() */
 #include "util.h"
 /* for safe_free() */
index bd97323d99f35c7e7a932e354b54a2f9dd0ead18..11dbd62cf396487c1d41e473df660a302f6584d2 100644 (file)
@@ -32,7 +32,7 @@
  *
  */
 
-#include "assert.h"
+#include "config.h"
 #include <cstring>
 
 String::String() : size_(0), len_(0), buf_ (NULL)
index b848363dec960338d2e4e2673071e9c038b306b0..2dda02b1b2e212e0c9569dc17a9e6edbaaad77a7 100644 (file)
  */
 #include "config.h"
 
-#if 0
-#include "squid.h"
-#include "HttpRequest.h"
-#endif
-
 #include "ACL.h"
 #include "ACLChecklist.h"
 #include "ConfigParser.h"
 #include "dlink.h"
 /* for special-case PURGE test */
 #include "HttpRequestMethod.h"
-/* for Vector<> Instances */
-#include "assert.h"
 
 const char *AclMatchedName = NULL;
 
index d3a991321ce0345ac1c39cbca966325f62f84c3f..0180906a27d2de97ea37de467bf79542f7e9c5d9 100644 (file)
@@ -47,7 +47,6 @@
 
 //#include "squid.h"
 #include "config.h"
-#include "assert.h"
 //#include "SquidTime.h"
 #include "cf_gen_defines.h"
 #include "util.h"
index 91f3b946477b0b5cc87f4ea5c2a46e731865e202..5440e0008ba688e48fc5d58e54b5fbde3b1e39fd 100644 (file)
@@ -1,7 +1,6 @@
 #include "squid.h"
 #include <libecap/adapter/service.h>
 #include "TextException.h"
-#include "assert.h"
 #include "eCAP/ServiceRep.h"
 #include "eCAP/XactionRep.h"
 
index fa106cdf21346f18d567778b008f084c9e3dabcf..e1eb8216b9158c553a080d13bc98066ef21eaa56 100644 (file)
@@ -3,7 +3,6 @@
 #include <libecap/common/delay.h>
 #include <libecap/adapter/xaction.h>
 #include "TextException.h"
-#include "assert.h"
 #include "HttpRequest.h"
 #include "HttpReply.h"
 #include "eCAP/XactionRep.h"
index defc84096743ca9d17b03455aa5f9c1f1e42d6a5..308d3598f02e0c05ab3b20fa350a8f565f6ee228 100644 (file)
@@ -40,8 +40,6 @@ using namespace Squid;
 /** \endcond */
 #endif
 
-#include "assert.h"
-
 #if HAVE_UNISTD_H
 #include <unistd.h>
 #endif
index 47e2365d93f23f8d63be89125e84fa32bfbe56fc..e9f5ddc85470975fbdca22d824765fc794002b19 100644 (file)
@@ -17,7 +17,7 @@ INCLUDES = \
        -I$(top_srcdir)/src
 
 LDADD = \
-       -L$(top_builddir)/compat/libcompat.la \
+       $(top_builddir)/compat/libcompat.la \
        -L$(top_builddir)/lib -lmiscutil \
        $(top_builddir)/src/globals.o \
        $(top_builddir)/src/time.o
index c9cbf46feede06a0940dcfa3341dade9f23fa804..45718d2d536ffc5acee5faa64957a9b6309d0488 100644 (file)
@@ -43,7 +43,11 @@ squidclient_SOURCES = squidclient.cc
 cachemgr__CGIEXT__SOURCES = cachemgr.cc
 cachemgr__CGIEXT__CXXFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CXXFLAGS)
 
-LDADD = ../src/ip/libip.la -L../lib -lmiscutil $(XTRA_LIBS)
+LDADD = \
+       ../compat/libcompat.la \
+       ../src/ip/libip.la \
+       -L../lib -lmiscutil \
+       $(XTRA_LIBS)
 
 EXTRA_DIST = \
        cachemgr.conf
index 53a4333f514189d1fc56d3e029c8b8e612136945..211a29c899e1df53f98e3e0d0feb3a3329289643 100644 (file)
@@ -129,7 +129,6 @@ extern "C"
 }
 #endif
 
-#include "assert.h"
 #include "util.h"
 #include "ip/IpAddress.h"
 #include "getfullhostname.h"