]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Move squidclient and cachemgr from src to tools
authorhno <>
Thu, 11 May 2006 07:36:57 +0000 (07:36 +0000)
committerhno <>
Thu, 11 May 2006 07:36:57 +0000 (07:36 +0000)
Makefile.am
configure.in
src/Makefile.am
tools/Makefile.am [new file with mode: 0644]
tools/cachemgr.cc [moved from src/cachemgr.cc with 99% similarity]
tools/cachemgr.conf [moved from src/cachemgr.conf with 100% similarity]
tools/squidclient.cc [moved from src/client.cc with 97% similarity]

index 97325baf54aaa6a20b727c8019d057a1bf85bb3b..b3290881a186735ebac68ca0eb2c6b7b79b0b8a5 100644 (file)
@@ -1,11 +1,11 @@
 ## Process this file with automake to produce Makefile.in
 #
-# $Id: Makefile.am,v 1.26 2006/04/17 12:00:35 robertc Exp $
+# $Id: Makefile.am,v 1.27 2006/05/11 01:36:57 hno Exp $
 #
 
 AUTOMAKE_OPTIONS = dist-bzip2 subdir-objects 1.5 foreign
-DIST_SUBDIRS   = lib snmplib scripts src icons errors contrib doc helpers test-suite
-SUBDIRS                = lib @makesnmplib@ scripts src icons errors doc helpers test-suite
+DIST_SUBDIRS   = lib snmplib scripts src icons errors contrib doc helpers test-suite tools
+SUBDIRS                = lib @makesnmplib@ scripts src icons errors doc helpers test-suite tools
 
 DISTCLEANFILES = include/stamp-h include/stamp-h[0-9]*
 DEFAULT_PINGER         = $(libexecdir)/`echo pinger | sed '$(transform);s/$$/$(EXEEXT)/'`
index 40150cccee41d556b4efbd67c952bbf0042fca3a..66ceb27ec11f5606026ae25db56cb218dc1366ec 100644 (file)
@@ -3,7 +3,7 @@ dnl  Configuration input file for Squid
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.410 2006/05/07 14:04:39 serassio Exp $
+dnl  $Id: configure.in,v 1.411 2006/05/11 01:36:57 hno Exp $
 dnl
 dnl
 dnl
@@ -13,7 +13,7 @@ AC_CONFIG_SRCDIR([src/main.cc])
 AC_CONFIG_AUX_DIR(cfgaux)
 AM_INIT_AUTOMAKE([tar-ustar])
 AM_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.410 $)dnl
+AC_REVISION($Revision: 1.411 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AM_MAINTAINER_MODE
 
@@ -3126,7 +3126,8 @@ AC_CONFIG_FILES([\
        helpers/external_acl/session/Makefile \
        helpers/external_acl/unix_group/Makefile \
        helpers/external_acl/wbinfo_group/Makefile \
-       helpers/external_acl/mswin_lm_group/Makefile
+       helpers/external_acl/mswin_lm_group/Makefile \
+       tools/Makefile
 ])
 
 AC_CONFIG_SUBDIRS(lib/libTrie)
index 61519a42f32d393b6991c1c3e88563818755b4db..6c1c64e07db9e01e38a1d6aa2544720d3340eda0 100644 (file)
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.am,v 1.143 2006/05/10 22:56:59 hno Exp $
+#  $Id: Makefile.am,v 1.144 2006/05/11 01:36:57 hno Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -190,24 +190,19 @@ noinst_PROGRAMS = \
 sbin_PROGRAMS = \
        squid
 
-bin_PROGRAMS = \
-       squidclient
+bin_PROGRAMS = 
 
 
 libexec_PROGRAMS = \
        $(PINGER) \
        $(DNSSERVER) \
        @DISK_PROGRAMS@ \
-       $(UNLINKD) \
-       cachemgr$(CGIEXT)
+       $(UNLINKD)
 
 cf_gen_SOURCES = cf_gen.cc defines.h debug.cc time.cc
 nodist_cf_gen_SOURCES = globals.cc
 nodist_cf_gen_HEADER = cf_gen_defines.h
 cf_gen.$(OBJEXT): cf_gen_defines.h
-squidclient_SOURCES = client.cc
-cachemgr__CGIEXT__SOURCES = cachemgr.cc
-cachemgr__CGIEXT__CFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CFLAGS)
 
 all_FSMODULES = \
        fs/aufs/StoreFSaufs.cc \
@@ -865,7 +860,6 @@ EXTRA_DIST = \
        mk-string-arrays.awk \
        repl_modules.sh \
        mib.txt \
-       cachemgr.conf \
        mime.conf.default
 
 libAIO_a_SOURCES = \
@@ -909,7 +903,6 @@ DEFAULT_HTTP_PORT   = @CACHE_HTTP_PORT@
 DEFAULT_ICP_PORT       = @CACHE_ICP_PORT@
 DEFAULT_PREFIX         = $(prefix)
 DEFAULT_CONFIG_FILE     = $(sysconfdir)/squid.conf
-DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
 DEFAULT_MIME_TABLE     = $(sysconfdir)/mime.conf
 DEFAULT_DNSSERVER       = $(libexecdir)/`echo dnsserver | sed '$(transform);s/$$/$(EXEEXT)/'`
 DEFAULT_LOG_PREFIX     = $(localstatedir)/logs
@@ -997,12 +990,6 @@ install-data-local: install-sysconfDATA install-dataDATA
                echo "$(INSTALL_DATA) squid.conf.default $(DESTDIR)$(DEFAULT_CONFIG_FILE)"; \
                $(INSTALL_DATA) squid.conf.default $(DESTDIR)$(DEFAULT_CONFIG_FILE); \
        fi
-       @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \
-               echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \
-       else \
-               echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
-               $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
-       fi
        $(mkinstalldirs) $(DESTDIR)$(DEFAULT_LOG_PREFIX)
 
 uninstall-local:
diff --git a/tools/Makefile.am b/tools/Makefile.am
new file mode 100644 (file)
index 0000000..0f0c2b2
--- /dev/null
@@ -0,0 +1,56 @@
+#
+#  Makefile for the Squid Object Cache server
+#
+#  $Id: Makefile.am,v 1.1 2006/05/11 01:36:57 hno Exp $
+#
+#  Uncomment and customize the following to suit your needs:
+#
+
+
+AUTOMAKE_OPTIONS = subdir-objects
+
+INCLUDES        = -I. -I$(srcdir) -I$(top_builddir)/include -I$(top_srcdir)/include -I$(top_srcdir)/lib/libTrie/include
+INCLUDES       += @SQUID_CPPUNIT_INC@
+
+TESTS=$(check_PROGRAMS)
+check_PROGRAMS=
+
+SUBDIRS                = 
+
+bin_PROGRAMS = \
+       squidclient
+
+libexec_PROGRAMS = \
+       cachemgr$(CGIEXT)
+
+squidclient_SOURCES = squidclient.cc
+cachemgr__CGIEXT__SOURCES = cachemgr.cc
+cachemgr__CGIEXT__CFLAGS = -DDEFAULT_CACHEMGR_CONFIG=\"$(DEFAULT_CACHEMGR_CONFIG)\" $(AM_CFLAGS)
+
+LDADD = -L../lib -lmiscutil $(XTRA_LIBS)
+
+EXTRA_DIST = \
+       cachemgr.conf
+
+DEFAULT_CACHEMGR_CONFIG = $(sysconfdir)/cachemgr.conf
+
+$(OBJS): $(top_srcdir)/include/version.h ../include/autoconf.h
+
+install-data-local: install-sysconfDATA install-dataDATA
+       @if test -f $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG) ; then \
+               echo "$@ will not overwrite existing $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)" ; \
+       else \
+               echo "$(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG)"; \
+               $(INSTALL_DATA) $(srcdir)/cachemgr.conf $(DESTDIR)$(DEFAULT_CACHEMGR_CONFIG); \
+       fi
+
+uninstall-local:
+
+# Don't automatically uninstall config files
+#      @if test -f $(DESTDIR)$(DEFAULT_CONFIG_FILE) ; then \
+#              echo "rm -f $(DESTDIR)$(DEFAULT_CONFIG_FILE)"; \
+#              $(RM) -f $(DESTDIR)$(DEFAULT_CONFIG_FILE); \
+#      fi
+
+DISTCLEANFILES = 
+
similarity index 99%
rename from src/cachemgr.cc
rename to tools/cachemgr.cc
index 836d7aa0f5ba43cc29128e4f1a07f2b2141bc0c8..ebe73803b59a7e11689edd5430408f6ae7081f9a 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cachemgr.cc,v 1.114 2006/05/10 22:03:07 hno Exp $
+ * $Id: cachemgr.cc,v 1.1 2006/05/11 01:36:57 hno Exp $
  *
  * DEBUG: section 0     CGI Cache Manager
  * AUTHOR: Duane Wessels
similarity index 100%
rename from src/cachemgr.conf
rename to tools/cachemgr.conf
similarity index 97%
rename from src/client.cc
rename to tools/squidclient.cc
index 2fdcb2a1ef7197aba8b3a9b418f918f348b468e4..75dce1c93657183104dd4b0a9472068ff0bfe659 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client.cc,v 1.109 2005/05/26 09:44:30 hno Exp $
+ * $Id: squidclient.cc,v 1.1 2006/05/11 01:36:57 hno Exp $
  *
  * DEBUG: section 0     WWW Client
  * AUTHOR: Harvest Derived
  *
  */
 
-#include "squid.h"
+#include "config.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <string.h>
+#include <unistd.h>
+#include <netdb.h>
+#include <signal.h>
+#include <errno.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "util.h"
 
 #ifndef BUFSIZ
 #define BUFSIZ 8192
 #endif
 
+typedef void SIGHDLR(int sig);
+
 /* Local functions */
 static int client_comm_bind(int, const char *);