---------------------
PatchSet 130 
Date: 2000/04/17 00:13:07
Author: hno
Branch: ntlm
Tag: (none) 
Log:
Updated to latest Squid.DEVEL sources

Members: 
	COPYRIGHT:1.1.1.1->1.1.1.1.14.1 
	ChangeLog:1.1.1.3.10.1->1.1.1.3.10.2 
	acconfig.h:1.1.1.3.10.1->1.1.1.3.10.2 
	configure:1.1.1.3->1.1.1.3.10.1(DEAD) 
	configure.in:1.1.1.3.10.2->1.1.1.3.10.3 
	makefile.in:1.1.1.3->1.1.1.3.10.1 
	auth_modules/PAM/pam_auth.c:1.1.1.1->1.1.1.1.10.1 
	doc/icpv2-application.txt:1.1.1.1->1.1.1.1.14.1(DEAD) 
	doc/icpv2-protocol.txt:1.1.1.1->1.1.1.1.14.1(DEAD) 
	doc/Programming-Guide/prog-guide.sgml:1.1.1.2->1.1.1.2.10.1 
	errors/Makefile.in:1.1.1.2->1.1.1.2.10.1 
	errors/Danish/ERR_CLIENT_ABORT:1.1.1.1->1.1.1.1.10.1(DEAD) 
	errors/Finnish/ERR_CLIENT_ABORT:1.1.1.1->1.1.1.1.10.1(DEAD) 
	errors/Finnish/ERR_FTP_FORBIDDEN:1.1->1.1.8.1 
	errors/Finnish/ERR_FTP_NOT_FOUND:1.1->1.1.8.1 
	errors/Finnish/ERR_FTP_UNAVAILABLE:1.1->1.1.8.1 
	errors/Finnish/ERR_SHUTTING_DOWN:1.1->1.1.8.1 
	errors/Finnish/ERR_TOO_BIG:1.1->1.1.8.1 
	errors/Swedish/ERR_TOO_BIG:1.1->1.1.4.1 
	icons/anthony-binhex.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-bomb.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-box.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-box2.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-c.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-compressed.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-dir.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-dirup.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-dvi.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-f.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-image.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-image2.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-layout.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-link.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-movie.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-pdf.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-portal.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-ps.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-quill.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-script.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-sound.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-tar.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-tex.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-text.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-unknown.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-xbm.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	icons/anthony-xpm.gif:1.1.1.1->1.1.1.1.14.1(DEAD) 
	include/autoconf.h.in:1.1.1.3->1.1.1.3.12.1(DEAD) 
	include/config.h.in:1.1.1.3->1.1.1.3.10.1 
	include/heap.h:1.1.1.1->1.1.1.1.10.1 
	include/splay.h:1.1.1.2->1.1.1.2.10.1 
	include/util.h:1.1.1.3.10.1->1.1.1.3.10.2 
	include/version.h:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.2 
	lib/Array.c:1.1.1.2->1.1.1.2.10.1 
	lib/Makefile.in:1.1.1.2->1.1.1.2.10.1 
	lib/Stack.c:1.1.1.2->1.1.1.2.10.1 
	lib/getfullhostname.c:1.1.1.1->1.1.1.1.14.1 
	lib/hash.c:1.1.1.3->1.1.1.3.10.1 
	lib/heap.c:1.1.1.1->1.1.1.1.10.1 
	lib/radix.c:1.1.1.2->1.1.1.2.14.1 
	lib/rfc1035.c:1.1.1.1.4.1->1.1.1.1.4.1.2.1 
	lib/rfc1123.c:1.1.1.3->1.1.1.3.10.1 
	lib/rfc1738.c:1.1.1.2->1.1.1.2.10.1 
	lib/splay.c:1.1.1.2->1.1.1.2.10.1 
	lib/strerror.c:1.1.1.1->1.1.1.1.14.1 
	lib/util.c:1.1.1.3->1.1.1.3.10.1 
	src/CacheDigest.c:1.1.1.2->1.1.1.2.14.1 
	src/ETag.c:1.1.1.1->1.1.1.1.14.1 
	src/HttpBody.c:1.1.1.1->1.1.1.1.14.1 
	src/HttpHdrCc.c:1.1.1.3->1.1.1.3.10.1 
	src/HttpHdrContRange.c:1.1.1.3->1.1.1.3.10.1 
	src/HttpHdrExtField.c:1.1.1.3->1.1.1.3.10.1 
	src/HttpHdrRange.c:1.1.1.3->1.1.1.3.10.1 
	src/HttpHeader.c:1.1.1.3->1.1.1.3.10.1 
	src/HttpHeaderTools.c:1.1.1.3->1.1.1.3.10.1 
	src/HttpMsg.c:1.1.1.1->1.1.1.1.16.1 
	src/HttpReply.c:1.1.1.3->1.1.1.3.10.1 
	src/HttpRequest.c:1.1.1.3.10.1->1.1.1.3.10.2 
	src/HttpStatusLine.c:1.1.1.3->1.1.1.3.10.1 
	src/Makefile.in:1.1.1.3.12.1->1.1.1.3.12.2 
	src/MemBuf.c:1.1.1.2->1.1.1.2.14.1 
	src/MemPool.c:1.1.1.3->1.1.1.3.10.1 
	src/Packer.c:1.1.1.2->1.1.1.2.14.1 
	src/StatHist.c:1.1.1.2->1.1.1.2.14.1 
	src/String.c:1.1.1.1->1.1.1.1.14.1 
	src/access_log.c:1.1.1.3->1.1.1.3.12.1 
	src/acl.c:1.1.1.3.12.2->1.1.1.3.12.3 
	src/aiops.c:1.1.1.3->1.1.1.3.12.1 
	src/asn.c:1.1.1.3->1.1.1.3.10.1 
	src/async_io.c:1.1.1.3.4.1->1.1.1.3.4.1.2.1 
	src/authenticate.c:1.1.1.3.12.1->1.1.1.3.12.2 
	src/cache_cf.c:1.1.1.3.4.1->1.1.1.3.4.1.2.1 
	src/cache_diff.c:1.1.1.1->1.1.1.1.14.1 
	src/cache_manager.c:1.1.1.2->1.1.1.2.14.1 
	src/cachemgr.c:1.1.1.3->1.1.1.3.10.1 
	src/carp.c:1.1.1.1->1.1.1.1.14.1 
	src/cbdata.c:1.1.1.2->1.1.1.2.14.1 
	src/cf.data.pre:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.4 
	src/cf_gen.c:1.1.1.3->1.1.1.3.12.1 
	src/client.c:1.1.1.3->1.1.1.3.10.1 
	src/client_db.c:1.1.1.3->1.1.1.3.10.1 
	src/client_side.c:1.1.1.3.4.1.2.7->1.1.1.3.4.1.2.8 
	src/comm.c:1.1.1.3->1.1.1.3.10.1 
	src/comm_select.c:1.1.1.3->1.1.1.3.12.1 
	src/debug.c:1.1.1.3->1.1.1.3.10.1 
	src/defines.h:1.1.1.3->1.1.1.3.12.1 
	src/delay_pools.c:1.1.1.3->1.1.1.3.12.1 
	src/disk.c:1.1.1.3->1.1.1.3.10.1 
	src/diskd.c:1.1->1.1.8.1 
	src/dns.c:1.1.1.3->1.1.1.3.12.1 
	src/dns_internal.c:1.1.1.1.4.1->1.1.1.1.4.1.2.1 
	src/dnsserver.c:1.1.1.3->1.1.1.3.10.1 
	src/enums.h:1.1.1.3->1.1.1.3.12.1 
	src/errorpage.c:1.1.1.3.10.1->1.1.1.3.10.2 
	src/event.c:1.1.1.3->1.1.1.3.10.1 
	src/fd.c:1.1.1.3->1.1.1.3.12.1 
	src/filemap.c:1.1.1.2->1.1.1.2.10.1 
	src/forward.c:1.1.1.3.12.1->1.1.1.3.12.2 
	src/fqdncache.c:1.1.1.3->1.1.1.3.10.1 
	src/ftp.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.2 
	src/globals.h:1.1.1.3->1.1.1.3.12.1 
	src/gopher.c:1.1.1.3->1.1.1.3.10.1 
	src/htcp.c:1.1.1.2->1.1.1.2.10.1 
	src/http.c:1.1.1.3.4.1.2.1->1.1.1.3.4.1.2.2 
	src/icmp.c:1.1.1.2->1.1.1.2.16.1 
	src/icp_v2.c:1.1.1.3->1.1.1.3.10.1 
	src/icp_v3.c:1.1.1.3->1.1.1.3.10.1 
	src/ident.c:1.1.1.3->1.1.1.3.10.1 
	src/internal.c:1.1.1.3->1.1.1.3.10.1 
	src/ipc.c:1.1.1.3->1.1.1.3.12.1 
	src/ipcache.c:1.1.1.3->1.1.1.3.10.1 
	src/leakfinder.c:1.1.1.1->1.1.1.1.14.1 
	src/logfile.c:1.1->1.1.6.1 
	src/main.c:1.1.1.3.4.1->1.1.1.3.4.1.2.1 
	src/mem.c:1.1.1.3->1.1.1.3.12.1 
	src/mime.c:1.1.1.3->1.1.1.3.10.1 
	src/multicast.c:1.1.1.1->1.1.1.1.14.1 
	src/neighbors.c:1.1.1.3->1.1.1.3.12.1 
	src/net_db.c:1.1.1.3->1.1.1.3.12.1 
	src/pconn.c:1.1.1.2->1.1.1.2.14.1 
	src/peer_digest.c:1.1.1.3->1.1.1.3.10.1 
	src/peer_select.c:1.1.1.3->1.1.1.3.12.1 
	src/pinger.c:1.1.1.3->1.1.1.3.10.1 
	src/protos.h:1.1.1.3.12.2->1.1.1.3.12.3 
	src/recv-announce.c:1.1.1.1->1.1.1.1.14.1 
	src/redirect.c:1.1.1.3.4.1->1.1.1.3.4.1.2.1 
	src/refresh.c:1.1.1.3->1.1.1.3.10.1 
	src/send-announce.c:1.1.1.3->1.1.1.3.10.1 
	src/snmp_agent.c:1.1.1.3->1.1.1.3.10.1 
	src/snmp_core.c:1.1.1.3->1.1.1.3.10.1 
	src/squid.h:1.1.1.3->1.1.1.3.12.1 
	src/ssl.c:1.1.1.3->1.1.1.3.12.1 
	src/stat.c:1.1.1.3.12.1->1.1.1.3.12.2 
	src/stmem.c:1.1.1.2->1.1.1.2.14.1 
	src/store.c:1.1.1.3->1.1.1.3.12.1 
	src/store_client.c:1.1.1.3.4.1->1.1.1.3.4.1.2.1 
	src/store_digest.c:1.1.1.3->1.1.1.3.10.1 
	src/store_dir.c:1.1.1.3->1.1.1.3.12.1 
	src/store_dir_ufs.c:1.1.1.1->1.1.1.1.12.1 
	src/store_heap_replacement.c:1.1.1.1->1.1.1.1.10.1 
	src/store_io_asyncufs.c:1.1.1.1.4.1->1.1.1.1.4.1.2.1 
	src/store_io_ufs.c:1.1.1.1->1.1.1.1.12.1 
	src/store_key_md5.c:1.1.1.3->1.1.1.3.10.1 
	src/store_log.c:1.1.1.2->1.1.1.2.12.1 
	src/store_rebuild.c:1.1.1.3->1.1.1.3.12.1 
	src/store_swapin.c:1.1.1.3->1.1.1.3.12.1 
	src/store_swapmeta.c:1.1.1.2->1.1.1.2.10.1 
	src/store_swapout.c:1.1.1.3.4.1->1.1.1.3.4.1.2.1 
	src/structs.h:1.1.1.3.4.1.2.3->1.1.1.3.4.1.2.4 
	src/test_cache_digest.c:1.1.1.1->1.1.1.1.14.1 
	src/tools.c:1.1.1.3->1.1.1.3.10.1 
	src/typedefs.h:1.1.1.3.12.1->1.1.1.3.12.2 
	src/unlinkd.c:1.1.1.3->1.1.1.3.12.1 
	src/url.c:1.1.1.3->1.1.1.3.12.1 
	src/urn.c:1.1.1.3->1.1.1.3.10.1 
	src/useragent.c:1.1.1.3->1.1.1.3.10.1 
	src/wais.c:1.1.1.2->1.1.1.2.14.1 
	src/wccp.c:1.1.1.1->1.1.1.1.10.1 
	src/whois.c:1.1.1.2->1.1.1.2.14.1 

Index: squid/COPYRIGHT
===================================================================
RCS file: /cvsroot/squid-sf//squid/COPYRIGHT,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/COPYRIGHT	26 Jan 2000 03:21:46 -0000	1.1.1.1
+++ squid/COPYRIGHT	17 Apr 2000 00:13:07 -0000	1.1.1.1.14.1
@@ -1,10 +1,11 @@
 By accepting this notice, you agree to be bound by the following
 agreements:
 
-This software product, SQUID, is copyrighted(C) 1998 by Duane Wessels,
-and the University of California, San Diego (UCSD), with all rights
-reserved.  UCSD administers the NLANR Cache grants, NCR 9616602 and NCR
-9521745 under which most of this code was developed.
+This software product, SQUID, is developed by Duane Wessels, and
+copyrighted (C) 2000 by the Regents of the University of California,
+with all rights reserved.  UCSD administers the NLANR Cache grants,
+NCR 9616602 and NCR 9521745 under which most of this code was
+developed.
 
 This program is free software; you can redistribute it and/or modify it
 under the terms of the GNU General Public License (version 2) as
Index: squid/ChangeLog
===================================================================
RCS file: /cvsroot/squid-sf//squid/ChangeLog,v
retrieving revision 1.1.1.3.10.1
retrieving revision 1.1.1.3.10.2
diff -u -r1.1.1.3.10.1 -r1.1.1.3.10.2
--- squid/ChangeLog	14 Apr 2000 23:09:53 -0000	1.1.1.3.10.1
+++ squid/ChangeLog	17 Apr 2000 00:13:07 -0000	1.1.1.3.10.2
@@ -2,6 +2,16 @@
 	  Now all client side processing is inside client_side.c, and
 	  the pass and pump modules is no longer used.
 
+Changes to Squid-2.4.DEVEL3 ():
+
+	- Added Logfile module.
+	- Added DISKD stats via cachemgr.
+	- Added squid.conf options for DISKD magic constants.
+
+Changes to Squid-2.4.DEVEL2 ():
+
+Changes to Squid-2.4.DEVEL1 ():
+
 Changes to Squid-2.3.STABLE1 (Jan 9, 2000):
 
 	- Updated PAM authentication module from Henrik Nordstrom.
@@ -232,7 +242,6 @@
 	- Added 'peer_connect_timeout' squid.conf option.
 	- Added 'redirector_bypass' squid.conf option.
 	- Added RFC 2518 (WEBDAV) request methods.
-	
 
 Changes to Squid-2.2 (April 19, 1999):
 
Index: squid/acconfig.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/Attic/acconfig.h,v
retrieving revision 1.1.1.3.10.1
retrieving revision 1.1.1.3.10.2
diff -u -r1.1.1.3.10.1 -r1.1.1.3.10.2
--- squid/acconfig.h	15 Apr 2000 13:27:06 -0000	1.1.1.3.10.1
+++ squid/acconfig.h	17 Apr 2000 00:13:07 -0000	1.1.1.3.10.2
@@ -20,7 +20,7 @@
  *
  */
 @ TOP @
-/* $Id: acconfig.h,v 1.1.1.3.10.1 2000/04/15 13:27:06 asd Exp $ */
+/* $Id: acconfig.h,v 1.1.1.3.10.2 2000/04/17 00:13:07 hno Exp $ */
 
 /*********************************
  * START OF CONFIGURABLE OPTIONS *
@@ -266,3 +266,13 @@
  * Use the heap-based replacement techniques
  */
 #undef HEAP_REPLACEMENT
+
+/*
+ * Use DISKD
+ */
+#undef USE_DISKD
+
+/*
+ * message type for message queues
+ */
+#undef mtyp_t
--- squid/configure	Wed Feb 14 00:43:23 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,5484 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-ac_default_prefix=/usr/local/squid
-ac_help="$ac_help
-  --enable-dlmalloc[=LIB] Compile & use the malloc package by Doug Lea"
-ac_help="$ac_help
-  --enable-gnuregex       Compile GNUregex"
-ac_help="$ac_help
-  --enable-xmalloc-debug  Do some simple malloc debugging"
-ac_help="$ac_help
-  --enable-xmalloc-debug-trace
-                          Detailed trace of memory allocations"
-ac_help="$ac_help
-  --enable-xmalloc-statistics
-                          Show malloc statistics in status page"
-ac_help="$ac_help
-  --enable-carp           Enable CARP support"
-ac_help="$ac_help
-  --enable-async-io[=N_THREADS]
-                          Do ASYNC disk I/O using threads.
-                          N_THREADS is the number of worker threads
-                          defaults to 16. See also src/squid.h for
-                          some additional platform tuning"
-ac_help="$ac_help
-  --enable-icmp           Enable ICMP pinging"
-ac_help="$ac_help
-  --enable-delay-pools    Enable delay pools to limit bandwith usage"
-ac_help="$ac_help
-  --enable-mem-gen-trace  Do trace of memory stuff"
-ac_help="$ac_help
-  --enable-useragent-log  Enable logging of User-Agent header"
-ac_help="$ac_help
-  --disable-wccp      Disable Web Cache Coordination Protocol"
-ac_help="$ac_help
-  --enable-kill-parent-hack
-                          Kill parent on shutdown"
-ac_help="$ac_help
-  --enable-snmp           Enable SNMP monitoring"
-ac_help="$ac_help
-  --enable-time-hack      Update internal timestamp only once per second"
-ac_help="$ac_help
-  --enable-cachemgr-hostname[=hostname]
-                          Make cachemgr.cgi default to this host"
-ac_help="$ac_help
-  --enable-arp-acl        Enable use of ARP ACL lists (ether address)"
-ac_help="$ac_help
-  --enable-htcp           Enable HTCP protocol"
-ac_help="$ac_help
-  --enable-forw-via-db    Enable Forw/Via database"
-ac_help="$ac_help
-  --enable-cache-digests  Use Cache Digests
-                          see http://squid.nlanr.net/Squid/FAQ/FAQ-16.html"
-ac_help="$ac_help
-  --enable-err-language=lang
-                          Select language for Error pages (see errors dir) "
-ac_help="$ac_help
-  --enable-poll           Enable poll() instead of select().  Normally poll
-                          is preferred over select, but configure knows poll
-                          is broken on some platforms.  If you think you are
-                          smarter than the configure script, you may enable
-                          poll with this option.
-  --disable-poll          Disable the use of poll()."
-ac_help="$ac_help
-  --disable-http-violations
-                          This allows you to remove code which is known to
-                          violate the HTTP protocol specification."
-ac_help="$ac_help
-  --enable-ipf-transparent
-                          Enable Transparent Proxy support for systems
-                          using IP-Filter network address redirection."
-ac_help="$ac_help
-  --enable-leakfinder
-                          Enable Leak Finding code.  Enabling this alone
-                          does nothing; you also have to modify the source
-			  code to use the leak finding functions.  Probably
-			  Useful for hackers only."
-ac_help="$ac_help
-  --disable-ident-lookups
-                          This allows you to remove code that performs
-                          Ident (RFC 931) lookups."
-ac_help="$ac_help
-  --disable-internal-dns  This prevents Squid from directly sending and
-                          receiving DNS messages, and instead enables the
-                          old external 'dnsserver' processes."
-ac_help="$ac_help
-  --enable-truncate       This uses truncate() instead of unlink() when
-                          removing cache files.  Truncate gives a little
-                          performance improvement, but may cause problems
-                          when used with async I/O.  Truncate uses more
-                          filesystem inodes than unlink.."
-ac_help="$ac_help
-  --enable-underscores    Squid by default rejects any host names with _
-                          in their name to conform with internet standars.
-                          If you disagree with this you may allow _ in
-                          hostnames by using this switch, provided that
-                          the resolver library on the host where Squid runs
-                          does not reject _ in hostnames..."
-ac_help="$ac_help
-  --enable-heap-replacement
-                          This option allows you to use various cache
-                          replacement algorithms, instead of the standard
-                          LRU algorithm.
-                          "
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.12"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=src/main.c
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='	'
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-
-# From configure.in Revision: 1.176.2.12 
-ac_aux_dir=
-for ac_dir in cfgaux $srcdir/cfgaux; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in cfgaux $srcdir/cfgaux" 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-
-
-# Make sure we can run config.sub.
-if $ac_config_sub sun4 >/dev/null 2>&1; then :
-else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:652: checking host system type" >&5
-
-host_alias=$host
-case "$host_alias" in
-NONE)
-  case $nonopt in
-  NONE)
-    if host_alias=`$ac_config_guess`; then :
-    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
-    fi ;;
-  *) host_alias=$nonopt ;;
-  esac ;;
-esac
-
-host=`$ac_config_sub $host_alias`
-host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
-host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
-host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
-echo "$ac_t""$host" 1>&6
-
-
-CRYPTLIB=''
-REGEXLIB=''	# -lregex
-LIBREGEX=''	# libregex.a
-
-if test "$libexecdir" = '${exec_prefix}/libexec'; then
-	libexecdir='${bindir}'
-	localstatedir='${prefix}'
-
-fi
-
-case "$host_os" in
-cygwin32|os2)
-	exec_suffix=".exe"
-	cgi_suffix=".exe"
-	;;
-*)
-	exec_suffix=""
-	cgi_suffix=".cgi"
-	;;
-esac
-
-
-
-if test -z "$CACHE_HTTP_PORT"; then
-	CACHE_HTTP_PORT="3128"
-fi
-if test -z "$CACHE_ICP_PORT"; then
-	CACHE_ICP_PORT="3130"
-fi
-
-
-
-
-cat >> confdefs.h <<EOF
-#define CONFIG_HOST_TYPE "$host"
-EOF
-
-
-if test -z "$LDFLAGS"; then
-	LDFLAGS="-g"
-fi
-
-PRESET_CFLAGS="$CFLAGS"
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:720: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:749: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  ac_prog_rejected=no
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-	continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext <<EOF
-#line 807 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:831: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:836: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:845: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-  ac_test_CFLAGS="${CFLAGS+set}"
-  ac_save_CFLAGS="$CFLAGS"
-  CFLAGS=
-  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:860: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-  if test "$ac_test_CFLAGS" = set; then
-    CFLAGS="$ac_save_CFLAGS"
-  elif test $ac_cv_prog_cc_g = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-O2"
-  fi
-else
-  GCC=
-  test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-
-case "$host" in
-    mab-next-nextstep3)
-	CC="$CC -arch m68k -arch i486 -arch hppa -arch sparc"
-	;;
-esac
-
-if test -z "$PRESET_CFLAGS"; then
-    if test "$GCC" = "yes"; then
-        case "$host" in
-	*-sun-sunos*)
-    	    # sunos has too many warnings for this to be useful
-	    # motorola too
-    	    ;;
-	*m88k*)
-	    # Motorola cc/ld does not like -02 but is ok on -O
-	    CFLAGS=`echo $CFLAGS | sed -e 's/-O0-9/-O/'`
-	    ;;
-        *)
-    	    CFLAGS="$CFLAGS -Wall"
-    	    ;;
-        esac
-    else
-	case "$host" in
-	*mips-sgi-irix6.4*)
-	    # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
-	    CFLAGS="$CFLAGS -n32 -mips4 -O3 -OPT:Olimit=0:space=OFF \
-		-woff 1009,1014,1048,1110,1116,1185,1188,1204,1230,1233 \
-		-Wl,-woff,85,-woff,84,-woff,134 \
-		-nostdinc -I/usr/include -D_BSD_SIGNALS"
-	    ;;
-	alpha-dec-osf4.*)
-	    # Mogul says DEC compilers take both -g and -O2
-	    CFLAGS=`echo $CFLAGS | sed -e 's/-g/-g3/'`
-	    CFLAGS="$CFLAGS -O2"
-	    ;;
-	*)
-	    ;;
-	esac
-    fi
-fi
-
-if test -z "$PRESET_LDFLAGS"; then
-    if test "$GCC" = "yes"; then
-        case "$host" in
-        *)
-    	    # nothing
-	    ;;
-        esac
-    else
-	case "$host" in
-	*mips-sgi-irix6.4*)
-	    # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
-	    LDFLAGS="-n32 -mips4 -nostdlib -L/usr/lib32"
-	    ;;
-	esac
-    fi
-fi
-
-# Check whether --enable-dlmalloc or --disable-dlmalloc was given.
-if test "${enable_dlmalloc+set}" = set; then
-  enableval="$enable_dlmalloc"
-  
- case "$enableval" in
- 'yes')
-    use_dlmalloc="yes"
-    LIBDLMALLOC="libdlmalloc.a"
-    LIB_MALLOC="-L../lib -ldlmalloc"
-    echo "dlmalloc enabled"
-    ;;
- 'no')
-    use_dlmalloc="no"
-    echo "dlmalloc disabled"
-    ;;
- *) use_dlmalloc="yes"
-    LIB_MALLOC="$enableval"
-    echo "dlmalloc enabled with $LIB_MALLOC"
- esac
-
-fi
-
-if test "${use_dlmalloc-unset}" = unset; then
-    case "$host" in
-	i386-*-solaris2.*)
-		echo "Enabling dlmalloc for $host"
-		use_dlmalloc="yes"
-		;;
-    esac
-fi
-if test "x$ac_cv_enabled_dlmalloc" = "xyes"; then
-    # Ok. dlmalloc was enabled before, but state may be changed.
-    # we have to test these again
-    unset ac_cv_func_mallinfo
-    unset ac_cv_func_mallocblksize
-    unset ac_cv_func_free
-    unset ac_cv_func_realloc
-    unset ac_cv_func_memalign
-    unset ac_cv_func_valloc
-    unset ac_cv_func_pvalloc
-    unset ac_cv_func_calloc
-    unset ac_cv_func_cfree
-    unset ac_cv_func_malloc_trim
-    unset ac_cv_func_malloc_usable_size
-    unset ac_cv_func_malloc_stats
-    unset ac_cv_func_mallinfo
-    unset ac_cv_func_mallopt
-    unset ac_cv_lib_gnumalloc
-    unset ac_cv_header_gnumalloc_h
-    unset ac_cv_lib_malloc
-    unset ac_cv_enabled_dlmalloc
-fi
-if test "$use_dlmalloc" = yes; then
-    ac_cv_func_mallinfo="yes"
-    ac_cv_func_mallocblksize="no"
-    ac_cv_func_free="yes"
-    ac_cv_func_realloc="yes"
-    ac_cv_func_memalign="yes"
-    ac_cv_func_valloc="yes"
-    ac_cv_func_pvalloc="yes"
-    ac_cv_func_calloc="yes"
-    ac_cv_func_cfree="yes"
-    ac_cv_func_malloc_trim="yes"
-    ac_cv_func_malloc_usable_size="yes"
-    ac_cv_func_malloc_stats="yes"
-    ac_cv_func_mallopt="yes"
-    ac_cv_lib_gnumalloc="no"
-    ac_cv_header_gnumalloc_h="no"
-    ac_cv_lib_malloc="no"
-    ac_cv_enabled_dlmalloc="yes"
-fi
-
-
-
-
-# Check whether --enable-gnuregex or --disable-gnuregex was given.
-if test "${enable_gnuregex+set}" = set; then
-  enableval="$enable_gnuregex"
-  USE_GNUREGEX=$enableval
-fi
-
-
-# Check whether --enable-xmalloc_debug or --disable-xmalloc_debug was given.
-if test "${enable_xmalloc_debug+set}" = set; then
-  enableval="$enable_xmalloc_debug"
-   if test "$enableval" = "yes" ; then
-    echo "Malloc debugging enabled"
-    cat >> confdefs.h <<\EOF
-#define XMALLOC_DEBUG 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-xmalloc_debug_trace or --disable-xmalloc_debug_trace was given.
-if test "${enable_xmalloc_debug_trace+set}" = set; then
-  enableval="$enable_xmalloc_debug_trace"
-   if test "$enableval" = "yes" ; then
-    echo "Malloc debug trace enabled"
-    cat >> confdefs.h <<\EOF
-#define XMALLOC_TRACE 1
-EOF
-
-    cat >> confdefs.h <<\EOF
-#define XMALLOC_DEBUG 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-xmalloc_statistics or --disable-xmalloc_statistics was given.
-if test "${enable_xmalloc_statistics+set}" = set; then
-  enableval="$enable_xmalloc_statistics"
-   if test "$enableval" = "yes" ; then
-    echo "Malloc statistics enabled"
-    cat >> confdefs.h <<\EOF
-#define XMALLOC_STATISTICS 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-carp or --disable-carp was given.
-if test "${enable_carp+set}" = set; then
-  enableval="$enable_carp"
-   if test "$enableval" = "yes" ; then
-    echo "CARP support enabled"
-    cat >> confdefs.h <<\EOF
-#define USE_CARP 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-async_io or --disable-async_io was given.
-if test "${enable_async_io+set}" = set; then
-  enableval="$enable_async_io"
-   case "$enableval" in
-  yes)
-    async_io=yes
-    ;;
-  no)
-    async_io=''
-    ;;
-  *)
-    async_io=yes
-    cat >> confdefs.h <<EOF
-#define NUMTHREADS $enableval
-EOF
-
-    ;;
-  esac
-
-fi
-
-
-if test -n "$async_io" ; then
-    echo "Async I/O enabled"
-    async_io=yes
-    cat >> confdefs.h <<\EOF
-#define USE_ASYNC_IO 1
-EOF
-
-    ASYNC_OBJS='$(ASYNC_OBJS)'
-    SQUID_PTHREAD_LIB='$(PTHREADLIB)'
-    CFLAGS="$CFLAGS -D_REENTRANT"
-    case "$host" in
-    i386-unknown-freebsd*)
-    	if test "$GCC" = "yes" ; then
-	    if test -z "$PRESET_LDFLAGS"; then
-		LDFLAGS="$LDFLAGS -pthread"
-	    fi
-	fi
-	;;
-    esac
-fi
-
-
-
-# Check whether --enable-icmp or --disable-icmp was given.
-if test "${enable_icmp+set}" = set; then
-  enableval="$enable_icmp"
-   if test "$enableval" = "yes" ; then
-    echo "ICMP enabled"
-    cat >> confdefs.h <<\EOF
-#define USE_ICMP 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-delay_pools or --disable-delay_pools was given.
-if test "${enable_delay_pools+set}" = set; then
-  enableval="$enable_delay_pools"
-   if test "$enableval" = "yes" ; then
-    echo "Delay pools enabled"
-    DELAY_OBJS='$(DELAY_OBJS)'
-    cat >> confdefs.h <<\EOF
-#define DELAY_POOLS 1
-EOF
-
-  fi
-
-fi
-
-
-
-# Check whether --enable-mem-gen-trace or --disable-mem-gen-trace was given.
-if test "${enable_mem_gen_trace+set}" = set; then
-  enableval="$enable_mem_gen_trace"
-   if test "$enableval" = "yes" ; then
-    echo "Memory trace (to file) enabled"
-    cat >> confdefs.h <<\EOF
-#define MEM_GEN_TRACE 1
-EOF
-
-  fi    
-
-fi
-     
-
-# Check whether --enable-useragent_log or --disable-useragent_log was given.
-if test "${enable_useragent_log+set}" = set; then
-  enableval="$enable_useragent_log"
-   if test "$enableval" = "yes" ; then
-    echo "User-Agent logging enabled"
-    cat >> confdefs.h <<\EOF
-#define USE_USERAGENT_LOG 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-wccp or --disable-wccp was given.
-if test "${enable_wccp+set}" = set; then
-  enableval="$enable_wccp"
-   if test "$enableval" = "no" ; then
-    echo "Web Cache Coordination Protocol disabled"
-    cat >> confdefs.h <<\EOF
-#define USE_WCCP 0
-EOF
-
-  else
-    cat >> confdefs.h <<\EOF
-#define USE_WCCP 1
-EOF
-
-  fi
-
-fi
-      
-
-# Check whether --enable-kill_parent_hack or --disable-kill_parent_hack was given.
-if test "${enable_kill_parent_hack+set}" = set; then
-  enableval="$enable_kill_parent_hack"
-   if test "$enableval" = "yes" ; then
-    echo "Kill parent on shutdown"
-    cat >> confdefs.h <<\EOF
-#define KILL_PARENT_OPT 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-snmp or --disable-snmp was given.
-if test "${enable_snmp+set}" = set; then
-  enableval="$enable_snmp"
-   if test "$enableval" = "yes" ; then
-    echo "SNMP monitoring enabled"
-    cat >> confdefs.h <<\EOF
-#define SQUID_SNMP 1
-EOF
-
-    SNMPLIB='-L../snmplib -lsnmp'
-    SNMP_OBJS='$(SNMP_OBJS)'
-    SNMP_MAKEFILE=./snmplib/Makefile
-    makesnmplib=snmplib
-  fi
-
-fi
-
-
-
-
-
-# Check whether --enable-time_hack or --disable-time_hack was given.
-if test "${enable_time_hack+set}" = set; then
-  enableval="$enable_time_hack"
-   if test "$enableval" = "yes" ; then
-    echo "Update internal timestamp only once per second"
-    cat >> confdefs.h <<\EOF
-#define ALARM_UPDATES_TIME 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-cachemgr_hostname or --disable-cachemgr_hostname was given.
-if test "${enable_cachemgr_hostname+set}" = set; then
-  enableval="$enable_cachemgr_hostname"
-    case $enableval in
-   yes)
-       cat >> confdefs.h <<\EOF
-#define CACHEMGR_HOSTNAME getfullhostname()
-EOF
-
-       echo "Cachemgr default hostname == host where cachemgr runs"
-       ;;
-   no)
-       : # Nothing to do..
-       ;;
-   *)
-       cat >> confdefs.h <<EOF
-#define CACHEMGR_HOSTNAME "${enableval}"
-EOF
-
-       echo "Cachemgr default hostname set to ${enableval}"
-       ;;
-   esac
-
-fi
-
-
-# Check whether --enable-arp_acl or --disable-arp_acl was given.
-if test "${enable_arp_acl+set}" = set; then
-  enableval="$enable_arp_acl"
-    if test "$enableval" = "yes" ; then
-     echo "ARP ACL lists enabled (ether address)"
-     case "$host" in
-	*-pc-linux-*)
-	    ;;
-	*)
-	    echo "WARNING: ARP ACL support is only currently supported on Linux"
-	    echo "         ethernet interfaces, probably won't work on $host."
-	    sleep 10
-	    ;;
-     esac
-     cat >> confdefs.h <<\EOF
-#define USE_ARP_ACL 1
-EOF
-
-   fi
-
-fi
-
-
-# Check whether --enable-htcp or --disable-htcp was given.
-if test "${enable_htcp+set}" = set; then
-  enableval="$enable_htcp"
-   if test "$enableval" = "yes" ; then
-    echo "HTCP enabled"
-    HTCP_OBJS='$(HTCP_OBJS)'
-    cat >> confdefs.h <<\EOF
-#define USE_HTCP 1
-EOF
-
-  fi
-
-fi
-
-
-
-# Check whether --enable-forw-via-db or --disable-forw-via-db was given.
-if test "${enable_forw_via_db+set}" = set; then
-  enableval="$enable_forw_via_db"
-   if test "$enableval" = "yes" ; then
-    echo "FORW-VIA enabled"
-    cat >> confdefs.h <<\EOF
-#define FORW_VIA_DB 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-cache-digests or --disable-cache-digests was given.
-if test "${enable_cache_digests+set}" = set; then
-  enableval="$enable_cache_digests"
-   if test "$enableval" = "yes" ; then
-    echo "USE_CACHE_DIGESTS enabled"
-    cat >> confdefs.h <<\EOF
-#define USE_CACHE_DIGESTS 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-err-language or --disable-err-language was given.
-if test "${enable_err_language+set}" = set; then
-  enableval="$enable_err_language"
-  
-    if test -d errors/$enableval; then
-	ERR_LANGUAGE=$enableval
-    else
-	echo "ERROR! Unknown language $enableval, see errors/"
-	exit 1
-    fi
-
-else
-  ERR_LANGUAGE="English"
-fi
-
-
-
-# Check whether --enable-poll or --disable-poll was given.
-if test "${enable_poll+set}" = set; then
-  enableval="$enable_poll"
-   
-  case "$enableval" in
-  yes)
-    echo "Forcing poll() to be enabled"
-    ac_cv_func_poll='yes'
-    ;;
-  no)
-    echo "Forcing poll() to be disabled"
-    ac_cv_func_poll='no'
-    ;;
-  esac
-
-fi
-
-
-# Check whether --enable-http-violations or --disable-http-violations was given.
-if test "${enable_http_violations+set}" = set; then
-  enableval="$enable_http_violations"
-   if test "$enableval" = "no" ; then
-    echo "Disabling HTTP Violations"
-    cat >> confdefs.h <<\EOF
-#define HTTP_VIOLATIONS 0
-EOF
-
-  else
-    cat >> confdefs.h <<\EOF
-#define HTTP_VIOLATIONS 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-ipf-transparent or --disable-ipf-transparent was given.
-if test "${enable_ipf_transparent+set}" = set; then
-  enableval="$enable_ipf_transparent"
-   if test "$enableval" = "yes" ; then
-	echo "IP-Filter Transparent Proxy enabled"
-	cat >> confdefs.h <<\EOF
-#define IPF_TRANSPARENT 1
-EOF
-
-	IPF_TRANSPARENT="yes"
-  fi
-
-fi
-
-
-# Check whether --enable-leakfinder or --disable-leakfinder was given.
-if test "${enable_leakfinder+set}" = set; then
-  enableval="$enable_leakfinder"
-   if test "$enableval" = "yes" ; then
-	echo "Leak-Finding enabled"
-	cat >> confdefs.h <<\EOF
-#define USE_LEAKFINDER 1
-EOF
-
-        LEAKFINDER_OBJS='$(LEAKFINDER_OBJS)'
-	USE_LEAKFINDER="yes"
-  fi
-
-fi
-
-
-
-# Check whether --enable-ident-lookups or --disable-ident-lookups was given.
-if test "${enable_ident_lookups+set}" = set; then
-  enableval="$enable_ident_lookups"
-   if test "$enableval" = "no" ; then
-    echo "Disabling Ident Lookups"
-    cat >> confdefs.h <<\EOF
-#define USE_IDENT 0
-EOF
-
-  else
-    cat >> confdefs.h <<\EOF
-#define USE_IDENT 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-internal-dns or --disable-internal-dns was given.
-if test "${enable_internal_dns+set}" = set; then
-  enableval="$enable_internal_dns"
-   if test "$enableval" = "no" ; then
-    echo "Disabling Internal DNS queries"
-    cat >> confdefs.h <<\EOF
-#define USE_DNSSERVERS 1
-EOF
-
-  else
-    cat >> confdefs.h <<\EOF
-#define USE_DNSSERVERS 0
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-truncate or --disable-truncate was given.
-if test "${enable_truncate+set}" = set; then
-  enableval="$enable_truncate"
-   if test "$enableval" = "yes" ; then
-    echo "Enabling truncate instead of unlink"
-    cat >> confdefs.h <<\EOF
-#define USE_TRUNCATE 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-underscores or --disable-underscores was given.
-if test "${enable_underscores+set}" = set; then
-  enableval="$enable_underscores"
-   if test "$enableval" = "yes" ; then
-    echo "Enabling the use of underscores in host names"
-    cat >> confdefs.h <<\EOF
-#define ALLOW_HOSTNAME_UNDERSCORES 1
-EOF
-
-  fi
-
-fi
-
-
-# Check whether --enable-heap-replacement or --disable-heap-replacement was given.
-if test "${enable_heap_replacement+set}" = set; then
-  enableval="$enable_heap_replacement"
-   if test "$enableval" = "yes" ; then
-    echo "Enabling HEAP_REPLACEMENT"
-    cat >> confdefs.h <<\EOF
-#define HEAP_REPLACEMENT 1
-EOF
-
-  fi
-
-fi
-
-
-# Force some compilers to use ANSI features
-#
-case "$host" in
-    alpha-dec-osf*)
-	if test "$ac_cv_prog_CC" = "cc" ; then
-		echo "adding '-std1' to cc args for $host"
-		CC="cc -std1";
-		ac_cv_prog_CC="$CC"
-	fi
-	;;
-    *-hp-hpux*)
-	if test "$ac_cv_prog_CC" = "cc" ; then
-		echo "adding '-Ae' to cc args for $host"
-		CC="cc -Ae";
-		ac_cv_prog_CC="$CC"
-	fi
-	;;
-esac
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1538: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 1553 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1559: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 1570 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1609: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      for ac_prog in ginstall installbsd scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-	  if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-	    # AIX install.  It has an incompatible calling convention.
-	    # OSF/1 installbsd also uses dspmsg, but is usable.
-	    :
-	  else
-	    ac_cv_path_install="$ac_dir/$ac_prog -c"
-	    break 2
-	  fi
-	fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1661: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
-echo "configure:1688: checking whether ln -s works" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  rm -f conftestdata
-if ln -s X conftestdata 2>/dev/null
-then
-  rm -f conftestdata
-  ac_cv_prog_LN_S="ln -s"
-else
-  ac_cv_prog_LN_S=ln
-fi
-fi
-LN_S="$ac_cv_prog_LN_S"
-if test "$ac_cv_prog_LN_S" = "ln -s"; then
-  echo "$ac_t""yes" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "sh", so it can be a program name with args.
-set dummy sh; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1711: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_SH'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$SH" in
-  /*)
-  ac_cv_path_SH="$SH" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_SH="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_SH" && ac_cv_path_SH="/bin/sh"
-  ;;
-esac
-fi
-SH="$ac_cv_path_SH"
-if test -n "$SH"; then
-  echo "$ac_t""$SH" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "false", so it can be a program name with args.
-set dummy false; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1743: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_FALSE'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$FALSE" in
-  /*)
-  ac_cv_path_FALSE="$FALSE" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_FALSE="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_FALSE" && ac_cv_path_FALSE="/usr/bin/false"
-  ;;
-esac
-fi
-FALSE="$ac_cv_path_FALSE"
-if test -n "$FALSE"; then
-  echo "$ac_t""$FALSE" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "true", so it can be a program name with args.
-set dummy true; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1775: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_TRUE'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$TRUE" in
-  /*)
-  ac_cv_path_TRUE="$TRUE" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_TRUE="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_TRUE" && ac_cv_path_TRUE="/usr/bin/true"
-  ;;
-esac
-fi
-TRUE="$ac_cv_path_TRUE"
-if test -n "$TRUE"; then
-  echo "$ac_t""$TRUE" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "rm", so it can be a program name with args.
-set dummy rm; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1807: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_RM'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$RM" in
-  /*)
-  ac_cv_path_RM="$RM" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_RM="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_RM" && ac_cv_path_RM="$FALSE"
-  ;;
-esac
-fi
-RM="$ac_cv_path_RM"
-if test -n "$RM"; then
-  echo "$ac_t""$RM" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "mv", so it can be a program name with args.
-set dummy mv; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1839: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MV'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$MV" in
-  /*)
-  ac_cv_path_MV="$MV" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_MV="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MV" && ac_cv_path_MV="$FALSE"
-  ;;
-esac
-fi
-MV="$ac_cv_path_MV"
-if test -n "$MV"; then
-  echo "$ac_t""$MV" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "mkdir", so it can be a program name with args.
-set dummy mkdir; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1871: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MKDIR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$MKDIR" in
-  /*)
-  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_MKDIR="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MKDIR" && ac_cv_path_MKDIR="$FALSE"
-  ;;
-esac
-fi
-MKDIR="$ac_cv_path_MKDIR"
-if test -n "$MKDIR"; then
-  echo "$ac_t""$MKDIR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "ln", so it can be a program name with args.
-set dummy ln; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1903: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_LN'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$LN" in
-  /*)
-  ac_cv_path_LN="$LN" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_LN="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_LN" && ac_cv_path_LN="cp"
-  ;;
-esac
-fi
-LN="$ac_cv_path_LN"
-if test -n "$LN"; then
-  echo "$ac_t""$LN" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "perl", so it can be a program name with args.
-set dummy perl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1935: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_PERL'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$PERL" in
-  /*)
-  ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_PERL="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_PERL" && ac_cv_path_PERL="/usr/local/bin/perl"
-  ;;
-esac
-fi
-PERL="$ac_cv_path_PERL"
-if test -n "$PERL"; then
-  echo "$ac_t""$PERL" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "makedepend", so it can be a program name with args.
-set dummy makedepend; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1967: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_MAKEDEPEND'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$MAKEDEPEND" in
-  /*)
-  ac_cv_path_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_MAKEDEPEND="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_MAKEDEPEND" && ac_cv_path_MAKEDEPEND="$TRUE"
-  ;;
-esac
-fi
-MAKEDEPEND="$ac_cv_path_MAKEDEPEND"
-if test -n "$MAKEDEPEND"; then
-  echo "$ac_t""$MAKEDEPEND" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Extract the first word of "ar", so it can be a program name with args.
-set dummy ar; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1999: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  case "$AR" in
-  /*)
-  ac_cv_path_AR="$AR" # Let the user override the test with a path.
-  ;;
-  *)
-  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_path_AR="$ac_dir/$ac_word"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_path_AR" && ac_cv_path_AR="$FALSE"
-  ;;
-esac
-fi
-AR="$ac_cv_path_AR"
-if test -n "$AR"; then
-  echo "$ac_t""$AR" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-case "$host" in
-    *-hp-hpux*)
-	echo "Disabling 'ranlib' for HP-UX..."
-	RANLIB=":"
-	;;
-esac
-
-AR_R="$AR r"
-case "$host" in
-	*-next-nextstep3)
-		AR="libtool -o"
-		;;
-esac
-
-
-ac_header_dirent=no
-for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6
-echo "configure:2049: checking for $ac_hdr that defines DIR" >&5
-if eval "test \"`echo '$''{'ac_cv_header_dirent_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2054 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <$ac_hdr>
-int main() {
-DIR *dirp = 0;
-; return 0; }
-EOF
-if { (eval echo configure:2062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  eval "ac_cv_header_dirent_$ac_safe=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_dirent_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_dirent_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- ac_header_dirent=$ac_hdr; break
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
-if test $ac_header_dirent = dirent.h; then
-echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6
-echo "configure:2087: checking for opendir in -ldir" >&5
-ac_lib_var=`echo dir'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-ldir  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2095 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:2106: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -ldir"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-else
-echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6
-echo "configure:2128: checking for opendir in -lx" >&5
-ac_lib_var=`echo x'_'opendir | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lx  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 2136 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char opendir();
-
-int main() {
-opendir()
-; return 0; }
-EOF
-if { (eval echo configure:2147: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  LIBS="$LIBS -lx"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-fi
-
-echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:2170: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2175 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2183: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  ac_cv_header_stdc=yes
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 2200 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 2218 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
-  :
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2239 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:2250: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  :
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-
-for ac_hdr in \
-	arpa/inet.h \
-	arpa/nameser.h \
-	assert.h \
-	bstring.h \
-	config.h \
-	crypt.h \
-	ctype.h \
-	errno.h \
-	fcntl.h \
-	getopt.h \
-	gnumalloc.h \
-	grp.h \
-	ip_compat.h \
-	ip_fil.h \
-	ip_nat.h \
-	libc.h \
-	limits.h \
-	malloc.h \
-	math.h \
-	memory.h \
-	mount.h \
-	net/if.h \
-	netdb.h \
-	netinet/in.h \
-	netinet/tcp.h \
-	netinet/ip_compat.h \
-	netinet/ip_fil.h \
-	netinet/ip_nat.h \
-	poll.h \
-	pwd.h \
-	regex.h \
-	resolv.h \
-	sched.h \
-	signal.h \
-	stdarg.h \
-	stddef.h \
-	stdio.h \
-	stdlib.h \
-	string.h \
-	strings.h \
-	sys/file.h \
-	sys/ioctl.h \
-	sys/param.h \
-	sys/resource.h \
-	sys/select.h\
-	sys/socket.h \
-	sys/stat.h \
-	sys/statvfs.h \
-	sys/syscall.h \
-	sys/time.h \
-	sys/types.h \
-	sys/un.h \
-	sys/vfs.h \
-	sys/wait.h \
-	syslog.h \
-	time.h \
-	unistd.h \
-	varargs.h \
-
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:2337: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2342 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:2347: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-echo $ac_n "checking for working const""... $ac_c" 1>&6
-echo "configure:2375: checking for working const" >&5
-if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2380 "configure"
-#include "confdefs.h"
-
-int main() {
-
-/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-/* SunOS 4.1.1 cc rejects this.  */
-char const *const *ccp;
-char **p;
-/* NEC SVR4.0.2 mips cc rejects this.  */
-struct point {int x, y;};
-static struct point const zero = {0,0};
-/* AIX XL C 1.02.0.0 rejects this.
-   It does not let you subtract one const X* pointer from another in an arm
-   of an if-expression whose if-part is not a constant expression */
-const char *g = "string";
-ccp = &g + (g ? g-g : 0);
-/* HPUX 7.0 cc rejects these. */
-++ccp;
-p = (char**) ccp;
-ccp = (char const *const *) p;
-{ /* SCO 3.2v4 cc rejects this.  */
-  char *t;
-  char const *s = 0 ? (char *) 0 : (char const *) 0;
-
-  *t++ = 0;
-}
-{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
-  int x[] = {25, 17};
-  const int *foo = &x[0];
-  ++foo;
-}
-{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
-  typedef const int *iptr;
-  iptr p = 0;
-  ++p;
-}
-{ /* AIX XL C 1.02.0.0 rejects this saying
-     "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
-  struct s { int j; const int *ap[3]; };
-  struct s *b; b->j = 5;
-}
-{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
-  const int foo = 10;
-}
-
-; return 0; }
-EOF
-if { (eval echo configure:2429: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_const=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_const=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_c_const" 1>&6
-if test $ac_cv_c_const = no; then
-  cat >> confdefs.h <<\EOF
-#define const 
-EOF
-
-fi
-
-echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6
-echo "configure:2450: checking whether byte ordering is bigendian" >&5
-if eval "test \"`echo '$''{'ac_cv_c_bigendian'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_cv_c_bigendian=unknown
-# See if sys/param.h defines the BYTE_ORDER macro.
-cat > conftest.$ac_ext <<EOF
-#line 2457 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
- bogus endian macros
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:2468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  # It does; now see whether it defined to BIG_ENDIAN or not.
-cat > conftest.$ac_ext <<EOF
-#line 2472 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/param.h>
-int main() {
-
-#if BYTE_ORDER != BIG_ENDIAN
- not big endian
-#endif
-; return 0; }
-EOF
-if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_c_bigendian=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_c_bigendian=no
-fi
-rm -f conftest*
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-if test $ac_cv_c_bigendian = unknown; then
-if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2503 "configure"
-#include "confdefs.h"
-main () {
-  /* Are we little or big endian?  From Harbison&Steele.  */
-  union
-  {
-    long l;
-    char c[sizeof (long)];
-  } u;
-  u.l = 1;
-  exit (u.c[sizeof (long) - 1] == 1);
-}
-EOF
-if { (eval echo configure:2516: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_c_bigendian=no
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_bigendian=yes
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_c_bigendian" 1>&6
-if test $ac_cv_c_bigendian = yes; then
-  cat >> confdefs.h <<\EOF
-#define WORDS_BIGENDIAN 1
-EOF
-
-fi
-
-
-echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6
-echo "configure:2541: checking if ANSI prototypes work" >&5
-if eval "test \"`echo '$''{'ac_cv_have_ansi_prototypes'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-  cat > conftest.$ac_ext <<EOF
-#line 2547 "configure"
-#include "confdefs.h"
-int foo(char *); int foo (char *bar) {return 1;}
-int main() {
-foo("bar")
-; return 0; }
-EOF
-if { (eval echo configure:2554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_have_ansi_prototypes="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_have_ansi_prototypes="no"
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_have_ansi_prototypes" 1>&6
-if test $ac_cv_have_ansi_prototypes = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ANSI_PROTOTYPES 1
-EOF
-
-fi
-
-echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6
-echo "configure:2576: checking for tm->tm_gmtoff" >&5
-if eval "test \"`echo '$''{'ac_cv_have_tm_gmoff'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-  cat > conftest.$ac_ext <<EOF
-#line 2582 "configure"
-#include "confdefs.h"
-#include <time.h>
-#include <sys/time.h>
-int main() {
-struct tm foo;
-      foo.tm_gmtoff = 0;
-; return 0; }
-EOF
-if { (eval echo configure:2591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_have_tm_gmoff="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_have_tm_gmoff="no"
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_have_tm_gmoff" 1>&6
-if test $ac_cv_have_tm_gmoff = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_TM_GMTOFF 1
-EOF
-
-fi
-
-echo $ac_n "checking for struct mallinfo""... $ac_c" 1>&6
-echo "configure:2613: checking for struct mallinfo" >&5
-if eval "test \"`echo '$''{'ac_cv_have_struct_mallinfo'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-  cat > conftest.$ac_ext <<EOF
-#line 2619 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if HAVE_MALLOC_H
-#include <malloc.h>
-#endif
-int main() {
-struct mallinfo foo;
-    foo.arena = 0;
-    foo.ordblks = 0;
-    foo.smblks = 0;
-    foo.hblks = 0;
-    foo.hblkhd = 0;
-    foo.uordblks = 0;
-    foo.fordblks = 0;
-    foo.keepcost = 0;
-; return 0; }
-EOF
-if { (eval echo configure:2637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_have_struct_mallinfo="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_have_struct_mallinfo="no"
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_have_struct_mallinfo" 1>&6
-if test $ac_cv_have_struct_mallinfo = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_MALLINFO 1
-EOF
-
-fi
-
-echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6
-echo "configure:2659: checking for extended mallinfo" >&5
-if eval "test \"`echo '$''{'ac_cv_have_ext_mallinfo'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-  cat > conftest.$ac_ext <<EOF
-#line 2665 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <malloc.h>
-int main() {
-struct mallinfo foo;
-      foo.mxfast = 0;
-; return 0; }
-EOF
-if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_have_ext_mallinfo="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_have_ext_mallinfo="no"
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_have_ext_mallinfo" 1>&6
-if test $ac_cv_have_ext_mallinfo = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_EXT_MALLINFO 1
-EOF
-
-fi
-
-echo $ac_n "checking for struct rusage""... $ac_c" 1>&6
-echo "configure:2696: checking for struct rusage" >&5
-if eval "test \"`echo '$''{'ac_cv_have_struct_rusage'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-  cat > conftest.$ac_ext <<EOF
-#line 2702 "configure"
-#include "confdefs.h"
-
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#if HAVE_SYS_RESOURCE_H
-#include <sys/resource.h>
-#endif
-int main() {
-struct rusage R;
-; return 0; }
-EOF
-if { (eval echo configure:2715: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_have_struct_rusage="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_have_struct_rusage="no"
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_have_struct_rusage" 1>&6
-if test $ac_cv_have_struct_rusage = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_STRUCT_RUSAGE 1
-EOF
-
-fi
-
-echo $ac_n "checking for ip->ip_hl""... $ac_c" 1>&6
-echo "configure:2737: checking for ip->ip_hl" >&5
-if eval "test \"`echo '$''{'ac_cv_have_ip_hl'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-  cat > conftest.$ac_ext <<EOF
-#line 2743 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <netinet/in_systm.h>
-#include <netinet/ip.h>
-#ifdef __linux__
-#define ip_hl ihl
-#endif
-#ifndef __linux__
-#define iphdr ip
-#endif
-int main() {
-struct iphdr ip;
-      ip.ip_hl= 0;
-; return 0; }
-EOF
-if { (eval echo configure:2760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_have_ip_hl="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_have_ip_hl="no"
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_have_ip_hl" 1>&6
-if test $ac_cv_have_ip_hl = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_IP_HL 1
-EOF
-
-fi
-
-echo $ac_n "checking size of int""... $ac_c" 1>&6
-echo "configure:2782: checking size of int" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_int'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2790 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(int));
-  exit(0);
-}
-EOF
-if { (eval echo configure:2801: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_int=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_int=0
-fi
-rm -fr conftest*
-fi
-
-fi
-echo "$ac_t""$ac_cv_sizeof_int" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_INT $ac_cv_sizeof_int
-EOF
-
-
-echo $ac_n "checking size of long""... $ac_c" 1>&6
-echo "configure:2821: checking size of long" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_long'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2829 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(long));
-  exit(0);
-}
-EOF
-if { (eval echo configure:2840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_long=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_long=0
-fi
-rm -fr conftest*
-fi
-
-fi
-echo "$ac_t""$ac_cv_sizeof_long" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_LONG $ac_cv_sizeof_long
-EOF
-
-
-echo $ac_n "checking size of void *""... $ac_c" 1>&6
-echo "configure:2860: checking size of void *" >&5
-if eval "test \"`echo '$''{'ac_cv_sizeof_void_p'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2868 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-main()
-{
-  FILE *f=fopen("conftestval", "w");
-  if (!f) exit(1);
-  fprintf(f, "%d\n", sizeof(void *));
-  exit(0);
-}
-EOF
-if { (eval echo configure:2879: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_sizeof_void_p=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_sizeof_void_p=0
-fi
-rm -fr conftest*
-fi
-
-fi
-echo "$ac_t""$ac_cv_sizeof_void_p" 1>&6
-cat >> confdefs.h <<EOF
-#define SIZEOF_VOID_P $ac_cv_sizeof_void_p
-EOF
-
-
-
-# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
-# for constant arguments.  Useless!
-echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6
-echo "configure:2902: checking for working alloca.h" >&5
-if eval "test \"`echo '$''{'ac_cv_header_alloca_h'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2907 "configure"
-#include "confdefs.h"
-#include <alloca.h>
-int main() {
-char *p = alloca(2 * sizeof(int));
-; return 0; }
-EOF
-if { (eval echo configure:2914: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_header_alloca_h=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_alloca_h=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_header_alloca_h" 1>&6
-if test $ac_cv_header_alloca_h = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA_H 1
-EOF
-
-fi
-
-echo $ac_n "checking for alloca""... $ac_c" 1>&6
-echo "configure:2935: checking for alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 2940 "configure"
-#include "confdefs.h"
-
-#ifdef __GNUC__
-# define alloca __builtin_alloca
-#else
-# if HAVE_ALLOCA_H
-#  include <alloca.h>
-# else
-#  ifdef _AIX
- #pragma alloca
-#  else
-#   ifndef alloca /* predefined by HP cc +Olibcalls */
-char *alloca ();
-#   endif
-#  endif
-# endif
-#endif
-
-int main() {
-char *p = (char *) alloca(1);
-; return 0; }
-EOF
-if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  ac_cv_func_alloca_works=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_func_alloca_works=no
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_func_alloca_works" 1>&6
-if test $ac_cv_func_alloca_works = yes; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_ALLOCA 1
-EOF
-
-fi
-
-if test $ac_cv_func_alloca_works = no; then
-  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
-  # that cause trouble.  Some versions do not even contain alloca or
-  # contain a buggy version.  If you still want to use their alloca,
-  # use ar to extract alloca.o from them instead of compiling alloca.c.
-  ALLOCA=alloca.o
-  cat >> confdefs.h <<\EOF
-#define C_ALLOCA 1
-EOF
-
-
-echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6
-echo "configure:2995: checking whether alloca needs Cray hooks" >&5
-if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3000 "configure"
-#include "confdefs.h"
-#if defined(CRAY) && ! defined(CRAY2)
-webecray
-#else
-wenotbecray
-#endif
-
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "webecray" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_os_cray=yes
-else
-  rm -rf conftest*
-  ac_cv_os_cray=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_os_cray" 1>&6
-if test $ac_cv_os_cray = yes; then
-for ac_func in _getb67 GETB67 getb67; do
-  echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:3025: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3030 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<EOF
-#define CRAY_STACKSEG_END $ac_func
-EOF
-
-  break
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-done
-fi
-
-echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6
-echo "configure:3080: checking stack direction for C alloca" >&5
-if eval "test \"`echo '$''{'ac_cv_c_stack_direction'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-  ac_cv_c_stack_direction=0
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3088 "configure"
-#include "confdefs.h"
-find_stack_direction ()
-{
-  static char *addr = 0;
-  auto char dummy;
-  if (addr == 0)
-    {
-      addr = &dummy;
-      return find_stack_direction ();
-    }
-  else
-    return (&dummy > addr) ? 1 : -1;
-}
-main ()
-{
-  exit (find_stack_direction() < 0);
-}
-EOF
-if { (eval echo configure:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_c_stack_direction=1
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_c_stack_direction=-1
-fi
-rm -fr conftest*
-fi
-
-fi
-
-echo "$ac_t""$ac_cv_c_stack_direction" 1>&6
-cat >> confdefs.h <<EOF
-#define STACK_DIRECTION $ac_cv_c_stack_direction
-EOF
-
-fi
-
-
-echo $ac_n "checking for pid_t""... $ac_c" 1>&6
-echo "configure:3130: checking for pid_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_pid_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3135 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_pid_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_pid_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_pid_t" 1>&6
-if test $ac_cv_type_pid_t = no; then
-  cat >> confdefs.h <<\EOF
-#define pid_t int
-EOF
-
-fi
-
-echo $ac_n "checking for size_t""... $ac_c" 1>&6
-echo "configure:3163: checking for size_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_size_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3168 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_size_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_size_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_size_t" 1>&6
-if test $ac_cv_type_size_t = no; then
-  cat >> confdefs.h <<\EOF
-#define size_t unsigned int
-EOF
-
-fi
-
-echo $ac_n "checking for ssize_t""... $ac_c" 1>&6
-echo "configure:3196: checking for ssize_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_ssize_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3201 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_ssize_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_ssize_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_ssize_t" 1>&6
-if test $ac_cv_type_ssize_t = no; then
-  cat >> confdefs.h <<\EOF
-#define ssize_t int
-EOF
-
-fi
-
-echo $ac_n "checking for off_t""... $ac_c" 1>&6
-echo "configure:3229: checking for off_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_off_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3234 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_off_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_off_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_off_t" 1>&6
-if test $ac_cv_type_off_t = no; then
-  cat >> confdefs.h <<\EOF
-#define off_t int
-EOF
-
-fi
-
-echo $ac_n "checking for mode_t""... $ac_c" 1>&6
-echo "configure:3262: checking for mode_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_mode_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3267 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_mode_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_mode_t=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_mode_t" 1>&6
-if test $ac_cv_type_mode_t = no; then
-  cat >> confdefs.h <<\EOF
-#define mode_t u_short
-EOF
-
-fi
-
-echo $ac_n "checking for fd_mask""... $ac_c" 1>&6
-echo "configure:3295: checking for fd_mask" >&5
-if eval "test \"`echo '$''{'ac_cv_type_fd_mask'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 3300 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "fd_mask[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_fd_mask=yes
-else
-  rm -rf conftest*
-  ac_cv_type_fd_mask=no
-fi
-rm -f conftest*
-
-fi
-echo "$ac_t""$ac_cv_type_fd_mask" 1>&6
-if test $ac_cv_type_fd_mask = no; then
-  cat >> confdefs.h <<\EOF
-#define fd_mask int
-EOF
-
-fi
-
-
-echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:3329: checking for socklen_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  
-  cat > conftest.$ac_ext <<EOF
-#line 3335 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <sys/socket.h>
-#if STDC_HEADERS
-#include <stdlib.h>
-#include <stddef.h>
-#endif
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "socklen_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_type_socklen_t=yes
-else
-  rm -rf conftest*
-  ac_cv_type_socklen_t=no
-fi
-rm -f conftest*
-
-
-fi
-
-echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
-if test $ac_cv_type_socklen_t = no; then
-  cat >> confdefs.h <<\EOF
-#define socklen_t int
-EOF
-
-fi
-
-echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6
-echo "configure:3366: checking for main in -lnsl" >&5
-ac_lib_var=`echo nsl'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lnsl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3374 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3381: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lnsl $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6
-echo "configure:3409: checking for main in -lsocket" >&5
-ac_lib_var=`echo socket'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lsocket  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3417 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lsocket $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-if test "x$ac_cv_enabled_dlmalloc" = "xyes" ; then
-  echo "skipping libmalloc check (--enable-dlmalloc specified)"
-else
-  echo $ac_n "checking for main in -lgnumalloc""... $ac_c" 1>&6
-echo "configure:3456: checking for main in -lgnumalloc" >&5
-ac_lib_var=`echo gnumalloc'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lgnumalloc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3464 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3471: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo gnumalloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lgnumalloc $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  if test "$ac_cv_lib_gnumalloc_main" = "yes"; then
-		echo "Disabling extended malloc functions when using gnumalloc"
-		ac_cv_func_mallinfo=no
-		ac_cv_func_mallocblksize=no
-		ac_cv_func_mallopt=no
-  else
-		case "$host" in
-			*-sun-solaris*)
-			  echo "skipping libmalloc check for $host"
-				;;
-			i386-*-freebsd*)
-			  echo "skipping libmalloc check for $host"
-				;;
-			*)
-  
-				echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6
-echo "configure:3514: checking for main in -lmalloc" >&5
-ac_lib_var=`echo malloc'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lmalloc  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3522 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3529: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo malloc | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lmalloc $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-				;;
-		esac
-  fi
-fi
-
-echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6
-echo "configure:3562: checking for main in -lbsd" >&5
-ac_lib_var=`echo bsd'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3570 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3577: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo bsd | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lbsd $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking for main in -lregex""... $ac_c" 1>&6
-echo "configure:3605: checking for main in -lregex" >&5
-ac_lib_var=`echo regex'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lregex  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3613 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3620: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  REGEXLIB="-lregex"
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6
-echo "configure:3641: checking for gethostbyname in -lbind" >&5
-ac_lib_var=`echo bind'_'gethostbyname | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lbind  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3649 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char gethostbyname();
-
-int main() {
-gethostbyname()
-; return 0; }
-EOF
-if { (eval echo configure:3660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo bind | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lbind $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test $ac_cv_lib_bind_gethostbyname = "no" ; then
-    case "$host" in
-	i386-*-freebsd*)
-		echo "skipping libresolv checks for $host"
-		;;
-	*)
-		echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6
-echo "configure:3694: checking for inet_aton in -lresolv" >&5
-ac_lib_var=`echo resolv'_'inet_aton | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lresolv  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3702 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char inet_aton();
-
-int main() {
-inet_aton()
-; return 0; }
-EOF
-if { (eval echo configure:3713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  echo $ac_n "checking for inet_aton in -l44bsd""... $ac_c" 1>&6
-echo "configure:3729: checking for inet_aton in -l44bsd" >&5
-ac_lib_var=`echo 44bsd'_'inet_aton | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-l44bsd  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3737 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char inet_aton();
-
-int main() {
-inet_aton()
-; return 0; }
-EOF
-if { (eval echo configure:3748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo 44bsd | sed -e 's/^a-zA-Z0-9_/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-l44bsd $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-		echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6
-echo "configure:3780: checking for main in -lresolv" >&5
-ac_lib_var=`echo resolv'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lresolv  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3788 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo resolv | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lresolv $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-		;;
-    esac
-fi
-echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
-echo "configure:3826: checking for main in -lm" >&5
-ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lm  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3834 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3841: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lm $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6
-echo "configure:3870: checking for crypt in -lcrypt" >&5
-ac_lib_var=`echo crypt'_'crypt | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lcrypt  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3878 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char crypt();
-
-int main() {
-crypt()
-; return 0; }
-EOF
-if { (eval echo configure:3889: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo crypt | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lcrypt $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test $ac_cv_lib_crypt_crypt = "yes"; then
-  CRYPTLIB="-lcrypt"
-fi
-
-
-echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6
-echo "configure:3922: checking for main in -lpthread" >&5
-ac_lib_var=`echo pthread'_'main | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lpthread  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3930 "configure"
-#include "confdefs.h"
-
-int main() {
-main()
-; return 0; }
-EOF
-if { (eval echo configure:3937: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo pthread | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lpthread $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test $ac_cv_lib_pthread_main = "yes"; then
-  PTHREADLIB="-lpthread"
-fi
-
-
-case "$host" in
-	*-pc-sco3.2*)
-		echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6
-echo "configure:3972: checking for strftime in -lintl" >&5
-ac_lib_var=`echo intl'_'strftime | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lintl  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 3980 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char strftime();
-
-int main() {
-strftime()
-; return 0; }
-EOF
-if { (eval echo configure:3991: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_lib=HAVE_LIB`echo intl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
-    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
-
-  LIBS="-lintl $LIBS"
-
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-		;;
-esac
-
-case "$host" in
-	i386-*-solaris2.*)
-    		if test "$GCC" = "yes"; then
-			echo "Removing -O for gcc on $host"
-			CFLAGS="`echo $CFLAGS | sed -e 's/-O[0-9]*//'`"
-		fi
-		;;
-	*-sgi-irix*)
-        	echo "Removing -lsocket for IRIX..."
-        	LIBS=`echo $LIBS | sed -e s/-lsocket//`
-        	echo "Removing -lnsl for IRIX..."
-        	LIBS=`echo $LIBS | sed -e s/-lnsl//`
-		echo "Removing -lbsd for IRIX..."
-		LIBS=`echo $LIBS | sed -e s/-lbsd//`
-		;;
-	*-ibm-aix*)
-		echo "Removing -lbsd for AIX..."
-		LIBS=`echo $LIBS | sed -e s/-lbsd//`
-		echo "disabling snprintf/vsnprintf for $host"
-		ac_cv_func_snprintf=no
-		ac_cv_func_vsnprintf=no
-		;;
-	*m88k*)
-		CFLAGS="$CFLAGS -D_SQUID_MOTOROLA_"
-		cat >> confdefs.h <<\EOF
-#define GETTIMEOFDAY_NO_TZP 1
-EOF
-
-		;;
-	*-*-solaris2.[0-4])
-		cat >> confdefs.h <<\EOF
-#define GETTIMEOFDAY_NO_TZP 1
-EOF
-
-		;;
-	*-sony-newsos[56]*)
-		cat >> confdefs.h <<\EOF
-#define GETTIMEOFDAY_NO_TZP 1
-EOF
-
-		;;
-esac
-
-# Recommended by Balint Nagy Endre <bne@CareNet.hu>
-case "$host" in
-	*-univel-sysv4.2MP)
-		if test `uname -v` = "2.03"; then
-			echo "disabling mallinfo for $host"
-			ac_cv_func_mallinfo=no
-		fi
-		;;
-esac
-
-# Disable poll() on certain platforms. Override by setting ac_cv_func_poll
-# when running configure.
-if test -z "$ac_cv_func_poll"; then
-	case "$host" in
-		alpha-dec-osf3.*)
-			# John Kay (jkay@nlanr.net) 19970818
-			echo "disabling poll for $host..."
-			ac_cv_func_poll='no'
-			;;
-		*-hp-hpux*.*)
-			# Duane Wessels
-			echo "disabling poll for $host..."
-			ac_cv_func_poll='no'
-			;;
-		*-linux-*)
-			# Henrik Nordstrom (hno@hem.passagen.se) 19980817
-			# poll is problematic on Linux.  We disable it
-			# by default until Linux gets it right.
-			rev=`uname -r | awk -F. '{printf "%03d%03d",$1,$2}'`
-			if test $rev -lt 002002; then
-			    echo "disabling poll for $host < 2.2..."
-			    ac_cv_func_poll='no'
-			fi
-			;;
-		powerpc-ibm-aix4.1.*)
-			# Mike Laster (mlaster@metavillage.com) 19981021
-			echo "disabling poll for $host..."
-			ac_cv_func_poll='no'
-			;;
-		*-pc-sco3.2*)
-			# Robert Side <rside@aiinc.bc.ca>
-			# Mon, 18 Jan 1999 17:48:00 GMT
-			echo "disabling poll for $host..."
-			ac_cv_func_poll='no'
-			;;
-	esac
-fi
-
-for ac_func in \
-	bcopy \
-	crypt \
-	fchmod \
-	getdtablesize \
-	getpagesize \
-	getrusage \
-	getspnam \
-	lrand48 \
-	mallinfo \
-	mallocblksize \
-	mallopt \
-	memcpy \
-	memmove \
-	memset \
-	mktime \
-	mstats \
-	poll \
-	putenv \
-	random \
-	regcomp \
-	regexec \
-	regfree \
-	res_init \
-	rint \
-	seteuid \
-	setgroups \
-	setpgrp \
-	setrlimit \
-	getrlimit \
-	setsid \
-	sigaction \
-	snprintf \
-	srand48 \
-	srandom \
-	sysconf \
-	syslog \
-	timegm \
-	vsnprintf \
-
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4154: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4159 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4182: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-
-if test "$async_io" = "yes" ; then
-	for ac_func in \
-		pthread_attr_setscope \
-		pthread_setschedparam \
-		pthread_attr_setschedparam \
-	
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4215: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4220 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-fi
-
-echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6
-echo "configure:4270: checking if setresuid is implemented" >&5
-if eval "test \"`echo '$''{'ac_cv_func_setresuid'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test "$cross_compiling" = yes; then
-    { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; }
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4278 "configure"
-#include "confdefs.h"
-
-#include <stdlib.h>
-  int main() {
-    if(setresuid(-1,-1,-1)) {
-      perror("setresuid:");
-      exit(1);
-    }
-    exit(0);
-  }
-  
-EOF
-if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  ac_cv_func_setresuid="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_func_setresuid="no"
-fi
-rm -fr conftest*
-fi
-
-
-fi
-
-echo "$ac_t""$ac_cv_func_setresuid" 1>&6
-if test "$ac_cv_func_setresuid" = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_SETRESUID 1
-EOF
-
-fi
-
-if test "$IPF_TRANSPARENT" ; then
-    echo $ac_n "checking if IP-Filter header files are installed""... $ac_c" 1>&6
-echo "configure:4316: checking if IP-Filter header files are installed" >&5
-    if test "$ac_cv_header_ip_compat_h" = "yes" &&
-       test "$ac_cv_header_ip_fil_h" = "yes" &&
-       test "$ac_cv_header_ip_nat_h" = "yes" ; then
-        IPF_TRANSPARENT="yes"
-        cat >> confdefs.h <<\EOF
-#define IPF_TRANSPARENT 1
-EOF
-
-    elif test "$ac_cv_header_netinet_ip_compat_h" = "yes" &&
-         test "$ac_cv_header_netinet_ip_fil_h" = "yes" &&
-         test "$ac_cv_header_netinet_ip_nat_h" = "yes" ; then
-        IPF_TRANSPARENT="yes"
-        cat >> confdefs.h <<\EOF
-#define IPF_TRANSPARENT 1
-EOF
-
-    else
-        IPF_TRANSPARENT="no"
-        cat >> confdefs.h <<\EOF
-#define IPF_TRANSPARENT 0
-EOF
-
-    fi
-    echo "$ac_t""$IPF_TRANSPARENT" 1>&6
-fi 
-if test "$IPF_TRANSPARENT" = "no" ; then
-    echo "WARNING: Cannot find necessary IP-Filter header files"
-    echo "         Transparent Proxy support WILL NOT be enabled"
-    sleep 10
-fi
-
-if test -z "$USE_GNUREGEX" ; then
-    case "$host" in
-    *-sun-solaris2.[0-4])
-	  USE_GNUREGEX="yes"
-	  ;;
-    *-next-nextstep*)
-	  USE_GNUREGEX="yes"
-	  ;;
-    esac
-fi
-echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6
-echo "configure:4359: checking if GNUregex needs to be compiled" >&5
-if test -z "$USE_GNUREGEX"; then
-if test "$ac_cv_func_regcomp" = "no" || test "$USE_GNUREGEX" = "yes" ; then
-	USE_GNUREGEX="yes"
-else
-	cat > conftest.$ac_ext <<EOF
-#line 4365 "configure"
-#include "confdefs.h"
-#include <sys/types.h>
-#include <regex.h>
-int main() {
-regex_t t; regcomp(&t,"",0);
-; return 0; }
-EOF
-if { (eval echo configure:4373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  USE_GNUREGEX="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  USE_GNUREGEX="yes"
-fi
-rm -f conftest*
-fi
-fi
-echo "$ac_t""$USE_GNUREGEX" 1>&6
-if test "$USE_GNUREGEX" = "yes"; then
-	REGEXLIB="-lregex"
-	LIBREGEX="libregex.a"
-	cat >> confdefs.h <<\EOF
-#define USE_GNUREGEX 1
-EOF
-
-fi
-
-
-
-for ac_func in \
-	drand48 \
-	tempnam \
-	strerror \
-
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:4404: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4409 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:4432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
- 
-else
-  echo "$ac_t""no" 1>&6
-LIBOBJS="$LIBOBJS ${ac_func}.o"
-fi
-done
-
-
-
-echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6
-echo "configure:4460: checking Default FD_SETSIZE value" >&5
-if test "$cross_compiling" = yes; then
-  DEFAULT_FD_SETSIZE=256
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4465 "configure"
-#include "confdefs.h"
-
-#if HAVE_STDIO_H
-#include <stdio.h>
-#endif
-#if HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-#if HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-#if HAVE_SYS_SELECT_H
-#include <sys/select.h>
-#endif
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-main() {
-	FILE *fp = fopen("conftestval", "w");
-	fprintf (fp, "%d\n", FD_SETSIZE);
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:4490: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  DEFAULT_FD_SETSIZE=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  DEFAULT_FD_SETSIZE=256
-fi
-rm -fr conftest*
-fi
-
-echo "$ac_t""$DEFAULT_FD_SETSIZE" 1>&6
-cat >> confdefs.h <<EOF
-#define DEFAULT_FD_SETSIZE $DEFAULT_FD_SETSIZE
-EOF
-
-
-echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6
-echo "configure:4509: checking Maximum number of filedescriptors we can open" >&5
-TLDFLAGS="$LDFLAGS"
-case $host in
-i386-unknown-freebsd*)
-    if echo "$LDFLAGS" | grep -q pthread; then
-	LDFLAGS=`echo $LDFLAGS | sed -e "s/-pthread//"`
-    fi
-esac
-if test "$cross_compiling" = yes; then
-  SQUID_MAXFD=256
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4521 "configure"
-#include "confdefs.h"
-
-#include <stdio.h>
-#include <unistd.h>
-#include <sys/time.h>	/* needed on FreeBSD */
-#include <sys/param.h>
-#include <sys/resource.h>
-main() {
-	FILE *fp;
-	int i,j;
-#if __CYGWIN32__
-    /* getrlimit and sysconf returns bogous values on cygwin32.
-     * Number of fds is virtually unlimited in cygwin (sys/param.h)
-     */
-    i = NOFILE;
-#elif HAVE_SETRLIMIT
-    struct rlimit rl;
-#if defined(RLIMIT_NOFILE)
-    if (getrlimit(RLIMIT_NOFILE, &rl) < 0) {
-        perror("getrlimit: RLIMIT_NOFILE");
-    } else {
-        rl.rlim_cur = rl.rlim_max;      /* set it to the max */
-        if (setrlimit(RLIMIT_NOFILE, &rl) < 0) {
-            perror("setrlimit: RLIMIT_NOFILE");
-        }
-    }
-#elif defined(RLIMIT_OFILE)
-    if (getrlimit(RLIMIT_OFILE, &rl) < 0) {
-        perror("getrlimit: RLIMIT_OFILE");
-    } else {
-        rl.rlim_cur = rl.rlim_max;      /* set it to the max */
-        if (setrlimit(RLIMIT_OFILE, &rl) < 0) {
-            perror("setrlimit: RLIMIT_OFILE");
-        }
-    }
-#endif /* RLIMIT_NOFILE */
-#endif /* HAVE_SETRLIMIT */
-	/* by starting at 2^14, we will never get higher
-	than 2^15 for SQUID_MAXFD */
-        i = j = 1<<14;
-        while (j) {
-                j >>= 1;
-                if (dup2(0, i) < 0) { 
-                        i -= j;
-                } else {
-                        close(i);
-                        i += j;
-                }
-        }
-        i++;
-	fp = fopen("conftestval", "w");
-	fprintf (fp, "%d\n", i);
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  SQUID_MAXFD=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  SQUID_MAXFD=256
-fi
-rm -fr conftest*
-fi
-
-echo "$ac_t""$SQUID_MAXFD" 1>&6
-cat >> confdefs.h <<EOF
-#define SQUID_MAXFD $SQUID_MAXFD
-EOF
-
-if test "$SQUID_MAXFD" -lt 512 ; then
-    echo "WARNING: $SQUID_MAXFD may not be enough filedescriptors if your"
-    echo "         cache will be very busy.  Please see the FAQ page"
-    echo "         http://squid.nlanr.net/Squid/FAQ/FAQ-11.html#filedescriptors"
-    echo "         on how to increase your filedescriptor limit"
-    sleep 10
-fi
-LDFLAGS="$TLDFLAGS"
-
-echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6
-echo "configure:4605: checking Default UDP send buffer size" >&5
-if test "$cross_compiling" = yes; then
-  SQUID_UDP_SO_SNDBUF=16384
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4610 "configure"
-#include "confdefs.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-main ()
-{
-	FILE *fp;
-        int fd,val=0,len=sizeof(int);
-	if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
-        if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
-	if (val<=0) exit(1);
-        fp = fopen("conftestval", "w");
-        fprintf (fp, "%d\n", val);
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  SQUID_UDP_SO_SNDBUF=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  SQUID_UDP_SO_SNDBUF=16384
-fi
-rm -fr conftest*
-fi
-
-echo "$ac_t""$SQUID_UDP_SO_SNDBUF" 1>&6
-cat >> confdefs.h <<EOF
-#define SQUID_UDP_SO_SNDBUF $SQUID_UDP_SO_SNDBUF
-EOF
-
-
-echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6
-echo "configure:4650: checking Default UDP receive buffer size" >&5
-if test "$cross_compiling" = yes; then
-  SQUID_UDP_SO_RCVBUF=16384
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4655 "configure"
-#include "confdefs.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-main ()
-{
-	FILE *fp;
-        int fd,val=0,len=sizeof(int);
-	if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) exit(1);
-        if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
-	if (val <= 0) exit(1);
-	fp = fopen("conftestval", "w"); 
-	fprintf (fp, "%d\n", val);
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  SQUID_UDP_SO_RCVBUF=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  SQUID_UDP_SO_RCVBUF=16384
-fi
-rm -fr conftest*
-fi
-
-echo "$ac_t""$SQUID_UDP_SO_RCVBUF" 1>&6
-cat >> confdefs.h <<EOF
-#define SQUID_UDP_SO_RCVBUF $SQUID_UDP_SO_RCVBUF
-EOF
-
-
-echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6
-echo "configure:4695: checking Default TCP send buffer size" >&5
-if test "$cross_compiling" = yes; then
-  SQUID_TCP_SO_SNDBUF=16384
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4700 "configure"
-#include "confdefs.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-main ()
-{
-	FILE *fp;
-        int fd,val=0,len=sizeof(int);
-	if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
-        if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &val, &len) < 0) exit(1);
-	if (val <= 0) exit(1);
-	fp = fopen("conftestval", "w"); 
-	fprintf (fp, "%d\n", val);
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:4721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  SQUID_TCP_SO_SNDBUF=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  SQUID_TCP_SO_SNDBUF=16384
-fi
-rm -fr conftest*
-fi
-
-echo "$ac_t""$SQUID_TCP_SO_SNDBUF" 1>&6
-cat >> confdefs.h <<EOF
-#define SQUID_TCP_SO_SNDBUF $SQUID_TCP_SO_SNDBUF
-EOF
-
-
-echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6
-echo "configure:4740: checking Default TCP receive buffer size" >&5
-if test "$cross_compiling" = yes; then
-  SQUID_TCP_SO_RCVBUF=16384
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4745 "configure"
-#include "confdefs.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include <netinet/in.h>
-main ()
-{
-	FILE *fp;
-        int fd,val=0,len=sizeof(int);
-	if ((fd = socket(AF_INET, SOCK_STREAM, 0)) < 0) exit(1);
-        if (getsockopt(fd, SOL_SOCKET, SO_RCVBUF, &val, &len) < 0) exit(1);
-	if (val <= 0) exit(1);
-	fp = fopen("conftestval", "w"); 
-	fprintf (fp, "%d\n", val);
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:4766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  SQUID_TCP_SO_RCVBUF=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  SQUID_TCP_SO_RCVBUF=16384
-fi
-rm -fr conftest*
-fi
-
-echo "$ac_t""$SQUID_TCP_SO_RCVBUF" 1>&6
-cat >> confdefs.h <<EOF
-#define SQUID_TCP_SO_RCVBUF $SQUID_TCP_SO_RCVBUF
-EOF
-
-
-echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6
-echo "configure:4785: checking if sys_errlist is already defined" >&5
-if eval "test \"`echo '$''{'ac_cv_needs_sys_errlist'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4790 "configure"
-#include "confdefs.h"
-#include <stdio.h>
-int main() {
-char *s = sys_errlist;
-; return 0; }
-EOF
-if { (eval echo configure:4797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_needs_sys_errlist="no"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_needs_sys_errlist="yes"
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_needs_sys_errlist" 1>&6
-if test "$ac_cv_needs_sys_errlist" = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define NEED_SYS_ERRLIST 1
-EOF
-
-fi
-
-echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6
-echo "configure:4819: checking for libresolv _dns_ttl_ hack" >&5
-cat > conftest.$ac_ext <<EOF
-#line 4821 "configure"
-#include "confdefs.h"
-extern int _dns_ttl_;
-int main() {
-return _dns_ttl_;
-; return 0; }
-EOF
-if { (eval echo configure:4828: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  echo "$ac_t""yes" 1>&6
-cat >> confdefs.h <<\EOF
-#define LIBRESOLV_DNS_TTL_HACK 1
-EOF
-
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  echo "$ac_t""no" 1>&6
-fi
-rm -f conftest*
-
-echo $ac_n "checking if inet_ntoa() actually works""... $ac_c" 1>&6
-echo "configure:4844: checking if inet_ntoa() actually works" >&5
-if test "$cross_compiling" = yes; then
-  INET_NTOA_RESULT="broken"
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4849 "configure"
-#include "confdefs.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-main ()
-{
-	FILE *fp;
-	struct in_addr in;
-	in.s_addr = inet_addr("1.2.3.4");
-	fp = fopen("conftestval", "w"); 
-	fprintf (fp, "%s\n", inet_ntoa(in));
-	exit(0);
-}
-
-EOF
-if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  INET_NTOA_RESULT=`cat conftestval`
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  INET_NTOA_RESULT="broken"
-fi
-rm -fr conftest*
-fi
-
-if test "$INET_NTOA_RESULT" = "1.2.3.4" ; then
-	echo "$ac_t"""yes"" 1>&6
-else
-	echo "$ac_t"""no"" 1>&6
-	echo "Will use our own inet_ntoa()."
-	LIBOBJS="$LIBOBJS inet_ntoa.o"
-#	echo "WARNING: This looks bad, and probably prevents Squid from working."
-#	echo "         If you're on IRIX and using GCC 2.8, you probably need"
-#	echo "         to use the IRIX C compiler instead."
-#	sleep 10
-fi
-
-if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then
-echo $ac_n "checking for working statvfs() interface""... $ac_c" 1>&6
-echo "configure:4894: checking for working statvfs() interface" >&5
-cat > conftest.$ac_ext <<EOF
-#line 4896 "configure"
-#include "confdefs.h"
-
-#include <stdlib.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/statvfs.h>
-
-int main() {
-
-struct statvfs sfs;
-sfs.f_blocks = sfs.f_bfree = sfs.f_frsize = 
-sfs.f_files = sfs.f_ffree = 0;
-statvfs("/tmp", &sfs);
-
-; return 0; }
-EOF
-if { (eval echo configure:4913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_func_statvfs=yes
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_func_statvfs=no
-fi
-rm -f conftest*
-echo "$ac_t""$ac_cv_func_statvfs" 1>&6
-if test "$ac_cv_func_statvfs" = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_STATVFS 1
-EOF
-
-fi
-fi
-
-echo $ac_n "checking for _res.nsaddr_list""... $ac_c" 1>&6
-echo "configure:4933: checking for _res.nsaddr_list" >&5
-if eval "test \"`echo '$''{'ac_cv_have_res_nsaddr_list'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4938 "configure"
-#include "confdefs.h"
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#if HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#if HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#if HAVE_RESOLV_H
-#include <resolv.h>
-#endif
-
-int main() {
-_res.nsaddr_list[0];
-; return 0; }
-EOF
-if { (eval echo configure:4961: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_have_res_nsaddr_list="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_have_res_nsaddr_list="no"
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_have_res_nsaddr_list" 1>&6
-if test $ac_cv_have_res_nsaddr_list = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_RES_NSADDR_LIST 1
-EOF
-
-fi
-
-if test $ac_cv_have_res_nsaddr_list = "no" ; then
-echo $ac_n "checking for _res.ns_list""... $ac_c" 1>&6
-echo "configure:4983: checking for _res.ns_list" >&5
-if eval "test \"`echo '$''{'ac_cv_have_res_ns_list'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 4988 "configure"
-#include "confdefs.h"
-
-#if HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-#if HAVE_NETINET_IN_H
-#include <netinet/in.h>
-#endif
-#if HAVE_ARPA_INET_H
-#include <arpa/inet.h>
-#endif
-#if HAVE_ARPA_NAMESER_H
-#include <arpa/nameser.h>
-#endif
-#if HAVE_RESOLV_H
-#include <resolv.h>
-#endif
-
-int main() {
-_res.ns_list[0].addr;
-; return 0; }
-EOF
-if { (eval echo configure:5011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  ac_cv_have_res_ns_list="yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_have_res_ns_list="no"
-fi
-rm -f conftest*
-fi
-
-echo "$ac_t""$ac_cv_have_res_ns_list" 1>&6
-if test $ac_cv_have_res_ns_list = "yes" ; then
-  cat >> confdefs.h <<\EOF
-#define HAVE_RES_NS_LIST 1
-EOF
-
-fi
-fi
-
-XTRA_OBJS=''
-if test "$ac_cv_lib_malloc_main" = "yes" ; then
-	if test -r /usr/lib/debug/malloc.o ; then
-		XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/malloc.o"
-	fi
-	if test -r /usr/lib/debug/mallocmap.o ; then
-		XTRA_OBJS="$XTRA_OBJS /usr/lib/debug/mallocmap.o"
-	fi
-fi
-
-
-
-if test -z "$XTRA_LIBS"; then
-	XTRA_LIBS="$LIBS"
-		XTRA_LIBS=`echo $XTRA_LIBS | sed -e "s/-lcrypt//"`
-		XTRA_LIBS=`echo $XTRA_LIBS | sed -e "s/-lpthread//"`
-		XTRA_LIBS=`echo $XTRA_LIBS | sed -e "s/  */ /g"`
-	LIBS=''
-fi
-
-
-rm -f core 
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.12"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "\
-	./makefile \
-	./lib/Makefile \
-	./include/config.h \
-	./scripts/Makefile \
-	./scripts/RunCache \
-	./scripts/RunAccel \
-	./src/Makefile \
-	./contrib/Makefile \
-	$SNMP_MAKEFILE \
-	./icons/Makefile \
-	./errors/Makefile \
-	./auth_modules/dummy \
-	./auth_modules/NCSA/Makefile \
-	./auth_modules/PAM/Makefile \
-	./auth_modules/SMB/Makefile
-	./auth_modules/getpwnam/Makefile \
-	./auth_modules/LDAP/Makefile \
- include/autoconf.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@host@%$host%g
-s%@host_alias@%$host_alias%g
-s%@host_cpu@%$host_cpu%g
-s%@host_vendor@%$host_vendor%g
-s%@host_os@%$host_os%g
-s%@exec_suffix@%$exec_suffix%g
-s%@cgi_suffix@%$cgi_suffix%g
-s%@CACHE_HTTP_PORT@%$CACHE_HTTP_PORT%g
-s%@CACHE_ICP_PORT@%$CACHE_ICP_PORT%g
-s%@CC@%$CC%g
-s%@LIBDLMALLOC@%$LIBDLMALLOC%g
-s%@LIB_MALLOC@%$LIB_MALLOC%g
-s%@ASYNC_OBJS@%$ASYNC_OBJS%g
-s%@SQUID_PTHREAD_LIB@%$SQUID_PTHREAD_LIB%g
-s%@DELAY_OBJS@%$DELAY_OBJS%g
-s%@SNMPLIB@%$SNMPLIB%g
-s%@SNMP_OBJS@%$SNMP_OBJS%g
-s%@makesnmplib@%$makesnmplib%g
-s%@HTCP_OBJS@%$HTCP_OBJS%g
-s%@ERR_LANGUAGE@%$ERR_LANGUAGE%g
-s%@LEAKFINDER_OBJS@%$LEAKFINDER_OBJS%g
-s%@CPP@%$CPP%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@RANLIB@%$RANLIB%g
-s%@LN_S@%$LN_S%g
-s%@SH@%$SH%g
-s%@FALSE@%$FALSE%g
-s%@TRUE@%$TRUE%g
-s%@RM@%$RM%g
-s%@MV@%$MV%g
-s%@MKDIR@%$MKDIR%g
-s%@LN@%$LN%g
-s%@PERL@%$PERL%g
-s%@MAKEDEPEND@%$MAKEDEPEND%g
-s%@AR@%$AR%g
-s%@AR_R@%$AR_R%g
-s%@ALLOCA@%$ALLOCA%g
-s%@CRYPTLIB@%$CRYPTLIB%g
-s%@PTHREADLIB@%$PTHREADLIB%g
-s%@REGEXLIB@%$REGEXLIB%g
-s%@LIBREGEX@%$LIBREGEX%g
-s%@LIBOBJS@%$LIBOBJS%g
-s%@XTRA_OBJS@%$XTRA_OBJS%g
-s%@XTRA_LIBS@%$XTRA_LIBS%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"\
-	./makefile \
-	./lib/Makefile \
-	./include/config.h \
-	./scripts/Makefile \
-	./scripts/RunCache \
-	./scripts/RunAccel \
-	./src/Makefile \
-	./contrib/Makefile \
-	$SNMP_MAKEFILE \
-	./icons/Makefile \
-	./errors/Makefile \
-	./auth_modules/dummy \
-	./auth_modules/NCSA/Makefile \
-	./auth_modules/PAM/Makefile \
-	./auth_modules/SMB/Makefile
-	./auth_modules/getpwnam/Makefile \
-	./auth_modules/LDAP/Makefile \
-"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
-ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_uB='\([ 	]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="include/autoconf.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  echo creating $ac_file
-
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
-  echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
-  else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
-    fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
-  fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
Index: squid/configure.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/configure.in,v
retrieving revision 1.1.1.3.10.2
retrieving revision 1.1.1.3.10.3
diff -u -r1.1.1.3.10.2 -r1.1.1.3.10.3
--- squid/configure.in	15 Apr 2000 13:27:06 -0000	1.1.1.3.10.2
+++ squid/configure.in	17 Apr 2000 00:13:07 -0000	1.1.1.3.10.3
@@ -3,13 +3,13 @@
 dnl
 dnl  Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9)
 dnl
-dnl  $Id: configure.in,v 1.1.1.3.10.2 2000/04/15 13:27:06 asd Exp $
+dnl  $Id: configure.in,v 1.1.1.3.10.3 2000/04/17 00:13:07 hno Exp $
 dnl
 dnl
 dnl
 AC_INIT(src/main.c)
 AC_CONFIG_HEADER(include/autoconf.h)
-AC_REVISION($Revision: 1.1.1.3.10.2 $)dnl
+AC_REVISION($Revision: 1.1.1.3.10.3 $)dnl
 AC_PREFIX_DEFAULT(/usr/local/squid)
 AC_CONFIG_AUX_DIR(cfgaux)
 
@@ -88,9 +88,9 @@
         esac
     else
 	case "$host" in
-	*mips-sgi-irix6.4*)
+	*mips-sgi-irix6.*)
 	    # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
-	    CFLAGS="$CFLAGS -n32 -mips4 -O3 -OPT:Olimit=0:space=OFF \
+	    CFLAGS="$CFLAGS -n32 -mips3 -O3 -OPT:Olimit=0:space=OFF \
 		-woff 1009,1014,1048,1110,1116,1185,1188,1204,1230,1233 \
 		-Wl,-woff,85,-woff,84,-woff,134 \
 		-nostdinc -I/usr/include -D_BSD_SIGNALS"
@@ -116,9 +116,9 @@
         esac
     else
 	case "$host" in
-	*mips-sgi-irix6.4*)
+	*mips-sgi-irix6.*)
 	    # suggested by Rafael Seidl <rafaels@cthulhu.engr.sgi.com>
-	    LDFLAGS="-n32 -mips4 -nostdlib -L/usr/lib32"
+	    LDFLAGS="-n32 -mips3 -nostdlib -L/usr/lib32"
 	    ;;
 	esac
     fi
@@ -564,6 +564,20 @@
   fi
 ])
 
+dnl Enable "diskd" code
+AC_ARG_ENABLE(diskd,
+[  --enable-diskd          Uses shared memory, message queues, and external
+                          processes for disk I/O.],
+[ if test "$enableval" = "yes" ; then
+    echo "DISKD enabled"
+    AC_DEFINE(USE_DISKD, 1)
+    OPT_DISKD_EXE='$(DISKD_EXE)'
+    AC_SUBST(OPT_DISKD_EXE)
+    DISKD_OBJS='diskd.o'
+    AC_SUBST(DISKD_OBJS)
+  fi
+])
+
 # Force some compilers to use ANSI features
 #
 case "$host" in
@@ -643,6 +657,7 @@
 	mount.h \
 	net/if.h \
 	netdb.h \
+	netinet/if_ether.h \
 	netinet/in.h \
 	netinet/tcp.h \
 	netinet/ip_compat.h \
@@ -662,6 +677,7 @@
 	strings.h \
 	sys/file.h \
 	sys/ioctl.h \
+	sys/msg.h \
 	sys/param.h \
 	sys/resource.h \
 	sys/select.h\
@@ -788,6 +804,7 @@
 AC_CHECK_TYPE(off_t, int)
 AC_CHECK_TYPE(mode_t, u_short)
 AC_CHECK_TYPE(fd_mask, int)
+AC_CHECK_TYPE(mtyp_t, long)
 
 dnl Check for type in sys/socket.h
 AC_CACHE_CHECK(for socklen_t, ac_cv_type_socklen_t, [
@@ -888,6 +905,7 @@
         	LIBS=`echo $LIBS | sed -e s/-lsocket//`
         	echo "Removing -lnsl for IRIX..."
         	LIBS=`echo $LIBS | sed -e s/-lnsl//`
+		ac_cv_lib_nsl_main=no
 		echo "Removing -lbsd for IRIX..."
 		LIBS=`echo $LIBS | sed -e s/-lbsd//`
 		;;
@@ -1130,7 +1148,7 @@
 
 dnl Not cached since people are likely to tune this
 AC_MSG_CHECKING(Maximum number of filedescriptors we can open)
-dnl shit! FreeBSD's pthreads breaks dup2().
+dnl damn! FreeBSD's pthreads breaks dup2().
 TLDFLAGS="$LDFLAGS"
 case $host in
 i386-unknown-freebsd*)
Index: squid/makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/Attic/makefile.in,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/makefile.in	26 Jan 2000 03:25:00 -0000	1.1.1.3
+++ squid/makefile.in	17 Apr 2000 00:13:07 -0000	1.1.1.3.10.1
@@ -1,4 +1,4 @@
-# $Id: makefile.in,v 1.1.1.3 2000/01/26 03:25:00 hno Exp $
+# $Id: makefile.in,v 1.1.1.3.10.1 2000/04/17 00:13:07 hno Exp $
 #
 
 srcdir		= @srcdir@
Index: squid/auth_modules/PAM/pam_auth.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/auth_modules/PAM/Attic/pam_auth.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.10.1
diff -u -r1.1.1.1 -r1.1.1.1.10.1
--- squid/auth_modules/PAM/pam_auth.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/auth_modules/PAM/pam_auth.c	17 Apr 2000 00:13:07 -0000	1.1.1.1.10.1
@@ -1,5 +1,5 @@
 /*
- * $Id: pam_auth.c,v 1.1.1.1 2000/01/26 03:25:00 hno Exp $
+ * $Id: pam_auth.c,v 1.1.1.1.10.1 2000/04/17 00:13:07 hno Exp $
  *
  * PAM authenticator module for Squid.
  * Copyright (C) 1999 Henrik Nordstrom <hno@hem.passagen.se>
--- squid/doc/icpv2-application.txt	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,1347 +0,0 @@
-
-
-
-
-
-
-Network Working Group                                         D. Wessels
-Internet-Draft                                                 K. Claffy
-                                         National Laboratory for Applied
-Obsoletes <draft-wessels-icp-v2-appl-02.txt>       Network Research/UCSD
-Expires: 8 January 1998                                      8 July 1997
-
-
-
-        Application of Internet Cache Protocol (ICP), version 2
-                   <draft-wessels-icp-v2-appl-03.txt>
-
-
-Status of this Memo
-
-   This document is an Internet-Draft. Internet-Drafts are working
-   documents of the Internet Engineering Task Force (IETF), its areas,
-   and its working groups. Note that other groups may also distribute
-   working documents as Internet-Drafts.
-
-   Internet-Drafts are draft documents valid for a maximum of six months
-   and may be updated, replaced, or obsoleted by other documents at any
-   time. It is inappropriate to use Internet-Drafts as reference
-   material or to cite them other than as ``work in progress.''
-
-   To learn the current status of any Internet-Draft, please check the
-   ``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow
-   Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
-   munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
-   ftp.isi.edu (US West Coast).
-
-Abstract
-
-   This document describes the application of ICPv2 (Internet Cache
-   Protocol version 2, RFCXXXX) to Web caching.  ICPv2 is a lightweight
-   message format used for communication among Web caches.  Several
-   independent caching implementations now use ICP[3,5], making it
-   important to codify the existing practical uses of ICP for those
-   trying to implement, deploy, and extend its use.
-
-   ICP queries and replies refer to the existence of URLs (or objects)
-   in neighbor caches.  Caches exchange ICP messages and use the
-   gathered information to select the most appropriate location from
-   which to retrieve an object.  A companion document (RFCXXXX)
-   describes the format and syntax of the protocol itself.  In this
-   document we focus on issues of ICP deployment, efficiency, security,
-   and interaction with other aspects of Web traffic behavior.
-
-
-
-
-
-Wessels & Claffy                                                [Page 1]
-
-Internet-Draft                                                8 Jul 1997
-
-
-Table of Contents
-
-   1.   Introduction.................................................  2
-   2.   Web Cache Hierarchies........................................  3
-   3.   What is the Added Value of ICP?..............................  5
-   4.   Example Configuration of ICP Hierarchy.......................  5
-     4.1. Configuring the `proxy.customer.org' cache.................  6
-     4.2. Configuring the `cache.isp.com' cache......................  6
-   5.   Applying the Protocol........................................  7
-     5.1. Sending ICP Queries........................................  8
-     5.2. Receiving ICP Queries and Sending Replies.................. 10
-     5.3. Receiving ICP Replies...................................... 11
-     5.4. ICP Options................................................ 13
-   6.   Firewalls.................................................... 14
-   7.   Multicast.................................................... 15
-   8.   Lessons Learned.............................................. 16
-     8.1. Differences Between ICP and HTTP........................... 16
-     8.2. Parents, Siblings, Hits and Misses......................... 16
-     8.3. Different Roles of ICP..................................... 17
-     8.4. Protocol Design Flaws of ICPv2............................. 17
-   9.   Security Considerations...................................... 18
-     9.1. Inserting Bogus ICP Queries................................ 19
-     9.2. Inserting Bogus ICP Replies................................ 19
-     9.3. Eavesdropping.............................................. 20
-     9.4. Blocking ICP Messages...................................... 20
-     9.5. Delaying ICP Messages...................................... 20
-     9.6. Denial of Service.......................................... 20
-     9.7. Altering ICP Fields........................................ 21
-     9.8. Summary.................................................... 22
-   10.  References................................................... 23
-   11.  Acknowledgments.............................................. 24
-   12.  Author's Addresses........................................... 24
-
-
-1.  Introduction
-
-   ICP is a lightweight message format used for communicating among Web
-   caches.  ICP is used to exchange hints about the existence of URLs in
-   neighbor caches.  Caches exchange ICP queries and replies to gather
-   information for use in selecting the most appropriate location from
-   which to retrieve an object.
-
-   This document describes the implementation of ICP in software.  For a
-   description of the protocol and message format, please refer to the
-   companion document (RFCXXXX).  We avoid making judgments about
-   whether or how ICP should be used in particular Web caching configu-
-   rations.  ICP may be a "net win" in some situations, and a "net loss"
-   in others.  We recognize that certain practices described in this
-
-
-
-Wessels & Claffy                                                [Page 2]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   document are suboptimal. Some of these exist for historical reasons.
-   Some aspects have been improved in later versions.  Since this docu-
-   ment only serves to describe current practices, we focus on document-
-   ing rather than evaluating.  However, we do address known security
-   problems and other shortcomings.
-
-   The remainder of this document is written as follows.  We first
-   describe Web cache hierarchies, explain motivation for using ICP, and
-   demonstrate how to configure its use in cache hierarchies.  We then
-   provide a step-by-step description of an ICP query-response transac-
-   tion.  We then discuss ICP interaction with firewalls, and briefly
-   touch on multicasting ICP.  We end with lessons with have learned
-   during the protocol development and deployement thus far, and the
-   canonical security considerations.
-
-   ICP was initially developed by Peter Danzig, et. al.  at the Univer-
-   sity of Southern California as a central part of hierarchical caching
-   in the Harvest research project[3].
-
-
-2.  Web Cache Hierarchies
-
-   A single Web cache will reduce the amount of traffic generated by the
-   clients behind it.  Similarly, a group of Web caches can benefit by
-   sharing another cache in much the same way.  Researchers on the Har-
-   vest project envisioned that it would be important to connect Web
-   caches hierarchically.  In a cache hierarchy (or mesh) one cache
-   establishes peering relationships with its neighbor caches.  There
-   are two types of relationship: parent and sibling.  A parent cache is
-   essentially one level up in a cache hierarchy.  A sibling cache is on
-   the same level.  The terms "neighbor" and "peer" are used to refer to
-   either parents or siblings which are a single "cache-hop" away.  Fig-
-   ure 1 shows a simple hierarchy configuration.
-
-   But what does it mean to be "on the same level" or "one level up?"
-   The general flow of document requests is up the hierarchy.  When a
-   cache does not hold a requested object, it may ask via ICP whether
-   any of its neighbor caches has the object.  If any of the neighbors
-   does have the requested object (i.e., a "neighbor hit"), then the
-   cache will request it from them.  If none of the neighbors has the
-   object (a "neighbor miss"), then the cache must forward the request
-   either to a parent, or directly to the origin server.  The essential
-   difference between a parent and sibling is that a "neighbor hit" may
-   be fetched from either one, but a "neighbor miss" may NOT be fetched
-   from a sibling.  In other words, in a sibling relationship, a cache
-   can only ask to retrieve objects that the sibling already has cached,
-   whereas the same cache can ask a parent to retrieve any object
-   regardless of whether or not it is cached.  A parent cache's role is
-
-
-
-Wessels & Claffy                                                [Page 3]
-
-Internet-Draft                                                8 Jul 1997
-
-
-     T H E   I N T E R N E T
-   ===========================
-       |          ||
-       |          ||
-       |          ||
-       |          ||
-       |      +----------------------+
-       |      |                      |
-       |      |        PARENT        |
-       |      |        CACHE         |
-       |      |                      |
-       |      +----------------------+
-       |          ||
-     DIRECT       ||
-   RETRIEVALS     ||
-       |          ||
-       |         HITS
-       |         AND
-       |        MISSES
-       |       RESOLVED
-       |          ||
-       |          ||
-       |          ||
-       V          \/
-   +------------------+                    +------------------+
-   |                  |                    |                  |
-   |      LOCAL       |/--------HITS-------|     SIBLING      |
-   |      CACHE       |\------RESOLVED-----|      CACHE       |
-   |                  |                    |                  |
-   +------------------+                    +------------------+
-      |  |  |  |  |
-      |  |  |  |  |
-      |  |  |  |  |
-      V  V  V  V  V
-   ===================
-      CACHE CLIENTS
-
-   FIGURE 1: A Simple Web cache hierarchy.  The local cache can
-   retrieve hits from sibling caches, hits and misses from parent
-   caches, and some requests directly from origin servers.
-
-   to provide "transit" for the request if necessary, and accordingly
-   parent caches are ideally located within or on the way to a transit
-   Internet service provider (ISP).
-
-   Squid and Harvest allow for complex hierarchical configurations.  For
-   example, one could specify that a given neighbor be used for only a
-   certain class of requests, such as URLs from a specific DNS domain.
-
-
-
-Wessels & Claffy                                                [Page 4]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   Additionally, it is possible to treat a neighbor as a sibling for
-   some requests and as a parent for others.
-
-   The cache hierarchy model described here includes a number of fea-
-   tures to prevent top-level caches from becoming choke points.  One is
-   the ability to restrict parents as just described previously (by
-   domains).  Another optimization is that the cache only forwards
-   cachable requests to its neighbors.  A large class of Web requests
-   are inherently uncachable, including: requests requiring certain
-   types of authentication, session-encrypted data, highly personalized
-   responses, and certain types of database queries.  Lower level caches
-   should handle these requests directly rather than burdening parent
-   caches.
-
-
-3.  What is the Added Value of ICP?
-
-   Although it is possible to maintain cache hierarchies without using
-   ICP, the lack of ICP or something similar prohibits the existence of
-   sibling meta-communicative relationships, i.e., mechanisms to query
-   nearby caches about a given document.
-
-   One concern over the use of ICP is the additional delay that an ICP
-   query/reply exchange contributes to an HTTP transaction.  However, if
-   the ICP query can locate the object in a nearby neighbor cache, then
-   the ICP delay may be more than offset by the faster delivery of the
-   data from the neighbor.  In order to minimize ICP delays, the caches
-   (as well as the protocol itself) are designed to return ICP requests
-   quickly.  Indeed, the application does minimal processing of the ICP
-   request, most ICP-related delay is due to transmission on the net-
-   work.
-
-   ICP also serves to provide an indication of neighbor reachability.
-   If ICP replies from a neighbor fail to arrive, then either the net-
-   work path is congested (or down), or the cache application is not
-   running on the ICP-queried neighbor machine.  In either case, the
-   cache should not use this neighbor at this time.  Additionally,
-   because an idle cache can turn around the replies faster than a busy
-   one, all other things being equal, ICP provides some form of load
-   balancing.
-
-
-4.  Example Configuration of ICP Hierarchy
-
-   Configuring caches within a hierarchy requires establishing peering
-   relationships, which currently involves manual configuration at both
-   peering endpoints.  One cache must indicate that the other is a par-
-   ent or sibling.  The other cache will most likely have to add the
-
-
-
-Wessels & Claffy                                                [Page 5]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   first cache to its access control lists.
-
-   Below we show some sample configuration lines for a hypothetical sit-
-   uation.  We have two caches, one operated by an ISP, and another
-   operated by a customer.  First we describe how the customer would
-   configure his cache to peer with the ISP.  Second, we describe how
-   the ISP would allow the customer access to its cache.
-
-
-4.1.  Configuring the `proxy.customer.org' cache
-
-   In Squid, to configure parents and siblings in a hierarchy, a
-   `cache_host' directive is entered into the configuration file.  The
-   format is:
-
-       cache_host hostname type http-port icp-port [options]
-
-   Where type is either `parent', `sibling', or `multicast'.  For our
-   example, it would be:
-
-       cache_host cache.isp.com parent 8080 3130
-
-   This configuration will cause the customer cache to resolve most
-   cache misses through the parent (`cgi-bin' and non-GET requests would
-   be resolved directly).  Utilizing the parent may be undesirable for
-   certain servers, such as servers also in the customer.org domain.  To
-   always handle such local domains directly, the customer would add
-   this to his configuration file:
-
-       local_domain customer.org
-
-   It may also be the case that the customer wants to use the ISP cache
-   only for a specific subset of DNS domains.  The need to limit
-   requests this way is actually more common for higher levels of cache
-   hierarchies, but it is illustrated here nonetheless.  To limit the
-   ISP cache to a subset of DNS domains, the customer would use:
-
-       cache_host_domain cache.isp.com com net org
-
-   Then, any requests which are NOT in the .com, .net, or .org domains
-   would be handled directly.
-
-
-4.2.  Configuring the `cache.isp.com' cache
-
-   To configure the query-receiving side of the cache peer relationship
-   one uses access lists, similar to those used in routing peers.  The
-   access lists support a large degree of customization in the peering
-
-
-
-Wessels & Claffy                                                [Page 6]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   relationship.  If there are no access lines present, the cache allows
-   the request by default.
-
-   Note that the cache.isp.com cache need not explicitly specify the
-   customer cache as a peer, nor is the type of relationship encoded
-   within the ICP query itself.  The access control entries regulate the
-   relationships between this cache and its neighbors.  For our example,
-   the ISP would use:
-
-       acl src Customer  proxy.customer.org
-       http_access allow Customer
-       icp_access  allow Customer
-
-   This defines an access control entry named `Customer' which specifies
-   a source IP address of the customer cache machine.  The customer
-   cache would then be allowed to make any request to both the HTTP and
-   ICP ports (including cache misses).  This configuration implies that
-   the ISP cache is a parent of the customer.
-
-   If the ISP wanted to enforce a sibling relationship, it would need to
-   deny access to cache misses.  This would be done as follows:
-
-       miss_access deny Customer
-
-   Of course the ISP should also communicate this to the customer, so
-   that the customer will change his configuration from parent to sib-
-   ling.  Otherwise, if the customer requests an object not in the ISP
-   cache, an error message is generated.
-
-
-5.  Applying the Protocol
-
-   The following sections describe the ICP implementation in the Har-
-   vest[3] (research version) and Squid Web cache[5] packages.  In terms
-   of version numbers, this means version 1.4pl2 for Harvest and version
-   1.1.10 for Squid.
-
-   The basic sequence of events in an ICP transaction is as follows:
-
-   1.   Local cache receives an HTTP[1] request from a cache client.
-
-   2.   The local cache sends ICP queries (section 5.1).
-
-   3.   The peer cache(s) receive the queries and send ICP replies (sec-
-        tion 5.2).
-
-   4.   The local cache receives the ICP replies and decides where to
-        forward the request (section 5.3).
-
-
-
-Wessels & Claffy                                                [Page 7]
-
-Internet-Draft                                                8 Jul 1997
-
-
-5.1.  Sending ICP Queries
-
-
-5.1.1.  Determine whether to use ICP at all
-
-   Not every HTTP request requires an ICP query to be sent.  Obviously,
-   cache hits will not need ICP because the request is satisfied immedi-
-   ately.  For origin servers very close to the cache, we do not want to
-   use any neighbor caches.  In Squid and Harvest, the administrator
-   specifies what constitutes a `local' server with the `local_domain'
-   and `local_ip' configuration options.  The cache always contacts a
-   local server directly, never querying a peer cache.
-
-   There are other classes of requests that the cache (or the adminis-
-   trator) may prefer to forward directly to the origin server.  In
-   Squid and Harvest, one such class includes all non-GET request meth-
-   ods.  A Squid cache can also be configured to not use peers for URLs
-   matching the `hierarchy_stoplist'.
-
-   In order for an HTTP request to yield an ICP transaction, it must:
-
-   o    not be a cache hit
-
-   o    not be to a local server
-
-   o    be a GET request, and
-
-   o    not match the `hierarchy_stoplist' configuration.
-
-   We call this a "hierarchical" request.  A "non-hierarchical" request
-   is one that doesn't generate any ICP traffic.  To avoid processing
-   requests that are likely to lower cache efficiency, one can configure
-   the cache to not consult the hierarchy for URLs that contain certain
-   strings (e.g. `cgi_bin').
-
-
-5.1.2.  Determine which peers to query
-
-   By default, a cache sends an ICP_OP_QUERY message to each peer,
-   unless any one of the following are true:
-
-   o    Restrictions prevent querying a peer for this request, based on
-        the configuration directive `cache_host_domain', which specifies
-        a set of DNS domains (from the URLs) for which the peer should
-        or should not be queried.  In Squid, a more flexible directive
-        ('cache_host_acl') supports restrictions on other parts of the
-        request (method, port number, source, etc.).
-
-
-
-
-Wessels & Claffy                                                [Page 8]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   o    The peer is a sibling, and the HTTP request includes a "Pragma:
-        no-cache" header.  This is because the sibling would be asked to
-        transit the request, which is not allowed.
-
-   o    The peer is configured to never be sent ICP queries (i.e. with
-        the `no-query' option).
-
-   If the determination yields only one queryable ICP peer, and the
-   Squid configuration directive `single_parent_bypass' is set, then one
-   can bypass waiting for the single ICP response and just send the HTTP
-   request directly to the peer cache.
-
-   The Squid configuration option `source_ping' configures a Squid cache
-   to send a ping to the original source simultaneous with its ICP
-   queries, in case the origin is closer than any of the caches.
-
-
-5.1.3.  Calculate the expected number of ICP replies
-
-   Harvest and Squid want to maximize the chance to get a HIT reply from
-   one of the peers.  Therefore, the cache waits for all ICP replies to
-   be received.  Normally, we expect to receive an ICP reply for each
-   query sent, except:
-
-   o    When the peer is believed to be down.  If the peer is down Squid
-        and Harvest continue to send it ICP queries, but do not expect
-        the peer to reply.  When an ICP reply is again received from the
-        peer, its status will be changed to up.
-
-        The determination of up/down status has varied a little bit as
-        the Harvest and Squid software evolved.  Both Harvest and Squid
-        mark a peer down when it fails to reply to 20 consecutive ICP
-        queries.  Squid also marks a peer down when a TCP connection
-        fails, and up again when a diagnostic TCP connection succeeds.
-
-   o    When sending to a multicast address.  In this case we'll proba-
-        bly expect to receive more than one reply, and have no way to
-        definitively determine how many to expect.  We discuss multicast
-        issues in section 7 below.
-
-
-5.1.4.  Install timeout event
-
-   Because ICP uses UDP as underlying transport, ICP queries and replies
-   may sometimes be dropped by the network.  The cache installs a time-
-   out event in case not all of the expected replies arrive.  By default
-   Squid and Harvest use a two-second timeout.  If object retrieval has
-   not commenced when the timeout occurs, a source is selected as
-
-
-
-Wessels & Claffy                                                [Page 9]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   described in section 5.3.9 below.
-
-
-5.2.  Receiving ICP Queries and Sending Replies
-
-   When an ICP_OP_QUERY message is received, the cache examines it and
-   decides which reply message is to be sent.  It will send one of the
-   following reply opcodes, tested for use in the order listed:
-
-
-5.2.1.  ICP_OP_ERR
-
-   The URL is extracted from the payload and parsed.  If parsing fails,
-   an ICP_OP_ERR message is returned.
-
-
-5.2.2.  ICP_OP_DENIED
-
-   The access controls are checked.  If the peer is not allowed to make
-   this request, ICP_OP_DENIED is returned.  Squid counts the number of
-   ICP_OP_DENIED messages sent to each peer.  If more than 95% of more
-   than 100 replies have been denied, then no reply is sent at all.
-   This prevents misconfigured caches from endlessly sending unnecessary
-   ICP messages back and forth.
-
-
-5.2.3.  ICP_OP_HIT
-
-   If the cache reaches this point without already matching one of the
-   previous  opcodes, it means the request is allowed and we must deter-
-   mine if it will be HIT or MISS, so we check if the URL exists in the
-   local cache.  If so, and if the cached entry is fresh for at least
-   the next 30 seconds, we can return an ICP_OP_HIT message.  The
-   stale/fresh determination uses the local refresh (or TTL) rules.
-
-   Note that a race condition exists for ICP_OP_HIT replies to sibling
-   peers.  The ICP_OP_HIT means that a subsequent HTTP request for the
-   named URL would result in a cache hit.  We assume that the HTTP
-   request will come very quickly after the ICP_OP_HIT.  However, there
-   is a slight chance that the object might be purged from this cache
-   before the HTTP request is received.  If this happens, and the reply-
-   ing peer has applied Squid's `miss_access' configuration then the
-   user will receive a very confusing access denied message.
-
-
-5.2.3.1.  ICP_OP_HIT_OBJ
-
-   Before returning the ICP_OP_HIT message, we see if we can send an
-
-
-
-Wessels & Claffy                                               [Page 10]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   ICP_OP_HIT_OBJ message instead.  We can use ICP_OP_HIT_OBJ if:
-
-   o    The ICP_OP_QUERY message had the ICP_FLAG_HIT_OBJ flag set.
-
-   o    The entire object (plus URL) will fit in an ICP message.  The
-        maximum ICP message size is 16 Kbytes, but an application may
-        choose to set a smaller maximum value for ICP_OP_HIT_OBJ
-        replies.
-
-   Normally ICP replies are sent immediately after the query is
-   received, but the ICP_OP_HIT_OBJ message cannot be sent until the
-   object data is available to copy into the reply message.  For Squid
-   and Harvest this means the object must be "swapped in" from disk if
-   it is not already in memory.  Therefore, on average, an
-   ICP_OP_HIT_OBJ reply will have higher latency than ICP_OP_HIT.
-
-
-5.2.4.  ICP_OP_MISS_NOFETCH
-
-   At this point we have a cache miss.  ICP has two types of miss
-   replies.  If the cache does not want the peer to request the object
-   from it, it sends an ICP_OP_MISS_NOFETCH message.
-
-
-5.2.5.  ICP_OP_MISS
-
-   Finally, an ICP_OP_MISS reply is returned as the default.  If the
-   replying cache is a parent of the querying cache, the ICP_OP_MISS
-   indicates an invitation to fetch the URL through the replying cache.
-
-
-5.3.  Receiving ICP Replies
-
-   Some ICP replies will be ignored; specifically, when any of the fol-
-   lowing are true:
-
-   o    The reply message originated from an unknown peer.
-
-   o    The object named by the URL does not exist.
-
-   o    The object is already being fetched.
-
-
-5.3.1.  ICP_OP_DENIED
-
-   If more than 95% of more than 100 replies from a peer cache have been
-   ICP_OP_DENIED, then such a high denial rate most likely indicates a
-   configuration error, either locally or at the peer.  For this reason,
-
-
-
-Wessels & Claffy                                               [Page 11]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   no further queries will be sent to the peer for the duration of the
-   cache process.
-
-
-5.3.2.  ICP_OP_HIT
-
-   Object retrieval commences immediately from the replying peer.
-
-
-5.3.3.  ICP_OP_HIT_OBJ
-
-   The object data is extracted from the ICP message and the retrieval
-   is complete.  If there is some problem with the ICP_OP_HIT_OBJ mes-
-   sage (e.g. missing data) the reply will be treated like a standard
-   ICP_OP_HIT.
-
-
-5.3.4.  ICP_OP_SECHO
-
-   Object retrieval commences immediately from the origin server because
-   the ICP_OP_SECHO reply arrived prior to any ICP_OP_HIT's.  If an
-   ICP_OP_HIT had arrived prior, this ICP_OP_SECHO reply would be
-   ignored because the retrieval has already started.
-
-
-5.3.5.  ICP_OP_DECHO
-
-   An ICP_OP_DECHO reply is handled like an ICP_OP_MISS.  Non-ICP peers
-   must always be configured as parents; a non-ICP sibling makes no
-   sense.  One serious problem with the ICP_OP_DECHO feature is that
-   since it bounces messages off the peer's UDP echo port, it does not
-   indicate that the peer cache is actually running -- only that network
-   connectivity exists between the pair.
-
-
-5.3.6.  ICP_OP_MISS
-
-   If the peer is a sibling, the ICP_OP_MISS reply is ignored.  Other-
-   wise, the peer may be "remembered" for future use in case no HIT
-   replies are received later (section 5.3.9).
-
-   Harvest and Squid remember the first parent to return an ICP_OP_MISS
-   message.  With Squid, the parents may be weighted so that the "first
-   parent to miss" may not actually be the first reply received.  We
-   call this the FIRST_PARENT_MISS.  Remember that sibling misses are
-   entirely ignored, we only care about misses from parents.  The parent
-   miss RTT's can be weighted because sometimes the closest parent is
-   not the one people want to use.
-
-
-
-Wessels & Claffy                                               [Page 12]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   Also, recent versions of Squid may remember the parent with the low-
-   est RTT to the origin server, using the ICP_FLAG_SRC_RTT option.  We
-   call this the CLOSEST_PARENT_MISS.
-
-
-5.3.7.  ICP_OP_MISS_NOFETCH
-
-   This reply is essentially ignored.  A cache must not forward a
-   request to a peer that returns ICP_OP_MISS_NOFETCH.
-
-
-5.3.8.  ICP_OP_ERR
-
-   Silently ignored.
-
-
-5.3.9.  When all peers MISS.
-
-   For ICP_OP_HIT and ICP_OP_SECHO the request is forwarded immediately.
-   For ICP_OP_HIT_OBJ there is no need to forward the request.  For all
-   other reply opcodes, we wait until the expected number of replies
-   have been received.  When we have all of the expected replies, or
-   when the query timeout occurs, it is time to forward the request.
-
-   Since MISS replies were received from all peers, we must either
-   select a parent cache or the origin server.
-
-   o    If the peers are using the ICP_FLAG_SRC_RTT feature, we forward
-        the request to the peer with the lowest RTT to the origin
-        server.  If the local cache is also measuring RTT's to origin
-        servers, and is closer than any of the parents, the request is
-        forwarded directly to the origin server.
-
-   o    If there is a FIRST_PARENT_MISS parent available, the request
-        will be forwarded there.
-
-   o    If the ICP query/reply exchange did not produce any appropriate
-        parents, the request will be sent directly to the origin server
-        (unless firewall restrictions prevent it).
-
-
-5.4.  ICP Options
-
-   The following options were added to Squid to support some new fea-
-   tures while maintaining backward compatibility with the Harvest
-   implementation.
-
-
-
-
-
-Wessels & Claffy                                               [Page 13]
-
-Internet-Draft                                                8 Jul 1997
-
-
-5.4.1.  ICP_FLAG_HIT_OBJ
-
-   This flag is off by default and will be set in an ICP_OP_QUERY mes-
-   sage only if these three criteria are met:
-
-   o    It is enabled in the cache configuration file with `udp_hit_obj
-        on'.
-
-   o    The peer must be using ICP version 2.
-
-   o    The HTTP request must not include the "Pragma: no-cache" header.
-
-
-5.4.2.  ICP_FLAG_SRC_RTT
-
-   This flag is off by default and will be set in an ICP_OP_QUERY mes-
-   sage only if these two criteria are met:
-
-   o    It is enabled in the cache configuration file with `query_icmp
-        on'.
-
-   o    The peer must be using ICP version 2.
-
-
-6.  Firewalls
-
-   Operating a Web cache behind a firewall or in a private network poses
-   some interesting problems.  The hard part is figuring out whether the
-   cache is able to connect to the origin server.  Harvest and Squid
-   provide an `inside_firewall' configuration directive to list DNS
-   domains on the near side of a firewall.  Everything else is assumed
-   to be on the far side of a firewall.  Squid also has a `firewall_ip'
-   directive so that inside hosts can be specified by IP addresses as
-   well.
-
-   In a simple configuration, a Squid cache behind a firewall will have
-   only one parent cache (which is on the firewall itself).  In this
-   case, Squid must use that parent for all servers beyond the firewall,
-   so there is no need to utilize ICP.
-
-   In a more complex configuration, there may be a number of peer caches
-   also behind the firewall.  Here, ICP may be used to check for cache
-   hits in the peers.  Occasionally, when ICP is being used, there may
-   not be any replies received.  If the cache were not behind a fire-
-   wall, the request would be forwarded directly to the origin server.
-   But in this situation, the cache must pick a parent cache, either
-   randomly or due to configuration information.  For example, Squid
-   allows a parent cache to be designated as a default choice when no
-
-
-
-Wessels & Claffy                                               [Page 14]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   others are available.
-
-
-7.  Multicast
-
-   For efficient distribution, a cache may deliver ICP queries to a mul-
-   ticast address, and neighbor caches may join the multicast group to
-   receive such queries.
-
-   Current practice is that caches send ICP replies only to unicast
-   addresses, for several reasons:
-
-   o    Multicasting ICP replies would not reduce the number of packets
-        sent.
-
-   o    It prevents other group members from receiving unexpected
-        replies.
-
-   o    The reply should follow unicast routing paths to indicate (uni-
-        cast) connectivity between the receiver and the sender since the
-        subsequent HTTP request will be unicast routed.
-
-
-   Trust is an important aspect of inter-cache relationships.  A Web
-   cache should not automatically trust any cache which replies to a
-   multicast ICP query.  Caches should ignore ICP messages from
-   addresses not specifically configured as neighbors.  Otherwise, one
-   could easily pollute a cache mesh by running an illegitimate cache
-   and having it join a group, return ICP_OP_HIT for all requests, and
-   then deliver bogus content.
-
-   When sending to multicast groups, cache administrators must be care-
-   ful to use the minimum multicast TTL required to reach all group mem-
-   bers.  Joining a multicast group requires no special privileges and
-   there is no way to prevent anyone from joining "your" group.  Two
-   groups of caches utilizing the same multicast address could overlap,
-   which would cause a cache to receive ICP replies from unknown neigh-
-   bors.  The unknown neighbors would not be used to retrieve the object
-   data, but the cache would constantly receive ICP replies that it must
-   always ignore.
-
-   To prevent an overlapping cache mesh, caches should thus limit the
-   scope of their ICP queries with appropriate TTLs; an application such
-   as mtrace[6] can determine appropriate multicast TTLs.
-
-   As mentioned in section 5.1.3, we need to estimate the number of
-   expected replies for an ICP_OP_QUERY message.  For unicast we expect
-   one reply for each query if the peer is up.  However, for multicast
-
-
-
-Wessels & Claffy                                               [Page 15]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   we generally expect more than one reply, but have no way of knowing
-   exactly how many replies to expect.  Squid regularly (every 15 min-
-   utes) sends out test ICP_OP_QUERY messages to only the multicast
-   group peers.  As with a real ICP query, a timeout event is installed
-   and the replies are counted until the timeout occurs.  We have found
-   that the received count varies considerably.  Therefore, the number
-   of replies to expect is calculated as a moving average, rounded down
-   to the nearest integer.
-
-
-8.  Lessons Learned
-
-
-8.1.  Differences Between ICP and HTTP
-
-   ICP is notably different from HTTP.  HTTP supports a rich and sophis-
-   ticated set of features.  In contrast, ICP was designed to be simple,
-   small, and efficient.  HTTP request and reply headers consist of
-   lines of ASCII text delimited by a CRLF pair, whereas ICP uses a
-   fixed size header and represents numbers in binary.  The only thing
-   ICP and HTTP have in common is the URL.
-
-   Note that the ICP message does not even include the HTTP request
-   method.  The original implementation assumed that only GET requests
-   would be cachable and there would be no need to locate non-GET
-   requests in neighbor caches.  Thus, the current version of ICP does
-   not accommodate non-GET requests, although the next version of this
-   protocol will likely include a field for the request method.
-
-   HTTP defines features that are important for caching but not express-
-   ible with the current ICP protocol.  Among these are Pragma: no-
-   cache, If-Modified-Since, and all of the Cache-Control features of
-   HTTP/1.1.  An ICP_OP_HIT_OBJ message may deliver an object which may
-   not obey all of the request header constraints.  These differences
-   between ICP and HTTP are the reason we discourage the use of the
-   ICP_OP_HIT_OBJ feature.
-
-
-8.2.  Parents, Siblings, Hits and Misses
-
-   Note that the ICP message does not have a field to indicate the
-   intent of the querying cache.  That is, nowhere in the ICP request or
-   reply does it say that the two caches have a sibling or parent rela-
-   tionship.  A sibling cache can only respond with HIT or MISS, not
-   "you can retrieve this from me" or "you can not retrieve this from
-   me."  The querying cache must apply the HIT or MISS reply to its
-   local configuration to prevent it from resolving misses through a
-   sibling cache.  This constraint is awkward, because this aspect of
-
-
-
-Wessels & Claffy                                               [Page 16]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   the relationship can be configured only in the cache originating the
-   requests, and indirectly via the access controls configured in the
-   queried cache as described earlier in section 4.2.
-
-
-8.3.  Different Roles of ICP
-
-   There are two different understandings of what exactly the role of
-   ICP is in a cache mesh.  One understanding is that ICP's role is only
-   object location, specifically, to provide hints about whether or not
-   a named object exists in a neighbor cache.  An implied assumption is
-   that cache hits are highly desirable, and ICP is used to maximize the
-   chance of getting them.  If an ICP message is lost due to congestion,
-   then nothing significant is lost; the request will be satisfied
-   regardless.
-
-   ICP is increasingly being tasked to fill a more complex role: convey-
-   ing cache usage policy.  For example, many organizations (e.g. uni-
-   versities) will install a Web cache on the border of their network.
-   Such organizations may be happy to establish sibling relationships
-   with other, nearby caches, subject to the following terms:
-
-   o    Any of the organization's customers or users may request any
-        object (cached or not).
-
-   o    Anyone may request an object already in the cache.
-
-   o    Anyone may request any object from the organization's servers
-        behind the cache.
-
-   o    All other requests are denied; specifically, the organization
-        will not provide transit for requests in which neither the
-        client nor the server falls within its domain.
-
-   To successfully convey policy the ICP exchange must very accurately
-   predict the result (hit, miss) of a subsequent HTTP request.  The
-   result may often depend on other request fields, such as Cache-Con-
-   trol.  So it's not possible for ICP to accurately predict the result
-   without more, or perhaps all, of the HTTP request.
-
-
-8.4.  Protocol Design Flaws of ICPv2
-
-   We recognize certain flaws with the original design of ICP, and make
-   note of them so that future versions can avoid the same mistakes.
-
-   o    The NULL-terminated URL in the payload field requires stepping
-        through the message an octet at a time to find some of the
-
-
-
-Wessels & Claffy                                               [Page 17]
-
-Internet-Draft                                                8 Jul 1997
-
-
-        fields (i.e. the beginning of object data in an ICP_OP_HIT_OBJ
-        message).
-
-   o    Two fields (Sender Host Address and Requester Host Address) are
-        IPv4 specific.  However, neither of these fields are used in
-        practice; they are normally zero-filled.  If IP addresses have a
-        role in the ICP message, there needs to be an address family
-        descriptor for each address, and clients need to be able to say
-        whether they want to hear IPv6 responses or not.
-
-   o    Options are limited to 32 option flags and 32 bits of option
-        data.  This should be more like TCP, with an option descriptor
-        followed by option data.
-
-   o    Although currently used as the cache key, the URL string no
-        longer serves this role adequately.  Some HTTP responses now
-        vary according to the requestor's User-Agent and other headers.
-        A cache key must incorporate all non-transport headers present
-        in the client's request.  All non-hop-by-hop request headers
-        should be sent in an ICP query.
-
-   o    ICPv2 uses different opcode values for queries and responses.
-        ICP should use the same opcode for both sides of a two-sided
-        transaction, with a "query/response" indicator telling which
-        side is which.
-
-   o    ICPv2 does not include any authentication fields.
-
-
-9.  Security Considerations
-
-   Security is an issue with ICP over UDP because of its connectionless
-   nature.  Below we consider various vulnerabilities and methods of
-   attack, and their implications.
-
-   Our first line of defense is to check the source IP address of the
-   ICP message, e.g. as given by recvfrom(2).  ICP query messages should
-   be processed if the access control rules allow the querying address
-   access to the cache.  However, ICP reply messages must only be
-   accepted from known neighbors; a cache must ignore replies from
-   unknown addresses.
-
-   Because we trust the validity of an address in an IP packet, ICP is
-   susceptible to IP address spoofing.  In this document we address some
-   consequences of IP address spoofing.  Normally, spoofed addresses can
-   only be detected by routers, not by hosts.  However, the IP Authenti-
-   cation Header[7,8] can be used underneath ICP to provide crypto-
-   graphic authentication of the entire IP packet containing the ICP
-
-
-
-Wessels & Claffy                                               [Page 18]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   protocol, thus eliminating the risk of IP address spoofing.
-
-
-9.1.  Inserting Bogus ICP Queries
-
-   Processing an ICP_OP_QUERY message has no known security implica-
-   tions, so long as the requesting address is granted access to the
-   cache.
-
-
-9.2.  Inserting Bogus ICP Replies
-
-   Here we are concerned with a third party generating ICP reply mes-
-   sages which are returned to the querying cache before the real reply
-   arrives, or before any replies arrive.  The third party may insert
-   bogus ICP replies which appear to come from legitimate neighbors.
-   There are three vulnerabilities:
-
-   o    Preventing a certain neighbor from being used
-
-        If a third-party could send an ICP_OP_MISS_NOFETCH reply back
-        before the real reply arrived, the (falsified) neighbor would
-        not be used.
-
-        A third-party could blast a cache with ICP_OP_DENIED messages
-        until the threshold described in section 5.3.1 is reached,
-        thereby causing the neighbor relationship to be temporarily ter-
-        minated.
-
-   o    Forcing a certain neighbor to be used
-
-        If a third-party could send an ICP_OP_HIT reply back before the
-        real reply arrived, the (falsified) neighbor would be used.
-        This may violate the terms of a sibling relationship; ICP_OP_HIT
-        replies mean a subsequent HTTP request will also be a hit.
-
-        Similarly, if bogus ICP_OP_SECHO messages can be generated, the
-        cache would retrieve requests directly from the origin server.
-
-   o    Cache poisoning
-
-        The ICP_OP_HIT_OBJ message is especially sensitive to security
-        issues since it contains actual object data.  In combination
-        with IP address spoofing, this option opens up the likely possi-
-        bility of having the cache polluted with invalid objects.
-
-
-
-
-
-
-Wessels & Claffy                                               [Page 19]
-
-Internet-Draft                                                8 Jul 1997
-
-
-9.3.  Eavesdropping
-
-   Multicasting ICP queries provides a very simple method for others to
-   "snoop" on ICP messages.  If enabling multicast, cache administrators
-   should configure the application to use the minimum required multi-
-   cast TTL, using a tool such as mtrace[6].  Note that the IP Encapsu-
-   lating Security Payload [7,9] mechanism can be used to provide pro-
-   tection against eavesdropping of ICP messages.
-
-   Eavesdropping on ICP traffic can provide third parties with a list of
-   URLs being browsed by cache users.  Because the Requestor Host
-   Address is zero-filled by Squid and Harvest, the URLs cannot be
-   mapped back to individual host systems.
-
-   By default, Squid and Harvest do not send ICP messages for URLs con-
-   taining `cgi-bin' or `?'.  These URLs sometimes contain sensitive
-   information as argument parameters.  Cache administrators need to be
-   aware that altering the configuration to make ICP queries for such
-   URLs may expose sensitive information to outsiders, especially when
-   multicast is used.
-
-
-9.4.  Blocking ICP Messages
-
-   Intentionally blocked (or discarded) ICP queries or replies will
-   appear to reflect link failure or congestion, and will prevent the
-   use of a neighbor as well as lead to timeouts (see section 5.1.4).
-   If all messages are blocked, the cache will assume the neighbor is
-   down and remove it from the selection algorithm.  However, if, for
-   example, every other query is blocked, the neighbor will remain
-   "alive," but every other request will suffer the ICP timeout.
-
-
-9.5.  Delaying ICP Messages
-
-   The neighbor selection algorithm normally waits for all ICP MISS
-   replies to arrive.  Delaying queries or replies, so that they arrive
-   later than they normally would, will cause additional delay for the
-   subsequent HTTP request.  Of course, if messages are delayed so that
-   they arrive after the timeout, the behavior is the same as "blocking"
-   above.
-
-
-9.6.  Denial of Service
-
-   A denial-of-service attack, where the ICP port is flooded with a con-
-   tinuous stream of bogus messages has three vulnerabilities:
-
-
-
-
-Wessels & Claffy                                               [Page 20]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   o    The application may log every bogus ICP message and eventually
-        fill up a disk partition.
-
-   o    The socket receive queue may fill up, causing legitimate mes-
-        sages to be dropped.
-
-   o    The host may waste some CPU cycles receiving the bogus messages.
-
-
-9.7.  Altering ICP Fields
-
-   Here we assume a third party is able to change one or more of the ICP
-   reply message fields.
-
-   Opcode
-
-      Changing the opcode field is much like inserting bogus messages
-      described above.  Changing a hit to a miss would prevent the peer
-      from being used.  Changing a miss to a hit would force the peer to
-      be used.
-
-   Version
-
-      Altering the ICP version field may have unpredictable consequences
-      if the new version number is recognized and supported.  The
-      receiving application should ignore messages with invalid version
-      numbers.  At the time of this writing, both version numbers 2 and
-      3 are in use.  These two versions use some fields (e.g. Options)
-      in a slightly different manner.
-
-   Message Length
-
-      An incorrect message length should be detected by the receiving
-      application as an invalid ICP message.
-
-   Request Number
-
-      The request number is often used as a part of the cache key.  Har-
-      vest does not use the request number.  Squid uses the request num-
-      ber in conjunction with the URL to create a cache key.  Altering
-      the request number will cause a lookup of the cache key to fail.
-      This is similar to blocking the ICP reply altogether.
-
-      There is no requirement that a cache use both the URL and the
-      request number to locate HTTP requests with outstanding ICP
-      queries (however both Squid and Harvest do).  The request number
-      must always be the same in the query and the reply.  However, if
-      the querying cache uses only the request number to locate pending
-
-
-
-Wessels & Claffy                                               [Page 21]
-
-Internet-Draft                                                8 Jul 1997
-
-
-      requests, there is some possibility that a replying cache might
-      increment the request number in the reply to give the false
-      impression that the two caches are closer than they really are.
-      In other words, assuming that there are a few ICP requests "in
-      flight" at any given time, incrementing the reply request number
-      trick the querying cache into seeing a smaller round-trip time
-      than really exists.
-
-   Options
-
-      There is little risk in having the Options bitfields altered.  Any
-      option bit must only be set in a reply if it was also set in a
-      query.  Changing a bit from clear to set is detectable by the
-      querying cache, and such a message must be ignored.  Changing a
-      bit from set to clear is allowed and has no negative side effects.
-
-   Option Data
-
-      ICP_FLAG_SRC_RTT is the only option which uses the Option Data
-      field.  Altering the RTT values returned here can affect the
-      neighbor selection algorithm, either forcing or preventing the use
-      of a neighbor.
-
-   URL
-
-      The URL and Request Number are used to generate the cache key.
-      Altering the URL will cause a lookup of the cache key to fail, and
-      the ICP reply to be entirely ignored.  This is similar to blocking
-      the ICP reply altogether.
-
-
-9.8.  Summary
-
-   o    ICP_OP_HIT_OBJ is particularly vulnerable to security problems
-        because it includes object data.  For this, and other reasons,
-        its use is discouraged.
-
-   o    Falsifying, altering, inserting, or blocking ICP messages can
-        cause an HTTP request to fail only in two situations:
-
-        -    If the cache is behind a firewall and cannot directly con-
-             nect to the origin server.
-
-        -    If a false ICP_OP_HIT reply causes the HTTP request to be
-             forwarded to a sibling, where the request is a cache miss
-             and the sibling refuses to continue forwarding the request
-             on behalf of the originating cache.
-
-
-
-
-Wessels & Claffy                                               [Page 22]
-
-Internet-Draft                                                8 Jul 1997
-
-
-   o    Falsifying, altering, inserting, or blocking ICP messages can
-        easily cause HTTP requests to be forwarded (or not forwarded) to
-        certain neighbors.  If the neighbor cache has also been compro-
-        mised, then it could serve bogus content and pollute a cache
-        hierarchy.
-
-   o    Blocking or delaying ICP messages can cause HTTP request to be
-        further delayed, but still satisfied.
-
-
-
-10.  References
-
-   [1] Fielding, R., et. al, "Hypertext Transfer Protocol -- HTTP/1.1",
-   RFC 2068, UC Irvine, January 1997.
-
-   [2] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform Resource
-   Locators (URL)", RFC 1738, CERN, Xerox PARC, University of Minnesota,
-   December 1994.
-
-   [3] Bowman M., Danzig P., Hardy D., Manber U., Schwartz M., and Wes-
-   sels D., "The Harvest Information Discovery and Access System",
-   Internet Research Task Force - Resource Discovery, http://har-
-   vest.transarc.com/.
-
-   [4] Wessels D., Claffy K., "ICP and the Squid Web Cache", National
-   Laboratory for Applied Network Research, http://www.nlanr.net/~wes-
-   sels/Papers/icp-squid.ps.gz.
-
-   [5] Wessels D., "The Squid Internet Object Cache", National Labora-
-   tory for Applied Network Research, http://squid.nlanr.net/Squid/
-
-   [6] mtrace, Xerox PARC, ftp://ftp.parc.xerox.com/pub/net-
-   research/ipmulti/.
-
-   [7] Atkinson, R., "Security Architecture for the Internet Protocol",
-   RFC 1825, NRL, August 1995.
-
-   [8] Atkinson, R., "IP Authentication Header", RFC 1826, NRL, August
-   1995.
-
-   [9] Atkinson, R., "IP Encapsulating Security Payload (ESP)", RFC
-   1827, NRL, August 1995.
-
-
-
-
-
-
-
-
-Wessels & Claffy                                               [Page 23]
-
-Internet-Draft                                                8 Jul 1997
-
-
-11.  Acknowledgments
-
-   The authors wish to thank Paul A Vixie <paul@vix.com> for
-   providing excellent feedback on this document,
-   Martin Hamilton <martin@mrrl.lut.ac.uk> for pushing the
-   development of multicast ICP, Eric Rescorla <ekr@terisa.com>
-   and Randall Atkinson <rja@home.net> for assisting with security issues,
-   and especially Allyn Romanow for keeping us on the right track.
-
-
-12.  Authors' Addresses:
-
-   Duane Wessels
-   National Laboratory for Applied Network Research
-   10100 Hopkins Drive
-   La Jolla, CA 92093
-   wessels@nlanr.net
-
-   K Claffy
-   National Laboratory for Applied Network Research
-   10100 Hopkins Drive
-   La Jolla, CA 92093
-   kc@nlanr.net
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Wessels & Claffy                                               [Page 24]
-
--- squid/doc/icpv2-protocol.txt	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,507 +0,0 @@
-
-
-
-
-
-
-Network Working Group                                         D. Wessels
-Internet-Draft                                                 K. Claffy
-                                         National Laboratory for Applied
-Obsoletes <draft-wessels-icp-v2-02.txt>            Network Research/UCSD
-Expires: November 27, 1997                                   27 May 1997
-
-
-
-                Internet Cache Protocol (ICP), version 2
-                     <draft-wessels-icp-v2-03.txt>
-
-
-Status of this Memo
-
-   This document is an Internet-Draft. Internet-Drafts are working
-   documents of the Internet Engineering Task Force (IETF), its areas,
-   and its working groups. Note that other groups may also distribute
-   working documents as Internet-Drafts.
-
-   Internet-Drafts are draft documents valid for a maximum of six months
-   and may be updated, replaced, or obsoleted by other documents at any
-   time. It is inappropriate to use Internet-Drafts as reference
-   material or to cite them other than as ``work in progress.''
-
-   To learn the current status of any Internet-Draft, please check the
-   ``1id-abstracts.txt'' listing contained in the Internet-Drafts Shadow
-   Directories on ftp.is.co.za (Africa), nic.nordu.net (Europe),
-   munnari.oz.au (Pacific Rim), ds.internic.net (US East Coast), or
-   ftp.isi.edu (US West Coast).
-
-Abstract
-
-   This draft document describes version 2 of the Internet Cache
-   Protocol (ICPv2) as currently implemented in two World-Wide Web proxy
-   cache packages[3,5].  ICP is a lightweight message format used for
-   communicating among Web caches.  ICP is used to exchange hints about
-   the existence of URLs in neighbor caches.  Caches exchange ICP
-   queries and replies to gather information to use in selecting the
-   most appropriate location from which to retrieve an object.
-
-   This document describes only the format and fields of ICP messages.
-   A companion document (RFCXXXX, <draft-wessels-icp-v2-appl-01.txt>)
-   describes the application of ICP to Web caches.  Several independent
-   caching implementations now use ICP, and we consider it important to
-   codify the existing practical uses of ICP for those trying to
-   implement, deploy, and extend its use for their own purposes.
-
-
-
-
-
-Wessels                                                         [Page 1]
-
-Internet-Draft                                             22 April 1997
-
-
-1.  Introduction
-
-   ICP is a message format used for communicating between Web caches.
-   Although Web caches use HTTP[1] for the transfer of object data,
-   caches benefit from a simpler, lighter communication protocol.  ICP
-   is primarily used in a cache mesh to locate specific Web objects in
-   neighboring caches.  One cache sends an ICP query to its neighbors.
-   The neighbors send back ICP replies indicating a "HIT" or a "MISS."
-
-   In current practice, ICP is implemented on top of UDP, but there is
-   no requirement that it be limited to UDP.  We feel that ICP over UDP
-   offers features important to Web caching applications.  An ICP
-   query/reply exchange needs to occur quickly, typically within a sec-
-   ond or two.  A cache cannot wait longer than that before beginning to
-   retrieve an object.  Failure to receive a reply message most likely
-   means the network path is either congested or broken.  In either case
-   we would not want to select that neighbor.  As an indication of imme-
-   diate network conditions between neighbor caches, ICP over a
-   lightweight protocol such as UDP is better than one with the overhead
-   of TCP.
-
-   In addition to its use as an object location protocol, ICP messages
-   can be used for cache selection.  Failure to receive a reply from a
-   cache may indicate a network or system failure.  The ICP reply may
-   include information that could assist selection of the most appropri-
-   ate source from which to retrieve an object.
-
-   ICP was initially developed by Peter Danzig, et. al.  at the Univer-
-   sity of Southern California as a central part of hierarchical caching
-   in the Harvest research project[3].
-
-ICP Message Format
-
-   The ICP message format consists of a 20-octet fixed header plus a
-   variable sized payload (see Figure 1).
-
-   NOTE: All fields must be represented in network byte order.
-
-   Opcode
-      One of the opcodes defined below.
-
-   Version
-      The ICP protocol version number.  At the time of this writing,
-      both versions two and three are in use.  This document describes
-      only version two.  The version number field allows for future
-      development of this protocol.
-
-   Message Length
-
-
-
-Wessels                                                         [Page 2]
-
-Internet-Draft                                             22 April 1997
-
-
-     0                   1                   2                   3
-    0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   |     Opcode    |    Version    |         Message Length        |
-   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   |                         Request Number                        |
-   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   |                            Options                            |
-   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   |                          Option Data                          |
-   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   |                       Sender Host Address                     |
-   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-   |                                                               |
-   |                            Payload                            |
-   /                                                               /
-   /                                                               /
-   |                                                               |
-   +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-                       FIGURE 1: ICP message format.
-
-      The total length (octets) of the ICP message.  ICP messages MUST
-      not exceed 16,384 octets in length.
-
-   Request Number
-      An opaque identifier.  When responding to a query, this value must
-      be copied into the reply message.
-
-   Options
-      A 32-bit field of option flags that allows extension of this ver-
-      sion of the protocol in certain, limited ways.  See ``ICP Option
-      Flags'' below.
-
-   Option Data
-      A four-octet field to support optional features.  The following
-      ICP features make use of this field:
-
-      The ICP_FLAG_SRC_RTT option uses the low 16-bits of Option Data to
-      return RTT measurements.  The ICP_FLAG_SRC_RTT option is further
-      described below.
-
-   Sender Host Address
-      The IPv4 address of the host sending the ICP message.  This field
-      should probably not be trusted over what is  provided by getpeer-
-      name(), accept(), and recvfrom().  There is some ambiguity over
-      the original purpose of this field.  In practice it is not used.
-
-
-
-
-Wessels                                                         [Page 3]
-
-Internet-Draft                                             22 April 1997
-
-
-   Payload
-      The contents of the Payload field vary depending on the Opcode,
-      but most often it contains a null-terminated URL string.
-
-
-2.  ICP Opcodes
-
-The following table shows currently defined ICP opcodes:
-
-   Value    Name
-   -----    -----------------
-       0    ICP_OP_INVALID
-       1    ICP_OP_QUERY
-       2    ICP_OP_HIT
-       3    ICP_OP_MISS
-       4    ICP_OP_ERR
-     5-9    UNUSED
-      10    ICP_OP_SECHO
-      11    ICP_OP_DECHO
-   12-20    UNUSED
-      21    ICP_OP_MISS_NOFETCH
-      22    ICP_OP_DENIED
-      23    ICP_OP_HIT_OBJ
-
-   ICP_OP_INVALID
-      A place holder to detect zero-filled or malformed messages.  A
-      cache must never intentionally send an ICP_OP_INVALID message.
-      ICP_OP_ERR should be used instead.
-
-   ICP_OP_QUERY
-      A query message.  NOTE this opcode has a different payload format
-      than most of the others.  First is the requester's IPv4 address,
-      followed by a URL.  The Requester Host Address is not that of the
-      cache generating the ICP message, but rather the address of the
-      caches's client that originated the request.  The Requester Host
-      Address is often zero filled.  An ICP message with an all-zero
-      Requester Host Address address should be taken as one where the
-      requester address is not specified; it does not indicate a valid
-      IPv4 address.
-
-
-
-
-
-
-
-
-
-
-
-
-Wessels                                                         [Page 4]
-
-Internet-Draft                                             22 April 1997
-
-
-      ICP_OP_QUERY payload format:
-
-        0                   1                   2                   3
-       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-      |                     Requester Host Address                    |
-      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-      |                                                               |
-      /                       Null-Terminated URL                     /
-      /                                                               /
-      |                                                               |
-      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-
-      In response to an ICP_OP_QUERY, the recipient must return one of:
-      ICP_OP_HIT, ICP_OP_MISS, ICP_OP_ERR, ICP_OP_MISS_NOFETCH,
-      ICP_OP_DENIED, or ICP_OP_HIT_OBJ.
-
-   ICP_OP_SECHO
-      Similar to ICP_OP_QUERY, but for use in simulating a query to an
-      origin server.  When ICP is used to select the closest neighbor,
-      the origin server can be included in the algorithm by bouncing an
-      ICP_OP_SECHO message off it's echo port.  The payload is simply
-      the null-terminated URL.
-
-      NOTE: the echo server will not interpret the data (i.e. we could
-      send it anything).  This opcode is used to tell the difference
-      between a legitimate query or response, random garbage, and an
-      echo response.
-
-   ICP_OP_DECHO
-      Similar to ICP_OP_QUERY, but for use in simulating a query to a
-      cache which does not use ICP.  When ICP is used to choose the
-      closest neighbor, a non-ICP cache can be included in the algorithm
-      by bouncing an ICP_OP_DECHO message off it's echo port.  The pay-
-      load is simply the null-terminated URL.
-
-      NOTE: one problem with this approach is that while a system's echo
-      port may be functioning perfectly, the cache software may not be
-      running at all.
-
-   One of the following six ICP opcodes are sent in response to an
-   ICP_OP_QUERY message.  Unless otherwise noted, the payload must be
-   the null-terminated URL string.  Both the URL string and the Request
-   Number field must be exactly the same as from the ICP_OP_QUERY mes-
-   sage.
-
-   ICP_OP_HIT
-
-
-
-Wessels                                                         [Page 5]
-
-Internet-Draft                                             22 April 1997
-
-
-      An ICP_OP_HIT response indicates that the requested URL exists in
-      this cache and that the requester is allowed to retrieve it.
-
-   ICP_OP_MISS
-      An ICP_OP_MISS response indicates that the requested URL does not
-      exist in this cache.  The querying cache may still choose to fetch
-      the URL from the replying cache.
-
-   ICP_OP_ERR
-      An ICP_OP_ERR response indicates some kind of error in parsing or
-      handling the query message (e.g. invalid URL).
-
-   ICP_OP_MISS_NOFETCH
-      An ICP_OP_MISS_NOFETCH response indicates that this cache is up,
-      but is in a state where it does not want to handle cache misses.
-      An example of such a state is during a startup phase where a cache
-      might be rebuilding its object store.  A cache in such a mode may
-      wish to return ICP_OP_HIT for cache hits, but not ICP_OP_MISS for
-      misses.  ICP_OP_MISS_NOFETCH essentially means ``I am up and run-
-      ning, but please don't fetch this URL from me now.''
-
-      Note, ICP_OP_MISS_NOFETCH has a different meaning than
-      ICP_OP_MISS.  The ICP_OP_MISS reply is an invitation to fetch the
-      URL from the replying cache (if their relationship allows it), but
-      ICP_OP_MISS_NOFETCH is a request to NOT fetch the URL from the
-      replying cache.
-
-   ICP_OP_DENIED
-      An ICP_OP_DENIED response indicates that the querying site is not
-      allowed to retrieve the named object from this cache.  Caches and
-      proxies may implement complex access controls.  This reply must be
-      be interpreted to mean ``you are not allowed to request this par-
-      ticular URL from me at this particular time.''
-
-      Caches receiving a high percentage of ICP_OP_DENIED replies are
-      probably misconfigured.  Caches should track percentage of all
-      replies which are ICP_OP_DENIED and disable a neighbor which
-      exceeds a certain threshold (e.g. 95% of 100 or more queries).
-
-      Similarly, a cache should track the percent of ICP_OP_DENIED mes-
-      sages that are sent to a given address.  If the percent of denied
-      messages exceeds a certain threshold (e.g. 95% of 100 or more),
-      the cache may choose to ignore all subsequent ICP_OP_QUERY mes-
-      sages from that address until some sort of administrative inter-
-      vention occurs.
-
-   ICP_OP_HIT_OBJ
-      Just like an ICP_OP_HIT response, but the actual object data has
-
-
-
-Wessels                                                         [Page 6]
-
-Internet-Draft                                             22 April 1997
-
-
-      been included in this reply message.   Many requested objects are
-      small enough that it is possible to include them in the query
-      response and avoid the need to make a subsequent HTTP request for
-      the object.
-
-      CAVEAT: ICP_OP_HIT_OBJ has some negative side effects which make
-      its use undesirable.  It transfers object data without HTTP and
-      therefore bypasses the standard HTTP processing, including autho-
-      rization and age validation.  Another negative side effect is that
-      ICP_OP_HIT_OBJ messages will often be much larger than the path
-      MTU, thereby causing fragmentation to occur on the UDP packet.
-      For these reasons, use of ICP_OP_HIT_OBJ is NOT recommended.
-
-      A cache must not send an ICP_OP_HIT_OBJ unless the
-      ICP_FLAG_HIT_OBJ flag is set in the query message Options field.
-
-      ICP_OP_HIT_OBJ payload format:
-
-        0                   1                   2                   3
-       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
-      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-      |                                                               |
-      /                       Null-Terminated URL                     /
-      /                                                               /
-      |                                                               |
-      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-      |         Object Size           |                               |
-      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+                               |
-      |                                                               |
-      /                           Object Data                         /
-      /                                                               /
-      |                                                               |
-      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-
-
-      The receiving application must check to make sure it actually
-      receives Object Size octets of data.  If it does not, then it
-      should treat the ICP_OP_HIT_OBJ reply as though it were a normal
-      ICP_OP_HIT.
-
-      NOTE: the Object Size field does not necessarily begin on a 32-bit
-      boundary as shown in the diagram above.  It begins immediately
-      following the NULL byte of the URL string.
-
-   UNRECOGNIZED OPCODES
-      ICP messages with unrecognized or unused opcodes should be
-      ignored, i.e. no reply generated.  The application may choose to
-      note the anomalous behaviour in a log file.
-
-
-
-Wessels                                                         [Page 7]
-
-Internet-Draft                                             22 April 1997
-
-
-3.  ICP Option Flags
-
-   0x80000000  ICP_FLAG_HIT_OBJ
-      This flag is set in an ICP_OP_QUERY message indicating that it is
-      okay to respond with an ICP_OP_HIT_OBJ message if the object data
-      will fit in the reply.
-
-   0x40000000  ICP_FLAG_SRC_RTT
-      This flag is set in an ICP_OP_QUERY message indicating that the
-      requester would like the ICP reply to include the responder's mea-
-      sured RTT to the origin server.
-
-      Upon receipt of an ICP_OP_QUERY with ICP_FLAG_SRC_RTT bit set, a
-      cache should check an internal database of RTT measurements.  If
-      available, the RTT value MUST be expressed as a 16-bit integer, in
-      units of milliseconds.  If unavailable, the responder may either
-      set the RTT value to zero, or clear the ICP_FLAG_SRC_RTT bit in
-      the ICP reply.  The ICP reply MUST not be delayed while waiting
-      for the RTT measurement to occur.
-
-      This flag is set in an ICP reply message (ICP_OP_HIT, ICP_OP_MISS,
-      ICP_OP_MISS_NOFETCH, or ICP_OP_HIT_OBJ) to indicate that the low
-      16-bits of the Option Data field contain the measured RTT to the
-      host given in the requested URL.  If ICP_FLAG_SRC_RTT is clear in
-      the query then it MUST also be clear in the reply.  If
-      ICP_FLAG_SRC_RTT is set in the query, then it may or may not be
-      set in the reply.
-
-
-4.  Security Considerations
-
-   The security issues relating to ICP are discussed in the companion
-   document, RFCXXXX (<draft-wessels-icp-v2-appl-01.txt>).
-
-
-5.  References
-
-   [1] Fielding, R., et. al, "Hypertext Transfer Protocol -- HTTP/1.1",
-   RFC 2068, UC Irvine, January 1997.
-
-   [2] Berners-Lee, T., Masinter, L., and M. McCahill, "Uniform Resource
-   Locators (URL)", RFC 1738, CERN, Xerox PARC, University of Minnesota,
-   December 1994.
-
-   [3] Bowman M., Danzig P., Hardy D., Manber U., Schwartz M., and Wes-
-   sels D., "The Harvest Information Discovery and Access System",
-   Internet Research Task Force - Resource Discovery, http://har-
-   vest.transarc.com/.
-
-
-
-Wessels                                                         [Page 8]
-
-Internet-Draft                                             22 April 1997
-
-
-   [4] Wessels D., Claffy K., "ICP and the Squid Web Cache", National
-   Laboratory for Applied Network Research, http://www.nlanr.net/~wes-
-   sels/Papers/icp-squid.ps.gz
-
-   [5] Wessels D., "The Squid Internet Object Cache", National Labora-
-   tory for Applied Network Research, http://squid.nlanr.net/Squid/
-
-
-6.  Acknowledgments
-
-   The authors wish to thank Paul A Vixie <paul@vix.com> for
-   providing excellent feedback on this document.
-
-
-7.  Author's  Addresses:
-
-   Duane Wessels
-   National Laboratory for Applied Network Research
-   10100 Hopkins Drive
-   La Jolla, CA 92093
-   wessels@nlanr.net
-
-   K Claffy
-   National Laboratory for Applied Network Research
-   10100 Hopkins Drive
-   La Jolla, CA 92093
-   kc@nlanr.net
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-Wessels                                                         [Page 9]
-
Index: squid/doc/Programming-Guide/prog-guide.sgml
===================================================================
RCS file: /cvsroot/squid-sf//squid/doc/Programming-Guide/prog-guide.sgml,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/doc/Programming-Guide/prog-guide.sgml	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/doc/Programming-Guide/prog-guide.sgml	17 Apr 2000 00:13:07 -0000	1.1.1.2.10.1
@@ -2,6 +2,7 @@
 <article>
 <title>Squid Programmers Guide</title>
 <author>Duane Wessels, Squid Developers
+<date>$Id: prog-guide.sgml,v 1.1.1.2.10.1 2000/04/17 00:13:07 hno Exp $</date>
 
 <abstract>
 Squid is a WWW Cache application developed by the National Laboratory
Index: squid/errors/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/errors/Attic/Makefile.in,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/errors/Makefile.in	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/errors/Makefile.in	17 Apr 2000 00:13:07 -0000	1.1.1.2.10.1
@@ -1,4 +1,4 @@
-# $Id: Makefile.in,v 1.1.1.2 2000/01/26 03:25:00 hno Exp $
+# $Id: Makefile.in,v 1.1.1.2.10.1 2000/04/17 00:13:07 hno Exp $
 #
 prefix		= @prefix@
 exec_prefix	= @exec_prefix@
--- squid/errors/Danish/ERR_CLIENT_ABORT	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,22 +0,0 @@
-<HTML><HEAD>
-<TITLE>FEJL: Den angivne URL kunne ikke hentes</TITLE>
-<META CONTENT="text/html; charset=iso-8859-1">
-</HEAD><BODY>
-<H1>FEJL</H1>
-<H2>Den angivne URL kunne ikke hentes</H2>
-<HR>
-<P>
-Under hentning af f&oslash;gende URL:
-<A HREF="%U">%U</A>
-<P>
-Opstod f&oslash;lgende fejl:
-<UL>
-<LI>
-<STRONG>
-Klient afbrydelse.
-</STRONG>
-</UL>
-
-<P>
-Foresp&oslash;rgslen blev afbrudt af klienten.
-</P>
--- squid/errors/Finnish/ERR_CLIENT_ABORT	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,21 +0,0 @@
-<HTML><HEAD>
-<TITLE>VIRHE: Pyydetty&auml; URL-osoitetta ei voitu hakea</TITLE>
-</HEAD><BODY>
-<H1>VIRHE</H1>
-<H2>Pyydetty&auml; URL-osoitetta ei voitu hakea</H2>
-<HR>
-<P>
-Yritett&auml;ess&auml; hakea URL-osoitetta:
-<A HREF="%U">%U</A>
-<P>
-Ilmeni seuraava virhe:
-<UL>
-<LI>
-<STRONG>
-Asiakkaan keskeytys.
-</STRONG>
-</UL>
-
-<P>
-Asiakas keskeytti pyynn&ouml;n.
-</P>
--- /dev/null	Wed Feb 14 00:42:24 2007
+++ squid/errors/Finnish/ERR_FTP_FORBIDDEN	Wed Feb 14 00:43:24 2007
@@ -0,0 +1,17 @@
+<HTML><HEAD>
+<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
+</HEAD><BODY>
+<H1>ERROR</H1>
+<H2>The requested URL could not be retrieved</H2>
+<HR>
+<P>
+An FTP authentication failure occurred
+while trying to retrieve the URL:
+<A HREF="%U">%U</A>
+<P>
+Squid sent the following FTP command:
+<blockquote><strong><pre>%f</pre></strong></blockquote>
+and then received this reply
+<blockquote><strong><pre>%F</pre></strong></blockquote>
+<blockquote><strong><pre>%g</pre></strong></blockquote>
+<P>Your cache administrator is <A HREF="mailto:%w">%w</A>. 
--- /dev/null	Wed Feb 14 00:42:24 2007
+++ squid/errors/Finnish/ERR_FTP_NOT_FOUND	Wed Feb 14 00:43:24 2007
@@ -0,0 +1,20 @@
+<HTML><HEAD>
+<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
+</HEAD><BODY>
+<H1>ERROR</H1>
+<H2>The requested URL could not be retrieved</H2>
+<HR>
+<P>
+The following URL could not be retrieved:
+<A HREF="%U">%U</A>
+<P>
+Squid sent the following FTP command:
+<blockquote><strong><pre>%f</pre></strong></blockquote>
+and then received this reply
+<blockquote><strong><pre>%F</pre></strong></blockquote>
+<blockquote><strong><pre>%g</pre></strong></blockquote>
+<P>
+This might be caused by an FTP URL with an absolute path (which does
+not comply with RFC 1738).  If this is the cause, then the file
+can be found at <A HREF="%B">%B</A>.
+<P>Your cache administrator is <A HREF="mailto:%w">%w</A>. 
--- /dev/null	Wed Feb 14 00:42:24 2007
+++ squid/errors/Finnish/ERR_FTP_UNAVAILABLE	Wed Feb 14 00:43:24 2007
@@ -0,0 +1,16 @@
+<HTML><HEAD>
+<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
+</HEAD><BODY>
+<H1>ERROR</H1>
+<H2>The requested URL could not be retrieved</H2>
+<HR>
+<P>
+The FTP server was too busy while trying to retrieve the URL:
+<A HREF="%U">%U</A>
+<P>
+Squid sent the following FTP command:
+<blockquote><strong><pre>%f</pre></strong></blockquote>
+and then received this reply
+<blockquote><strong><pre>%F</pre></strong></blockquote>
+<blockquote><strong><pre>%g</pre></strong></blockquote>
+<P>Your cache administrator is <A HREF="mailto:%w">%w</A>. 
--- /dev/null	Wed Feb 14 00:42:24 2007
+++ squid/errors/Finnish/ERR_SHUTTING_DOWN	Wed Feb 14 00:43:24 2007
@@ -0,0 +1,17 @@
+<HTML><HEAD>
+<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
+</HEAD><BODY>
+<H1>ERROR</H1>
+<H2>The requested URL could not be retrieved</H2>
+<HR>
+<P>
+While trying to retrieve the URL:
+<A HREF="%U">%U</A>
+<P>
+The following error was encountered:
+<UL>
+<P>
+This cache is in the process of shutting down and can not
+service your request at this time.  Please retry your
+request again soon.
+<P>Your cache administrator is <A HREF="mailto:%w">%w</A>. 
--- /dev/null	Wed Feb 14 00:42:24 2007
+++ squid/errors/Finnish/ERR_TOO_BIG	Wed Feb 14 00:43:24 2007
@@ -0,0 +1,26 @@
+<HTML><HEAD>
+<TITLE>ERROR: The requested URL could not be retrieved</TITLE>
+</HEAD><BODY>
+<H1>ERROR</H1>
+<H2>The requested URL could not be retrieved</H2>
+<HR>
+<P>
+While trying to retrieve the URL:
+<A HREF="%U">%U</A>
+<P>
+The following error was encountered:
+<UL>
+<LI>
+<STRONG>
+The request or reply is too large.
+</STRONG>
+<P>
+If you are making a POST or PUT request, then your request body
+(the thing you are trying to upload) is too large.  If you are 
+making a GET request, then the reply body (what you are trying
+to download) is too large.   These limits have been established
+by the Internet Service Provider who operates this cache.  Please
+contact them directly if you feel this is an error.
+</UL>
+<P>
+Your cache administrator is <A HREF="mailto:%w">%w</A>.
--- squid/icons/anthony-binhex.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,2 +0,0 @@
-GIF89a
-aH
--- squid/icons/anthony-bomb.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-box.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-box2.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,2 +0,0 @@
-GIF89a
-	
--- squid/icons/anthony-c.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,2 +0,0 @@
-GIF89a
-�(Q!uA!֋Jq9h�R�Z-�f���N��0�\��������p�4@���7l�+	
--- squid/icons/anthony-compressed.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-dir.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,2 +0,0 @@
-GIF89a
-��xE#���� �	]J�@Bj��x��xL�
�t�
--- squid/icons/anthony-dirup.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-dvi.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-f.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,3 +0,0 @@
-GIF89a
-��7<���	�C	
-`����S�cV|��(*M�vأ���.�93�KD[ŷ5�*���<�q�	
--- squid/icons/anthony-image.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,2 +0,0 @@
-GIF89a
-
--- squid/icons/anthony-image2.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-layout.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-link.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-movie.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-pdf.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-portal.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-ps.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-quill.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,2 +0,0 @@
-GIF89a
-�s�U�Ɲ��
RU:h&�Տ�����+ ̔�n�
�����L���amB�Bh"���	
--- squid/icons/anthony-script.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-sound.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,2 +0,0 @@
-GIF89a
-�cU���q	��h~
�r�wi�Q�[�Dh���kwṄ�
�4�8fqz�*��*�*��o�Ԝ�
--- squid/icons/anthony-tar.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,2 +0,0 @@
-GIF89a
-\��w�v�����`8
--- squid/icons/anthony-tex.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,2 +0,0 @@
-GIF89a
-RR���E'�Ԗp��3����8Znו�GT#{��->~��7G��F:o�Z	
--- squid/icons/anthony-text.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,2 +0,0 @@
-GIF89a
-�n��������Jn�(�,�t:}6��Q@��[���~�W�V����ص����>Y��7&
--- squid/icons/anthony-unknown.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,4 +0,0 @@
-GIF89a
-7�
-�0֧���#�$�
-
@*�,K���|�'��"-���K<%��$����`�[˓��j%<?����$8@�A	
--- squid/icons/anthony-xbm.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/icons/anthony-xpm.gif	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1 +0,0 @@
-GIF89a
--- squid/include/autoconf.h.in	Wed Feb 14 00:43:24 2007
+++ /dev/null	Wed Feb 14 00:42:24 2007
@@ -1,644 +0,0 @@
-/* include/autoconf.h.in.  Generated automatically from configure.in by autoheader.  */
-
-/* Define if using alloca.c.  */
-#undef C_ALLOCA
-
-/* Define to empty if the keyword does not work.  */
-#undef const
-
-/* Define to one of _getb67, GETB67, getb67 for Cray-2 and Cray-YMP systems.
-   This function is required for alloca.c support on those systems.  */
-#undef CRAY_STACKSEG_END
-
-/* Define if you have alloca, as a function or macro.  */
-#undef HAVE_ALLOCA
-
-/* Define if you have <alloca.h> and it should be used (not on Ultrix).  */
-#undef HAVE_ALLOCA_H
-
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#undef mode_t
-
-/* Define to `long' if <sys/types.h> doesn't define.  */
-#undef off_t
-
-/* Define to `int' if <sys/types.h> doesn't define.  */
-#undef pid_t
-
-/* Define to `unsigned' if <sys/types.h> doesn't define.  */
-#undef size_t
-
-/* If using the C implementation of alloca, define if you know the
-   direction of stack growth for your system; otherwise it will be
-   automatically deduced at run-time.
- STACK_DIRECTION > 0 => grows toward higher addresses
- STACK_DIRECTION < 0 => grows toward lower addresses
- STACK_DIRECTION = 0 => direction of growth unknown
- */
-#undef STACK_DIRECTION
-
-/* Define if you have the ANSI C header files.  */
-#undef STDC_HEADERS
-
-/* Define if your processor stores words with the most significant
-   byte first (like Motorola and SPARC, unlike Intel and VAX).  */
-#undef WORDS_BIGENDIAN
-
-/*********************************
- * START OF CONFIGURABLE OPTIONS *
- *********************************/
-/*
- * If you are upset that the cachemgr.cgi form comes up with the hostname
- * field blank, then define this to getfullhostname()
- */
-#undef CACHEMGR_HOSTNAME
-
-/* Define to do simple malloc debugging */
-#undef XMALLOC_DEBUG
-
-/* Define for log file trace of mem alloc/free */
-#undef MEM_GEN_TRACE
-
-/* Define to have malloc statistics */
-#undef XMALLOC_STATISTICS
-
-/* Define to have a detailed trace of memory allocations */
-#undef XMALLOC_TRACE
-
-#undef FORW_VIA_DB
-
-/* Define to use async disk I/O operations */
-#undef USE_ASYNC_IO
-
-/* Defines how many threads to use for async I/O */
-#undef NUMTHREADS
-
-/*
- * If you want to use Squid's ICMP features (highly recommended!) then
- * define this.  When USE_ICMP is defined, Squid will send ICMP pings
- * to origin server sites.  This information is used in numerous ways:
- *         - Sent in ICP replies so neighbor caches know how close
- *           you are to the source.
- *         - For finding the closest instance of a URN.
- *         - With the 'test_reachability' option.  Squid will return
- *           ICP_OP_MISS_NOFETCH for sites which it cannot ping.
- */
-#undef USE_ICMP
-
-/*
- * Traffic management via "delay pools".
- */
-#undef DELAY_POOLS
-
-/*
- * If you want to log User-Agent request header values, define this.
- * By default, they are written to useragent.log in the Squid log
- * directory.
- */
-#undef USE_USERAGENT_LOG
-
-/*
- * A dangerous feature which causes Squid to kill its parent process
- * (presumably the RunCache script) upon receipt of SIGTERM or SIGINT.
- * Use with caution.
- */
-#undef KILL_PARENT_OPT
-
-/* Define to enable SNMP monitoring of Squid */
-#undef SQUID_SNMP
-
-/*
- * Define to enable WCCP
- */
-#define USE_WCCP 1
-
-/*
- * Squid frequently calls gettimeofday() for accurate timestamping.
- * If you are concerned that gettimeofday() is called too often, and
- * could be causing performance degradation, then you can define
- * ALARM_UPDATES_TIME and cause Squid's clock to be updated at regular
- * intervals (one second) with ALARM signals.
- */
-#undef ALARM_UPDATES_TIME
-
-/*
- * Define this to include code which lets you specify access control
- * elements based on ethernet hardware addresses.  This code uses
- * functions found in 4.4 BSD derviations (e.g. FreeBSD, ?).
- */
-#undef USE_ARP_ACL
-
-/*
- * Define this to include code for the Hypertext Cache Protocol (HTCP)
- */
-#undef USE_HTCP
-
-/*
- * Use Cache Digests for locating objects in neighbor caches.  This
- * code is still semi-experimental. 
- */
-#undef USE_CACHE_DIGESTS
-
-/*
- * Cache Array Routing Protocol
- */
-#undef USE_CARP
-
-/* Define if struct tm has tm_gmtoff member */
-#undef HAVE_TM_GMTOFF
-
-/* Define if struct mallinfo has mxfast member */
-#undef HAVE_EXT_MALLINFO
-
-/* Default FD_SETSIZE value */
-#undef DEFAULT_FD_SETSIZE
-
-/* Maximum number of open filedescriptors */
-#undef SQUID_MAXFD
-
-/* UDP send buffer size */
-#undef SQUID_UDP_SO_SNDBUF
-
-/* UDP receive buffer size */
-#undef SQUID_UDP_SO_RCVBUF
-
-/* TCP send buffer size */
-#undef SQUID_TCP_SO_SNDBUF
-
-/* TCP receive buffer size */
-#undef SQUID_TCP_SO_RCVBUF
-
-/* Host type from configure */
-#undef CONFIG_HOST_TYPE
-
-/* If we need to declare sys_errlist[] as external */
-#undef NEED_SYS_ERRLIST
-
-/* If gettimeofday is known to take only one argument */
-#undef GETTIMEOFDAY_NO_TZP
-
-/* If libresolv.a has been hacked to export _dns_ttl_ */
-#undef LIBRESOLV_DNS_TTL_HACK
-
-/* Define if struct ip has ip_hl member */
-#undef HAVE_IP_HL
-
-/* Define if your compiler supports prototyping */
-#undef HAVE_ANSI_PROTOTYPES
-
-/* Define if we should use GNU regex */
-#undef USE_GNUREGEX
-
-/* signed size_t, grr */
-#undef ssize_t
-
-/*
- * Yay! Another Linux brokenness.  Its not good enough to know that
- * setresuid() exists, because RedHat 5.0 declare setresuid() but
- * doesn't implement it.
- */
-#undef HAVE_SETRESUID
-
-/* Define if you have struct rusage */
-#undef HAVE_STRUCT_RUSAGE
-
-/*
- * This makes warnings go away.  If you have socklen_t defined in your
- * /usr/include files, then this should remain undef'd.  Otherwise it
- * should be defined to int.
- */
-#undef socklen_t
-
-/*
- * By default (for now anyway) Squid includes options which allows
- * the cache administrator to violate the HTTP protocol specification
- * in terms of cache behaviour.  Setting this to '0' will disable
- * such code.
- */
-#define HTTP_VIOLATIONS 1
-
-/*
- * Enable support for Transparent Proxy on systems using IP-Filter
- * address redirection. This provides "masquerading" support for non
- *  Linux system.
- */
-#undef IPF_TRANSPARENT
-
-/*
- * Enable code for assiting in finding memory leaks.  Hacker stuff only.
- */
-#undef USE_LEAKFINDER
-
-/*
- * type of fd_set array
- */
-#undef fd_mask
-
-/*
- * If _res structure has nsaddr_list member
- */
-#undef HAVE_RES_NSADDR_LIST
-
-/*
- * If _res structure has ns_list member
- */
-#undef HAVE_RES_NS_LIST
-
-/*
- * Compile in support for Ident (RFC 931) lookups?  Enabled by default.
- */
-#define USE_IDENT 1
-
-/*
- * If your system has statvfs(), and if it actually works!
- */
-#undef HAVE_STATVFS
-
-/*
- * If --disable-internal-dns was given to configure, then we'll use
- * the dnsserver processes instead.
- */
-#undef USE_DNSSERVERS
-
-/*
- * we check for the existance of struct mallinfo
- */
-#undef HAVE_STRUCT_MALLINFO
-
-/*
- * Do we want to use truncate(2) or unlink(2)?
- */
-#undef USE_TRUNCATE
-
-/*
- * Allow underscores in host names
- */
-#undef ALLOW_HOSTNAME_UNDERSCORES
-
-/*
- * Use the heap-based replacement techniques
- */
-#undef HEAP_REPLACEMENT
-
-/* The number of bytes in a int.  */
-#undef SIZEOF_INT
-
-/* The number of bytes in a long.  */
-#undef SIZEOF_LONG
-
-/* The number of bytes in a void *.  */
-#undef SIZEOF_VOID_P
-
-/* Define if you have the bcopy function.  */
-#undef HAVE_BCOPY
-
-/* Define if you have the crypt function.  */
-#undef HAVE_CRYPT
-
-/* Define if you have the drand48 function.  */
-#undef HAVE_DRAND48
-
-/* Define if you have the fchmod function.  */
-#undef HAVE_FCHMOD
-
-/* Define if you have the getdtablesize function.  */
-#undef HAVE_GETDTABLESIZE
-
-/* Define if you have the getpagesize function.  */
-#undef HAVE_GETPAGESIZE
-
-/* Define if you have the getrlimit function.  */
-#undef HAVE_GETRLIMIT
-
-/* Define if you have the getrusage function.  */
-#undef HAVE_GETRUSAGE
-
-/* Define if you have the getspnam function.  */
-#undef HAVE_GETSPNAM
-
-/* Define if you have the lrand48 function.  */
-#undef HAVE_LRAND48
-
-/* Define if you have the mallinfo function.  */
-#undef HAVE_MALLINFO
-
-/* Define if you have the mallocblksize function.  */
-#undef HAVE_MALLOCBLKSIZE
-
-/* Define if you have the mallopt function.  */
-#undef HAVE_MALLOPT
-
-/* Define if you have the memcpy function.  */
-#undef HAVE_MEMCPY
-
-/* Define if you have the memmove function.  */
-#undef HAVE_MEMMOVE
-
-/* Define if you have the memset function.  */
-#undef HAVE_MEMSET
-
-/* Define if you have the mktime function.  */
-#undef HAVE_MKTIME
-
-/* Define if you have the mstats function.  */
-#undef HAVE_MSTATS
-
-/* Define if you have the poll function.  */
-#undef HAVE_POLL
-
-/* Define if you have the pthread_attr_setschedparam function.  */
-#undef HAVE_PTHREAD_ATTR_SETSCHEDPARAM
-
-/* Define if you have the pthread_attr_setscope function.  */
-#undef HAVE_PTHREAD_ATTR_SETSCOPE
-
-/* Define if you have the pthread_setschedparam function.  */
-#undef HAVE_PTHREAD_SETSCHEDPARAM
-
-/* Define if you have the putenv function.  */
-#undef HAVE_PUTENV
-
-/* Define if you have the random function.  */
-#undef HAVE_RANDOM
-
-/* Define if you have the regcomp function.  */
-#undef HAVE_REGCOMP
-
-/* Define if you have the regexec function.  */
-#undef HAVE_REGEXEC
-
-/* Define if you have the regfree function.  */
-#undef HAVE_REGFREE
-
-/* Define if you have the res_init function.  */
-#undef HAVE_RES_INIT
-
-/* Define if you have the rint function.  */
-#undef HAVE_RINT
-
-/* Define if you have the seteuid function.  */
-#undef HAVE_SETEUID
-
-/* Define if you have the setgroups function.  */
-#undef HAVE_SETGROUPS
-
-/* Define if you have the setpgrp function.  */
-#undef HAVE_SETPGRP
-
-/* Define if you have the setrlimit function.  */
-#undef HAVE_SETRLIMIT
-
-/* Define if you have the setsid function.  */
-#undef HAVE_SETSID
-
-/* Define if you have the sigaction function.  */
-#undef HAVE_SIGACTION
-
-/* Define if you have the snprintf function.  */
-#undef HAVE_SNPRINTF
-
-/* Define if you have the srand48 function.  */
-#undef HAVE_SRAND48
-
-/* Define if you have the srandom function.  */
-#undef HAVE_SRANDOM
-
-/* Define if you have the strerror function.  */
-#undef HAVE_STRERROR
-
-/* Define if you have the sysconf function.  */
-#undef HAVE_SYSCONF
-
-/* Define if you have the syslog function.  */
-#undef HAVE_SYSLOG
-
-/* Define if you have the tempnam function.  */
-#undef HAVE_TEMPNAM
-
-/* Define if you have the timegm function.  */
-#undef HAVE_TIMEGM
-
-/* Define if you have the vsnprintf function.  */
-#undef HAVE_VSNPRINTF
-
-/* Define if you have the <arpa/inet.h> header file.  */
-#undef HAVE_ARPA_INET_H
-
-/* Define if you have the <arpa/nameser.h> header file.  */
-#undef HAVE_ARPA_NAMESER_H
-
-/* Define if you have the <assert.h> header file.  */
-#undef HAVE_ASSERT_H
-
-/* Define if you have the <bstring.h> header file.  */
-#undef HAVE_BSTRING_H
-
-/* Define if you have the <config.h> header file.  */
-#undef HAVE_CONFIG_H
-
-/* Define if you have the <crypt.h> header file.  */
-#undef HAVE_CRYPT_H
-
-/* Define if you have the <ctype.h> header file.  */
-#undef HAVE_CTYPE_H
-
-/* Define if you have the <dirent.h> header file.  */
-#undef HAVE_DIRENT_H
-
-/* Define if you have the <errno.h> header file.  */
-#undef HAVE_ERRNO_H
-
-/* Define if you have the <fcntl.h> header file.  */
-#undef HAVE_FCNTL_H
-
-/* Define if you have the <getopt.h> header file.  */
-#undef HAVE_GETOPT_H
-
-/* Define if you have the <gnumalloc.h> header file.  */
-#undef HAVE_GNUMALLOC_H
-
-/* Define if you have the <grp.h> header file.  */
-#undef HAVE_GRP_H
-
-/* Define if you have the <ip_compat.h> header file.  */
-#undef HAVE_IP_COMPAT_H
-
-/* Define if you have the <ip_fil.h> header file.  */
-#undef HAVE_IP_FIL_H
-
-/* Define if you have the <ip_nat.h> header file.  */
-#undef HAVE_IP_NAT_H
-
-/* Define if you have the <libc.h> header file.  */
-#undef HAVE_LIBC_H
-
-/* Define if you have the <limits.h> header file.  */
-#undef HAVE_LIMITS_H
-
-/* Define if you have the <malloc.h> header file.  */
-#undef HAVE_MALLOC_H
-
-/* Define if you have the <math.h> header file.  */
-#undef HAVE_MATH_H
-
-/* Define if you have the <memory.h> header file.  */
-#undef HAVE_MEMORY_H
-
-/* Define if you have the <mount.h> header file.  */
-#undef HAVE_MOUNT_H
-
-/* Define if you have the <ndir.h> header file.  */
-#undef HAVE_NDIR_H
-
-/* Define if you have the <net/if.h> header file.  */
-#undef HAVE_NET_IF_H
-
-/* Define if you have the <netdb.h> header file.  */
-#undef HAVE_NETDB_H
-
-/* Define if you have the <netinet/in.h> header file.  */
-#undef HAVE_NETINET_IN_H
-
-/* Define if you have the <netinet/ip_compat.h> header file.  */
-#undef HAVE_NETINET_IP_COMPAT_H
-
-/* Define if you have the <netinet/ip_fil.h> header file.  */
-#undef HAVE_NETINET_IP_FIL_H
-
-/* Define if you have the <netinet/ip_nat.h> header file.  */
-#undef HAVE_NETINET_IP_NAT_H
-
-/* Define if you have the <netinet/tcp.h> header file.  */
-#undef HAVE_NETINET_TCP_H
-
-/* Define if you have the <poll.h> header file.  */
-#undef HAVE_POLL_H
-
-/* Define if you have the <pwd.h> header file.  */
-#undef HAVE_PWD_H
-
-/* Define if you have the <regex.h> header file.  */
-#undef HAVE_REGEX_H
-
-/* Define if you have the <resolv.h> header file.  */
-#undef HAVE_RESOLV_H
-
-/* Define if you have the <sched.h> header file.  */
-#undef HAVE_SCHED_H
-
-/* Define if you have the <signal.h> header file.  */
-#undef HAVE_SIGNAL_H
-
-/* Define if you have the <stdarg.h> header file.  */
-#undef HAVE_STDARG_H
-
-/* Define if you have the <stddef.h> header file.  */
-#undef HAVE_STDDEF_H
-
-/* Define if you have the <stdio.h> header file.  */
-#undef HAVE_STDIO_H
-
-/* Define if you have the <stdlib.h> header file.  */
-#undef HAVE_STDLIB_H
-
-/* Define if you have the <string.h> header file.  */
-#undef HAVE_STRING_H
-
-/* Define if you have the <strings.h> header file.  */
-#undef HAVE_STRINGS_H
-
-/* Define if you have the <sys/dir.h> header file.  */
-#undef HAVE_SYS_DIR_H
-
-/* Define if you have the <sys/file.h> header file.  */
-#undef HAVE_SYS_FILE_H
-
-/* Define if you have the <sys/ioctl.h> header file.  */
-#undef HAVE_SYS_IOCTL_H
-
-/* Define if you have the <sys/ndir.h> header file.  */
-#undef HAVE_SYS_NDIR_H
-
-/* Define if you have the <sys/param.h> header file.  */
-#undef HAVE_SYS_PARAM_H
-
-/* Define if you have the <sys/resource.h> header file.  */
-#undef HAVE_SYS_RESOURCE_H
-
-/* Define if you have the <sys/select.h> header file.  */
-#undef HAVE_SYS_SELECT_H
-
-/* Define if you have the <sys/socket.h> header file.  */
-#undef HAVE_SYS_SOCKET_H
-
-/* Define if you have the <sys/stat.h> header file.  */
-#undef HAVE_SYS_STAT_H
-
-/* Define if you have the <sys/statvfs.h> header file.  */
-#undef HAVE_SYS_STATVFS_H
-
-/* Define if you have the <sys/syscall.h> header file.  */
-#undef HAVE_SYS_SYSCALL_H
-
-/* Define if you have the <sys/time.h> header file.  */
-#undef HAVE_SYS_TIME_H
-
-/* Define if you have the <sys/types.h> header file.  */
-#undef HAVE_SYS_TYPES_H
-
-/* Define if you have the <sys/un.h> header file.  */
-#undef HAVE_SYS_UN_H
-
-/* Define if you have the <sys/vfs.h> header file.  */
-#undef HAVE_SYS_VFS_H
-
-/* Define if you have the <sys/wait.h> header file.  */
-#undef HAVE_SYS_WAIT_H
-
-/* Define if you have the <syslog.h> header file.  */
-#undef HAVE_SYSLOG_H
-
-/* Define if you have the <time.h> header file.  */
-#undef HAVE_TIME_H
-
-/* Define if you have the <unistd.h> header file.  */
-#undef HAVE_UNISTD_H
-
-/* Define if you have the <varargs.h> header file.  */
-#undef HAVE_VARARGS_H
-
-/* Define if you have the 44bsd library (-l44bsd).  */
-#undef HAVE_LIB44BSD
-
-/* Define if you have the bind library (-lbind).  */
-#undef HAVE_LIBBIND
-
-/* Define if you have the bsd library (-lbsd).  */
-#undef HAVE_LIBBSD
-
-/* Define if you have the crypt library (-lcrypt).  */
-#undef HAVE_LIBCRYPT
-
-/* Define if you have the gnumalloc library (-lgnumalloc).  */
-#undef HAVE_LIBGNUMALLOC
-
-/* Define if you have the intl library (-lintl).  */
-#undef HAVE_LIBINTL
-
-/* Define if you have the m library (-lm).  */
-#undef HAVE_LIBM
-
-/* Define if you have the malloc library (-lmalloc).  */
-#undef HAVE_LIBMALLOC
-
-/* Define if you have the nsl library (-lnsl).  */
-#undef HAVE_LIBNSL
-
-/* Define if you have the pthread library (-lpthread).  */
-#undef HAVE_LIBPTHREAD
-
-/* Define if you have the resolv library (-lresolv).  */
-#undef HAVE_LIBRESOLV
-
-/* Define if you have the socket library (-lsocket).  */
-#undef HAVE_LIBSOCKET
Index: squid/include/config.h.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/Attic/config.h.in,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/include/config.h.in	26 Jan 2000 03:25:00 -0000	1.1.1.3
+++ squid/include/config.h.in	17 Apr 2000 00:13:08 -0000	1.1.1.3.10.1
@@ -1,5 +1,5 @@
 /*
- * $Id: config.h.in,v 1.1.1.3 2000/01/26 03:25:00 hno Exp $
+ * $Id: config.h.in,v 1.1.1.3.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * AUTHOR: Duane Wessels
  *
Index: squid/include/heap.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/heap.h,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.10.1
diff -u -r1.1.1.1 -r1.1.1.1.10.1
--- squid/include/heap.h	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/include/heap.h	17 Apr 2000 00:13:08 -0000	1.1.1.1.10.1
@@ -1,5 +1,5 @@
 /*
- * $Id: heap.h,v 1.1.1.1 2000/01/26 03:25:00 hno Exp $
+ * $Id: heap.h,v 1.1.1.1.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * AUTHOR: John Dilley, Hewlett Packard
  *
Index: squid/include/splay.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/splay.h,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/include/splay.h	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/include/splay.h	17 Apr 2000 00:13:08 -0000	1.1.1.2.10.1
@@ -1,5 +1,5 @@
 /*
- * $Id: splay.h,v 1.1.1.2 2000/01/26 03:25:00 hno Exp $
+ * $Id: splay.h,v 1.1.1.2.10.1 2000/04/17 00:13:08 hno Exp $
  */
 
 
Index: squid/include/util.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/util.h,v
retrieving revision 1.1.1.3.10.1
retrieving revision 1.1.1.3.10.2
diff -u -r1.1.1.3.10.1 -r1.1.1.3.10.2
--- squid/include/util.h	5 Feb 2000 20:14:18 -0000	1.1.1.3.10.1
+++ squid/include/util.h	17 Apr 2000 00:13:08 -0000	1.1.1.3.10.2
@@ -1,5 +1,5 @@
 /*
- * $Id: util.h,v 1.1.1.3.10.1 2000/02/05 20:14:18 hno Exp $
+ * $Id: util.h,v 1.1.1.3.10.2 2000/04/17 00:13:08 hno Exp $
  *
  * AUTHOR: Harvest Derived
  *
Index: squid/include/version.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/include/version.h,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.2
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.2
--- squid/include/version.h	5 Feb 2000 19:38:58 -0000	1.1.1.3.4.1.2.1
+++ squid/include/version.h	17 Apr 2000 00:13:08 -0000	1.1.1.3.4.1.2.2
@@ -1,10 +1,10 @@
 /*
- * $Id: version.h,v 1.1.1.3.4.1.2.1 2000/02/05 19:38:58 hno Exp $
+ * $Id: version.h,v 1.1.1.3.4.1.2.2 2000/04/17 00:13:08 hno Exp $
  *
  *  SQUID_VERSION - String for version id of this distribution
  */
 #ifndef SQUID_VERSION
-#define SQUID_VERSION	"2.3.STABLE1-ntlm"
+#define SQUID_VERSION	"2.4.DEVEL3-ntlm"
 #endif
 
 #ifndef SQUID_RELEASE_TIME
Index: squid/lib/Array.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/Array.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/lib/Array.c	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/lib/Array.c	17 Apr 2000 00:13:08 -0000	1.1.1.2.10.1
@@ -1,5 +1,5 @@
 /*
- * $Id: Array.c,v 1.1.1.2 2000/01/26 03:25:00 hno Exp $
+ * $Id: Array.c,v 1.1.1.2.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/lib/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/Attic/Makefile.in,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/lib/Makefile.in	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/lib/Makefile.in	17 Apr 2000 00:13:08 -0000	1.1.1.2.10.1
@@ -1,5 +1,5 @@
 #
-#  $Id: Makefile.in,v 1.1.1.2 2000/01/26 03:25:00 hno Exp $
+#  $Id: Makefile.in,v 1.1.1.2.10.1 2000/04/17 00:13:08 hno Exp $
 #
 prefix		= @prefix@
 top_srcdir	= @top_srcdir@
Index: squid/lib/Stack.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/Stack.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/lib/Stack.c	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/lib/Stack.c	17 Apr 2000 00:13:08 -0000	1.1.1.2.10.1
@@ -1,5 +1,5 @@
 /*
- * $Id: Stack.c,v 1.1.1.2 2000/01/26 03:25:00 hno Exp $
+ * $Id: Stack.c,v 1.1.1.2.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/lib/getfullhostname.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/getfullhostname.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/lib/getfullhostname.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/lib/getfullhostname.c	17 Apr 2000 00:13:08 -0000	1.1.1.1.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: getfullhostname.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: getfullhostname.c,v 1.1.1.1.14.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/lib/hash.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/hash.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/lib/hash.c	26 Jan 2000 03:25:00 -0000	1.1.1.3
+++ squid/lib/hash.c	17 Apr 2000 00:13:08 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: hash.c,v 1.1.1.3 2000/01/26 03:25:00 hno Exp $
+ * $Id: hash.c,v 1.1.1.3.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: section 0     Hash Tables
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/lib/heap.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/heap.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.10.1
diff -u -r1.1.1.1 -r1.1.1.1.10.1
--- squid/lib/heap.c	26 Jan 2000 03:25:00 -0000	1.1.1.1
+++ squid/lib/heap.c	17 Apr 2000 00:13:08 -0000	1.1.1.1.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: heap.c,v 1.1.1.1 2000/01/26 03:25:00 hno Exp $
+ * $Id: heap.c,v 1.1.1.1.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * AUTHOR: John Dilley, Hewlett Packard
  *
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/lib/radix.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/radix.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/lib/radix.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/lib/radix.c	17 Apr 2000 00:13:08 -0000	1.1.1.2.14.1
@@ -1,5 +1,5 @@
 /*
- * $Id: radix.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: radix.c,v 1.1.1.2.14.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: section 53     Radix tree data structure implementation
  * AUTHOR: NetBSD Derived
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/lib/rfc1035.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/rfc1035.c,v
retrieving revision 1.1.1.1.4.1
retrieving revision 1.1.1.1.4.1.2.1
diff -u -r1.1.1.1.4.1 -r1.1.1.1.4.1.2.1
--- squid/lib/rfc1035.c	4 Feb 2000 19:39:40 -0000	1.1.1.1.4.1
+++ squid/lib/rfc1035.c	17 Apr 2000 00:13:08 -0000	1.1.1.1.4.1.2.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1035.c,v 1.1.1.1.4.1 2000/02/04 19:39:40 hno Exp $
+ * $Id: rfc1035.c,v 1.1.1.1.4.1.2.1 2000/04/17 00:13:08 hno Exp $
  *
  * Low level DNS protocol routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -33,6 +33,12 @@
  *
  */
 
+/*
+ * KNOWN BUGS:
+ * 
+ * UDP replies with TC set should be retried via TCP
+ */
+
 #include "config.h"
 
 #if HAVE_STDIO_H
@@ -227,7 +233,7 @@
     h->qr = (t >> 15) & 0x01;
     h->opcode = (t >> 11) & 0x0F;
     h->aa = (t >> 10) & 0x01;
-    h->tc = (t >> 8) & 0x01;
+    h->tc = (t >> 9) & 0x01;
     h->rd = (t >> 8) & 0x01;
     h->ra = (t >> 7) & 0x01;
     h->rcode = t & 0x0F;
@@ -270,7 +276,7 @@
     do {
 	c = *(buf + off);
 	if (c > RFC1035_MAXLABELSZ) {
-	    /* fucking compression */
+	    /* blasted compression */
 	    unsigned short s;
 	    off_t ptr;
 	    memcpy(&s, buf + off, sizeof(s));
@@ -321,6 +327,14 @@
     RR->ttl = ntohl(i);
     memcpy(&s, buf + off, sizeof(s));
     off += sizeof(s);
+    if (off + ntohs(s) > sz) {
+	/*
+	 * We got a truncated packet.  'dnscache' truncates UDP
+	 * replies at 512 octets, as per RFC 1035.  Returning sz+1
+	 * should cause no further processing for this reply.
+	 */
+	return sz + 1;
+    }
     switch (RR->type) {
     case RFC1035_TYPE_PTR:
 	RR->rdata = malloc(RFC1035_MAXHOSTNAMESZ);
@@ -432,7 +446,8 @@
     recs = calloc(i, sizeof(*recs));
     while (i--) {
 	off = rfc1035RRUnpack(buf, sz, off, &recs[i]);
-	assert(off <= sz);
+	if (off > sz)		/* truncated packet */
+	    break;
 	nr++;
     }
     *records = recs;
Index: squid/lib/rfc1123.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/rfc1123.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/lib/rfc1123.c	26 Jan 2000 03:25:00 -0000	1.1.1.3
+++ squid/lib/rfc1123.c	17 Apr 2000 00:13:08 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: rfc1123.c,v 1.1.1.3 2000/01/26 03:25:00 hno Exp $
+ * $Id: rfc1123.c,v 1.1.1.3.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/lib/rfc1738.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/rfc1738.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/lib/rfc1738.c	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/lib/rfc1738.c	17 Apr 2000 00:13:08 -0000	1.1.1.2.10.1
@@ -1,5 +1,5 @@
 /*
- * $Id: rfc1738.c,v 1.1.1.2 2000/01/26 03:25:00 hno Exp $
+ * $Id: rfc1738.c,v 1.1.1.2.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/lib/splay.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/splay.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/lib/splay.c	26 Jan 2000 03:25:00 -0000	1.1.1.2
+++ squid/lib/splay.c	17 Apr 2000 00:13:08 -0000	1.1.1.2.10.1
@@ -1,5 +1,5 @@
 /*
- * $Id: splay.c,v 1.1.1.2 2000/01/26 03:25:00 hno Exp $
+ * $Id: splay.c,v 1.1.1.2.10.1 2000/04/17 00:13:08 hno Exp $
  */
 
 #include "config.h"
Index: squid/lib/strerror.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/strerror.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/lib/strerror.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/lib/strerror.c	17 Apr 2000 00:13:08 -0000	1.1.1.1.14.1
@@ -1,5 +1,5 @@
 /*
- * $Id: strerror.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: strerror.c,v 1.1.1.1.14.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Duane Wessels
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/lib/util.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/lib/util.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/lib/util.c	26 Jan 2000 03:25:00 -0000	1.1.1.3
+++ squid/lib/util.c	17 Apr 2000 00:13:08 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: util.c,v 1.1.1.3 2000/01/26 03:25:00 hno Exp $
+ * $Id: util.c,v 1.1.1.3.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: 
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -603,8 +603,9 @@
 {
     static char xstrerror_buf[BUFSIZ];
     if (errno < 0 || errno >= sys_nerr)
-	return ("Unknown");
-    snprintf(xstrerror_buf, BUFSIZ, "(%d) %s", errno, strerror(errno));
+	snprintf(xstrerror_buf, BUFSIZ, "(%d) Unknown", errno);
+    else
+        snprintf(xstrerror_buf, BUFSIZ, "(%d) %s", errno, strerror(errno));
     return xstrerror_buf;
 }
 
Index: squid/src/CacheDigest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/CacheDigest.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/src/CacheDigest.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/CacheDigest.c	17 Apr 2000 00:13:08 -0000	1.1.1.2.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: CacheDigest.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: CacheDigest.c,v 1.1.1.2.14.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: section 70    Cache Digest
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/ETag.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/ETag.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/src/ETag.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/src/ETag.c	17 Apr 2000 00:13:08 -0000	1.1.1.1.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ETag.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: ETag.c,v 1.1.1.1.14.1 2000/04/17 00:13:08 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/HttpBody.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpBody.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/src/HttpBody.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/src/HttpBody.c	17 Apr 2000 00:13:08 -0000	1.1.1.1.14.1
@@ -2,7 +2,7 @@
 
 
 /*
- * $Id: HttpBody.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: HttpBody.c,v 1.1.1.1.14.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: section 56    HTTP Message Body
  * AUTHOR: Alex Rousskov
@@ -14,10 +14,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/HttpHdrCc.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrCc.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/HttpHdrCc.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/HttpHdrCc.c	17 Apr 2000 00:13:08 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrCc.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: HttpHdrCc.c,v 1.1.1.3.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: section 65    HTTP Cache Control Header
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/HttpHdrContRange.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrContRange.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/HttpHdrContRange.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/HttpHdrContRange.c	17 Apr 2000 00:13:08 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrContRange.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: HttpHdrContRange.c,v 1.1.1.3.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: section 68    HTTP Content-Range Header
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/HttpHdrExtField.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrExtField.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/HttpHdrExtField.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/HttpHdrExtField.c	17 Apr 2000 00:13:08 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrExtField.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: HttpHdrExtField.c,v 1.1.1.3.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: section 69    HTTP Header: Extension Field
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/HttpHdrRange.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHdrRange.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/HttpHdrRange.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/HttpHdrRange.c	17 Apr 2000 00:13:08 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrRange.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: HttpHdrRange.c,v 1.1.1.3.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: section 64    HTTP Range Header
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/HttpHeader.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHeader.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/HttpHeader.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/HttpHeader.c	17 Apr 2000 00:13:08 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeader.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: HttpHeader.c,v 1.1.1.3.10.1 2000/04/17 00:13:08 hno Exp $
  *
  * DEBUG: section 55    HTTP Header
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -84,6 +84,7 @@
     {"Content-MD5", HDR_CONTENT_MD5, ftStr},	/* for now */
     {"Content-Range", HDR_CONTENT_RANGE, ftPContRange},
     {"Content-Type", HDR_CONTENT_TYPE, ftStr},
+    {"Cookie", HDR_COOKIE, ftStr},
     {"Date", HDR_DATE, ftDate_1123},
     {"ETag", HDR_ETAG, ftETag},
     {"Expires", HDR_EXPIRES, ftDate_1123},
@@ -1094,3 +1095,12 @@
 	Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
     return httpHeaderIdByName(name, name_len, Headers, HDR_ENUM_END);
 }
+
+const char *
+httpHeaderNameById(int id)
+{
+    if (!Headers)
+	Headers = httpHeaderBuildFieldsInfo(HeadersAttrs, HDR_ENUM_END);
+    assert(id >= 0 && id < HDR_ENUM_END);
+    return HeadersAttrs[id].name;
+}
Index: squid/src/HttpHeaderTools.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpHeaderTools.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/HttpHeaderTools.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/HttpHeaderTools.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeaderTools.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: HttpHeaderTools.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 66    HTTP Header Tools
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/HttpMsg.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpMsg.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.16.1
diff -u -r1.1.1.1 -r1.1.1.1.16.1
--- squid/src/HttpMsg.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/src/HttpMsg.c	17 Apr 2000 00:13:09 -0000	1.1.1.1.16.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpMsg.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: HttpMsg.c,v 1.1.1.1.16.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 74    HTTP Message
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/HttpReply.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpReply.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/HttpReply.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/HttpReply.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpReply.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: HttpReply.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 58    HTTP Reply (Response)
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/HttpRequest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpRequest.c,v
retrieving revision 1.1.1.3.10.1
retrieving revision 1.1.1.3.10.2
diff -u -r1.1.1.3.10.1 -r1.1.1.3.10.2
--- squid/src/HttpRequest.c	14 Apr 2000 23:09:53 -0000	1.1.1.3.10.1
+++ squid/src/HttpRequest.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.2
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpRequest.c,v 1.1.1.3.10.1 2000/04/14 23:09:53 hno Exp $
+ * $Id: HttpRequest.c,v 1.1.1.3.10.2 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 73    HTTP Request
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/HttpStatusLine.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/HttpStatusLine.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/HttpStatusLine.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/HttpStatusLine.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpStatusLine.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: HttpStatusLine.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 57    HTTP Status-line
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/Makefile.in
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/Makefile.in,v
retrieving revision 1.1.1.3.12.1
retrieving revision 1.1.1.3.12.2
diff -u -r1.1.1.3.12.1 -r1.1.1.3.12.2
--- squid/src/Makefile.in	14 Apr 2000 23:43:29 -0000	1.1.1.3.12.1
+++ squid/src/Makefile.in	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.2
@@ -1,7 +1,7 @@
 #
 #  Makefile for the Squid Object Cache server
 #
-#  $Id: Makefile.in,v 1.1.1.3.12.1 2000/04/14 23:43:29 hno Exp $
+#  $Id: Makefile.in,v 1.1.1.3.12.2 2000/04/17 00:13:09 hno Exp $
 #
 #  Uncomment and customize the following to suit your needs:
 #
@@ -26,6 +26,8 @@
 UNLINKD_EXE	= unlinkd$(exec_suffix)
 PINGER_EXE	= pinger$(exec_suffix)
 CACHEMGR_EXE	= cachemgr$(cgi_suffix)
+DISKD_EXE	= diskd$(exec_suffix)
+OPT_DISKD_EXE	= @OPT_DISKD_EXE@
 
 DEFAULT_PREFIX		= $(prefix)
 DEFAULT_CONFIG_FILE     = $(sysconfdir)/squid.conf
@@ -64,18 +66,18 @@
 RM		= @RM@
 SHELL		= /bin/sh
 
-
 INCLUDE		= -I. -I../include -I$(top_srcdir)/include
 CFLAGS 		= $(AC_CFLAGS) $(INCLUDE) $(DEFINES)
 SQUID_LIBS	= -L../lib $(CRYPTLIB) $(REGEXLIB) @SQUID_PTHREAD_LIB@ \
 		  $(SNMPLIB) $(MALLOCLIB) -lmiscutil $(XTRA_LIBS)
 CLIENT_LIBS	= -L../lib -lmiscutil $(XTRA_LIBS)
 DNSSERVER_LIBS	= -L../lib -lmiscutil $(XTRA_LIBS)
+DISKD_LIBS	= -L../lib -lmiscutil $(XTRA_LIBS)
 PINGER_LIBS	= -L../lib -lmiscutil $(XTRA_LIBS)
 STD_APP_LIBS    = -L../lib -lmiscutil $(XTRA_LIBS)
 
 PROGS           = $(SQUID_EXE) $(CLIENT_EXE)
-UTILS           = $(DNSSERVER_EXE) $(UNLINKD_EXE)
+UTILS           = $(DNSSERVER_EXE) $(UNLINKD_EXE) $(OPT_DISKD_EXE)
 SUID_UTILS	= $(PINGER_EXE)
 CGIPROGS	= $(CACHEMGR_EXE)
 OBJS	 	= \
@@ -129,6 +131,7 @@
 		ipc.o \
 		ipcache.o \
 		@LEAKFINDER_OBJS@ \
+		logfile.o \
 		main.o \
 		mem.o \
 		MemPool.o \
@@ -153,6 +156,7 @@
 		store.o \
 		store_io.o \
 		store_io_ufs.o \
+		@DISKD_OBJS@ \
 		store_client.o \
 		store_digest.o \
 		store_dir.o \
@@ -217,6 +221,12 @@
 $(DNSSERVER_EXE): dnsserver.o
 	$(CC) -o $@ $(LDFLAGS) dnsserver.o $(DNSSERVER_LIBS)
 
+$(DISKD_EXE): diskd-daemon.o
+	$(CC) -o $@ $(LDFLAGS) diskd-daemon.o $(DISKD_LIBS)
+
+diskd-daemon.o: diskd.c
+	$(CC) -c $(CFLAGS) -DDISKD_DAEMON=1 $(srcdir)/diskd.c -o $@
+
 $(CACHEMGR_EXE): cachemgr.o
 	$(CC) -o $@ $(LDFLAGS) cachemgr.o $(CLIENT_LIBS)
 
Index: squid/src/MemBuf.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/MemBuf.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/src/MemBuf.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/MemBuf.c	17 Apr 2000 00:13:09 -0000	1.1.1.2.14.1
@@ -1,5 +1,5 @@
 /*
- * $Id: MemBuf.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: MemBuf.c,v 1.1.1.2.14.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 59    auto-growing Memory Buffer with printf
  * AUTHOR: Alex Rousskov
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/MemPool.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/MemPool.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/MemPool.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/MemPool.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: MemPool.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: MemPool.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 63    Low Level Memory Pool Management
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/Packer.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Packer.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/src/Packer.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/Packer.c	17 Apr 2000 00:13:09 -0000	1.1.1.2.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: Packer.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: Packer.c,v 1.1.1.2.14.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 60    Packer: A uniform interface to store-like modules
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/StatHist.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/StatHist.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/src/StatHist.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/StatHist.c	17 Apr 2000 00:13:09 -0000	1.1.1.2.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: StatHist.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: StatHist.c,v 1.1.1.2.14.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 62    Generic Histogram
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/String.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/String.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/src/String.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/src/String.c	17 Apr 2000 00:13:09 -0000	1.1.1.1.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: String.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: String.c,v 1.1.1.1.14.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 67    String
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/access_log.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/access_log.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/access_log.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/access_log.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.1
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: access_log.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: access_log.c,v 1.1.1.3.12.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 46    Access Log
  * AUTHOR: Duane Wessels
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -37,10 +37,13 @@
 
 #include "squid.h"
 
-static void accessLogOpen(const char *fname);
 static char *log_quote(const char *header);
-static void accessLogSquid(AccessLogEntry * al, MemBuf * mb);
-static void accessLogCommon(AccessLogEntry * al, MemBuf * mb);
+static void accessLogSquid(AccessLogEntry * al);
+static void accessLogCommon(AccessLogEntry * al);
+static Logfile *logfile = NULL;
+#if HEADERS_LOG
+static Logfile *headerslog = NULL;
+#endif
 
 #if MULTICAST_MISS_STREAM
 static int mcast_miss_fd = -1;
@@ -63,6 +66,9 @@
     "TCP_MEM_HIT",
     "TCP_DENIED",
     "TCP_OFFLINE_HIT",
+#if LOG_TCP_REDIRECTS
+    "TCP_REDIRECT",
+#endif
     "UDP_HIT",
     "UDP_MISS",
     "UDP_DENIED",
@@ -90,8 +96,6 @@
 #endif
 
 static int LogfileStatus = LOG_DISABLE;
-static int LogfileFD = -1;
-static char LogfileName[SQUID_MAXPATHLEN];
 #define LOG_BUF_SZ (MAX_URL<<2)
 
 static const char c2x[] =
@@ -182,14 +186,14 @@
 }
 
 static void
-accessLogSquid(AccessLogEntry * al, MemBuf * mb)
+accessLogSquid(AccessLogEntry * al)
 {
     const char *client = NULL;
     if (Config.onoff.log_fqdn)
 	client = fqdncache_gethostbyaddr(al->cache.caddr, FQDN_LOOKUP_IF_MISS);
     if (client == NULL)
 	client = inet_ntoa(al->cache.caddr);
-    memBufPrintf(mb, "%9d.%03d %6d %s %s/%03d %d %s %s %s %s%s/%s %s",
+    logfilePrintf(logfile, "%9d.%03d %6d %s %s/%03d %d %s %s %s %s%s/%s %s",
 	(int) current_time.tv_sec,
 	(int) current_time.tv_usec / 1000,
 	al->cache.msec,
@@ -207,14 +211,14 @@
 }
 
 static void
-accessLogCommon(AccessLogEntry * al, MemBuf * mb)
+accessLogCommon(AccessLogEntry * al)
 {
     const char *client = NULL;
     if (Config.onoff.log_fqdn)
 	client = fqdncache_gethostbyaddr(al->cache.caddr, 0);
     if (client == NULL)
 	client = inet_ntoa(al->cache.caddr);
-    memBufPrintf(mb, "%s %s - [%s] \"%s %s HTTP/%.1f\" %d %d %s:%s",
+    logfilePrintf(logfile, "%s %s - [%s] \"%s %s HTTP/%.1f\" %d %d %s:%s",
 	client,
 	al->cache.ident,
 	mkhttpdlogtime(&squid_curtime),
@@ -227,37 +231,9 @@
 	hier_strings[al->hier.code]);
 }
 
-static void
-accessLogOpen(const char *fname)
-{
-    assert(fname);
-    xstrncpy(LogfileName, fname, SQUID_MAXPATHLEN);
-    LogfileFD = file_open(LogfileName, O_WRONLY | O_CREAT);
-    if (LogfileFD == DISK_ERROR) {
-	if (ENOENT == errno) {
-	    fatalf("%s cannot be created, since the\n"
-		"\tdirectory it is to reside in does not exist."
-		"\t(%s)\n", LogfileName, xstrerror());
-	} else if (EACCES == errno) {
-	    fatalf("cannot create %s:\n"
-		"\t%s.\n"
-		"\tThe directory access.log is to reside in needs to be\n"
-		"\twriteable by the user %s, the cache_effective_user\n"
-		"\tset in squid.conf.",
-		LogfileName, xstrerror(), Config.effectiveUser);
-	} else {
-	    debug(50, 0) ("%s: %s\n", LogfileName, xstrerror());
-	    fatalf("Cannot open %s: %s", LogfileName, xstrerror());
-	}
-    }
-    LogfileStatus = LOG_ENABLE;
-}
-
 void
 accessLogLog(AccessLogEntry * al)
 {
-    MemBuf mb;
-    char *xbuf = NULL;
     LOCAL_ARRAY(char, ident_buf, USER_IDENT_SZ);
 
     if (LogfileStatus != LOG_ENABLE)
@@ -279,23 +255,20 @@
     if (al->hier.host[0] == '\0')
 	xstrncpy(al->hier.host, dash_str, SQUIDHOSTNAMELEN);
 
-    memBufDefInit(&mb);
-
     if (Config.onoff.common_log)
-	accessLogCommon(al, &mb);
+	accessLogCommon(al);
     else
-	accessLogSquid(al, &mb);
+	accessLogSquid(al);
     if (Config.onoff.log_mime_hdrs) {
 	char *ereq = log_quote(al->headers.request);
 	char *erep = log_quote(al->headers.reply);
-	memBufPrintf(&mb, " [%s] [%s]\n", ereq, erep);
+	logfilePrintf(logfile, " [%s] [%s]\n", ereq, erep);
 	safe_free(ereq);
 	safe_free(erep);
     } else {
-	memBufPrintf(&mb, "\n");
+	logfilePrintf(logfile, "\n");
     }
-    file_write_mbuf(LogfileFD, -1, mb, NULL, NULL);
-    safe_free(xbuf);
+    logfileFlush(logfile);
 #if MULTICAST_MISS_STREAM
     if (al->cache.code != LOG_TCP_MISS)
 	(void) 0;
@@ -322,48 +295,26 @@
 void
 accessLogRotate(void)
 {
-    int i;
-    LOCAL_ARRAY(char, from, MAXPATHLEN);
-    LOCAL_ARRAY(char, to, MAXPATHLEN);
-    char *fname = NULL;
-    struct stat sb;
 #if FORW_VIA_DB
     fvdbClear();
 #endif
-    if ((fname = LogfileName) == NULL)
+    if (NULL == logfile)
 	return;
-#ifdef S_ISREG
-    if (stat(fname, &sb) == 0)
-	if (S_ISREG(sb.st_mode) == 0)
-	    return;
-#endif
-    debug(46, 1) ("accessLogRotate: Rotating\n");
-    /* Rotate numbers 0 through N up one */
-    for (i = Config.Log.rotateNumber; i > 1;) {
-	i--;
-	snprintf(from, MAXPATHLEN, "%s.%d", fname, i - 1);
-	snprintf(to, MAXPATHLEN, "%s.%d", fname, i);
-	xrename(from, to);
-    }
-    /* Rotate the current log to .0 */
-    file_close(LogfileFD);	/* always close */
-    if (Config.Log.rotateNumber > 0) {
-	snprintf(to, MAXPATHLEN, "%s.%d", fname, 0);
-	xrename(fname, to);
-    }
-    /* Reopen the log.  It may have been renamed "manually" */
-    LogfileFD = file_open(fname, O_WRONLY | O_CREAT);
-    if (LogfileFD == DISK_ERROR) {
-	debug(46, 0) ("accessLogRotate: Cannot open logfile: %s\n", fname);
-	LogfileStatus = LOG_DISABLE;
-	fatalf("Cannot open %s: %s", fname, xstrerror());
-    }
+    logfileRotate(logfile);
+#if HEADERS_LOG
+    logfileRotate(headerslog);
+#endif
 }
 
 void
 accessLogClose(void)
 {
-    file_close(LogfileFD);
+    logfileClose(logfile);
+    logfile = NULL;
+#if HEADERS_LOG
+    logfileClose(headerslog);
+    headerslog = NULL;
+#endif
 }
 
 void
@@ -380,7 +331,12 @@
 accessLogInit(void)
 {
     assert(sizeof(log_tags) == (LOG_TYPE_MAX + 1) * sizeof(char *));
-    accessLogOpen(Config.Log.access);
+    logfile = logfileOpen(Config.Log.access, MAX_URL << 1);
+    LogfileStatus = LOG_ENABLE;
+#if HEADERS_LOG
+    headerslog = logfileOpen("/usr/local/squid/logs/headers.log", 512);
+    assert(NULL != headerslog);
+#endif
 #if FORW_VIA_DB
     fvdbInit();
 #endif
@@ -546,3 +502,54 @@
 }
 
 #endif
+
+#if HEADERS_LOG
+void
+headersLog(int cs, int pq, method_t m, void *data)
+{
+    HttpReply *rep;
+    request_t *req;
+    unsigned short magic = 0;
+    unsigned char M = (unsigned char) m;
+    unsigned short S;
+    char *hmask;
+    int ccmask = 0;
+    if (0 == pq) {
+	/* reply */
+	rep = data;
+	req = NULL;
+	magic = 0x0050;
+	hmask = rep->header.mask;
+	if (rep->cache_control)
+	    ccmask = rep->cache_control->mask;
+    } else {
+	/* request */
+	req = data;
+	rep = NULL;
+	magic = 0x0051;
+	hmask = req->header.mask;
+	if (req->cache_control)
+	    ccmask = req->cache_control->mask;
+    }
+    if (0 == cs) {
+	/* client */
+	magic |= 0x4300;
+    } else {
+	/* server */
+	magic |= 0x5300;
+    }
+    magic = htons(magic);
+    ccmask = htonl(ccmask);
+    if (0 == pq)
+	S = (unsigned short) rep->sline.status;
+    else
+	S = (unsigned short) HTTP_STATUS_NONE;
+    logfileWrite(headerslog, &magic, sizeof(magic));
+    logfileWrite(headerslog, &M, sizeof(M));
+    logfileWrite(headerslog, &S, sizeof(S));
+    logfileWrite(headerslog, hmask, sizeof(HttpHeaderMask));
+    logfileWrite(headerslog, &ccmask, sizeof(int));
+    logfileFlush(headerslog);
+}
+
+#endif
Index: squid/src/acl.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/acl.c,v
retrieving revision 1.1.1.3.12.2
retrieving revision 1.1.1.3.12.3
diff -u -r1.1.1.3.12.2 -r1.1.1.3.12.3
--- squid/src/acl.c	15 Apr 2000 11:54:27 -0000	1.1.1.3.12.2
+++ squid/src/acl.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.3
@@ -1,6 +1,6 @@
 
 /*
- * $Id: acl.c,v 1.1.1.3.12.2 2000/04/15 11:54:27 asd Exp $
+ * $Id: acl.c,v 1.1.1.3.12.3 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 28    Access Control
  * AUTHOR: Duane Wessels
@@ -11,11 +11,11 @@
  *  Squid is the result of efforts by numerous individuals from the
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
- *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  National Science Foundation.  Squid is Copyrighted (C) 2000 by
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -337,8 +337,6 @@
     while ((t = strtokFile())) {
 	q = memAllocate(MEM_INTLIST);
 	q->i = (int) urlParseMethod(t);
-	if (q->i == METHOD_PURGE)
-	    Config.onoff.enable_purge = 1;
 	*(Tail) = q;
 	Tail = &q->next;
     }
@@ -1424,7 +1422,7 @@
 	/* NOTREACHED */
     case ACL_MAXCONN:
 	k = clientdbEstablished(checklist->src_addr, 0);
-	return ((k > ((intlist *) ae->data)->i) ? 0 : 1);
+	return ((k > ((intlist *) ae->data)->i) ? 1 : 0);
 	/* NOTREACHED */
     case ACL_URL_PORT:
 	return aclMatchIntegerRange(ae->data, (int) r->port);
@@ -2264,6 +2262,26 @@
 }
 
 
+/*
+ * This function traverses all ACL elements referenced
+ * by an access list (presumably 'http_access').   If 
+ * it finds a PURGE method ACL, then it returns TRUE,
+ * otherwise FALSE.
+ */
+int
+aclPurgeMethodInUse(acl_access * a)
+{
+    acl_list *b;
+    for (; a; a = a->next) {
+	for (b = a->acl_list; b; b = b->next) {
+	    if (ACL_METHOD != b->acl->type)
+		continue;
+	    if (aclMatchInteger(b->acl->data, METHOD_PURGE))
+		return 1;
+	}
+    }
+    return 0;
+}
 
 
 #if USE_ARP_ACL
@@ -2301,7 +2319,9 @@
 #endif
 #include <net/route.h>
 #include <net/if.h>
+#if HAVE_NETINET_IF_ETHER_H
 #include <netinet/if_ether.h>
+#endif
 
 /*
  * Decode an ascii representation (asc) of an ethernet adress, and place
Index: squid/src/aiops.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/aiops.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/aiops.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/aiops.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.1
@@ -1,5 +1,5 @@
 /*
- * $Id: aiops.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: aiops.c,v 1.1.1.3.12.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 43    AIOPS
  * AUTHOR: Stewart Forster <slf@connect.com.au>
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -160,8 +160,16 @@
 
     pthread_attr_init(&globattr);
 #if HAVE_PTHREAD_ATTR_SETSCOPE
+#if defined(_SQUID_SGI_)
+    /* 
+     * Erik Hofman <erik.hofman@a1.nl> suggests PTHREAD_SCOPE_PROCESS
+     * instead of PTHREAD_SCOPE_SYSTEM, esp for IRIX.
+     */
+    pthread_attr_setscope(&globattr, PTHREAD_SCOPE_PROCESS);
+#else
     pthread_attr_setscope(&globattr, PTHREAD_SCOPE_SYSTEM);
 #endif
+#endif
     globsched.sched_priority = 1;
     main_thread = pthread_self();
 #if HAVE_PTHREAD_SETSCHEDPARAM
@@ -171,6 +179,9 @@
 #if HAVE_PTHREAD_ATTR_SETSCHEDPARAM
     pthread_attr_setschedparam(&globattr, &globsched);
 #endif
+#if defined(_SQUID_SGI_)
+    pthread_setconcurrency(NUMTHREADS + 1);
+#endif
 
     /* Create threads and get them to sit in their wait loop */
     threads = xcalloc(NUMTHREADS, sizeof(aio_thread_t));
Index: squid/src/asn.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/asn.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/asn.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/asn.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,5 +1,5 @@
 /*
- * $Id: asn.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: asn.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/async_io.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/async_io.c,v
retrieving revision 1.1.1.3.4.1
retrieving revision 1.1.1.3.4.1.2.1
diff -u -r1.1.1.3.4.1 -r1.1.1.3.4.1.2.1
--- squid/src/async_io.c	4 Feb 2000 19:39:40 -0000	1.1.1.3.4.1
+++ squid/src/async_io.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.4.1.2.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: async_io.c,v 1.1.1.3.4.1 2000/02/04 19:39:40 hno Exp $
+ * $Id: async_io.c,v 1.1.1.3.4.1.2.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 32    Asynchronous Disk I/O
  * AUTHOR: Pete Bentley <pete@demon.net>
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/authenticate.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/authenticate.c,v
retrieving revision 1.1.1.3.12.1
retrieving revision 1.1.1.3.12.2
diff -u -r1.1.1.3.12.1 -r1.1.1.3.12.2
--- squid/src/authenticate.c	5 Feb 2000 20:14:18 -0000	1.1.1.3.12.1
+++ squid/src/authenticate.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.2
@@ -1,6 +1,6 @@
 
 /*
- * $Id: authenticate.c,v 1.1.1.3.12.1 2000/02/05 20:14:18 hno Exp $
+ * $Id: authenticate.c,v 1.1.1.3.12.2 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/cache_cf.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cache_cf.c,v
retrieving revision 1.1.1.3.4.1
retrieving revision 1.1.1.3.4.1.2.1
diff -u -r1.1.1.3.4.1 -r1.1.1.3.4.1.2.1
--- squid/src/cache_cf.c	4 Feb 2000 19:39:40 -0000	1.1.1.3.4.1
+++ squid/src/cache_cf.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.4.1.2.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.c,v 1.1.1.3.4.1 2000/02/04 19:39:40 hno Exp $
+ * $Id: cache_cf.c,v 1.1.1.3.4.1.2.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -55,8 +55,8 @@
 static const char *const B_GBYTES_STR = "GB";
 
 static const char *const list_sep = ", \t\n\r";
-
-static int http_header_first = 0;
+static int http_header_first;
+static int http_header_allowed = 0;
 
 static void configDoConfigure(void);
 static void parse_refreshpattern(refresh_t **);
@@ -188,6 +188,7 @@
 	cfg_filename = token + 1;
     memset(config_input_line, '\0', BUFSIZ);
     config_lineno = 0;
+    http_header_first = 0;
     while (fgets(config_input_line, BUFSIZ, fp)) {
 	config_lineno++;
 	if ((token = strchr(config_input_line, '\n')))
@@ -356,6 +357,8 @@
 	Config.Wais.peer->host = xstrdup(Config.Wais.relayHost);
 	Config.Wais.peer->http_port = Config.Wais.relayPort;
     }
+    if (aclPurgeMethodInUse(Config.accessList.http))
+	Config2.onoff.enable_purge = 1;
 }
 
 /* Parse a time specification from the config file.  Store the
@@ -713,7 +716,13 @@
 static void
 dump_http_header(StoreEntry * entry, const char *name, HttpHeaderMask header)
 {
-    storeAppendPrintf(entry, "%s\n", name);
+    int i;
+    for (i = 0; i < HDR_OTHER; i++) {
+	if (http_header_allowed && !CBIT_TEST(header, i))
+	    storeAppendPrintf(entry, "%s allow %s\n", name, httpHeaderNameById(i));
+	else if (!http_header_allowed && CBIT_TEST(header, i))
+	    storeAppendPrintf(entry, "%s deny %s\n", name, httpHeaderNameById(i));
+    }
 }
 
 static void
@@ -721,7 +730,6 @@
 {
     int allowed, id;
     char *t = NULL;
-
     if ((t = strtok(NULL, w_space)) == NULL) {
 	debug(3, 0) ("%s line %d: %s\n",
 	    cfg_filename, config_lineno, config_input_line);
@@ -738,11 +746,15 @@
 	debug(3, 0) ("parse_http_header: expecting 'allow' or 'deny', got '%s'.\n", t);
 	return;
     }
-
     if (!http_header_first) {
 	http_header_first = 1;
-	if (allowed)
+	if (allowed) {
+	    http_header_allowed = 1;
 	    httpHeaderMaskInit(header, 0xFF);
+	} else {
+	    http_header_allowed = 0;
+	    httpHeaderMaskInit(header, 0);
+	}
     }
     while ((t = strtok(NULL, w_space))) {
 	if ((id = httpHeaderIdByNameDef(t, strlen(t))) == -1)
@@ -821,6 +833,10 @@
     } else if (0 == strcasecmp(type_str, "asyncufs")) {
 	storeAufsDirParse(swap);
 #endif
+#if USE_DISKD
+    } else if (0 == strcasecmp(type_str, "diskd")) {
+	storeDiskdDirParse(swap);
+#endif
     } else {
 	fatalf("Unknown cache_dir type '%s'\n", type_str);
     }
Index: squid/src/cache_diff.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cache_diff.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/src/cache_diff.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/src/cache_diff.c	17 Apr 2000 00:13:09 -0000	1.1.1.1.14.1
@@ -1,5 +1,5 @@
 /*
- * $Id: cache_diff.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: cache_diff.c,v 1.1.1.1.14.1 2000/04/17 00:13:09 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/cache_manager.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cache_manager.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/src/cache_manager.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/cache_manager.c	17 Apr 2000 00:13:09 -0000	1.1.1.2.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_manager.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: cache_manager.c,v 1.1.1.2.14.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 16    Cache Manager Objects
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/cachemgr.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/cachemgr.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/cachemgr.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/cachemgr.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cachemgr.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: cachemgr.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 0     CGI Cache Manager
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/carp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/carp.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/src/carp.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/src/carp.c	17 Apr 2000 00:13:09 -0000	1.1.1.1.14.1
@@ -1,5 +1,5 @@
 /*
- * $Id: carp.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: carp.c,v 1.1.1.1.14.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 39    Cache Array Routing Protocol
  * AUTHOR: Eric Stern
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -97,6 +97,10 @@
 	url_hash += (url_hash << 19) + *c;
     /* select peer */
     for (tp = Config.peers; tp; tp = tp->next) {
+	if (0.0 == tp->carp.load_factor)
+	    continue;
+	if (tp->tcp_up != PEER_TCP_MAGIC_COUNT)
+	    continue;
 	assert(tp->type == PEER_PARENT);
 	combined_hash = (url_hash ^ tp->carp.hash);
 	combined_hash += combined_hash * 0x62531965;
Index: squid/src/cbdata.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cbdata.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/src/cbdata.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/cbdata.c	17 Apr 2000 00:13:09 -0000	1.1.1.2.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cbdata.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: cbdata.c,v 1.1.1.2.14.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 45    Callback Data Registry
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -167,7 +167,11 @@
 }
 
 void
+#if CBDATA_DEBUG
+cbdataLockDbg(const void *p, const char *file, int line)
+#else
 cbdataLock(const void *p)
+#endif
 {
     cbdata *c;
     if (p == NULL)
@@ -176,10 +180,18 @@
     debug(45, 3) ("cbdataLock: %p\n", p);
     assert(c != NULL);
     c->locks++;
+#if CBDATA_DEBUG
+    c->file = file;
+    c->line = line;
+#endif
 }
 
 void
+#if CBDATA_DEBUG
+cbdataUnlockDbg(const void *p, const char *file, int line)
+#else
 cbdataUnlock(const void *p)
+#endif
 {
     cbdata *c;
     if (p == NULL)
@@ -189,6 +201,10 @@
     assert(c != NULL);
     assert(c->locks > 0);
     c->locks--;
+#if CBDATA_DEBUG
+    c->file = file;
+    c->line = line;
+#endif
     if (c->valid || c->locks)
 	return;
     cbdataReallyFree(c);
Index: squid/src/cf.data.pre
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cf.data.pre,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.4
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.4
--- squid/src/cf.data.pre	15 Apr 2000 00:45:02 -0000	1.1.1.3.4.1.2.3
+++ squid/src/cf.data.pre	17 Apr 2000 00:13:09 -0000	1.1.1.3.4.1.2.4
@@ -1,6 +1,6 @@
 
 #
-# $Id: cf.data.pre,v 1.1.1.3.4.1.2.3 2000/04/15 00:45:02 hno Exp $
+# $Id: cf.data.pre,v 1.1.1.3.4.1.2.4 2000/04/17 00:13:09 hno Exp $
 #
 #
 # SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
 #  Internet community.  Development is led by Duane Wessels of the
 #  National Laboratory for Applied Network Research and funded by the
 #  National Science Foundation.  Squid is Copyrighted (C) 1998 by
-#  Duane Wessels and the University of California San Diego.  Please
-#  see the COPYRIGHT file for full details.  Squid incorporates
-#  software developed and/or copyrighted by other sources.  Please see
-#  the CREDITS file for full details.
+#  the Regents of the University of California.  Please see the
+#  COPYRIGHT file for full details.  Squid incorporates software
+#  developed and/or copyrighted by other sources.  Please 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
@@ -1189,7 +1189,7 @@
 	'Max' is an upper limit on how long objects without an explicit
 	expiry time will be considered fresh.
 
-	options: override-expire
+	options: overrsde-expire
 		 override-lastmod
 		 reload-into-ims
 		 ignore-reload
@@ -2317,14 +2317,14 @@
 
 NAME: store_objects_per_bucket
 TYPE: int
-DEFAULT: 50
+DEFAULT: 20
 LOC: Config.Store.objectsPerBucket
 DOC_START
 	Target number of objects per bucket in the store hash table.
 	Lowering this value increases the total number of buckets and
 	also the storage maintenance rate.  The default is 50.
 
-store_objects_per_bucket 50
+store_objects_per_bucket 20
 DOC_END
 
 NAME: client_db
@@ -3211,5 +3211,19 @@
 server_persistent_connections on
 DOC_END
 
+NAME: diskd_magic1
+IFDEF: USE_DISKD
+TYPE: int
+LOC: Config.diskd.magic1
+DEFAULT: 64
+DOC_NONE
+
+NAME: diskd_magic2
+IFDEF: USE_DISKD
+TYPE: int
+LOC: Config.diskd.magic2
+DEFAULT: 72
+DOC_NONE
+
 EOF
 
Index: squid/src/cf_gen.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/cf_gen.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/cf_gen.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/cf_gen.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.1
@@ -1,5 +1,5 @@
 /*
- * $Id: cf_gen.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: cf_gen.c,v 1.1.1.3.12.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: none
  * AUTHOR: Max Okumoto
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/client.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/client.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/client.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/client.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: client.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 0     WWW Client
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/client_db.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/client_db.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/client_db.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/client_db.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_db.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: client_db.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 0     Client Database
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/client_side.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v
retrieving revision 1.1.1.3.4.1.2.7
retrieving revision 1.1.1.3.4.1.2.8
diff -u -r1.1.1.3.4.1.2.7 -r1.1.1.3.4.1.2.8
--- squid/src/client_side.c	15 Apr 2000 10:52:16 -0000	1.1.1.3.4.1.2.7
+++ squid/src/client_side.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.4.1.2.8
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.c,v 1.1.1.3.4.1.2.7 2000/04/15 10:52:16 asd Exp $
+ * $Id: client_side.c,v 1.1.1.3.4.1.2.8 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -142,7 +142,7 @@
     clientHttpRequest *http = data;
     ConnStateData *conn = http->conn;
     if (checkAccelOnly(http)) {
-	clientAccessCheckDone(0, http);
+	clientAccessCheckDone(ACCESS_ALLOWED, http);
 	return;
     }
     http->acl_checklist = aclChecklistCreate(Config.accessList.http,
@@ -294,6 +294,9 @@
 	http->request = requestLink(new_request);
     }
     clientInterpretRequestHeaders(http);
+#if HEADERS_LOG
+    headersLog(0, 1, request->method, request);
+#endif
     fd_note(http->conn->fd, http->uri);
     clientProcessRequest(http);
 }
@@ -531,8 +534,8 @@
     StoreEntry *entry;
     ErrorState *err = NULL;
     HttpReply *r;
-    debug(33, 3) ("Config.onoff.enable_purge = %d\n", Config.onoff.enable_purge);
-    if (!Config.onoff.enable_purge) {
+    debug(33, 1) ("Config2.onoff.enable_purge = %d\n", Config2.onoff.enable_purge);
+    if (!Config2.onoff.enable_purge) {
 	http->log_type = LOG_TCP_DENIED;
 	err = errorCon(ERR_ACCESS_DENIED, HTTP_FORBIDDEN);
 	err->request = requestLink(http->request);
@@ -582,6 +585,10 @@
     Counter.client_http.requests++;
     if (isTcpHit(http->log_type))
 	Counter.client_http.hits++;
+    if (http->log_type == LOG_TCP_HIT)
+	Counter.client_http.disk_hits++;
+    else if (http->log_type == LOG_TCP_MEM_HIT)
+	Counter.client_http.mem_hits++;
     if (http->request->err_type != ERR_NONE)
 	Counter.client_http.errors++;
     statHistCount(&Counter.client_http.all_svc_time, svc_time);
@@ -1707,6 +1714,9 @@
 	mb = httpReplyPack(rep);
 	http->out.offset += rep->hdr_sz;
 	check_size += rep->hdr_sz;
+#if HEADERS_LOG
+	headersLog(0, 0, http->request->method, rep);
+#endif
 	httpReplyDestroy(rep);
 	rep = NULL;
     } else {
@@ -1748,7 +1758,7 @@
 	/*
 	 * Set the timeout BEFORE calling clientReadRequest().
 	 */
-	commSetTimeout(conn->fd, 15, requestTimeout, conn);
+	commSetTimeout(conn->fd, Config.Timeout.pconn, requestTimeout, conn);
 	clientReadRequest(conn->fd, conn);	/* Read next request */
 	/*
 	 * Note, the FD may be closed at this point.
@@ -1988,7 +1998,7 @@
 	    clientCacheHit,
 	    http);
     } else {
-	/* MISS CASE */
+	/* MISS CASE, http->log_type is already set! */
 	clientProcessMiss(http);
     }
 }
@@ -2035,6 +2045,9 @@
     http->entry = clientCreateStoreEntry(http, r->method, r->flags);
     if (http->redirect.status) {
 	HttpReply *rep = httpReplyCreate();
+#if LOG_TCP_REDIRECTS
+	http->log_type = LOG_TCP_REDIRECT;
+#endif
 	storeReleaseRequest(http->entry);
 	httpRedirectReply(rep, http->redirect.status, http->redirect.location);
 	httpReplySwapOut(rep, http->entry);
@@ -2748,7 +2761,7 @@
 	    break;
 	}
 	debug(33, 4) ("httpAccept: FD %d: accepted\n", fd);
-	connState = xcalloc(1, sizeof(ConnStateData));
+	connState = memAllocate(MEM_CONNSTATEDATA);
 	connState->peer = peer;
 	connState->log_addr = peer.sin_addr;
 	connState->log_addr.s_addr &= Config.Addrs.client_netmask.s_addr;
@@ -2756,7 +2769,7 @@
 	connState->fd = fd;
 	connState->in.size = REQUEST_BUF_SIZE;
 	connState->in.buf = xcalloc(connState->in.size, 1);
-	cbdataAdd(connState, cbdataXfree, 0);
+	cbdataAdd(connState, memFree, MEM_CONNSTATEDATA);
 	/* XXX account connState->in.buf */
 	comm_add_close_handler(fd, connStateFree, connState);
 	if (Config.onoff.log_fqdn)
Index: squid/src/comm.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/comm.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/comm.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/comm.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: comm.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/comm_select.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/comm_select.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/comm_select.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/comm_select.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm_select.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: comm_select.c,v 1.1.1.3.12.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  *
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -36,6 +36,8 @@
 
 #if USE_ASYNC_IO
 #define MAX_POLL_TIME 10
+#elif USE_DISKD
+#define MAX_POLL_TIME 10
 #else
 #define MAX_POLL_TIME 1000
 #endif
@@ -333,6 +335,9 @@
 #if USE_ASYNC_IO
 	aioCheckCallbacks();
 #endif
+#if USE_DISKD
+	storeDiskdReadQueue();
+#endif
 #if DELAY_POOLS
 	FD_ZERO(&slowfds);
 #endif
@@ -664,6 +669,9 @@
 #if USE_ASYNC_IO
 	aioCheckCallbacks();
 #endif
+#if USE_DISKD
+	storeDiskdReadQueue();
+#endif
 #if DELAY_POOLS
 	FD_ZERO(&slowfds);
 #endif
Index: squid/src/debug.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/debug.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/debug.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/debug.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: debug.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: debug.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 0     Debug Routines
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/defines.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/defines.h,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/defines.h	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/defines.h	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: defines.h,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: defines.h,v 1.1.1.3.12.1 2000/04/17 00:13:09 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/delay_pools.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/delay_pools.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/delay_pools.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/delay_pools.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: delay_pools.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: delay_pools.c,v 1.1.1.3.12.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 77    Delay Pools
  * AUTHOR: David Luyer <luyer@ucs.uwa.edu.au>
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -42,30 +42,35 @@
     int aggregate;
 };
 
+#define IND_MAP_SZ 256
+
 struct _class2DelayPool {
     int aggregate;
     /* OK: -1 is terminator.  individual[255] is always host 255. */
     /* 255 entries + 1 terminator byte */
-    unsigned char individual_map[256];
+    unsigned char individual_map[IND_MAP_SZ];
     unsigned char individual_255_used;
     /* 256 entries */
-    int individual[256];
+    int individual[IND_MAP_SZ];
 };
 
+#define NET_MAP_SZ 256
+#define C3_IND_SZ (NET_MAP_SZ*IND_MAP_SZ)
+
 struct _class3DelayPool {
     int aggregate;
     /* OK: -1 is terminator.  network[255] is always host 255. */
     /* 255 entries + 1 terminator byte */
-    unsigned char network_map[256];
+    unsigned char network_map[NET_MAP_SZ];
     unsigned char network_255_used;
     /* 256 entries */
     int network[256];
     /* 256 sets of (255 entries + 1 terminator byte) */
-    unsigned char individual_map[256][256];
+    unsigned char individual_map[NET_MAP_SZ][IND_MAP_SZ];
     /* Pack this into one bit per net */
     unsigned char individual_255_used[32];
     /* largest entry = (255<<8)+255 = 65535 */
-    int individual[65536];
+    int individual[C3_IND_SZ];
 };
 
 typedef struct _class1DelayPool class1DelayPool;
@@ -301,17 +306,18 @@
 	if (host == 255) {
 	    if (!delay_data[pool].class2->individual_255_used) {
 		delay_data[pool].class2->individual_255_used = 1;
-		delay_data[pool].class2->individual[255] =
+		delay_data[pool].class2->individual[IND_MAP_SZ - 1] =
 		    (Config.Delay.rates[pool]->individual.max_bytes *
 		    Config.Delay.initial) / 100;
 	    }
 	    return delayId(pool + 1, 255);
 	}
-	for (i = 0;; i++) {
+	for (i = 0; i < IND_MAP_SZ; i++) {
 	    if (delay_data[pool].class2->individual_map[i] == host)
 		break;
 	    if (delay_data[pool].class2->individual_map[i] == 255) {
 		delay_data[pool].class2->individual_map[i] = host;
+		assert(i < (IND_MAP_SZ - 1));
 		delay_data[pool].class2->individual_map[i + 1] = 255;
 		delay_data[pool].class2->individual[i] =
 		    (Config.Delay.rates[pool]->individual.max_bytes *
@@ -334,12 +340,13 @@
 		Config.Delay.initial) / 100;
 	}
     } else {
-	for (i = 0;; i++) {
+	for (i = 0; i < NET_MAP_SZ; i++) {
 	    if (delay_data[pool].class3->network_map[i] == net)
 		break;
 	    if (delay_data[pool].class3->network_map[i] == 255) {
 		delay_data[pool].class3->network_map[i] = net;
 		delay_data[pool].class3->individual_map[i][0] = 255;
+		assert(i < (NET_MAP_SZ - 1));
 		delay_data[pool].class3->network_map[i + 1] = 255;
 		delay_data[pool].class3->network[i] =
 		    (Config.Delay.rates[pool]->network.max_bytes *
@@ -353,21 +360,26 @@
 	position |= 255;
 	if (!(delay_data[pool].class3->individual_255_used[i / 8] & (1 << (i % 8)))) {
 	    delay_data[pool].class3->individual_255_used[i / 8] |= (1 << (i % 8));
+	    assert(position < C3_IND_SZ);
 	    delay_data[pool].class3->individual[position] =
 		(Config.Delay.rates[pool]->individual.max_bytes *
 		Config.Delay.initial) / 100;
 	}
 	return delayId(pool + 1, position);
     }
-    for (j = 0;; j++) {
+    assert(i < NET_MAP_SZ);
+    for (j = 0; j < IND_MAP_SZ; j++) {
 	if (delay_data[pool].class3->individual_map[i][j] == host) {
 	    position |= j;
 	    break;
 	}
 	if (delay_data[pool].class3->individual_map[i][j] == 255) {
 	    delay_data[pool].class3->individual_map[i][j] = host;
+	    assert(j < (IND_MAP_SZ - 1));
 	    delay_data[pool].class3->individual_map[i][j + 1] = 255;
-	    delay_data[pool].class3->individual[position |= j] =
+	    position |= j;
+	    assert(position < C3_IND_SZ);
+	    delay_data[pool].class3->individual[position] =
 		(Config.Delay.rates[pool]->individual.max_bytes *
 		Config.Delay.initial) / 100;
 	    break;
@@ -392,7 +404,7 @@
 delayUpdateClass2(class2DelayPool * class2, delaySpecSet * rates, int incr)
 {
     int restore_bytes;
-    unsigned char i;
+    unsigned int i;
     /* delaySetSpec may be pointer to partial structure so MUST pass by
      * reference.
      */
@@ -408,12 +420,13 @@
     else
 	i = 0;
     for (;;) {
+	assert(i < IND_MAP_SZ);
 	if (i != 255 && class2->individual_map[i] == 255)
 	    return;
 	if (class2->individual[i] != rates->individual.max_bytes &&
 	    (class2->individual[i] += restore_bytes) > rates->individual.max_bytes)
 	    class2->individual[i] = rates->individual.max_bytes;
-	if (++i == 255)
+	if (++i == (IND_MAP_SZ - 1))
 	    return;
     }
 }
@@ -423,7 +436,7 @@
 {
     int individual_restore_bytes, network_restore_bytes;
     int mpos;
-    unsigned char i, j;
+    unsigned int i, j;
     /* delaySetSpec may be pointer to partial structure so MUST pass by
      * reference.
      */
@@ -444,6 +457,7 @@
     else
 	i = 0;
     for (;;) {
+	assert(i < NET_MAP_SZ);
 	if (i != 255 && class3->network_map[i] == 255)
 	    return;
 	if (individual_restore_bytes != -incr) {
@@ -453,16 +467,19 @@
 	    else
 		j = 0;
 	    for (;;) {
+		assert(i < NET_MAP_SZ);
+		assert(j < IND_MAP_SZ);
 		if (j != 255 && class3->individual_map[i][j] == 255)
 		    break;
+		assert(mpos < C3_IND_SZ);
 		if (class3->individual[mpos] != rates->individual.max_bytes &&
 		    (class3->individual[mpos] += individual_restore_bytes) >
 		    rates->individual.max_bytes)
 		    class3->individual[mpos] = rates->individual.max_bytes;
 		mpos++;
-		if (j == 255)
+		if (j == (IND_MAP_SZ - 1))
 		    mpos -= 256;
-		if (++j == 255)
+		if (++j == (IND_MAP_SZ - 1))
 		    break;
 	    }
 	}
@@ -471,7 +488,7 @@
 	    (class3->network[i] += network_restore_bytes) >
 	    rates->network.max_bytes)
 	    class3->network[i] = rates->network.max_bytes;
-	if (++i == 255)
+	if (++i == (NET_MAP_SZ - 1))
 	    return;
     }
 }
@@ -663,7 +680,8 @@
     /* must be a reference only - partially malloc()d struct */
     delaySpecSet *rate = Config.Delay.rates[pool];
     class2DelayPool *class2 = delay_data[pool].class2;
-    unsigned char shown = 0, i;
+    unsigned char shown = 0;
+    unsigned int i;
 
     storeAppendPrintf(sentry, "Pool: %d\n\tClass: 2\n\n", pool + 1);
     delayPoolStatsAg(sentry, rate, class2->aggregate);
@@ -675,7 +693,7 @@
     storeAppendPrintf(sentry, "\t\tMax: %d\n", rate->individual.max_bytes);
     storeAppendPrintf(sentry, "\t\tRate: %d\n", rate->individual.restore_bps);
     storeAppendPrintf(sentry, "\t\tCurrent: ");
-    for (i = 0;; i++) {
+    for (i = 0; i < IND_MAP_SZ; i++) {
 	if (class2->individual_map[i] == 255)
 	    break;
 	storeAppendPrintf(sentry, "%d:%d ", class2->individual_map[i],
@@ -697,7 +715,9 @@
     /* fully malloc()d struct in this case only */
     delaySpecSet *rate = Config.Delay.rates[pool];
     class3DelayPool *class3 = delay_data[pool].class3;
-    unsigned char shown = 0, i, j;
+    unsigned char shown = 0;
+    unsigned int i;
+    unsigned int j;
 
     storeAppendPrintf(sentry, "Pool: %d\n\tClass: 3\n\n", pool + 1);
     delayPoolStatsAg(sentry, rate, class3->aggregate);
@@ -708,7 +728,7 @@
 	storeAppendPrintf(sentry, "\t\tMax: %d\n", rate->network.max_bytes);
 	storeAppendPrintf(sentry, "\t\tRate: %d\n", rate->network.restore_bps);
 	storeAppendPrintf(sentry, "\t\tCurrent: ");
-	for (i = 0;; i++) {
+	for (i = 0; i < NET_MAP_SZ; i++) {
 	    if (class3->network_map[i] == 255)
 		break;
 	    storeAppendPrintf(sentry, "%d:%d ", class3->network_map[i],
@@ -731,12 +751,12 @@
     storeAppendPrintf(sentry, "\tIndividual:\n");
     storeAppendPrintf(sentry, "\t\tMax: %d\n", rate->individual.max_bytes);
     storeAppendPrintf(sentry, "\t\tRate: %d\n", rate->individual.restore_bps);
-    for (i = 0;; i++) {
+    for (i = 0; i < NET_MAP_SZ; i++) {
 	if (class3->network_map[i] == 255)
 	    break;
 	storeAppendPrintf(sentry, "\t\tCurrent [Network %d]: ", class3->network_map[i]);
 	shown = 1;
-	for (j = 0;; j++) {
+	for (j = 0; j < IND_MAP_SZ; j++) {
 	    if (class3->individual_map[i][j] == 255)
 		break;
 	    storeAppendPrintf(sentry, "%d:%d ", class3->individual_map[i][j],
@@ -750,7 +770,7 @@
     if (class3->network_255_used) {
 	storeAppendPrintf(sentry, "\t\tCurrent [Network 255]: ");
 	shown = 1;
-	for (j = 0;; j++) {
+	for (j = 0; j < IND_MAP_SZ; j++) {
 	    if (class3->individual_map[255][j] == 255)
 		break;
 	    storeAppendPrintf(sentry, "%d:%d ", class3->individual_map[255][j],
Index: squid/src/disk.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/disk.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/disk.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/disk.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: disk.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: disk.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 6     Disk I/O Routines
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/diskd.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/diskd.c,v
retrieving revision 1.1
retrieving revision 1.1.8.1
diff -u -r1.1 -r1.1.8.1
--- squid/src/diskd.c	4 Feb 2000 18:56:52 -0000	1.1
+++ squid/src/diskd.c	17 Apr 2000 00:13:09 -0000	1.1.8.1
@@ -347,6 +347,7 @@
 static void storeDiskdIOCallback(storeIOState * sio, int errflag);
 static int storeDiskdReadIndividualQueue(SwapDir * sd);
 static SwapDir *swapDirFromFileno(sfileno f);
+static OBJH storeDiskdStats;
 
 /*
  * SHMBUFS is the number of shared memory buffers to allocate for
@@ -360,7 +361,15 @@
  * queue until the level falls below MAGIC2.  Recommended value
  * is 75% of SHMBUFS.
  */
-#define MAGIC2 72
+#define MAGIC1 Config.diskd.magic1
+#define MAGIC2 Config.diskd.magic2
+
+struct {
+    int open_fail_queue_len;
+    int block_queue_len;
+    int max_away;
+    int max_shmuse;
+} diskd_stats;
 
 
 /* === PUBLIC =========================================================== */
@@ -378,6 +387,10 @@
      * XXX Eventually there should be an option here to fail on open()
      * If there are too many requests queued.
      */
+    if (sd->u.diskd.away > MAGIC1) {
+	diskd_stats.open_fail_queue_len++;
+	return NULL;
+    }
     assert(mode == O_RDONLY || mode == O_WRONLY);
     sio = memAllocate(MEM_STORE_IO);
     cbdataAdd(sio, memFree, MEM_STORE_IO);
@@ -521,6 +534,7 @@
 void
 storeDiskdInit(SwapDir * sd)
 {
+    static int first = 0;
     int x;
     int i;
     int rfd;
@@ -581,6 +595,11 @@
     commSetTimeout(sd->u.diskd.wfd, -1, NULL, NULL);
     commSetNonBlocking(sd->u.diskd.wfd);
     debug(81, 1) ("diskd started\n");
+    if (0 == first) {
+	first++;
+	memset(&diskd_stats, '\0', sizeof(diskd_stats));
+	cachemgrRegister("diskd", "DISKD Stats", storeDiskdStats, 0, 1);
+    }
 }
 
 void
@@ -590,19 +609,9 @@
     int i;
     int j;
     static int ndir = 0;
-    static time_t last_report = 0;
-    static int record_away = 0;
-    static int record_shmbuf = 0;
-    if (sent_count - recv_count > record_away) {
-	record_away = sent_count - recv_count;
-	record_shmbuf = shmbuf_count;
-    }
-    if (squid_curtime - last_report > 15) {
-	if (record_away)
-	    debug(81, 1) ("DISKD: %d msgs away, %d shmbufs in use\n",
-		record_away, record_shmbuf);
-	last_report = squid_curtime;
-	record_away = record_shmbuf = 0;
+    if (sent_count - recv_count > diskd_stats.max_away) {
+	diskd_stats.max_away = sent_count - recv_count;
+	diskd_stats.max_shmuse = shmbuf_count;
     }
     do {
 	j = 0;
@@ -792,8 +801,10 @@
 	    cbdataUnlock(M.callback_data);
 	assert(++send_errors < 100);
     }
-    if (sd->u.diskd.away > MAGIC2)
+    if (sd->u.diskd.away > MAGIC2) {
+	diskd_stats.block_queue_len++;
 	storeDiskdReadQueue();
+    }
     return x;
 }
 
@@ -847,4 +858,14 @@
     return &Config.cacheSwap.swapDirs[f >> SWAP_DIR_SHIFT];
 }
 
+static void
+storeDiskdStats(StoreEntry * sentry)
+{
+    storeAppendPrintf(sentry, "max_away: %d\n", diskd_stats.max_away);
+    storeAppendPrintf(sentry, "max_shmuse: %d\n", diskd_stats.max_shmuse);
+    storeAppendPrintf(sentry, "open_fail_queue_len: %d\n", diskd_stats.open_fail_queue_len);
+    storeAppendPrintf(sentry, "block_queue_len: %d\n", diskd_stats.block_queue_len);
+    diskd_stats.max_away = diskd_stats.max_shmuse = 0;
+}
+
 #endif
Index: squid/src/dns.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/dns.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/dns.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/dns.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: dns.c,v 1.1.1.3.12.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 34    Dnsserver interface
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/dns_internal.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/dns_internal.c,v
retrieving revision 1.1.1.1.4.1
retrieving revision 1.1.1.1.4.1.2.1
diff -u -r1.1.1.1.4.1 -r1.1.1.1.4.1.2.1
--- squid/src/dns_internal.c	4 Feb 2000 19:39:40 -0000	1.1.1.1.4.1
+++ squid/src/dns_internal.c	17 Apr 2000 00:13:09 -0000	1.1.1.1.4.1.2.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns_internal.c,v 1.1.1.1.4.1 2000/02/04 19:39:40 hno Exp $
+ * $Id: dns_internal.c,v 1.1.1.1.4.1.2.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 78    DNS lookups; interacts with lib/rfc1035.c
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -76,6 +76,7 @@
 static OBJH idnsStats;
 static void idnsAddNameserver(const char *buf);
 static void idnsFreeNameservers(void);
+static void idnsParseNameservers(void);
 static void idnsParseResolvConf(void);
 static void idnsSendQuery(idns_query * q);
 static int idnsFromKnownNameserver(struct sockaddr_in *from);
@@ -105,7 +106,7 @@
     nameservers[nns].S.sin_family = AF_INET;
     nameservers[nns].S.sin_port = htons(DOMAIN_PORT);
     nameservers[nns].S.sin_addr.s_addr = inet_addr(buf);
-    debug(78, 1) ("idnsAddNameserver: Added nameserver #%d: %s\n",
+    debug(78, 3) ("idnsAddNameserver: Added nameserver #%d: %s\n",
 	nns, inet_ntoa(nameservers[nns].S.sin_addr));
     nns++;
 }
@@ -118,6 +119,16 @@
 }
 
 static void
+idnsParseNameservers(void)
+{
+    wordlist *w;
+    for (w = Config.dns_nameservers; w; w = w->next) {
+	debug(78, 1) ("Adding nameserver %s from squid.conf\n", w->key);
+	idnsAddNameserver(w->key);
+    }
+}
+
+static void
 idnsParseResolvConf(void)
 {
     FILE *fp;
@@ -128,17 +139,16 @@
 	debug(78, 1) ("%s: %s\n", _PATH_RESOLV_CONF, xstrerror());
 	return;
     }
-    idnsFreeNameservers();
     while (fgets(buf, 512, fp)) {
 	t = strtok(buf, w_space);
-	if (t == NULL)
-	    continue;;
+	if (NULL == t)
+	    continue;
 	if (strcasecmp(t, "nameserver"))
 	    continue;
 	t = strtok(NULL, w_space);
 	if (t == NULL)
 	    continue;;
-	debug(78, 1) ("idnsParseResolvConf: nameserver %s\n", t);
+	debug(78, 1) ("Adding nameserver %s from %s\n", t, _PATH_RESOLV_CONF);
 	idnsAddNameserver(t);
     }
     fclose(fp);
@@ -382,7 +392,9 @@
 	    fatal("Could not create a DNS socket");
 	debug(78, 1) ("DNS Socket created on FD %d\n", DnsSocket);
     }
-    if (nns == 0)
+    assert(0 == nns);
+    idnsParseNameservers();
+    if (0 == nns)
 	idnsParseResolvConf();
     if (!init) {
 	memDataInit(MEM_IDNS_QUERY, "idns_query", sizeof(idns_query), 0);
@@ -400,6 +412,7 @@
 	return;
     comm_close(DnsSocket);
     DnsSocket = -1;
+    idnsFreeNameservers();
 }
 
 void
Index: squid/src/dnsserver.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/dnsserver.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/dnsserver.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/dnsserver.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dnsserver.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: dnsserver.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 0     DNS Resolver
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/enums.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/enums.h,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/enums.h	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/enums.h	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: enums.h,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: enums.h,v 1.1.1.3.12.1 2000/04/17 00:13:09 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -45,6 +45,9 @@
     LOG_TCP_MEM_HIT,
     LOG_TCP_DENIED,
     LOG_TCP_OFFLINE_HIT,
+#if LOG_TCP_REDIRECTS
+    LOG_TCP_REDIRECT,
+#endif
     LOG_UDP_HIT,
     LOG_UDP_MISS,
     LOG_UDP_DENIED,
@@ -197,6 +200,7 @@
     HDR_CONTENT_MD5,
     HDR_CONTENT_RANGE,
     HDR_CONTENT_TYPE,
+    HDR_COOKIE,
     HDR_DATE,
     HDR_ETAG,
     HDR_EXPIRES,
@@ -655,5 +659,8 @@
 typedef enum {
     SWAPDIR_UFS,
     SWAPDIR_ASYNCUFS,
+#if USE_DISKD
+    SWAPDIR_DISKD,
+#endif
     SWAPDIR_MAX
 } swapdir_t;
Index: squid/src/errorpage.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/errorpage.c,v
retrieving revision 1.1.1.3.10.1
retrieving revision 1.1.1.3.10.2
diff -u -r1.1.1.3.10.1 -r1.1.1.3.10.2
--- squid/src/errorpage.c	5 Feb 2000 20:14:18 -0000	1.1.1.3.10.1
+++ squid/src/errorpage.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.2
@@ -1,6 +1,6 @@
 
 /*
- * $Id: errorpage.c,v 1.1.1.3.10.1 2000/02/05 20:14:18 hno Exp $
+ * $Id: errorpage.c,v 1.1.1.3.10.2 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/event.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/event.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/event.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/event.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: event.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: event.c,v 1.1.1.3.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 41    Event Processing
  * AUTHOR: Henrik Nordstrom
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/fd.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/fd.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/fd.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/fd.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: fd.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: fd.c,v 1.1.1.3.12.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 51    Filedescriptor Functions
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/filemap.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/filemap.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/src/filemap.c	26 Jan 2000 03:25:01 -0000	1.1.1.2
+++ squid/src/filemap.c	17 Apr 2000 00:13:09 -0000	1.1.1.2.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: filemap.c,v 1.1.1.2 2000/01/26 03:25:01 hno Exp $
+ * $Id: filemap.c,v 1.1.1.2.10.1 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 8     Swap File Bitmap
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -122,9 +122,8 @@
     int count;
     if (suggestion >= fm->max_n_files)
 	suggestion = 0;
-    if (!file_map_bit_test(fm, suggestion)) {
-	return file_map_bit_set(fm, suggestion);
-    }
+    if (!file_map_bit_test(fm, suggestion))
+	return suggestion;
     word = suggestion >> LONG_BIT_SHIFT;
     for (count = 0; count < fm->nwords; count++) {
 	if (fm->file_map[word] != ALL_ONES)
Index: squid/src/forward.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/forward.c,v
retrieving revision 1.1.1.3.12.1
retrieving revision 1.1.1.3.12.2
diff -u -r1.1.1.3.12.1 -r1.1.1.3.12.2
--- squid/src/forward.c	14 Apr 2000 23:09:53 -0000	1.1.1.3.12.1
+++ squid/src/forward.c	17 Apr 2000 00:13:09 -0000	1.1.1.3.12.2
@@ -1,6 +1,6 @@
 
 /*
- * $Id: forward.c,v 1.1.1.3.12.1 2000/04/14 23:09:53 hno Exp $
+ * $Id: forward.c,v 1.1.1.3.12.2 2000/04/17 00:13:09 hno Exp $
  *
  * DEBUG: section 17    Request Forwarding
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -68,6 +68,9 @@
     int sfd;
     debug(17, 3) ("fwdStateFree: %p\n", fwdState);
     assert(e->mem_obj);
+#if URL_CHECKSUM_DEBUG
+    assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
+#endif
     if (e->store_status == STORE_PENDING) {
 	if (e->mem_obj->inmem_hi == 0) {
 	    assert(fwdState->err);
@@ -108,7 +111,7 @@
 	return 0;
     if (fwdState->n_tries > 10)
 	return 0;
-    if (squid_curtime - fwdState->start > 120)
+    if (squid_curtime - fwdState->start > Config.Timeout.connect)
 	return 0;
     if (fwdState->flags.dont_retry)
 	return 0;
@@ -202,6 +205,12 @@
 	err->request = requestLink(fwdState->request);
 	err->xerrno = ETIMEDOUT;
 	fwdFail(fwdState, err);
+	/*
+	 * This marks the peer DOWN ... 
+	 */
+	if (fwdState->servers)
+	    if (fwdState->servers->peer)
+		peerCheckConnectStart(fwdState->servers->peer);
     }
     comm_close(fd);
 }
@@ -239,6 +248,9 @@
 	fwdConnectDone(fd, COMM_OK, fwdState);
 	return;
     }
+#if URL_CHECKSUM_DEBUG
+    assert(fwdState->entry->mem_obj->chksum == url_checksum(url));
+#endif
     fd = comm_open(SOCK_STREAM,
 	0,
 	Config.Addrs.tcp_outgoing,
@@ -368,6 +380,9 @@
     http_status s;
     assert(e->store_status == STORE_PENDING);
     assert(e->mem_obj);
+#if URL_CHECKSUM_DEBUG
+    assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
+#endif
     debug(17, 3) ("fwdReforward: %s?\n", storeUrl(e));
     if (!EBIT_TEST(e->flags, ENTRY_FWD_HDR_WAIT)) {
 	debug(17, 3) ("fwdReforward: No, ENTRY_FWD_HDR_WAIT isn't set\n");
@@ -434,6 +449,9 @@
     debug(17, 3) ("fwdStart: '%s'\n", storeUrl(e));
     e->mem_obj->request = requestLink(r);
     e->mem_obj->fd = fd;
+#if URL_CHECKSUM_DEBUG
+    assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
+#endif
     if (shutting_down) {
 	/* more yuck */
 	err = errorCon(ERR_SHUTTING_DOWN, HTTP_SERVICE_UNAVAILABLE);
@@ -478,6 +496,9 @@
     int rc = 0;
     if (mem == NULL)
 	return 0;
+#if URL_CHECKSUM_DEBUG
+    assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
+#endif
 #if DELAY_POOLS
     if (fd < 0)
 	(void) 0;
@@ -551,6 +572,9 @@
     assert(e->store_status == STORE_PENDING);
     debug(17, 3) ("fwdComplete: %s\n\tstatus %d\n", storeUrl(e),
 	e->mem_obj->reply->sline.status);
+#if URL_CHECKSUM_DEBUG
+    assert(e->mem_obj->chksum == url_checksum(e->mem_obj->url));
+#endif
     fwdLogReplyStatus(fwdState->n_tries, e->mem_obj->reply->sline.status);
     if (fwdReforward(fwdState)) {
 	debug(17, 3) ("fwdComplete: re-forwarding %d %s\n",
Index: squid/src/fqdncache.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/fqdncache.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/fqdncache.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/fqdncache.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: fqdncache.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: fqdncache.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 35    FQDN Cache
  * AUTHOR: Harvest Derived
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/ftp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ftp.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.2
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.2
--- squid/src/ftp.c	14 Apr 2000 23:09:53 -0000	1.1.1.3.4.1.2.1
+++ squid/src/ftp.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.4.1.2.2
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.c,v 1.1.1.3.4.1.2.1 2000/04/14 23:09:53 hno Exp $
+ * $Id: ftp.c,v 1.1.1.3.4.1.2.2 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/globals.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/globals.h,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/globals.h	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/globals.h	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: globals.h,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: globals.h,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/gopher.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/gopher.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/gopher.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/gopher.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: gopher.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: gopher.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/htcp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/htcp.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/src/htcp.c	26 Jan 2000 03:25:01 -0000	1.1.1.2
+++ squid/src/htcp.c	17 Apr 2000 00:13:10 -0000	1.1.1.2.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: htcp.c,v 1.1.1.2 2000/01/26 03:25:01 hno Exp $
+ * $Id: htcp.c,v 1.1.1.2.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 31    Hypertext Caching Protocol
  * AUTHOR: Duane Wesssels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/http.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/http.c,v
retrieving revision 1.1.1.3.4.1.2.1
retrieving revision 1.1.1.3.4.1.2.2
diff -u -r1.1.1.3.4.1.2.1 -r1.1.1.3.4.1.2.2
--- squid/src/http.c	14 Apr 2000 23:09:53 -0000	1.1.1.3.4.1.2.1
+++ squid/src/http.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.4.1.2.2
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.c,v 1.1.1.3.4.1.2.1 2000/04/14 23:09:53 hno Exp $
+ * $Id: http.c,v 1.1.1.3.4.1.2.2 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -392,6 +392,9 @@
 		httpState->request->host, skew);
     }
     ctx_exit(ctx);
+#if HEADERS_LOG
+    headersLog(1, 0, httpState->request->method, reply);
+#endif
 }
 
 static int
@@ -586,6 +589,9 @@
     ErrorState *err;
     debug(11, 5) ("httpSendComplete: FD %d: size %d: errflag %d.\n",
 	fd, size, errflag);
+#if URL_CHECKSUM_DEBUG
+    assert(entry->mem_obj->chksum == url_checksum(entry->mem_obj->url));
+#endif
     if (size > 0) {
 	fd_bytes(fd, size, FD_WRITE);
 	kb_incr(&Counter.server.all.kbytes_out, size);
Index: squid/src/icmp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/icmp.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.16.1
diff -u -r1.1.1.2 -r1.1.1.2.16.1
--- squid/src/icmp.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/icmp.c	17 Apr 2000 00:13:10 -0000	1.1.1.2.16.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icmp.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: icmp.c,v 1.1.1.2.16.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 37    ICMP Routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/icp_v2.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/icp_v2.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/icp_v2.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/icp_v2.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icp_v2.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: icp_v2.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/icp_v3.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/icp_v3.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/icp_v3.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/icp_v3.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: icp_v3.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: icp_v3.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 12    Internet Cache Protocol
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/ident.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ident.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/ident.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/ident.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ident.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: ident.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 30    Ident (RFC 931)
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/internal.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/internal.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/internal.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/internal.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: internal.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: internal.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 76    Internal Squid Object handling
  * AUTHOR: Duane, Alex, Henrik
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/ipc.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ipc.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/ipc.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/ipc.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipc.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: ipc.c,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 54    Interprocess Communication
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/ipcache.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ipcache.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/ipcache.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/ipcache.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ipcache.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: ipcache.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 14    IP Cache
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/leakfinder.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/leakfinder.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/src/leakfinder.c	26 Jan 2000 03:23:10 -0000	1.1.1.1
+++ squid/src/leakfinder.c	17 Apr 2000 00:13:10 -0000	1.1.1.1.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: leakfinder.c,v 1.1.1.1 2000/01/26 03:23:10 hno Exp $
+ * $Id: leakfinder.c,v 1.1.1.1.14.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 45    Callback Data Registry
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -98,7 +98,7 @@
 }
 
 void *
-leakFree(void *p)
+leakFreeFL(void *p, const char *file, int line)
 {
     ptr *c = (ptr *) hash_lookup(htable, p);
     assert(p);
--- /dev/null	Wed Feb 14 00:42:24 2007
+++ squid/src/logfile.c	Wed Feb 14 00:43:25 2007
@@ -0,0 +1,153 @@
+/*
+ * $Id$
+ */
+
+#include "squid.h"
+
+static void logfileWriteWrapper(Logfile * lf, const void *buf, size_t len);
+
+Logfile *
+logfileOpen(const char *path, size_t bufsz)
+{
+    int fd;
+    Logfile *lf;
+    fd = file_open(path, O_WRONLY | O_CREAT);
+    if (DISK_ERROR == fd) {
+	if (ENOENT == errno) {
+	    fatalf("Cannot open '%s' because\n"
+		"\tthe parent directory does not exist.\n"
+		"\tPlease create the directory.\n", path);
+	} else if (EACCES == errno) {
+	    fatalf("Cannot open '%s' for writing.\n"
+		"\tThe parent directory must be writeable by the\n"
+		"\tuser '%s', which is the cache_effective_user\n"
+		"\tset in squid.conf.", path, Config.effectiveUser);
+	} else {
+	    debug(50, 1) ("logfileOpen: %s: %s\n", path, xstrerror());
+	    return NULL;
+	}
+    }
+    lf = xcalloc(1, sizeof(*lf));
+    lf->fd = fd;
+    xstrncpy(lf->path, path, MAXPATHLEN);
+    if (bufsz > 0) {
+	lf->buf = xmalloc(bufsz);
+	lf->bufsz = bufsz;
+    }
+    return lf;
+}
+
+void
+logfileClose(Logfile * lf)
+{
+    logfileFlush(lf);
+    file_close(lf->fd);
+    if (lf->buf)
+	xfree(lf->buf);
+    xfree(lf);
+}
+
+void
+logfileRotate(Logfile * lf)
+{
+    struct stat sb;
+    int i;
+    char from[MAXPATHLEN];
+    char to[MAXPATHLEN];
+    assert(lf->path);
+#ifdef S_ISREG
+    if (stat(lf->path, &sb) == 0)
+	if (S_ISREG(sb.st_mode) == 0)
+	    return;
+#endif
+    debug(0, 1) ("logfileRotate: %s\n", lf->path);
+    /* Rotate numbers 0 through N up one */
+    for (i = Config.Log.rotateNumber; i > 1;) {
+	i--;
+	snprintf(from, MAXPATHLEN, "%s.%d", lf->path, i - 1);
+	snprintf(to, MAXPATHLEN, "%s.%d", lf->path, i);
+	xrename(from, to);
+    }
+    /* Rotate the current log to .0 */
+    logfileFlush(lf);
+    file_close(lf->fd);		/* always close */
+    if (Config.Log.rotateNumber > 0) {
+	snprintf(to, MAXPATHLEN, "%s.%d", lf->path, 0);
+	xrename(lf->path, to);
+    }
+    /* Reopen the log.  It may have been renamed "manually" */
+    lf->fd = file_open(lf->path, O_WRONLY | O_CREAT);
+    if (DISK_ERROR == lf->fd) {
+	debug(50, 1) ("logfileRotate: %s: %s\n", lf->path, xstrerror());
+	fatalf("Cannot open %s: %s", lf->path, xstrerror());
+    }
+}
+
+void
+logfileWrite(Logfile * lf, void *buf, size_t len)
+{
+    if (0 == lf->bufsz) {
+	/* buffering disabled */
+	logfileWriteWrapper(lf, buf, len);
+	return;
+    }
+    if (lf->offset > 0 && lf->offset + len > lf->bufsz)
+	logfileFlush(lf);
+    if (len > lf->bufsz) {
+	/* too big to fit in buffer */
+	logfileWriteWrapper(lf, buf, len);
+    }
+    /* buffer it */
+    xmemcpy(lf->buf + lf->offset, buf, len);
+    lf->offset += len;
+    assert(lf->offset <= lf->bufsz);
+}
+
+void
+#if STDC_HEADERS
+logfilePrintf(Logfile * lf, const char *fmt,...)
+#else
+logfilePrintf(va_alist)
+     va_dcl
+#endif
+{
+    va_list args;
+    char buf[8192];
+    int s;
+#if STDC_HEADERS
+    va_start(args, fmt);
+#else
+    Logfile *lf;
+    const char *fmt;
+    va_start(args);
+    lf = va_arg(args, Logfile *);
+    fmt = va_arg(args, char *);
+#endif
+    s = vsnprintf(buf, 8192, fmt, args);
+    logfileWrite(lf, buf, (size_t) s);
+    va_end(args);
+}
+
+void
+logfileFlush(Logfile * lf)
+{
+    if (0 == lf->offset)
+	return;
+    logfileWriteWrapper(lf, lf->buf, (size_t) lf->offset);
+    lf->offset = 0;
+}
+
+/*
+ * Aborts with fatal message if write() returns something other
+ * than its length argument.
+ */
+static void
+logfileWriteWrapper(Logfile * lf, const void *buf, size_t len)
+{
+    int s;
+    s = write(lf->fd, buf, len);
+    fd_bytes(lf->fd, len, FD_WRITE);
+    if (s == len)
+	return;
+    fatalf("logfileWrite: %s: %s\n", lf->path, xstrerror());
+}
Index: squid/src/main.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/main.c,v
retrieving revision 1.1.1.3.4.1
retrieving revision 1.1.1.3.4.1.2.1
diff -u -r1.1.1.3.4.1 -r1.1.1.3.4.1.2.1
--- squid/src/main.c	4 Feb 2000 19:39:41 -0000	1.1.1.3.4.1
+++ squid/src/main.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.4.1.2.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: main.c,v 1.1.1.3.4.1 2000/02/04 19:39:41 hno Exp $
+ * $Id: main.c,v 1.1.1.3.4.1.2.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 1     Startup and Main Loop
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -73,6 +73,8 @@
 static void mainSetCwd(void);
 static int checkRunningPid(void);
 
+static const char *squid_start_script = "squid_start";
+
 #if TEST_ACCESS
 #include "test_access.c"
 #endif
@@ -745,6 +747,43 @@
     exit(0);
 }
 
+/*
+ * This function is run when Squid is in daemon mode, just
+ * before the parent forks and starts up the child process.
+ * It can be used for admin-specific tasks, such as notifying
+ * someone that Squid is (re)started.
+ */
+static void
+mainStartScript(const char *prog)
+{
+    char script[SQUID_MAXPATHLEN];
+    char *t;
+    size_t sl = 0;
+    pid_t cpid;
+    pid_t rpid;
+    xstrncpy(script, prog, MAXPATHLEN);
+    if ((t = strrchr(script, '/'))) {
+	*(++t) = '\0';
+	sl = strlen(script);
+    }
+    xstrncpy(&script[sl], squid_start_script, MAXPATHLEN - sl);
+    if ((cpid = fork()) == 0) {
+	/* child */
+	execl(script, squid_start_script, 0);
+	_exit(0);
+    } else {
+	do {
+#ifdef _SQUID_NEXT_
+	    union wait status;
+	    rpid = wait3(&status, 0, NULL);
+#else
+	    int status;
+	    rpid = waitpid(-1, &status, 0);
+#endif
+	} while (rpid != cpid);
+    }
+}
+
 static int
 checkRunningPid(void)
 {
@@ -782,6 +821,7 @@
 	exit(0);
     if (setsid() < 0)
 	syslog(LOG_ALERT, "setsid failed: %s", xstrerror());
+    closelog();
 #ifdef TIOCNOTTY
     if ((i = open("/dev/tty", O_RDWR)) >= 0) {
 	ioctl(i, TIOCNOTTY, NULL);
@@ -791,14 +831,17 @@
     for (i = 0; i < Squid_MaxFD; i++)
 	close(i);
     for (;;) {
+	mainStartScript(argv[0]);
 	if ((pid = fork()) == 0) {
 	    /* child */
+	    openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
 	    prog = xstrdup(argv[0]);
 	    argv[0] = xstrdup("(squid)");
 	    execvp(prog, argv);
 	    syslog(LOG_ALERT, "execvp failed: %s", xstrerror());
 	}
 	/* parent */
+	openlog(appname, LOG_PID | LOG_NDELAY | LOG_CONS, LOG_LOCAL4);
 	syslog(LOG_NOTICE, "Squid Parent: child process %d started", pid);
 	time(&start);
 	squid_signal(SIGINT, SIG_IGN, SA_RESTART);
Index: squid/src/mem.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/mem.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/mem.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/mem.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mem.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: mem.c,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 13    High Level Memory Pool Management
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/mime.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/mime.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/mime.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/mime.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mime.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: mime.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 25    MIME Parsing
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/multicast.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/multicast.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/src/multicast.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/src/multicast.c	17 Apr 2000 00:13:10 -0000	1.1.1.1.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: multicast.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: multicast.c,v 1.1.1.1.14.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 7     Multicast
  * AUTHOR: Martin Hamilton
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/neighbors.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/neighbors.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/neighbors.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/neighbors.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: neighbors.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: neighbors.c,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 15    Neighbor Routines
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/net_db.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/net_db.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/net_db.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/net_db.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: net_db.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: net_db.c,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 38    Network Measurement Database
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/pconn.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/pconn.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/src/pconn.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/pconn.c	17 Apr 2000 00:13:10 -0000	1.1.1.2.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pconn.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: pconn.c,v 1.1.1.2.14.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 48    Persistent Connections
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/peer_digest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/peer_digest.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/peer_digest.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/peer_digest.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_digest.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: peer_digest.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 72    Peer Digest Routines
  * AUTHOR: Alex Rousskov
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/peer_select.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/peer_select.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/peer_select.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/peer_select.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_select.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: peer_select.c,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 44    Peer Selection Algorithm
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -357,11 +357,10 @@
 static void
 peerGetSomeNeighborReplies(ps_state * ps)
 {
-    StoreEntry *entry = ps->entry;
     request_t *request = ps->request;
     peer *p = NULL;
     hier_code code = HIER_NONE;
-    assert(entry->ping_status == PING_WAITING);
+    assert(ps->entry->ping_status == PING_WAITING);
     assert(ps->direct != DIRECT_YES);
     if (peerCheckNetdbDirect(ps)) {
 	code = CLOSEST_DIRECT;
Index: squid/src/pinger.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/pinger.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/pinger.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/pinger.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: pinger.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: pinger.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 42    ICMP Pinger program
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/protos.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/protos.h,v
retrieving revision 1.1.1.3.12.2
retrieving revision 1.1.1.3.12.3
diff -u -r1.1.1.3.12.2 -r1.1.1.3.12.3
--- squid/src/protos.h	14 Apr 2000 23:09:53 -0000	1.1.1.3.12.2
+++ squid/src/protos.h	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.3
@@ -1,6 +1,6 @@
 
 /*
- * $Id: protos.h,v 1.1.1.3.12.2 2000/04/14 23:09:53 hno Exp $
+ * $Id: protos.h,v 1.1.1.3.12.3 2000/04/17 00:13:10 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -41,6 +41,9 @@
 extern void fvdbCountVia(const char *key);
 extern void fvdbCountForw(const char *key);
 #endif
+#if HEADERS_LOG
+extern void headersLog(int cs, int pq, method_t m, void *data);
+#endif
 
 extern aclCheck_t *aclChecklistCreate(const struct _acl_access *,
     request_t *,
@@ -62,6 +65,7 @@
 extern void aclParseRegexList(void *curlist);
 extern const char *aclTypeToStr(squid_acl);
 extern wordlist *aclDumpGeneric(const acl *);
+extern int aclPurgeMethodInUse(acl_access *);
 
 #if USE_ASYNC_IO
 extern int aio_cancel(aio_result_t *);
@@ -110,12 +114,14 @@
 extern void cbdataInit(void);
 #if CBDATA_DEBUG
 extern void cbdataAddDbg(const void *p, CBDUNL *, int, const char *, int);
+extern void cbdataLockDbg(const void *p, const char *, int);
+extern void cbdataUnlockDbg(const void *p, const char *, int);
 #else
 extern void cbdataAdd(const void *p, CBDUNL *, int);
-#endif
-extern void cbdataFree(void *p);
 extern void cbdataLock(const void *p);
 extern void cbdataUnlock(const void *p);
+#endif
+extern void cbdataFree(void *p);
 extern int cbdataValid(const void *p);
 extern CBDUNL cbdataXfree;
 
@@ -373,6 +379,7 @@
 extern void httpHeaderDestroyFieldsInfo(HttpHeaderFieldInfo * info, int count);
 extern int httpHeaderIdByName(const char *name, int name_len, const HttpHeaderFieldInfo * attrs, int end);
 extern int httpHeaderIdByNameDef(const char *name, int name_len);
+extern const char *httpHeaderNameById(int id);
 extern void httpHeaderMaskInit(HttpHeaderMask * mask, int value);
 extern void httpHeaderCalcMask(HttpHeaderMask * mask, const int *enums, int count);
 extern int httpHeaderHasConnDir(const HttpHeader * hdr, const char *directive);
@@ -728,6 +735,8 @@
 extern double stat5minCPUUsage(void);
 extern const char *storeEntryFlags(const StoreEntry *);
 extern double statRequestHitRatio(int minutes);
+extern double statRequestHitMemoryRatio(int minutes);
+extern double statRequestHitDiskRatio(int minutes);
 extern double statByteHitRatio(int minutes);
 
 
@@ -860,6 +869,7 @@
 extern int storeTooManyDiskFilesOpen(void);
 extern void storeEntryReset(StoreEntry *);
 extern void storeHeapPositionUpdate(StoreEntry *);
+extern void storeSwapFileNumberSet(StoreEntry * e, sfileno filn);
 
 /* store_io.c */
 extern STOBJOPEN storeOpen;
@@ -889,6 +899,19 @@
 extern void storeAufsUnlink(int fileno);
 #endif
 
+#if USE_DISKD
+/*
+ * diskd.c
+ */
+extern storeIOState *storeDiskdOpen(sfileno, mode_t, STIOCB *, void *);
+extern void storeDiskdClose(storeIOState * sio);
+extern void storeDiskdRead(storeIOState *, char *, size_t, off_t, STRCB *, void *);
+extern void storeDiskdWrite(storeIOState *, char *, size_t, off_t, FREE *);
+extern void storeDiskdUnlink(int fileno);
+extern STINIT storeDiskdInit;
+extern void storeDiskdReadQueue(void);
+#endif
+
 /*
  * store_log.c
  */
@@ -951,6 +974,8 @@
 extern void storeDirOpenSwapLogs(void);
 extern void storeDirSwapLog(const StoreEntry *, int op);
 extern void storeDirUpdateSwapSize(int fn, size_t size, int sign);
+extern void storeDirLRUDelete(StoreEntry *);
+extern void storeDirLRUAdd(StoreEntry *);
 
 /*
  * store_dir_ufs.c
@@ -960,9 +985,13 @@
 extern void storeUfsDirDump(StoreEntry * entry, const char *name, SwapDir * s);
 extern void storeUfsDirFree(SwapDir *);
 extern char *storeUfsFullPath(sfileno fn, char *fullpath);
+extern STINIT storeUfsDirInit;
 #if USE_ASYNC_IO
 extern void storeAufsDirParse(cacheSwap * swap);
 #endif
+#if USE_DISKD
+extern void storeDiskdDirParse(cacheSwap *);
+#endif
 
 
 /*
@@ -1182,8 +1211,8 @@
 extern int delayMostBytesWanted(const MemObject * mem, int max);
 extern delay_id delayMostBytesAllowed(const MemObject * mem);
 extern void delaySetStoreClient(StoreEntry * e, void *data, delay_id delay_id);
-void delayRegisterDelayIdPtr(delay_id * loc);
-void delayUnregisterDelayIdPtr(delay_id * loc);
+extern void delayRegisterDelayIdPtr(delay_id * loc);
+extern void delayUnregisterDelayIdPtr(delay_id * loc);
 #endif
 
 /* helper.c */
@@ -1198,7 +1227,19 @@
 extern void leakInit(void);
 extern void *leakAddFL(void *, const char *, int);
 extern void *leakTouchFL(void *, const char *, int);
-extern void *leakFree(void *);
+extern void *leakFreeFL(void *, const char *, int);
+#endif
+
+/* logfile.c */
+extern Logfile *logfileOpen(const char *path, size_t bufsz);
+extern void logfileClose(Logfile * lf);
+extern void logfileRotate(Logfile * lf);
+extern void logfileWrite(Logfile * lf, void *buf, size_t len);
+extern void logfileFlush(Logfile * lf);
+#if STDC_HEADERS
+extern void logfilePrintf(Logfile * lf, const char *fmt,...);
+#else
+extern void logfilePrintf(va_alist);
 #endif
 
 /*
@@ -1210,3 +1251,7 @@
 extern int getpagesize(void);
 extern int gethostname(char *, int);
 #endif
+
+#if URL_CHECKSUM_DEBUG
+extern unsigned int url_checksum(const char *url);
+#endif
Index: squid/src/recv-announce.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/recv-announce.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/src/recv-announce.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/src/recv-announce.c	17 Apr 2000 00:13:10 -0000	1.1.1.1.14.1
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: recv-announce.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: recv-announce.c,v 1.1.1.1.14.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 0     Announcement Server
  * AUTHOR: Harvest Derived
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/redirect.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/redirect.c,v
retrieving revision 1.1.1.3.4.1
retrieving revision 1.1.1.3.4.1.2.1
diff -u -r1.1.1.3.4.1 -r1.1.1.3.4.1.2.1
--- squid/src/redirect.c	4 Feb 2000 19:39:41 -0000	1.1.1.3.4.1
+++ squid/src/redirect.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.4.1.2.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: redirect.c,v 1.1.1.3.4.1 2000/02/04 19:39:41 hno Exp $
+ * $Id: redirect.c,v 1.1.1.3.4.1.2.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 29    Redirector
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/refresh.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/refresh.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/refresh.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/refresh.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,7 +1,7 @@
 
 
 /*
- * $Id: refresh.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: refresh.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 22    Refresh Calculation
  * AUTHOR: Harvest Derived
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/send-announce.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/send-announce.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/send-announce.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/send-announce.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: send-announce.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: send-announce.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 27    Cache Announcer
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/snmp_agent.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/snmp_agent.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/snmp_agent.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/snmp_agent.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_agent.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: snmp_agent.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 49     SNMP Interface
  * AUTHOR: Kostas Anagnostakis
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/snmp_core.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/snmp_core.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/snmp_core.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/snmp_core.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: snmp_core.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: snmp_core.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 49    SNMP support
  * AUTHOR: Glenn Chisholm
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/squid.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/squid.h,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/squid.h	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/squid.h	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: squid.h,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: squid.h,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * AUTHOR: Duane Wessels
  *
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -81,6 +81,8 @@
 
 #if PURIFY
 #define assert(EX) ((void)0)
+#elif defined(NODEBUG)
+#define assert(EX) ((void)0)
 #elif STDC_HEADERS
 #define assert(EX)  ((EX)?((void)0):xassert( # EX , __FILE__, __LINE__))
 #else
@@ -314,11 +316,14 @@
 
 #if CBDATA_DEBUG
 #define cbdataAdd(a,b,c)	cbdataAddDbg(a,b,c,__FILE__,__LINE__)
+#define cbdataLock(a)		cbdataLockDbg(a,__FILE__,__LINE__)
+#define cbdataUnlock(a)		cbdataUnlockDbg(a,__FILE__,__LINE__)
 #endif
 
 #if USE_LEAKFINDER
 #define leakAdd(p) leakAddFL(p,__FILE__,__LINE__)
 #define leakTouch(p) leakTouchFL(p,__FILE__,__LINE__)
+#define leakFree(p) leakFreeFL(p,__FILE__,__LINE__)
 #else
 #define leakAdd(p) p
 #define leakTouch(p) p
Index: squid/src/ssl.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/ssl.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/ssl.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/ssl.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ssl.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: ssl.c,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 26    Secure Sockets Layer Proxy
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/stat.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/stat.c,v
retrieving revision 1.1.1.3.12.1
retrieving revision 1.1.1.3.12.2
diff -u -r1.1.1.3.12.1 -r1.1.1.3.12.2
--- squid/src/stat.c	15 Apr 2000 11:54:27 -0000	1.1.1.3.12.1
+++ squid/src/stat.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.2
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stat.c,v 1.1.1.3.12.1 2000/04/15 11:54:27 asd Exp $
+ * $Id: stat.c,v 1.1.1.3.12.2 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -485,6 +485,12 @@
     storeAppendPrintf(sentry, "\tByte Hit Ratios:\t5min: %3.1f%%, 60min: %3.1f%%\n",
 	statByteHitRatio(5),
 	statByteHitRatio(60));
+    storeAppendPrintf(sentry, "\tRequest Memory Hit Ratios:\t5min: %3.1f%%, 60min: %3.1f%%\n",
+	statRequestHitMemoryRatio(5),
+	statRequestHitMemoryRatio(60));
+    storeAppendPrintf(sentry, "\tRequest Disk Hit Ratios:\t5min: %3.1f%%, 60min: %3.1f%%\n",
+	statRequestHitDiskRatio(5),
+	statRequestHitDiskRatio(60));
     storeAppendPrintf(sentry, "\tStorage Swap size:\t%d KB\n",
 	store_swap_size);
     storeAppendPrintf(sentry, "\tStorage Mem size:\t%d KB\n",
@@ -1290,6 +1296,26 @@
 }
 
 extern double
+statRequestHitMemoryRatio(int minutes)
+{
+    assert(minutes < N_COUNT_HIST);
+    return dpercent(CountHist[0].client_http.mem_hits -
+	CountHist[minutes].client_http.mem_hits,
+	CountHist[0].client_http.hits -
+	CountHist[minutes].client_http.hits);
+}
+
+extern double
+statRequestHitDiskRatio(int minutes)
+{
+    assert(minutes < N_COUNT_HIST);
+    return dpercent(CountHist[0].client_http.disk_hits -
+	CountHist[minutes].client_http.disk_hits,
+	CountHist[0].client_http.hits -
+	CountHist[minutes].client_http.hits);
+}
+
+extern double
 statByteHitRatio(int minutes)
 {
     size_t s;
Index: squid/src/stmem.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/stmem.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/src/stmem.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/stmem.c	17 Apr 2000 00:13:10 -0000	1.1.1.2.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stmem.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: stmem.c,v 1.1.1.2.14.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 19    Store Memory Primitives
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/store.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/store.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/store.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: store.c,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -109,12 +109,30 @@
 static int store_swap_low = 0;
 static Stack LateReleaseStack;
 
+#if URL_CHECKSUM_DEBUG
+unsigned int
+url_checksum(const char *url)
+{
+    unsigned int ck;
+    MD5_CTX M;
+    static unsigned char digest[16];
+    MD5Init(&M);
+    MD5Update(&M, (unsigned char *) url, strlen(url));
+    MD5Final(digest, &M);
+    xmemcpy(&ck, digest, sizeof(ck));
+    return ck;
+}
+#endif
+
 static MemObject *
 new_MemObject(const char *url, const char *log_url)
 {
     MemObject *mem = memAllocate(MEM_MEMOBJECT);
     mem->reply = httpReplyCreate();
     mem->url = xstrdup(url);
+#if URL_CHECKSUM_DEBUG
+    mem->chksum = url_checksum(mem->url);
+#endif
     mem->log_url = xstrdup(log_url);
     mem->object_sz = -1;
     mem->fd = -1;
@@ -132,6 +150,7 @@
 	e->mem_obj = new_MemObject(url, log_url);
     debug(20, 3) ("new_StoreEntry: returning %p\n", e);
     e->expires = e->lastmod = e->lastref = e->timestamp = -1;
+    e->swap_file_number = -1;
     return e;
 }
 
@@ -141,6 +160,9 @@
     MemObject *mem = e->mem_obj;
     const Ctx ctx = ctx_enter(mem->url);
     debug(20, 3) ("destroy_MemObject: destroying %p\n", mem);
+#if URL_CHECKSUM_DEBUG
+    assert(mem->chksum == url_checksum(mem->url));
+#endif
     e->mem_obj = NULL;
     if (!shutting_down)
 	assert(mem->swapout.sio == NULL);
@@ -189,8 +211,6 @@
 	e->node = heap_insert(store_heap, e);
 	debug(20, 4) ("storeHashInsert: inserted node %p\n", e->node);
     }
-#else
-    dlinkAdd(e, &e->lru, &store_list);
 #endif
 }
 
@@ -204,8 +224,6 @@
 	heap_delete(store_heap, e->node);
 	e->node = NULL;
     }
-#else
-    dlinkDelete(&e->lru, &store_list);
 #endif
     storeKeyFree(e->key);
     e->key = NULL;
@@ -243,8 +261,8 @@
 	 */
 	debug(20, 4) ("storeLockObject: just locked node %p\n", e->node);
 #else
-	dlinkDelete(&e->lru, &store_list);
-	dlinkAdd(e, &e->lru, &store_list);
+	storeDirLRUDelete(e);
+	storeDirLRUAdd(e);
 #endif
     }
     debug(20, 3) ("storeLockObject: key '%s' count=%d\n",
@@ -283,6 +301,9 @@
     assert(storePendingNClients(e) == 0);
 #if HEAP_REPLACEMENT
     storeHeapPositionUpdate(e);
+#else
+    storeDirLRUDelete(e);
+    storeDirLRUAdd(e);
 #endif
     if (EBIT_TEST(e->flags, RELEASE_REQUEST))
 	storeRelease(e);
@@ -292,19 +313,8 @@
 	e->mem_obj->request = NULL;
     } else {
 	storePurgeMem(e);
-	if (EBIT_TEST(e->flags, KEY_PRIVATE)) {
-#if HEAP_REPLACEMENT
-	    /*
-	     * Squid/LRU is moving things around in the linked list in order
-	     * to keep from bumping into them when purging from the LRU list.
-	     */
-	    debug(20, 4) ("storeUnlockObject: purged private node %p\n",
-		e->node);
-#else
-	    dlinkDelete(&e->lru, &store_list);
-	    dlinkAddTail(e, &e->lru, &store_list);
-#endif
-	}
+	if (EBIT_TEST(e->flags, KEY_PRIVATE))
+	    debug(20, 1) ("WARNING: %s:%d: found KEY_PRIVATE\n", __FILE__, __LINE__);
     }
     return 0;
 }
@@ -504,7 +514,6 @@
 	int private_key;
 	int too_many_open_files;
 	int too_many_open_fds;
-	int lru_age_too_low;
     } no;
     struct {
 	int Default;
@@ -565,18 +574,6 @@
     } else if (fdNFree() < RESERVED_FD) {
 	debug(20, 2) ("storeCheckCachable: NO: too many FD's open\n");
 	store_check_cachable_hist.no.too_many_open_fds++;
-#if HEAP_REPLACEMENT
-	/*
-	 * With the HEAP-based replacement policies a low reference
-	 * age should not prevent cacheability of an object.  We
-	 * do not use LRU age at all.
-	 */
-#else
-    } else if (storeExpiredReferenceAge() < 300) {
-	debug(20, 2) ("storeCheckCachable: NO: LRU Age = %d\n",
-	    storeExpiredReferenceAge());
-	store_check_cachable_hist.no.lru_age_too_low++;
-#endif
     } else {
 	store_check_cachable_hist.yes.Default++;
 	return 1;
@@ -609,8 +606,6 @@
 	store_check_cachable_hist.no.too_many_open_files);
     storeAppendPrintf(sentry, "no.too_many_open_fds\t%d\n",
 	store_check_cachable_hist.no.too_many_open_fds);
-    storeAppendPrintf(sentry, "no.lru_age_too_low\t%d\n",
-	store_check_cachable_hist.no.lru_age_too_low);
     storeAppendPrintf(sentry, "yes.default\t%d\n",
 	store_check_cachable_hist.yes.Default);
 }
@@ -711,8 +706,6 @@
     pages_needed = (size / SM_PAGE_SIZE) + 1;
     if (memInUse(MEM_STMEM_BUF) + pages_needed < store_pages_max)
 	return;
-    if (store_dirs_rebuilding)
-	return;
     debug(20, 2) ("storeGetMemSpace: Starting, need %d pages\n", pages_needed);
 #if HEAP_REPLACEMENT
     while (heap_nodes(inmem_heap) > 0) {
@@ -790,11 +783,13 @@
     int expired = 0;
     int max_scan;
     int max_remove;
+    int i;
+    int j;
+    static int ndir = 0;
     double f;
     static time_t last_warn_time = 0;
 #if !HEAP_REPLACEMENT
-    dlink_node *m;
-    dlink_node *prev = NULL;
+    SwapDir *sd;
 #else
     heap_key age;
     heap_key min_age = 0.0;
@@ -813,7 +808,8 @@
 	f = (double) (store_swap_size - store_swap_low) / (store_swap_high - store_swap_low);
 	f = f < 0.0 ? 0.0 : f > 1.0 ? 1.0 : f;
 	max_scan = (int) (f * 400.0 + 100.0);
-	max_remove = (int) (f * 70.0 + 10.0);
+	if ((max_remove = stat5minClientRequests()) < 10)
+	    max_remove = 10;
 	eventAdd("MaintainSwapSpace", storeMaintainSwapSpace, NULL, 1.0 - f, 1);
     }
     debug(20, 3) ("storeMaintainSwapSpace: f=%f, max_scan=%d, max_remove=%d\n",
@@ -884,32 +880,50 @@
     while ((e = linklistShift(&locked_entries)))
 	e->node = heap_insert(store_heap, e);
 #else
-    for (m = store_list.tail; m; m = prev) {
-	prev = m->prev;
-	e = m->data;
-	scanned++;
-	if (storeEntryLocked(e)) {
-	    /*
-	     * If there is a locked entry at the tail of the LRU list,
-	     * move it to the beginning to get it out of the way.
-	     * Theoretically, we might have all locked objects at the
-	     * tail, and then we'll never remove anything here and the
-	     * LRU age will go to zero.
-	     */
-	    if (memInUse(MEM_STOREENTRY) > max_scan) {
-		dlinkDelete(&e->lru, &store_list);
-		dlinkAdd(e, &e->lru, &store_list);
+    for (i = 0; i < Config.cacheSwap.n_configured; i++) {
+	sd = &Config.cacheSwap.swapDirs[i];
+	sd->lru_walker = sd->lru_list.tail;
+    }
+    do {
+	j = 0;
+	for (i = 0; i < Config.cacheSwap.n_configured; i++) {
+	    if (ndir >= Config.cacheSwap.n_configured)
+		ndir = ndir % Config.cacheSwap.n_configured;
+	    sd = &Config.cacheSwap.swapDirs[ndir++];
+	    if (sd->cur_size < sd->low_size)
+		continue;
+	    if (NULL == sd->lru_walker)
+		continue;
+	    e = sd->lru_walker->data;
+	    sd->lru_walker = sd->lru_walker->prev;
+	    j++;
+	    scanned++;
+	    sd->scanned++;
+	    if (storeEntryLocked(e)) {
+		/*
+		 * If there is a locked entry at the tail of the LRU list,
+		 * move it to the beginning to get it out of the way.
+		 * Theoretically, we might have all locked objects at the
+		 * tail, and then we'll never remove anything here and the
+		 * LRU age will go to zero.
+		 */
+		if (memInUse(MEM_STOREENTRY) > max_scan) {
+		    storeDirLRUDelete(e);
+		    if (!EBIT_TEST(e->flags, ENTRY_SPECIAL))
+			storeDirLRUAdd(e);
+		}
+		locked++;
+	    } else if (storeCheckExpired(e)) {
+		expired++;
+		sd->removals++;
+		storeRelease(e);
 	    }
-	    locked++;
-	} else if (storeCheckExpired(e)) {
-	    expired++;
-	    storeRelease(e);
+	    if (expired >= max_remove)
+		break;
+	    if (scanned >= max_scan)
+		break;
 	}
-	if (expired >= max_remove)
-	    break;
-	if (scanned >= max_scan)
-	    break;
-    }
+    } while (j > 0 && expired < max_remove && scanned < max_scan);
 #endif
     debug(20, (expired ? 2 : 3)) ("storeMaintainSwapSpace: scanned %d/%d removed %d/%d locked %d f=%.03f\n",
 	scanned, max_scan, expired, max_remove, locked, f);
@@ -953,18 +967,19 @@
 	 * we'll just call storeUnlockObject() on these.
 	 */
 	e->lock_count++;
+	EBIT_SET(e->flags, RELEASE_REQUEST);
 	stackPush(&LateReleaseStack, e);
 	return;
     }
     storeLog(STORE_LOG_RELEASE, e);
     if (e->swap_file_number > -1) {
 	storeUnlink(e->swap_file_number);
-	storeDirMapBitReset(e->swap_file_number);
 	if (e->swap_status == SWAPOUT_DONE)
 	    if (EBIT_TEST(e->flags, ENTRY_VALIDATED))
 		storeDirUpdateSwapSize(e->swap_file_number, e->swap_file_sz, -1);
 	if (!EBIT_TEST(e->flags, KEY_PRIVATE))
 	    storeDirSwapLog(e, SWAP_LOG_DEL);
+	storeSwapFileNumberSet(e, -1);
     }
     storeSetMemStatus(e, NOT_IN_MEMORY);
     destroy_StoreEntry(e);
@@ -1116,7 +1131,6 @@
 	store_heap = new_heap(10000, HeapKeyGen_StoreEntry_GDSF);
     }
 #else
-    store_list.head = store_list.tail = NULL;
     inmem_list.head = inmem_list.tail = NULL;
 #endif
     stackInit(&LateReleaseStack);
@@ -1161,17 +1175,7 @@
 	return 1;
     if (EBIT_TEST(e->flags, ENTRY_NEGCACHED) && squid_curtime >= e->expires)
 	return 1;
-#if HEAP_REPLACEMENT
-    /*
-     * With HEAP_REPLACEMENT we are not using the LRU reference age, the heap
-     * controls the replacement of objects.
-     */
     return 1;
-#else
-    if (squid_curtime - e->lastref > storeExpiredReferenceAge())
-	return 1;
-    return 0;
-#endif
 }
 
 #if !HEAP_REPLACEMENT
@@ -1470,3 +1474,20 @@
 	heap_update(inmem_heap, e->mem_obj->node, e);
 }
 #endif
+
+void
+storeSwapFileNumberSet(StoreEntry * e, sfileno filn)
+{
+    if (e->swap_file_number == filn)
+	return;
+    if (filn < 0) {
+	assert(-1 == filn);
+	storeDirMapBitReset(e->swap_file_number);
+	storeDirLRUDelete(e);
+	e->swap_file_number = -1;
+    } else {
+	assert(-1 == e->swap_file_number);
+	storeDirMapBitSet(e->swap_file_number = filn);
+	storeDirLRUAdd(e);
+    }
+}
Index: squid/src/store_client.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_client.c,v
retrieving revision 1.1.1.3.4.1
retrieving revision 1.1.1.3.4.1.2.1
diff -u -r1.1.1.3.4.1 -r1.1.1.3.4.1.2.1
--- squid/src/store_client.c	4 Feb 2000 19:39:41 -0000	1.1.1.3.4.1
+++ squid/src/store_client.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.4.1.2.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_client.c,v 1.1.1.3.4.1 2000/02/04 19:39:41 hno Exp $
+ * $Id: store_client.c,v 1.1.1.3.4.1.2.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Client-Side Interface
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -43,6 +43,7 @@
 static STRCB storeClientReadBody;
 static STRCB storeClientReadHeader;
 static void storeClientCopy2(StoreEntry * e, store_client * sc);
+static void storeClientCopy3(StoreEntry * e, store_client * sc);
 static void storeClientFileRead(store_client * sc);
 static EVH storeClientCopyEvent;
 static store_client_t storeClientType(StoreEntry *);
@@ -146,6 +147,19 @@
 }
 
 static void
+storeClientCallback(store_client * sc, ssize_t sz)
+{
+    STCB *callback = sc->callback;
+    char *buf = sc->copy_buf;
+    assert(sc->callback);
+    assert(sc->copy_buf);
+    sc->callback = NULL;
+    sc->copy_buf = NULL;
+    if (cbdataValid(sc->callback_data))
+	callback(sc->callback_data, buf, sz);
+}
+
+static void
 storeClientCopyEvent(void *data)
 {
     store_client *sc = data;
@@ -212,9 +226,6 @@
 static void
 storeClientCopy2(StoreEntry * e, store_client * sc)
 {
-    STCB *callback = sc->callback;
-    MemObject *mem = e->mem_obj;
-    size_t sz;
     if (sc->flags.copy_event_pending)
 	return;
     if (EBIT_TEST(e->flags, ENTRY_FWD_HDR_WAIT)) {
@@ -230,7 +241,7 @@
     cbdataLock(sc);		/* ick, prevent sc from getting freed */
     sc->flags.store_copying = 1;
     debug(20, 3) ("storeClientCopy2: %s\n", storeKeyText(e->key));
-    assert(callback != NULL);
+    assert(sc->callback != NULL);
     /*
      * We used to check for ENTRY_ABORTED here.  But there were some
      * problems.  For example, we might have a slow client (or two) and
@@ -238,54 +249,72 @@
      * if the server-side aborts, we want to give the client(s)
      * everything we got before the abort condition occurred.
      */
+    storeClientCopy3(e, sc);
+    sc->flags.store_copying = 0;
+    cbdataUnlock(sc);		/* ick, allow sc to be freed */
+}
+
+static void
+storeClientCopy3(StoreEntry * e, store_client * sc)
+{
+    MemObject *mem = e->mem_obj;
+    size_t sz;
     if (storeClientNoMoreToSend(e, sc)) {
 	/* There is no more to send! */
-	sc->flags.disk_io_pending = 0;
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, 0);
-    } else if (e->store_status == STORE_PENDING && sc->seen_offset >= mem->inmem_hi) {
+	storeClientCallback(sc, 0);
+	return;
+    }
+    if (e->store_status == STORE_PENDING && sc->seen_offset >= mem->inmem_hi) {
 	/* client has already seen this, wait for more */
-	debug(20, 3) ("storeClientCopy2: Waiting for more\n");
-    } else if (sc->copy_offset >= mem->inmem_lo && sc->copy_offset < mem->inmem_hi) {
-	/* What the client wants is in memory */
-	debug(20, 3) ("storeClientCopy2: Copying from memory\n");
-	sz = stmemCopy(&mem->data_hdr, sc->copy_offset, sc->copy_buf, sc->copy_size);
-	sc->flags.disk_io_pending = 0;
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, sz);
-    } else if (sc->swapin_sio == NULL) {
-	debug(20, 3) ("storeClientCopy2: Need to open swap in file\n");
-	assert(sc->type == STORE_DISK_CLIENT);
+	debug(20, 3) ("storeClientCopy3: Waiting for more\n");
+	return;
+    }
+    /*
+     * Slight weirdness here.  We open a swapin file for any
+     * STORE_DISK_CLIENT, even if we can copy the requested chunk
+     * from memory in the next block.  We must try to open the
+     * swapin file before sending any data to the client side.  If
+     * we postpone the open, and then can not open the file later
+     * on, the client loses big time.  Its transfer just gets cut
+     * off.  Better to open it early (while the client side handler
+     * is clientCacheHit) so that we can fall back to a cache miss
+     * if needed.
+     */
+    if (STORE_DISK_CLIENT == sc->type && NULL == sc->swapin_sio) {
+	debug(20, 3) ("storeClientCopy3: Need to open swap in file\n");
 	/* gotta open the swapin file */
 	if (storeTooManyDiskFilesOpen()) {
 	    /* yuck -- this causes a TCP_SWAPFAIL_MISS on the client side */
-	    sc->callback = NULL;
-	    callback(sc->callback_data, sc->copy_buf, -1);
-	} else if (!sc->flags.disk_io_pending) {
-	    sc->flags.disk_io_pending = 1;
+	    storeClientCallback(sc, -1);
+	    return;
+	}
+	if (!sc->flags.disk_io_pending) {
 	    storeSwapInStart(sc);
 	    if (NULL == sc->swapin_sio) {
-		sc->flags.disk_io_pending = 0;
-		sc->callback = NULL;
-		callback(sc->callback_data, sc->copy_buf, -1);
-	    } else {
-		storeClientFileRead(sc);
+		storeClientCallback(sc, -1);
+		return;
 	    }
+	    /*
+	     * If the open succeeds we either copy from memory, or
+	     * schedule a disk read in the next block.
+	     */
 	} else {
-	    debug(20, 2) ("storeClientCopy2: Averted multiple fd operation\n");
-	}
-    } else {
-	debug(20, 3) ("storeClientCopy: reading from STORE\n");
-	assert(sc->type == STORE_DISK_CLIENT);
-	if (!sc->flags.disk_io_pending) {
-	    sc->flags.disk_io_pending = 1;
-	    storeClientFileRead(sc);
-	} else {
-	    debug(20, 2) ("storeClientCopy2: Averted multiple fd operation\n");
+	    debug(20, 1) ("WARNING: Averted multiple fd operation (1)\n");
+	    return;
 	}
     }
-    sc->flags.store_copying = 0;
-    cbdataUnlock(sc);		/* ick, allow sc to be freed */
+    if (sc->copy_offset >= mem->inmem_lo && sc->copy_offset < mem->inmem_hi) {
+	/* What the client wants is in memory */
+	debug(20, 3) ("storeClientCopy3: Copying from memory\n");
+	sz = stmemCopy(&mem->data_hdr,
+	    sc->copy_offset, sc->copy_buf, sc->copy_size);
+	storeClientCallback(sc, sz);
+	return;
+    }
+    assert(STORE_DISK_CLIENT == sc->type);
+    assert(!sc->flags.disk_io_pending);
+    debug(20, 3) ("storeClientCopy3: reading from STORE\n");
+    storeClientFileRead(sc);
 }
 
 static void
@@ -293,6 +322,8 @@
 {
     MemObject *mem = sc->entry->mem_obj;
     assert(sc->callback != NULL);
+    assert(!sc->flags.disk_io_pending);
+    sc->flags.disk_io_pending = 1;
     if (mem->swap_hdr_sz == 0) {
 	storeRead(sc->swapin_sio,
 	    sc->copy_buf,
@@ -317,15 +348,13 @@
 {
     store_client *sc = data;
     MemObject *mem = sc->entry->mem_obj;
-    STCB *callback = sc->callback;
     assert(sc->flags.disk_io_pending);
     sc->flags.disk_io_pending = 0;
     assert(sc->callback != NULL);
     debug(20, 3) ("storeClientReadBody: len %d\n", len);
     if (sc->copy_offset == 0 && len > 0 && mem->reply->sline.status == 0)
 	httpReplyParse(mem->reply, sc->copy_buf, headersEnd(sc->copy_buf, len));
-    sc->callback = NULL;
-    callback(sc->callback_data, sc->copy_buf, len);
+    storeClientCallback(sc, len);
 }
 
 static void
@@ -334,7 +363,6 @@
     store_client *sc = data;
     StoreEntry *e = sc->entry;
     MemObject *mem = e->mem_obj;
-    STCB *callback = sc->callback;
     int swap_hdr_sz = 0;
     size_t body_sz;
     size_t copy_sz;
@@ -347,22 +375,19 @@
     debug(20, 3) ("storeClientReadHeader: len %d\n", len);
     if (len < 0) {
 	debug(20, 3) ("storeClientReadHeader: %s\n", xstrerror());
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, len);
+	storeClientCallback(sc, len);
 	return;
     }
     tlv_list = storeSwapMetaUnpack(buf, &swap_hdr_sz);
     if (swap_hdr_sz > len) {
 	/* oops, bad disk file? */
 	debug(20, 1) ("WARNING: swapfile header too small\n");
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, -1);
+	storeClientCallback(sc, -1);
 	return;
     }
     if (tlv_list == NULL) {
-	debug(20, 1) ("WARNING: failed to unpack swapfile meta data\n");
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, -1);
+	debug(20, 1) ("WRNING: failed to unpack meta data\n");
+	storeClientCallback(sc, -1);
 	return;
     }
     /*
@@ -372,8 +397,11 @@
 	switch (t->type) {
 	case STORE_META_KEY:
 	    assert(t->length == MD5_DIGEST_CHARS);
-	    if (memcmp(t->value, e->key, MD5_DIGEST_CHARS))
+	    if (memcmp(t->value, e->key, MD5_DIGEST_CHARS)) {
 		debug(20, 1) ("WARNING: swapin MD5 mismatch\n");
+		debug(20, 1) ("\t%s\n", storeKeyText(t->value));
+		debug(20, 1) ("\t%s\n", storeKeyText(e->key));
+	    }
 	    break;
 	case STORE_META_URL:
 	    if (NULL == mem->url)
@@ -396,8 +424,7 @@
     }
     storeSwapTLVFree(tlv_list);
     if (!swap_object_ok) {
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, -1);
+	storeClientCallback(sc, -1);
 	return;
     }
     mem->swap_hdr_sz = swap_hdr_sz;
@@ -418,8 +445,7 @@
 	if (sc->copy_offset == 0 && len > 0 && mem->reply->sline.status == 0)
 	    httpReplyParse(mem->reply, sc->copy_buf,
 		headersEnd(sc->copy_buf, copy_sz));
-	sc->callback = NULL;
-	callback(sc->callback_data, sc->copy_buf, copy_sz);
+	storeClientCallback(sc, copy_sz);
 	return;
     }
     /*
@@ -447,7 +473,6 @@
     MemObject *mem = e->mem_obj;
     store_client *sc;
     store_client **S;
-    STCB *callback;
     if (mem == NULL)
 	return 0;
     debug(20, 3) ("storeUnregister: called for '%s'\n", storeKeyText(e->key));
@@ -466,25 +491,24 @@
     }
     *S = sc->next;
     mem->nclients--;
-    sc->flags.disk_io_pending = 0;
     if (e->store_status == STORE_OK && e->swap_status != SWAPOUT_DONE)
 	storeSwapOut(e);
     if (sc->swapin_sio) {
 	storeClose(sc->swapin_sio);
+	cbdataUnlock(sc->swapin_sio);
 	sc->swapin_sio = NULL;
     }
-    if ((callback = sc->callback) != NULL) {
+    if (NULL != sc->callback) {
 	/* callback with ssize = -1 to indicate unexpected termination */
 	debug(20, 3) ("storeUnregister: store_client for %s has a callback\n",
 	    mem->url);
-	sc->callback = NULL;
-	if (cbdataValid(sc->callback_data))
-	    callback(sc->callback_data, sc->copy_buf, -1);
+	storeClientCallback(sc, -1);
     }
 #if DELAY_POOLS
     delayUnregisterDelayIdPtr(&sc->delay_id);
 #endif
     cbdataUnlock(sc->callback_data);	/* we're done with it now */
+    /*assert(!sc->flags.disk_io_pending); */
     cbdataFree(sc);
     assert(e->lock_count > 0);
     if (mem->nclients == 0)
@@ -503,8 +527,9 @@
 	nx = sc->next;
 	if (sc->callback_data == NULL)	/* open slot */
 	    continue;
-	if (sc->type != STORE_MEM_CLIENT)
-	    continue;
+	if (sc->type == STORE_DISK_CLIENT)
+	    if (NULL != sc->swapin_sio)
+		continue;
 	if (sc->copy_offset < lowest)
 	    lowest = sc->copy_offset;
     }
@@ -529,6 +554,8 @@
 	    continue;
 	if (sc->callback == NULL)
 	    continue;
+	if (sc->flags.disk_io_pending)
+	    continue;
 	storeClientCopy2(e, sc);
     }
 }
Index: squid/src/store_digest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_digest.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/store_digest.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/store_digest.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,5 +1,5 @@
 /*
- * $Id: store_digest.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: store_digest.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 71    Store Digest Manager
  * AUTHOR: Alex Rousskov
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -221,9 +221,19 @@
 	    Config.digest.rebuild_period);
 	return 0;
     }
-    /* idea: how about also skipping very fresh (thus, potentially unstable) 
-     * entries? Should be configurable through cd_refresh_pattern, of course */
-
+    /*
+     * idea: how about also skipping very fresh (thus, potentially
+     * unstable) entries? Should be configurable through
+     * cd_refresh_pattern, of course.
+     */
+    /*
+     * idea: skip objects that are going to be purged before the next
+     * update.
+     */
+#if !HEAP_REPLACEMENT
+    if ((squid_curtime + Config.digest.rebuild_period) - e->lastref > storeExpiredReferenceAge())
+	return 0;
+#endif
     return 1;
 }
 
Index: squid/src/store_dir.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_dir.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/store_dir.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/store_dir.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: store_dir.c,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -35,6 +35,9 @@
 
 #include "squid.h"
 
+static void storeDirLRUWalkInitHead(SwapDir * sd);
+static void *storeDirLRUWalkNext(SwapDir * sd);
+
 const char *SwapDirType[] =
 {
     "ufs",
@@ -76,7 +79,72 @@
 }
 
 /*
- *Spread load across least 3/4 of the store directories
+ * This new selection scheme simply does round-robin on all SwapDirs.
+ * A SwapDir is skipped if it is over the max_size (100%) limit.  If
+ * all SwapDir's are above the limit, then the first dirn that we
+ * checked is returned.  Note that 'dirn' is guaranteed to advance even
+ * if all SwapDirs are full.
+ * 
+ * XXX This function does NOT account for the read_only flag!
+ */
+static int
+storeDirSelectSwapDir(void)
+{
+    static int dirn = 0;
+    int i;
+    SwapDir *sd;
+    /*
+     * yes, the '<=' is intentional.  If all dirs are full we want to
+     * make sure 'dirn' advances every time this gets called, otherwise
+     * we get stuck on one dir.
+     */
+    for (i = 0; i <= Config.cacheSwap.n_configured; i++) {
+	if (++dirn >= Config.cacheSwap.n_configured)
+	    dirn = 0;
+	sd = &Config.cacheSwap.swapDirs[dirn];
+	if (sd->cur_size > sd->max_size)
+	    continue;
+	return dirn;
+    }
+    return dirn;
+}
+
+#if USE_DISKD && EXPERIMENTAL
+/*
+ * This fileno selection function returns a fileno on the least
+ * busy SwapDir.  Ties are broken by selecting the SwapDir with
+ * the most free space.
+ */
+static int
+storeDirSelectSwapDir(void)
+{
+    SwapDir *SD;
+    int min_away = 10000;
+    int min_size = 1 << 30;
+    int dirn = 0;
+    int i;
+    for (i = 0; i < Config.cacheSwap.n_configured; i++) {
+	SD = &Config.cacheSwap.swapDirs[i];
+	if (SD->cur_size > SD->max_size)
+	    continue;
+	if (SD->u.diskd.away > min_away)
+	    continue;
+	if (SD->cur_size > min_size)
+	    continue;
+	if (SD->flags.read_only)
+	    continue;
+	min_away = SD->u.diskd.away;
+	min_size = SD->cur_size;
+	dirn = i;
+    }
+    return dirn;
+}
+#endif
+
+#if OLD
+/*
+ * This is Stew Forster's selection algorithm.
+ * Spread load across least 3/4 of the store directories
  */
 static int
 storeDirSelectSwapDir(void)
@@ -165,6 +233,7 @@
     dirq[0] = -1;
     return dirn;
 }
+#endif
 
 int
 storeDirValidFileno(int fn, int flag)
@@ -321,6 +390,8 @@
 	Config.Swap.maxSize += SD->max_size;
 	if (NULL == SD->map)
 	    SD->map = file_map_create();
+	SD->low_size = (int) (((float) SD->max_size *
+		(float) Config.Swap.lowWaterMark) / 100.0);
     }
 }
 
@@ -372,11 +443,10 @@
     double dt;
     SwapDir *sd;
     int dirn;
-    int N = Config.cacheSwap.n_configured;
 #if HEAP_REPLACEMENT
     int node;
 #else
-    dlink_node *m;
+    int j;
 #endif
     if (store_dirs_rebuilding) {
 	debug(20, 1) ("Not currently OK to rewrite swap log.\n");
@@ -392,20 +462,15 @@
 	    debug(20, 1) ("log.clean.open() failed for dir #%d\n", sd->index);
 	    continue;
 	}
+#if !HEAP_REPLACEMENT
+	storeDirLRUWalkInitHead(sd);
+#endif
     }
 #if HEAP_REPLACEMENT
     if (NULL == store_heap)
 	return 0;
-    for (node = 0; node < heap_nodes(store_heap); node++)
-#else
-    for (m = store_list.tail; m; m = m->prev)
-#endif
-    {
-#if HEAP_REPLACEMENT
+    for (node = 0; node < heap_nodes(store_heap); node++) {
 	e = (StoreEntry *) heap_peep(store_heap, node);
-#else
-	e = m->data;
-#endif
 	if (e->swap_file_number < 0)
 	    continue;
 	if (e->swap_status != SWAPOUT_DONE)
@@ -435,6 +500,39 @@
 	    continue;
 	sd->log.clean.write(NULL, sd);
     }
+#else
+    do {
+	j = 0;
+	for (dirn = 0; dirn < Config.cacheSwap.n_configured; dirn++) {
+	    sd = &Config.cacheSwap.swapDirs[dirn];
+	    if (NULL == sd->log.clean.write)
+		continue;
+	    e = storeDirLRUWalkNext(sd);
+	    if (NULL == e) {
+		sd->log.clean.write(NULL, sd);
+		continue;
+	    }
+	    j++;
+	    if (e->swap_file_number < 0)
+		continue;
+	    if (e->swap_status != SWAPOUT_DONE)
+		continue;
+	    if (e->swap_file_sz <= 0)
+		continue;
+	    if (EBIT_TEST(e->flags, RELEASE_REQUEST))
+		continue;
+	    if (EBIT_TEST(e->flags, KEY_PRIVATE))
+		continue;
+	    if (EBIT_TEST(e->flags, ENTRY_SPECIAL))
+		continue;
+	    sd->log.clean.write(e, sd);
+	    if ((++n & 0xFFFF) == 0) {
+		getCurrentTime();
+		debug(20, 1) ("  %7d entries written so far.\n", n);
+	    }
+	}
+    } while (j > 0);
+#endif
     if (reopen)
 	storeDirOpenSwapLogs();
     getCurrentTime();
@@ -445,3 +543,40 @@
     return n;
 }
 #undef CLEAN_BUF_SZ
+
+void
+storeDirLRUDelete(StoreEntry * e)
+{
+    SwapDir *sd;
+    if (e->swap_file_number < 0)
+	return;
+    sd = &Config.cacheSwap.swapDirs[e->swap_file_number >> SWAP_DIR_SHIFT];
+    dlinkDelete(&e->lru, &sd->lru_list);
+}
+
+void
+storeDirLRUAdd(StoreEntry * e)
+{
+    SwapDir *sd;
+    if (e->swap_file_number < 0)
+	return;
+    sd = &Config.cacheSwap.swapDirs[e->swap_file_number >> SWAP_DIR_SHIFT];
+    dlinkAdd(e, &e->lru, &sd->lru_list);
+}
+
+static void
+storeDirLRUWalkInitHead(SwapDir * sd)
+{
+    sd->lru_walker = sd->lru_list.head;
+}
+
+static void *
+storeDirLRUWalkNext(SwapDir * sd)
+{
+    void *p;
+    if (NULL == sd->lru_walker)
+	return NULL;
+    p = sd->lru_walker->data;
+    sd->lru_walker = sd->lru_walker->next;
+    return p;
+}
Index: squid/src/store_dir_ufs.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_dir_ufs.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.12.1
diff -u -r1.1.1.1 -r1.1.1.1.12.1
--- squid/src/store_dir_ufs.c	26 Jan 2000 03:25:01 -0000	1.1.1.1
+++ squid/src/store_dir_ufs.c	17 Apr 2000 00:13:10 -0000	1.1.1.1.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_ufs.c,v 1.1.1.1 2000/01/26 03:25:01 hno Exp $
+ * $Id: store_dir_ufs.c,v 1.1.1.1.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -93,7 +93,6 @@
 static void storeUfsDirCloseTmpSwapLog(SwapDir * sd);
 static FILE *storeUfsDirOpenTmpSwapLog(SwapDir *, int *, int *);
 static STLOGOPEN storeUfsDirOpenSwapLog;
-static STINIT storeUfsDirInit;
 static STLOGCLEANOPEN storeUfsDirWriteCleanOpen;
 static void storeUfsDirWriteCleanClose(SwapDir * sd);
 static STLOGCLEANWRITE storeUfsDirWriteCleanEntry;
@@ -245,7 +244,7 @@
 	safe_free(ufs_dir_index);
 }
 
-static void
+void
 storeUfsDirInit(SwapDir * sd)
 {
     static int started_clean_event = 0;
@@ -280,6 +279,8 @@
     tlv *tlv_list;
     tlv *t;
     assert(rb != NULL);
+    if (opt_foreground_rebuild)
+	getCurrentTime();
     debug(20, 3) ("storeRebuildFromDirectory: DIR #%d\n", rb->sd->index);
     for (count = 0; count < rb->speed; count++) {
 	assert(fd == -1);
@@ -305,8 +306,8 @@
 	    fd = -1;
 	    continue;
 	}
-	if ((++rb->counts.scancount & 0xFFFF) == 0)
-	    debug(20, 3) ("  %s %7d files opened so far.\n",
+	if ((++rb->counts.scancount & 0x3FFF) == 0)
+	    debug(20, 1) ("  %s %7d files opened so far.\n",
 		rb->sd->path, rb->counts.scancount);
 	debug(20, 9) ("file_in: fd=%d %08X\n", fd, sfileno);
 	Counter.syscalls.disk.reads++;
@@ -398,7 +399,7 @@
 	    tmpe.flags,		/* flags */
 	    (int) rb->flags.clean);
     }
-    eventAdd("storeRebuild", storeRebuildFromDirectory, rb, 0.0, 1);
+    eventAdd("storeRebuild", storeRebuildFromDirectory, rb, 0.0, 0);
 }
 
 static void
@@ -449,10 +450,7 @@
 		 */
 		storeExpireNow(e);
 		storeReleaseRequest(e);
-		if (e->swap_file_number > -1) {
-		    storeDirMapBitReset(e->swap_file_number);
-		    e->swap_file_number = -1;
-		}
+		storeSwapFileNumberSet(e, -1);
 		rb->counts.objcount--;
 		rb->counts.cancelcount++;
 	    }
@@ -465,8 +463,8 @@
 	    rb->counts.invalid++;
 	    continue;
 	}
-	if ((++rb->counts.scancount & 0xFFFF) == 0)
-	    debug(20, 3) ("  %7d %s Entries read so far.\n",
+	if ((++rb->counts.scancount & 0x3FFF) == 0)
+	    debug(20, 1) ("  %7d %s Entries read so far.\n",
 		rb->counts.scancount, rb->sd->path);
 	if (!storeDirValidFileno(s.swap_file_number, 0)) {
 	    rb->counts.invalid++;
@@ -533,10 +531,7 @@
 	    /* junk old, load new */
 	    storeExpireNow(e);
 	    storeReleaseRequest(e);
-	    if (e->swap_file_number > -1) {
-		storeDirMapBitReset(e->swap_file_number);
-		e->swap_file_number = -1;
-	    }
+	    storeSwapFileNumberSet(e, -1);
 	    rb->counts.dupcount++;
 	} else {
 	    /* URL doesnt exist, swapfile not in use */
@@ -557,7 +552,7 @@
 	    (int) rb->flags.clean);
 	storeDirSwapLog(e, SWAP_LOG_ADD);
     }
-    eventAdd("storeRebuild", storeRebuildFromSwapLog, rb, 0.0, 1);
+    eventAdd("storeRebuild", storeRebuildFromSwapLog, rb, 0.0, 0);
 }
 
 static int
@@ -668,7 +663,7 @@
     e->store_status = STORE_OK;
     storeSetMemStatus(e, NOT_IN_MEMORY);
     e->swap_status = SWAPOUT_DONE;
-    e->swap_file_number = file_number;
+    storeSwapFileNumberSet(e, file_number);
     e->swap_file_sz = swap_file_sz;
     e->lock_count = 0;
 #if !HEAP_REPLACEMENT
@@ -685,7 +680,6 @@
     EBIT_CLR(e->flags, KEY_PRIVATE);
     e->ping_status = PING_NONE;
     EBIT_CLR(e->flags, ENTRY_VALIDATED);
-    storeDirMapBitSet(e->swap_file_number);
     storeHashInsert(e, key);	/* do it after we clear KEY_PRIVATE */
     return e;
 }
@@ -722,7 +716,7 @@
 	sd->path, clean ? "CLEAN" : "DIRTY");
     store_dirs_rebuilding++;
     cbdataAdd(rb, cbdataXfree, 0);
-    eventAdd("storeRebuild", func, rb, 0.0, 1);
+    eventAdd("storeRebuild", func, rb, 0.0, 0);
 }
 
 static void
@@ -786,6 +780,7 @@
 	debug(50, 0) ("%s: %s\n", swaplog_path, xstrerror());
 	fatal("Failed to open swap log for reading");
     }
+    commSetCloseOnExec(fileno(fp));
     memset(&clean_sb, '\0', sizeof(struct stat));
     if (stat(clean_path, &clean_sb) < 0)
 	*clean_flag = 0;
@@ -881,8 +876,9 @@
 	    safe_free(state);
 	    sd->log.clean.state = NULL;
 	    sd->log.clean.write = NULL;
+	} else {
+	    state->outbuf_offset = 0;
 	}
-	state->outbuf_offset = 0;
     }
 }
 
@@ -1097,6 +1093,10 @@
 	return 1;
     if (sd->type == SWAPDIR_ASYNCUFS)
 	return 1;
+#if USE_DISKD
+    if (sd->type == SWAPDIR_DISKD)
+	return 1;
+#endif
     return 0;
 }
 
@@ -1142,12 +1142,15 @@
 	storeAppendPrintf(sentry, "First level subdirectories: %d\n", SD->u.ufs.l1);
 	storeAppendPrintf(sentry, "Second level subdirectories: %d\n", SD->u.ufs.l2);
 	storeAppendPrintf(sentry, "Maximum Size: %d KB\n", SD->max_size);
+	storeAppendPrintf(sentry, "LoWater Size: %d KB\n", SD->low_size);
 	storeAppendPrintf(sentry, "Current Size: %d KB\n", SD->cur_size);
 	storeAppendPrintf(sentry, "Percent Used: %0.2f%%\n",
 	    100.0 * SD->cur_size / SD->max_size);
 	storeAppendPrintf(sentry, "Filemap bits in use: %d of %d (%d%%)\n",
 	    SD->map->n_files_in_map, SD->map->max_n_files,
 	    percent(SD->map->n_files_in_map, SD->map->max_n_files));
+	storeAppendPrintf(sentry, "Removals: %d\n", SD->removals);
+	storeAppendPrintf(sentry, " Scanned: %d\n", SD->scanned);
 #if HAVE_STATVFS
 #define fsbtoblk(num, fsbs, bs) \
         (((fsbs) != 0 && (fsbs) < (bs)) ? \
@@ -1313,6 +1316,78 @@
 }
 #endif
 
+#if USE_DISKD
+void
+storeDiskdDirParse(cacheSwap * swap)
+{
+    char *token;
+    char *path;
+    int i;
+    int size;
+    int l1;
+    int l2;
+    unsigned int read_only = 0;
+    SwapDir *sd = NULL;
+    if ((path = strtok(NULL, w_space)) == NULL)
+	self_destruct();
+    i = GetInteger();
+    size = i << 10;		/* Mbytes to kbytes */
+    if (size <= 0)
+	fatal("storeUfsDirParse: invalid size value");
+    i = GetInteger();
+    l1 = i;
+    if (l1 <= 0)
+	fatal("storeUfsDirParse: invalid level 1 directories value");
+    i = GetInteger();
+    l2 = i;
+    if (l2 <= 0)
+	fatal("storeUfsDirParse: invalid level 2 directories value");
+    if ((token = strtok(NULL, w_space)))
+	if (!strcasecmp(token, "read-only"))
+	    read_only = 1;
+    for (i = 0; i < swap->n_configured; i++) {
+	sd = swap->swapDirs + i;
+	if (!strcmp(path, sd->path)) {
+	    /* just reconfigure it */
+	    if (size == sd->max_size)
+		debug(3, 1) ("Cache dir '%s' size remains unchanged at %d KB\n",
+		    path, size);
+	    else
+		debug(3, 1) ("Cache dir '%s' size changed to %d KB\n",
+		    path, size);
+	    sd->max_size = size;
+	    if (sd->flags.read_only != read_only)
+		debug(3, 1) ("Cache dir '%s' now %s\n",
+		    path, read_only ? "Read-Only" : "Read-Write");
+	    sd->flags.read_only = read_only;
+	    return;
+	}
+    }
+    allocate_new_swapdir(swap);
+    sd = swap->swapDirs + swap->n_configured;
+    sd->type = SWAPDIR_DISKD;
+    sd->index = swap->n_configured;
+    sd->path = xstrdup(path);
+    sd->max_size = size;
+    sd->u.ufs.l1 = l1;
+    sd->u.ufs.l2 = l2;
+    sd->u.ufs.swaplog_fd = -1;
+    sd->flags.read_only = read_only;
+    sd->init = storeDiskdInit;
+    sd->newfs = storeUfsDirNewfs;
+    sd->obj.open = storeDiskdOpen;
+    sd->obj.close = storeDiskdClose;
+    sd->obj.read = storeDiskdRead;
+    sd->obj.write = storeDiskdWrite;
+    sd->obj.unlink = storeDiskdUnlink;
+    sd->log.open = storeUfsDirOpenSwapLog;
+    sd->log.close = storeUfsDirCloseSwapLog;
+    sd->log.write = storeUfsDirSwapLog;
+    sd->log.clean.open = storeUfsDirWriteCleanOpen;
+    swap->n_configured++;
+}
+#endif
+
 void
 storeUfsDirDump(StoreEntry * entry, const char *name, SwapDir * s)
 {
Index: squid/src/store_heap_replacement.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_heap_replacement.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.10.1
diff -u -r1.1.1.1 -r1.1.1.1.10.1
--- squid/src/store_heap_replacement.c	26 Jan 2000 03:25:01 -0000	1.1.1.1
+++ squid/src/store_heap_replacement.c	17 Apr 2000 00:13:10 -0000	1.1.1.1.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_heap_replacement.c,v 1.1.1.1 2000/01/26 03:25:01 hno Exp $
+ * $Id: store_heap_replacement.c,v 1.1.1.1.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Heap-based replacement
  * AUTHOR: John Dilley
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/store_io_asyncufs.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_io_asyncufs.c,v
retrieving revision 1.1.1.1.4.1
retrieving revision 1.1.1.1.4.1.2.1
diff -u -r1.1.1.1.4.1 -r1.1.1.1.4.1.2.1
--- squid/src/store_io_asyncufs.c	4 Feb 2000 19:39:41 -0000	1.1.1.1.4.1
+++ squid/src/store_io_asyncufs.c	17 Apr 2000 00:13:10 -0000	1.1.1.1.4.1.2.1
@@ -44,8 +44,6 @@
      * we should detect some 'too many files open' condition and return
      * NULL here.
      */
-    while (aioQueueSize() > MAGIC1)
-	return NULL;
     sio = memAllocate(MEM_STORE_IO);
     cbdataAdd(sio, memFree, MEM_STORE_IO);
     sio->type.aufs.fd = -1;
@@ -72,7 +70,7 @@
 	sio->type.aufs.flags.close_request = 1;
 	return;
     }
-    storeAufsIOCallback(sio, 0);
+    storeAufsIOCallback(sio, DISK_OK);
 }
 
 void
@@ -195,7 +193,7 @@
 	errno = errflag;
 	debug(78, 0) ("storeAufsOpenDone: %s\n", xstrerror());
 	debug(78, 1) ("\t%s\n", storeUfsFullPath(sio->swap_file_number, NULL));
-	storeAufsIOCallback(sio, errflag);
+	storeAufsIOCallback(sio, DISK_ERROR);
 	return;
     }
     sio->type.aufs.fd = fd;
@@ -251,7 +249,7 @@
     sio->type.aufs.flags.writing = 0;
     if (errflag) {
 	debug(78, 3) ("storeAufsWriteDone: got failure (%d)\n", errflag);
-	storeAufsIOCallback(sio, errflag);
+	storeAufsIOCallback(sio, DISK_ERROR);
 	loop_detect--;
 	return;
     }
@@ -259,7 +257,7 @@
     if (storeAufsKickWriteQueue(sio))
 	(void) 0;
     else if (sio->type.aufs.flags.close_request)
-	storeAufsIOCallback(sio, errflag);
+	storeAufsIOCallback(sio, DISK_OK);
     loop_detect--;
 }
 
@@ -272,21 +270,17 @@
     debug(78, 3) ("storeAufsIOCallback: errflag=%d\n", errflag);
     sio->callback = NULL;
     sio->callback_data = NULL;
-    debug(78, 3) ("%s:%d\n", __FILE__, __LINE__);
     if (callback)
 	if (NULL == their_data || cbdataValid(their_data))
 	    callback(their_data, errflag, sio);
-    debug(78, 3) ("%s:%d\n", __FILE__, __LINE__);
     cbdataUnlock(their_data);
     sio->type.aufs.fd = -1;
     cbdataFree(sio);
     if (fd < 0)
 	return;
-    debug(78, 3) ("%s:%d\n", __FILE__, __LINE__);
     aioClose(fd);
     fd_close(fd);
     store_open_disk_fd--;
-    debug(78, 3) ("%s:%d\n", __FILE__, __LINE__);
 }
 
 
Index: squid/src/store_io_ufs.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/Attic/store_io_ufs.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.12.1
diff -u -r1.1.1.1 -r1.1.1.1.12.1
--- squid/src/store_io_ufs.c	26 Jan 2000 03:25:01 -0000	1.1.1.1
+++ squid/src/store_io_ufs.c	17 Apr 2000 00:13:10 -0000	1.1.1.1.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_ufs.c,v 1.1.1.1 2000/01/26 03:25:01 hno Exp $
+ * $Id: store_io_ufs.c,v 1.1.1.1.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 79    Storage Manager UFS Interface
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/store_key_md5.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_key_md5.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/store_key_md5.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/store_key_md5.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_key_md5.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: store_key_md5.c,v 1.1.1.3.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 20    Storage Manager MD5 Cache Keys
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/store_log.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_log.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.12.1
diff -u -r1.1.1.2 -r1.1.1.2.12.1
--- squid/src/store_log.c	26 Jan 2000 03:25:01 -0000	1.1.1.2
+++ squid/src/store_log.c	17 Apr 2000 00:13:10 -0000	1.1.1.2.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_log.c,v 1.1.1.2 2000/01/26 03:25:01 hno Exp $
+ * $Id: store_log.c,v 1.1.1.2.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Logging Functions
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -43,15 +43,14 @@
     "RELEASE"
 };
 
-static int storelog_fd = -1;
+static Logfile *storelog = NULL;
 
 void
 storeLog(int tag, const StoreEntry * e)
 {
-    MemBuf mb;
     MemObject *mem = e->mem_obj;
     HttpReply *reply;
-    if (storelog_fd < 0)
+    if (NULL == storelog)
 	return;
     if (mem == NULL)
 	return;
@@ -62,9 +61,8 @@
 	storeMemObjectDump(mem);
 	mem->log_url = xstrdup(mem->url);
     }
-    memBufDefInit(&mb);
     reply = mem->reply;
-    memBufPrintf(&mb, "%9d.%03d %-7s %08X %4d %9d %9d %9d %s %d/%d %s %s\n",
+    logfilePrintf(storelog, "%9d.%03d %-7s %08X %4d %9d %9d %9d %s %d/%d %s %s\n",
 	(int) current_time.tv_sec,
 	(int) current_time.tv_usec / 1000,
 	storeLogTags[tag],
@@ -78,69 +76,31 @@
 	(int) (mem->inmem_hi - mem->reply->hdr_sz),
 	RequestMethodStr[mem->method],
 	mem->log_url);
-    file_write_mbuf(storelog_fd, -1, mb, NULL, NULL);
 }
 
 void
 storeLogRotate(void)
 {
-    char *fname = NULL;
-    int i;
-    LOCAL_ARRAY(char, from, MAXPATHLEN);
-    LOCAL_ARRAY(char, to, MAXPATHLEN);
-#ifdef S_ISREG
-    struct stat sb;
-#endif
-
-    if (storelog_fd > -1) {
-	file_close(storelog_fd);
-	storelog_fd = -1;
-    }
-    if ((fname = Config.Log.store) == NULL)
-	return;
-    if (strcmp(fname, "none") == 0)
+    if (NULL == storelog)
 	return;
-#ifdef S_ISREG
-    if (stat(fname, &sb) == 0)
-	if (S_ISREG(sb.st_mode) == 0)
-	    return;
-#endif
-
-    debug(20, 1) ("storeLogRotate: Rotating.\n");
-
-    /* Rotate numbers 0 through N up one */
-    for (i = Config.Log.rotateNumber; i > 1;) {
-	i--;
-	snprintf(from, MAXPATHLEN, "%s.%d", fname, i - 1);
-	snprintf(to, MAXPATHLEN, "%s.%d", fname, i);
-	xrename(from, to);
-    }
-    /* Rotate the current log to .0 */
-    if (Config.Log.rotateNumber > 0) {
-	snprintf(to, MAXPATHLEN, "%s.%d", fname, 0);
-	xrename(fname, to);
-    }
-    storelog_fd = file_open(fname, O_WRONLY | O_CREAT);
-    if (storelog_fd < 0) {
-	debug(50, 0) ("storeLogRotate: %s: %s\n", fname, xstrerror());
-	debug(20, 1) ("Store logging disabled\n");
-    }
+    logfileRotate(storelog);
 }
 
 void
 storeLogClose(void)
 {
-    if (storelog_fd >= 0)
-	file_close(storelog_fd);
+    if (NULL == storelog)
+	return;
+    logfileClose(storelog);
+    storelog = NULL;
 }
 
 void
 storeLogOpen(void)
 {
-    if (strcmp(Config.Log.store, "none") == 0)
-	storelog_fd = -1;
-    else
-	storelog_fd = file_open(Config.Log.store, O_WRONLY | O_CREAT);
-    if (storelog_fd < 0)
+    if (strcmp(Config.Log.store, "none") == 0) {
 	debug(20, 1) ("Store logging disabled\n");
+	return;
+    }
+    storelog = logfileOpen(Config.Log.store, 0);
 }
Index: squid/src/store_rebuild.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_rebuild.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/store_rebuild.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/store_rebuild.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_rebuild.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: store_rebuild.c,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 20    Store Rebuild Routines
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -83,7 +83,7 @@
     hash_link *link_ptr = NULL;
     hash_link *link_next = NULL;
     validnum_start = validnum;
-    while (validnum - validnum_start < 50) {
+    while (validnum - validnum_start < 500) {
 	if (++bucketnum >= store_hash_buckets) {
 	    debug(20, 1) ("  Completed Validation Procedure\n");
 	    debug(20, 1) ("  Validated %d Entries\n", validnum);
Index: squid/src/store_swapin.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_swapin.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/store_swapin.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/store_swapin.c	17 Apr 2000 00:13:10 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapin.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: store_swapin.c,v 1.1.1.3.12.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Swapin Functions
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/store_swapmeta.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_swapmeta.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.10.1
diff -u -r1.1.1.2 -r1.1.1.2.10.1
--- squid/src/store_swapmeta.c	26 Jan 2000 03:25:01 -0000	1.1.1.2
+++ squid/src/store_swapmeta.c	17 Apr 2000 00:13:10 -0000	1.1.1.2.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapmeta.c,v 1.1.1.2 2000/01/26 03:25:01 hno Exp $
+ * $Id: store_swapmeta.c,v 1.1.1.2.10.1 2000/04/17 00:13:10 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Swapfile Metadata
  * AUTHOR: Kostas Anagnostakis
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -64,11 +64,10 @@
 tlv *
 storeSwapMetaBuild(StoreEntry * e)
 {
-    MemObject *mem = e->mem_obj;
     tlv *TLV = NULL;		/* we'll return this */
     tlv **T = &TLV;
     const char *url;
-    assert(mem != NULL);
+    assert(e->mem_obj != NULL);
     assert(e->swap_status == SWAPOUT_WRITING);
     url = storeUrl(e);
     debug(20, 3) ("storeSwapMetaBuild: %s\n", url);
Index: squid/src/store_swapout.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/store_swapout.c,v
retrieving revision 1.1.1.3.4.1
retrieving revision 1.1.1.3.4.1.2.1
diff -u -r1.1.1.3.4.1 -r1.1.1.3.4.1.2.1
--- squid/src/store_swapout.c	4 Feb 2000 19:39:41 -0000	1.1.1.3.4.1
+++ squid/src/store_swapout.c	17 Apr 2000 00:13:11 -0000	1.1.1.3.4.1.2.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_swapout.c,v 1.1.1.3.4.1 2000/02/04 19:39:41 hno Exp $
+ * $Id: store_swapout.c,v 1.1.1.3.4.1.2.1 2000/04/17 00:13:11 hno Exp $
  *
  * DEBUG: section 20    Storage Manager Swapout Functions
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -50,7 +50,7 @@
     char *buf;
     assert(mem);
     storeLockObject(e);
-    e->swap_file_number = storeDirMapAllocate();
+    storeSwapFileNumberSet(e, storeDirMapAllocate());
     c = xcalloc(1, sizeof(*c));
     c->data = e;
     cbdataAdd(c, cbdataXfree, 0);
@@ -58,8 +58,7 @@
 	O_WRONLY, storeSwapOutFileClosed, c);
     if (NULL == mem->swapout.sio) {
 	e->swap_status = SWAPOUT_NONE;
-	storeDirMapBitReset(e->swap_file_number);
-	e->swap_file_number = -1;
+	storeSwapFileNumberSet(e, -1);
 	cbdataFree(c);
 	storeUnlockObject(e);
 	return;
@@ -109,7 +108,10 @@
     lowest_offset = storeLowestMemReaderOffset(e);
     debug(20, 7) ("storeSwapOut: lowest_offset = %d\n",
 	(int) lowest_offset);
-    new_mem_lo = lowest_offset;
+    if (mem->inmem_hi - lowest_offset > DISK_PAGE_SIZE)
+        new_mem_lo = lowest_offset;
+    else
+        new_mem_lo = mem->inmem_lo;
     assert(new_mem_lo >= mem->inmem_lo);
     if (storeSwapOutAble(e)) {
 	/*
@@ -120,11 +122,11 @@
 	 */
 	if ((on_disk = storeSwapOutObjectBytesOnDisk(mem)) < new_mem_lo)
 	    new_mem_lo = on_disk;
-    } else {
+    } else if (new_mem_lo > 0) {
 	/*
-	 * Its not swap-able, so we must make it PRIVATE.  Even if
-	 * be only one MEM client and all others must read from
-	 * disk.
+	 * Its not swap-able, and we're about to delete a chunk,
+	 * so we must make it PRIVATE.  This is tricky/ugly because
+	 * for the most part, we treat swapable == cachable here.
 	 */
 	storeReleaseRequest(e);
     }
@@ -176,8 +178,7 @@
 	if (swap_buf_len < 0) {
 	    debug(20, 1) ("stmemCopy returned %d for '%s'\n", swap_buf_len, storeKeyText(e->key));
 	    storeUnlink(e->swap_file_number);
-	    storeDirMapBitReset(e->swap_file_number);
-	    e->swap_file_number = -1;
+	    storeSwapFileNumberSet(e, -1);
 	    e->swap_status = SWAPOUT_NONE;
 	    memFree(swap_buf, MEM_DISK_BUF);
 	    storeReleaseRequest(e);
@@ -233,21 +234,22 @@
     assert(e->swap_status == SWAPOUT_WRITING);
     cbdataFree(c);
     if (errflag) {
-	debug(20, 3) ("storeSwapOutFileClosed: swapfile %08X, errflag=%d\n\t%s\n",
-	    e->swap_file_number, errflag, xstrerror());
+	sfileno bad = e->swap_file_number;
+	debug(20, 1) ("storeSwapOutFileClosed: swapfile %08X, errflag=%d\n\t%s\n",
+	    bad, errflag, xstrerror());
+	storeSwapFileNumberSet(e, -1);
 	/*
-	 * yuck.  don't clear the filemap bit for some errors so that
+	 * yuck.  re-set the filemap bit for some errors so that
 	 * we don't try re-using it over and over
 	 */
-	if (errno != EPERM)
-	    storeDirMapBitReset(e->swap_file_number);
+	if (errno == EPERM)
+	    storeDirMapBitSet(bad);
 	if (errflag == DISK_NO_SPACE_LEFT) {
-	    storeDirDiskFull(e->swap_file_number);
+	    storeDirDiskFull(bad);
 	    storeDirConfigure();
 	    storeConfigure();
 	}
 	storeReleaseRequest(e);
-	e->swap_file_number = -1;
 	e->swap_status = SWAPOUT_NONE;
     } else {
 	/* swapping complete */
Index: squid/src/structs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/structs.h,v
retrieving revision 1.1.1.3.4.1.2.3
retrieving revision 1.1.1.3.4.1.2.4
diff -u -r1.1.1.3.4.1.2.3 -r1.1.1.3.4.1.2.4
--- squid/src/structs.h	15 Apr 2000 11:54:27 -0000	1.1.1.3.4.1.2.3
+++ squid/src/structs.h	17 Apr 2000 00:13:11 -0000	1.1.1.3.4.1.2.4
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.1.1.3.4.1.2.3 2000/04/15 11:54:27 asd Exp $
+ * $Id: structs.h,v 1.1.1.3.4.1.2.4 2000/04/17 00:13:11 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -394,7 +394,6 @@
     } Netdb;
     struct {
 	int log_udp;
-	int enable_purge;
 #if USE_DNSSERVER
 	int res_defnames;
 #endif
@@ -506,6 +505,12 @@
 	int rebuild_chunk_percentage;
     } digest;
 #endif
+#if USE_DISKD
+    struct {
+	int magic1;
+	int magic2;
+    } diskd;
+#endif
 };
 
 struct _SquidConfig2 {
@@ -513,6 +518,9 @@
 	char *prefix;
 	int on;
     } Accel;
+    struct {
+	int enable_purge;
+    } onoff;
 };
 
 struct _close_handler {
@@ -1305,6 +1313,9 @@
     int id;
     ssize_t object_sz;
     size_t swap_hdr_sz;
+#if URL_CHECKSUM_DEBUG
+    unsigned int chksum;
+#endif
 };
 
 struct _StoreEntry {
@@ -1336,10 +1347,13 @@
     swapdir_t type;
     fileMap *map;
     int cur_size;
+    int low_size;
     int max_size;
     char *path;
     int index;			/* This entry's index into the swapDirs array */
-    int suggest;
+    sfileno suggest;
+    int removals;
+    int scanned;
     struct {
 	unsigned int selected:1;
 	unsigned int read_only:1;
@@ -1363,12 +1377,32 @@
 	    void *state;
 	} clean;
     } log;
+#if !HEAP_REPLACEMENT
+    dlink_list lru_list;
+    dlink_node *lru_walker;
+#endif
     union {
 	struct {
 	    int l1;
 	    int l2;
 	    int swaplog_fd;
 	} ufs;
+#if USE_DISKD
+	struct {
+	    int l1;
+	    int l2;
+	    int swaplog_fd;
+	    int smsgid;
+	    int rmsgid;
+	    int wfd;
+	    int away;
+	    struct {
+		char *buf;
+		link_list *stack;
+		int id;
+	    } shm;
+	} diskd;
+#endif
     } u;
 };
 
@@ -1434,6 +1468,16 @@
 	    link_list *pending_writes;
 	    link_list *pending_reads;
 	} aufs;
+#if USE_DISKD
+	struct {
+	    int id;
+	    struct {
+		unsigned int reading:1;
+		unsigned int writing:1;
+	    } flags;
+	    char *read_buf;
+	} diskd;
+#endif
     } type;
 };
 
@@ -1552,6 +1596,8 @@
 	int clients;
 	int requests;
 	int hits;
+	int mem_hits;
+	int disk_hits;
 	int errors;
 	kb_t kbytes_in;
 	kb_t kbytes_out;
@@ -1847,3 +1893,11 @@
     int bad_log_op;
     int zero_object_sz;
 };
+
+struct _Logfile {
+    int fd;
+    char path[MAXPATHLEN];
+    char *buf;
+    size_t bufsz;
+    off_t offset;
+};
Index: squid/src/test_cache_digest.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/test_cache_digest.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.14.1
diff -u -r1.1.1.1 -r1.1.1.1.14.1
--- squid/src/test_cache_digest.c	26 Jan 2000 03:21:47 -0000	1.1.1.1
+++ squid/src/test_cache_digest.c	17 Apr 2000 00:13:11 -0000	1.1.1.1.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: test_cache_digest.c,v 1.1.1.1 2000/01/26 03:21:47 hno Exp $
+ * $Id: test_cache_digest.c,v 1.1.1.1.14.1 2000/04/17 00:13:11 hno Exp $
  *
  * AUTHOR: Alex Rousskov
  *
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/tools.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/tools.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/tools.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/tools.c	17 Apr 2000 00:13:11 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: tools.c,v 1.1.1.3.10.1 2000/04/17 00:13:11 hno Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -876,7 +876,6 @@
     return p;
 }
 
-
 /*
  * Same as rename(2) but complains if something goes wrong;
  * the caller is responsible for handing and explaining the 
Index: squid/src/typedefs.h
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/typedefs.h,v
retrieving revision 1.1.1.3.12.1
retrieving revision 1.1.1.3.12.2
diff -u -r1.1.1.3.12.1 -r1.1.1.3.12.2
--- squid/src/typedefs.h	14 Apr 2000 23:09:53 -0000	1.1.1.3.12.1
+++ squid/src/typedefs.h	17 Apr 2000 00:13:11 -0000	1.1.1.3.12.2
@@ -1,6 +1,6 @@
 
 /*
- * $Id: typedefs.h,v 1.1.1.3.12.1 2000/04/14 23:09:53 hno Exp $
+ * $Id: typedefs.h,v 1.1.1.3.12.2 2000/04/17 00:13:11 hno Exp $
  *
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -10,10 +10,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -31,6 +31,9 @@
  *
  */
 
+#ifndef _TYPEDEFS_H_
+#define _TYPEDEFS_H_
+
 typedef unsigned int store_status_t;
 typedef unsigned int mem_status_t;
 typedef unsigned int ping_status_t;
@@ -165,6 +168,7 @@
 typedef struct _generic_cbdata generic_cbdata;
 typedef struct _storeIOState storeIOState;
 typedef struct _link_list link_list;
+typedef struct _Logfile Logfile;
 
 #if SQUID_SNMP
 typedef variable_list *(oid_ParseFn) (variable_list *, snint *);
@@ -266,3 +270,5 @@
 #if USE_HTCP
 typedef struct _htcpReplyData htcpReplyData;
 #endif
+
+#endif /* _TYPEDEFS_H_ */
Index: squid/src/unlinkd.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/unlinkd.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/unlinkd.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/unlinkd.c	17 Apr 2000 00:13:11 -0000	1.1.1.3.12.1
@@ -1,5 +1,5 @@
 /*
- * $Id: unlinkd.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: unlinkd.c,v 1.1.1.3.12.1 2000/04/17 00:13:11 hno Exp $
  *
  * DEBUG: section 12    Unlink Daemon
  * AUTHOR: Duane Wessels
@@ -11,10 +11,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/url.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/url.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.12.1
diff -u -r1.1.1.3 -r1.1.1.3.12.1
--- squid/src/url.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/url.c	17 Apr 2000 00:13:11 -0000	1.1.1.3.12.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: url.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: url.c,v 1.1.1.3.12.1 2000/04/17 00:13:11 hno Exp $
  *
  * DEBUG: section 23    URL Parsing
  * AUTHOR: Duane Wessels
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/urn.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/urn.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/urn.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/urn.c	17 Apr 2000 00:13:11 -0000	1.1.1.3.10.1
@@ -1,7 +1,7 @@
 
 /*
  *
- * $Id: urn.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: urn.c,v 1.1.1.3.10.1 2000/04/17 00:13:11 hno Exp $
  *
  * DEBUG: section 52    URN Parsing
  * AUTHOR: Kostas Anagnostakis
@@ -13,10 +13,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/useragent.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/useragent.c,v
retrieving revision 1.1.1.3
retrieving revision 1.1.1.3.10.1
diff -u -r1.1.1.3 -r1.1.1.3.10.1
--- squid/src/useragent.c	26 Jan 2000 03:25:01 -0000	1.1.1.3
+++ squid/src/useragent.c	17 Apr 2000 00:13:11 -0000	1.1.1.3.10.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: useragent.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $
+ * $Id: useragent.c,v 1.1.1.3.10.1 2000/04/17 00:13:11 hno Exp $
  *
  * DEBUG: section 40    User-Agent logging
  * AUTHOR: Joe Ramey <ramey@csc.ti.com>
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -35,31 +35,20 @@
 
 #include "squid.h"
 
+#if USE_USERAGENT_LOG
+static Logfile *useragentlog = NULL;
+#endif
+
 void
 useragentOpenLog(void)
 {
 #if USE_USERAGENT_LOG
-    char *fname = NULL;
-    int log_fd = -1;
-    fname = Config.Log.useragent;
-    /* Close and reopen the log.  It may have been renamed "manually"
-     * before HUP'ing us. */
-    if (cache_useragent_log) {
-	file_close(fileno(cache_useragent_log));
-	fclose(cache_useragent_log);
-	cache_useragent_log = NULL;
-    }
-    if (fname && strcmp(fname, "none") != 0) {
-	log_fd = file_open(fname, O_WRONLY | O_CREAT | O_APPEND);
-	if (log_fd < 0) {
-	    debug(50, 0) ("useragentOpenLog: %s: %s\n", fname, xstrerror());
-	} else if ((cache_useragent_log = fdopen(log_fd, "a")) == NULL) {
-	    file_close(log_fd);
-	    debug(50, 0) ("useragentOpenLog: %s: %s\n", fname, xstrerror());
-	}
-    }
-    if (log_fd < 0 || cache_useragent_log == NULL)
+    assert(NULL == useragentlog);
+    if (0 == strcmp(Config.Log.useragent, "none")) {
 	debug(40, 1) ("User-Agent logging is disabled.\n");
+	return;
+    }
+    logfileOpen(Config.Log.useragent, 0);
 #endif
 }
 
@@ -67,39 +56,9 @@
 useragentRotateLog(void)
 {
 #if USE_USERAGENT_LOG
-    char *fname = NULL;
-    int i;
-    LOCAL_ARRAY(char, from, MAXPATHLEN);
-    LOCAL_ARRAY(char, to, MAXPATHLEN);
-    struct stat sb;
-    if ((fname = Config.Log.useragent) == NULL)
-	return;
-    if (strcmp(fname, "none") == 0)
+    if (NULL == useragentlog)
 	return;
-#ifdef S_ISREG
-    if (stat(fname, &sb) == 0)
-	if (S_ISREG(sb.st_mode) == 0)
-	    return;
-#endif
-    debug(40, 1) ("useragentRotateLog: Rotating.\n");
-    /* Rotate numbers 0 through N up one */
-    for (i = Config.Log.rotateNumber; i > 1;) {
-	i--;
-	snprintf(from, MAXPATHLEN, "%s.%d", fname, i - 1);
-	snprintf(to, MAXPATHLEN, "%s.%d", fname, i);
-	xrename(from, to);
-    }
-    if (cache_useragent_log) {
-	file_close(fileno(cache_useragent_log));
-	fclose(cache_useragent_log);
-	cache_useragent_log = NULL;
-    }
-    /* Rotate the current log to .0 */
-    if (Config.Log.rotateNumber > 0) {
-	snprintf(to, MAXPATHLEN, "%s.%d", fname, 0);
-	xrename(fname, to);
-    }
-    useragentOpenLog();
+    logfileRotate(useragentlog);
 #endif
 }
 
@@ -110,18 +69,16 @@
     static time_t last_time = 0;
     static char time_str[128];
     const char *s;
-    if (!cache_useragent_log)
+    if (NULL == useragentlog)
 	return;
     if (squid_curtime != last_time) {
 	s = mkhttpdlogtime(&squid_curtime);
 	strcpy(time_str, s);
 	last_time = squid_curtime;
     }
-    fprintf(cache_useragent_log, "%s [%s] \"%s\"\n",
+    logfilePrintf(useragentlog, "%s [%s] \"%s\"\n",
 	client,
 	time_str,
 	agent);
-    if (!Config.onoff.buffered_logs)
-	fflush(cache_useragent_log);
 #endif
 }
Index: squid/src/wais.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/wais.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/src/wais.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/wais.c	17 Apr 2000 00:13:11 -0000	1.1.1.2.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: wais.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: wais.c,v 1.1.1.2.14.1 2000/04/17 00:13:11 hno Exp $
  *
  * DEBUG: section 24    WAIS Relay
  * AUTHOR: Harvest Derived
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
Index: squid/src/wccp.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/wccp.c,v
retrieving revision 1.1.1.1
retrieving revision 1.1.1.1.10.1
diff -u -r1.1.1.1 -r1.1.1.1.10.1
--- squid/src/wccp.c	26 Jan 2000 03:25:01 -0000	1.1.1.1
+++ squid/src/wccp.c	17 Apr 2000 00:13:11 -0000	1.1.1.1.10.1
@@ -1,8 +1,8 @@
 
 /*
- * $Id: wccp.c,v 1.1.1.1 2000/01/26 03:25:01 hno Exp $
+ * $Id: wccp.c,v 1.1.1.1.10.1 2000/04/17 00:13:11 hno Exp $
  *
- * DEBUG: section 80     WCCP Support
+ * DEBUG: section 80    WCCP Support
  * AUTHOR: Glenn Chisholm
  *
  * SQUID Internet Object Cache  http://squid.nlanr.net/Squid/
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
@@ -211,7 +211,7 @@
 {
     struct sockaddr_in from;
     socklen_t from_len;
-    int len;
+    size_t len;
 
     debug(80, 6) ("wccpHandleUdp: Called.\n");
 
@@ -223,7 +223,7 @@
     Counter.syscalls.sock.recvfroms++;
 
     len = recvfrom(sock,
-	&wccp_i_see_you,
+	(void *) &wccp_i_see_you,
 	WCCP_RESPONSE_SIZE,
 	0,
 	(struct sockaddr *) &from,
Index: squid/src/whois.c
===================================================================
RCS file: /cvsroot/squid-sf//squid/src/whois.c,v
retrieving revision 1.1.1.2
retrieving revision 1.1.1.2.14.1
diff -u -r1.1.1.2 -r1.1.1.2.14.1
--- squid/src/whois.c	26 Jan 2000 03:23:10 -0000	1.1.1.2
+++ squid/src/whois.c	17 Apr 2000 00:13:11 -0000	1.1.1.2.14.1
@@ -1,6 +1,6 @@
 
 /*
- * $Id: whois.c,v 1.1.1.2 2000/01/26 03:23:10 hno Exp $
+ * $Id: whois.c,v 1.1.1.2.14.1 2000/04/17 00:13:11 hno Exp $
  *
  * DEBUG: section 75    WHOIS protocol
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -12,10 +12,10 @@
  *  Internet community.  Development is led by Duane Wessels of the
  *  National Laboratory for Applied Network Research and funded by the
  *  National Science Foundation.  Squid is Copyrighted (C) 1998 by
- *  Duane Wessels and the University of California San Diego.  Please
- *  see the COPYRIGHT file for full details.  Squid incorporates
- *  software developed and/or copyrighted by other sources.  Please see
- *  the CREDITS file for full details.
+ *  the Regents of the University of California.  Please see the
+ *  COPYRIGHT file for full details.  Squid incorporates software
+ *  developed and/or copyrighted by other sources.  Please 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
