dnl Configuration input file for Squid
dnl
-dnl $Id: configure.in,v 1.492 2007/12/19 02:36:26 amosjeffries Exp $
+dnl $Id: configure.in,v 1.493 2007/12/27 15:48:53 hno Exp $
dnl
dnl
dnl
AC_CONFIG_AUX_DIR(cfgaux)
AC_CONFIG_SRCDIR([src/main.cc])
AM_INIT_AUTOMAKE([tar-ustar])
-AC_REVISION($Revision: 1.492 $)dnl
+AC_REVISION($Revision: 1.493 $)dnl
AC_PREFIX_DEFAULT(/usr/local/squid)
AM_MAINTAINER_MODE
dnl
STORE_TESTS="$STORE_TESTS tests/testCoss$EXEEXT"
;;
- null)
- STORE_TESTS="$STORE_TESTS tests/testNull$EXEEXT"
- ;;
ufs)
UFS_FOUND="true"
STORE_TESTS="$STORE_TESTS tests/testUfs$EXEEXT"
#
# Makefile for the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.196 2007/12/27 14:55:47 hno Exp $
+# $Id: Makefile.am,v 1.197 2007/12/27 15:48:53 hno Exp $
#
# Uncomment and customize the following to suit your needs:
#
fs/aufs/StoreFSaufs.cc \
fs/coss/StoreFScoss.cc \
fs/diskd/StoreFSdiskd.cc \
- fs/null/StoreFSnull.cc \
fs/ufs/StoreFSufs.cc
all_DISKIOMODULES = \
/*
- * $Id: cache_cf.cc,v 1.530 2007/12/18 23:24:25 amosjeffries Exp $
+ * $Id: cache_cf.cc,v 1.531 2007/12/27 15:48:53 hno Exp $
*
* DEBUG: section 3 Configuration File Parsing
* AUTHOR: Harvest Derived
memConfigure();
/* Sanity checks */
- if (Config.cacheSwap.swapDirs == NULL)
- fatal("No cache_dir's specified in config file");
-
#if SIZEOF_OFF_T <= 4
if (Config.Store.maxObjectSize > 0x7FFF0000) {
debugs(3, 0, "WARNING: This Squid binary can not handle files larger than 2GB. Limiting maximum_object_size to just below 2GB");
}
}
-static int
-check_null_cachedir(_SquidConfig::_cacheSwap swap)
-{
- return swap.swapDirs == NULL;
-}
-
static int
check_null_string(char *s)
{
#
-# $Id: cf.data.pre,v 1.490 2007/12/27 14:55:47 hno Exp $
+# $Id: cf.data.pre,v 1.491 2007/12/27 15:48:53 hno Exp $
#
# SQUID Web Proxy Cache http://www.squid-cache.org/
# ----------------------------------------------------------
NAME: cache_dir
TYPE: cachedir
DEFAULT: none
-DEFAULT_IF_NONE: ufs @DEFAULT_SWAP_DIR@ 100 16 256
LOC: Config.cacheSwap
DOC_START
Usage:
called 'stripe' in the directory names in the config - and
this will be created by squid -z.
- The null store type:
-
- no options are allowed or required
-
Common options:
no-store, no new objects should be stored to this cache_dir
Note for coss, max-size must be less than COSS_MEMBUF_SZ,
which can be changed with the --with-coss-membuf-size=N configure
option.
+NOCOMMENT_START
+DEFAULT_IF_NONE: ufs @DEFAULT_SWAP_DIR@ 100 16 256
+NOCOMMENT_END
DOC_END
NAME: store_dir_select_algorithm
# Makefile for storage modules in the Squid Object Cache server
#
-# $Id: Makefile.am,v 1.13 2005/08/20 21:08:38 serassio Exp $
+# $Id: Makefile.am,v 1.14 2007/12/27 15:48:55 hno Exp $
#
AUTOMAKE_OPTIONS = subdir-objects
##DIST_SUBDIRS = coss null ufs
-EXTRA_LIBRARIES = libcoss.a libnull.a libufs.a
+EXTRA_LIBRARIES = libcoss.a libufs.a
noinst_LIBRARIES = @STORE_LIBS@
libcoss_a_SOURCES = \
coss/store_dir_coss.cc \
coss/CossSwapDir.h
-libnull_a_SOURCES = null/store_null.cc null/store_null.h
libufs_a_SOURCES = ufs/store_dir_ufs.cc ufs/store_io_ufs.cc \
ufs/ufscommon.cci \
ufs/ufscommon.cc \
EXTRA_DIST = \
coss/coss-notes.txt \
coss/StoreFScoss.h \
- ufs/StoreFSufs.h \
- null/StoreFSnull.h
+ ufs/StoreFSufs.h
INCLUDES = -I. -I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/src
## targets below to emulate distributed makefiles
coss/all: libcoss.a
coss/clean: clean
-null/all: libnull.a
-null/clean: clean
ufs/all: libufs.a
ufs/clean: clean
+++ /dev/null
-
-
-/*
- * $Id: StoreFSnull.cc,v 1.1 2003/07/22 15:23:14 robertc Exp $
- *
- * DEBUG: section 47 Store Directory Routines
- * AUTHOR: Robert Collins
- *
- * 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.
- *
- * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
- */
-
-
-#include "StoreFileSystem.h"
-#include "fs/null/StoreFSnull.h"
-#include "fs/null/store_null.h"
-
-StoreFSnull StoreFSnull::_instance;
-
-StoreFileSystem &
-StoreFSnull::GetInstance()
-{
- return _instance;
-}
-
-StoreFSnull::StoreFSnull()
-{
- FsAdd(*this);
-}
-
-char const *
-StoreFSnull::type() const
-{
- return "null";
-}
-
-void
-StoreFSnull::done()
-{
- initialised = false;
-}
-
-SwapDir *
-StoreFSnull::createSwapDir()
-{
- return new NullSwapDir;
-}
-
-void
-StoreFSnull::setup()
-{
- assert(!initialised);
- initialised = true;
-}
+++ /dev/null
-
-/*
- * $Id: StoreFSnull.h,v 1.1 2003/07/22 15:23:14 robertc Exp $
- *
- * 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.
- *
- * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
- */
-
-#ifndef SQUID_STOREFSNULL_H
-#define SQUID_STOREFSNULL_H
-
-#include "squid.h"
-
-class StoreFSnull : public StoreFileSystem
-{
-
-public:
- static StoreFileSystem &GetInstance();
- StoreFSnull();
- virtual ~StoreFSnull() {}
-
- virtual char const *type() const;
- virtual SwapDir *createSwapDir();
- virtual void done();
- virtual void setup();
- /* Not implemented */
- StoreFSnull (StoreFSnull const &);
- StoreFSnull &operator=(StoreFSnull const &);
-
-private:
- static StoreFSnull _instance;
-};
-
-#endif /* SQUID_STOREFSNULL_H */
+++ /dev/null
-
-/*
- * $Id: store_null.cc,v 1.14 2007/05/29 13:31:47 amosjeffries Exp $
- *
- * DEBUG: section 47 Store Directory Routines
- * 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.
- *
- */
-
-#include "squid.h"
-#include "event.h"
-#if HAVE_STATVFS
-#if HAVE_SYS_STATVFS_H
-#include <sys/statvfs.h>
-#endif
-#endif
-#include "Store.h"
-#include "fs/null/store_null.h"
-
-static EVH storeNullDirRebuildComplete;
-NullSwapDir::NullSwapDir() : SwapDir ("null")
-{
- repl = NULL;
-}
-
-void
-NullSwapDir::reconfigure(int index, char *path)
-{
- (void) 0;
-}
-
-
-void
-NullSwapDir::init()
-{
- StoreController::store_dirs_rebuilding++;
- eventAdd("storeNullDirRebuildComplete", storeNullDirRebuildComplete,
- NULL, 0.0, 1);
-}
-
-StoreIOState::Pointer
-NullSwapDir::createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *)
-{
- fatal ("Attempt to get a StoreIO from the NULL store!\n");
- return NULL;
-}
-
-StoreIOState::Pointer
-NullSwapDir::openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *)
-{
- fatal ("Attempt to get a StoreIO from the NULL store!\n");
- return NULL;
-}
-
-static void
-storeNullDirRebuildComplete(void *unused)
-{
-
- struct _store_rebuild_data counts;
- memset(&counts, '\0', sizeof(counts));
- StoreController::store_dirs_rebuilding--;
- storeRebuildComplete(&counts);
-}
-
-int
-NullSwapDir::canStore(StoreEntry const &)const
-{
- return -1;
-}
-
-void
-NullSwapDir::parse(int anIndex, char *aPath)
-{
- index = anIndex;
- path = xstrdup(aPath);
- parseOptions(0);
-}
-
-StoreSearch *
-NullSwapDir::search(String const url, HttpRequest *)
-{
- if (url.size())
- fatal ("Cannot search by url yet\n");
-
- return new StoreSearchNull ();
-}
-
-
-CBDATA_CLASS_INIT(StoreSearchNull);
-StoreSearchNull::StoreSearchNull()
-{}
-
-/* do not link
-StoreSearchNull::StoreSearchNull(StoreSearchNull const &);
-*/
-
-StoreSearchNull::~StoreSearchNull()
-{}
-
-void
-StoreSearchNull::next(void (callback)(void *cbdata), void *cbdata)
-{
- callback (cbdata);
-}
-
-bool
-StoreSearchNull::next()
-{
- return false;
-}
-
-bool
-StoreSearchNull::error() const
-{
- return false;
-}
-
-bool
-StoreSearchNull::isDone() const
-{
- return true;
-}
-
-StoreEntry *
-StoreSearchNull::currentItem()
-{
- return NULL;
-}
+++ /dev/null
-
-/*
- * $Id: store_null.h,v 1.5 2007/05/29 13:31:47 amosjeffries Exp $
- *
- * 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.
- *
- * Copyright (c) 2003, Robert Collins <robertc@squid-cache.org>
- */
-
-#ifndef SQUID_STORE_NULL_H
-#define SQUID_STORE_NULL_H
-
-#include "squid.h"
-#include "SwapDir.h"
-#include "StoreSearch.h"
-
-class NullSwapDir : public SwapDir
-{
-
-public:
- NullSwapDir();
- virtual void init();
- virtual int canStore(StoreEntry const &)const;
- virtual StoreIOState::Pointer createStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *);
- virtual StoreIOState::Pointer openStoreIO(StoreEntry &, StoreIOState::STFNCB *, StoreIOState::STIOCB *, void *);
- virtual void parse(int, char*);
- virtual void reconfigure (int, char *);
- virtual StoreSearch *search(String const url, HttpRequest *);
-};
-
-class StoreSearchNull : public StoreSearch
-{
-
-public:
- StoreSearchNull();
- StoreSearchNull(StoreSearchNull const &);
- ~StoreSearchNull();
- /* Iterator API - garh, wrong place */
- /* callback the client when a new StoreEntry is available
- * or an error occurs
- */
- virtual void next(void (callback)(void *cbdata), void *cbdata);
- /* return true if a new StoreEntry is immediately available */
- virtual bool next();
- virtual bool error() const;
- virtual bool isDone() const;
- virtual StoreEntry *currentItem();
-
-private:
- CBDATA_CLASS2(StoreSearchNull);
-};
-
-#endif /* SQUID_STORE_NULL_H */