--------------------- PatchSet 16 Date: 2000/02/04 18:56:47 Author: hno Branch: NLANR Tag: (none) Log: Imported current Squid sources Members: ChangeLog:1.1.1.3->1.1.1.4 acconfig.h:1.1.1.3->1.1.1.4 configure:1.1.1.3->1.1.1.4 configure.in:1.1.1.3->1.1.1.4 makefile.in:1.1.1.3->1.1.1.4 auth_modules/PAM/pam_auth.c:1.1.1.1->1.1.1.2 errors/Makefile.in:1.1.1.2->1.1.1.3 errors/Finnish/ERR_FTP_FORBIDDEN:1.1->1.1.1.1 errors/Finnish/ERR_FTP_NOT_FOUND:1.1->1.1.1.1 errors/Finnish/ERR_FTP_UNAVAILABLE:1.1->1.1.1.1 errors/Finnish/ERR_SHUTTING_DOWN:1.1->1.1.1.1 errors/Finnish/ERR_TOO_BIG:1.1->1.1.1.1 errors/Swedish/ERR_TOO_BIG:1.1->1.1.1.1 include/autoconf.h.in:1.1.1.3->1.1.1.4 include/config.h.in:1.1.1.3->1.1.1.4 include/heap.h:1.1.1.1->1.1.1.2 include/splay.h:1.1.1.2->1.1.1.3 include/util.h:1.1.1.3->1.1.1.4 include/version.h:1.1.1.3->1.1.1.4 lib/Makefile.in:1.1.1.2->1.1.1.3 lib/heap.c:1.1.1.1->1.1.1.2 lib/rfc1035.c:1.1.1.1->1.1.1.2 lib/rfc1738.c:1.1.1.2->1.1.1.3 lib/splay.c:1.1.1.2->1.1.1.3 lib/util.c:1.1.1.3->1.1.1.4 src/HttpHdrCc.c:1.1.1.3->1.1.1.4 src/HttpHdrContRange.c:1.1.1.3->1.1.1.4 src/HttpHdrRange.c:1.1.1.3->1.1.1.4 src/HttpHeader.c:1.1.1.3->1.1.1.4 src/HttpHeaderTools.c:1.1.1.3->1.1.1.4 src/HttpReply.c:1.1.1.3->1.1.1.4 src/HttpRequest.c:1.1.1.3->1.1.1.4 src/Makefile.in:1.1.1.3->1.1.1.4 src/MemPool.c:1.1.1.3->1.1.1.4 src/access_log.c:1.1.1.3->1.1.1.4 src/acl.c:1.1.1.3->1.1.1.4 src/aiops.c:1.1.1.3->1.1.1.4 src/asn.c:1.1.1.3->1.1.1.4 src/async_io.c:1.1.1.3->1.1.1.4 src/cache_cf.c:1.1.1.3->1.1.1.4 src/cbdata.c:1.1.1.2->1.1.1.3 src/cf.data.pre:1.1.1.3->1.1.1.4 src/client.c:1.1.1.3->1.1.1.4 src/client_db.c:1.1.1.3->1.1.1.4 src/client_side.c:1.1.1.3->1.1.1.4 src/comm.c:1.1.1.3->1.1.1.4 src/comm_select.c:1.1.1.3->1.1.1.4 src/debug.c:1.1.1.3->1.1.1.4 src/defines.h:1.1.1.3->1.1.1.4 src/delay_pools.c:1.1.1.3->1.1.1.4 src/diskd.c:1.1->1.1.1.1 src/dns.c:1.1.1.3->1.1.1.4 src/dns_internal.c:1.1.1.1->1.1.1.2 src/enums.h:1.1.1.3->1.1.1.4 src/errorpage.c:1.1.1.3->1.1.1.4 src/filemap.c:1.1.1.2->1.1.1.3 src/forward.c:1.1.1.3->1.1.1.4 src/ftp.c:1.1.1.3->1.1.1.4 src/globals.h:1.1.1.3->1.1.1.4 src/gopher.c:1.1.1.3->1.1.1.4 src/htcp.c:1.1.1.2->1.1.1.3 src/http.c:1.1.1.3->1.1.1.4 src/icp_v2.c:1.1.1.3->1.1.1.4 src/internal.c:1.1.1.3->1.1.1.4 src/ipc.c:1.1.1.3->1.1.1.4 src/ipcache.c:1.1.1.3->1.1.1.4 src/leakfinder.c:1.1.1.1->1.1.1.2 src/main.c:1.1.1.3->1.1.1.4 src/mime.c:1.1.1.3->1.1.1.4 src/neighbors.c:1.1.1.3->1.1.1.4 src/net_db.c:1.1.1.3->1.1.1.4 src/peer_digest.c:1.1.1.3->1.1.1.4 src/peer_select.c:1.1.1.3->1.1.1.4 src/protos.h:1.1.1.3->1.1.1.4 src/pump.c:1.1.1.3->1.1.1.4 src/redirect.c:1.1.1.3->1.1.1.4 src/refresh.c:1.1.1.3->1.1.1.4 src/send-announce.c:1.1.1.3->1.1.1.4 src/snmp_agent.c:1.1.1.3->1.1.1.4 src/snmp_core.c:1.1.1.3->1.1.1.4 src/squid.h:1.1.1.3->1.1.1.4 src/ssl.c:1.1.1.3->1.1.1.4 src/stat.c:1.1.1.3->1.1.1.4 src/store.c:1.1.1.3->1.1.1.4 src/store_client.c:1.1.1.3->1.1.1.4 src/store_digest.c:1.1.1.3->1.1.1.4 src/store_dir.c:1.1.1.3->1.1.1.4 src/store_dir_ufs.c:1.1.1.1->1.1.1.2 src/store_heap_replacement.c:1.1.1.1->1.1.1.2 src/store_io_asyncufs.c:1.1.1.1->1.1.1.2 src/store_io_ufs.c:1.1.1.1->1.1.1.2 src/store_key_md5.c:1.1.1.3->1.1.1.4 src/store_log.c:1.1.1.2->1.1.1.3 src/store_rebuild.c:1.1.1.3->1.1.1.4 src/store_swapin.c:1.1.1.3->1.1.1.4 src/store_swapmeta.c:1.1.1.2->1.1.1.3 src/store_swapout.c:1.1.1.3->1.1.1.4 src/structs.h:1.1.1.3->1.1.1.4 src/tools.c:1.1.1.3->1.1.1.4 src/typedefs.h:1.1.1.3->1.1.1.4 src/unlinkd.c:1.1.1.3->1.1.1.4 src/url.c:1.1.1.3->1.1.1.4 src/urn.c:1.1.1.3->1.1.1.4 src/useragent.c:1.1.1.3->1.1.1.4 src/wccp.c:1.1.1.1->1.1.1.2 Index: squid/ChangeLog =================================================================== RCS file: /cvsroot/squid-sf//squid/ChangeLog,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/ChangeLog 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/ChangeLog 4 Feb 2000 18:56:47 -0000 1.1.1.4 @@ -1,48 +1,5 @@ -Changes to Squid-2.3.STABLE1 (Jan 9, 2000): - - - Updated PAM authentication module from Henrik Nordstrom. - - Updated Bulgarian error messages from Svetlin Simeonov. - - Changed ACL routines so that User-Agent (browser) string - is always taken from compiled HTTP request headers - instead of passed as an argument to aclCreateChecklist. - - Added a 'strip' option to the 'uri_whitesace' configuration - directive and made it the default behavior. Whitespace - found in URI's is now stripped out by default. - - Added chroot feature. The 'chroot_dir' config option enables - it and specifies the directory. - - Changed clientBuildReplyHeader so that the Age header is - added only for cache hits, and only when we can calculate - a valid, positive age value. - - Changed clientWriteComplete and clientGotNotEnough so - that they keep persistent connections open for more types - of replies that don't have bodies. - - Changed filemap.c routines to dynamically grow filemap - space as needed. - - Added a hack to ftp.c to deal with ftp.netscape.com, which - sometimes doesn't acknowledge PASV commands. - - Fixed FTP bug with ftpScheduleReadControlReply; there - was not always a timeout handler on the control socket - after the transfer completed. - - Fixed FTP filedescriptor leak from invalid PASV replies. - - Changed httpBuildRequestHeader so that it doesn't - copy the Host header from the client request. Instead - we should generate our own Host header which is known - to be correct. - - Changed storeTimestampsSet to adjust entry->timestamp - if the response includes an Age header. - - Removed size limit from storeKeyHashBuckets. - - Changed fwdConnectStart from a "heavy" to a "light" event. - - Fixed an 'anonymize_headers' bug that affects unknown - HTTP headers. With the bug, if you list a header that - Squid doesn't know about (such as "Charset"), it would - add HDR_OTHER to the allow/deny mask. This caused all - unknown headers to be allowed or denied (depending on - the scheme you use). Now, with the bug fixed, an unknown - header in the 'anonymize_headers' list is simply ignored. - Changes to Squid-2.3.DEVEL3 (): - - Added MSNT auth module from Antonino Iannella. - Added --enable-underscores configure option. This allows Squid to accept hostnames with underscores in them. Your DNS resolver may still complain about them, however. @@ -228,7 +185,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 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/acconfig.h 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/acconfig.h 4 Feb 2000 18:56:47 -0000 1.1.1.4 @@ -20,7 +20,7 @@ * */ @ TOP @ -/* $Id: acconfig.h,v 1.1.1.3 2000/01/26 03:25:00 hno Exp $ */ +/* $Id: acconfig.h,v 1.1.1.4 2000/02/04 18:56:47 hno Exp $ */ /********************************* * START OF CONFIGURABLE OPTIONS * @@ -261,3 +261,13 @@ * Use the heap-based replacement techniques */ #undef HEAP_REPLACEMENT + +/* + * Use DISKD + */ +#undef USE_DISKD + +/* + * message type for message queues + */ +#undef mtyp_t Index: squid/configure =================================================================== RCS file: /cvsroot/squid-sf//squid/Attic/configure,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/configure 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/configure 4 Feb 2000 18:56:47 -0000 1.1.1.4 @@ -112,6 +112,9 @@ replacement algorithms, instead of the standard LRU algorithm. " +ac_help="$ac_help + --enable-diskd Uses shared memory, message queues, and external + processes for disk I/O." # Initialize some variables set by options. # The variables have the same names as the options, with @@ -620,7 +623,7 @@ -# From configure.in Revision: 1.176.2.12 +# From configure.in Revision: 1.181 ac_aux_dir= for ac_dir in cfgaux $srcdir/cfgaux; do if test -f $ac_dir/install-sh; then @@ -648,7 +651,7 @@ fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:652: checking host system type" >&5 +echo "configure:655: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -716,7 +719,7 @@ # 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 +echo "configure:723: 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 @@ -745,7 +748,7 @@ # 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 +echo "configure:752: 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 @@ -793,7 +796,7 @@ 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 +echo "configure:800: 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. @@ -803,11 +806,11 @@ cross_compiling=$ac_cv_prog_cc_cross cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:814: \"$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 @@ -827,12 +830,12 @@ { 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 "configure:834: 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 +echo "configure:839: 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 @@ -841,7 +844,7 @@ 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 +if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:848: \"$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 @@ -856,7 +859,7 @@ 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 +echo "configure:863: 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 @@ -1514,6 +1517,24 @@ fi +# Check whether --enable-diskd or --disable-diskd was given. +if test "${enable_diskd+set}" = set; then + enableval="$enable_diskd" + if test "$enableval" = "yes" ; then + echo "DISKD enabled" + cat >> confdefs.h <<\EOF +#define USE_DISKD 1 +EOF + + OPT_DISKD_EXE='$(DISKD_EXE)' + + DISKD_OBJS='diskd.o' + + fi + +fi + + # Force some compilers to use ANSI features # case "$host" in @@ -1534,7 +1555,7 @@ 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 +echo "configure:1559: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1549,13 +1570,13 @@ # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < 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; } +{ (eval echo configure:1580: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1566,13 +1587,13 @@ rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < 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; } +{ (eval echo configure:1597: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1605,7 +1626,7 @@ # 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 +echo "configure:1630: 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 @@ -1657,7 +1678,7 @@ # 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 +echo "configure:1682: 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 @@ -1684,7 +1705,7 @@ fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1688: checking whether ln -s works" >&5 +echo "configure:1709: 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 @@ -1707,7 +1728,7 @@ # 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 +echo "configure:1732: 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 @@ -1739,7 +1760,7 @@ # 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 +echo "configure:1764: 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 @@ -1771,7 +1792,7 @@ # 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 +echo "configure:1796: 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 @@ -1803,7 +1824,7 @@ # 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 +echo "configure:1828: 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 @@ -1835,7 +1856,7 @@ # 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 +echo "configure:1860: 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 @@ -1867,7 +1888,7 @@ # 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 +echo "configure:1892: 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 @@ -1899,7 +1920,7 @@ # 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 +echo "configure:1924: 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 @@ -1931,7 +1952,7 @@ # 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 +echo "configure:1956: 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 @@ -1963,7 +1984,7 @@ # 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 +echo "configure:1988: 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 @@ -1995,7 +2016,7 @@ # 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 +echo "configure:2020: 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 @@ -2045,12 +2066,12 @@ 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 +echo "configure:2070: 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 < #include <$ac_hdr> @@ -2058,7 +2079,7 @@ DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:2062: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2083,7 +2104,7 @@ # 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 +echo "configure:2108: 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 @@ -2091,7 +2112,7 @@ ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2127: \"$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 @@ -2124,7 +2145,7 @@ else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2128: checking for opendir in -lx" >&5 +echo "configure:2149: 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 @@ -2132,7 +2153,7 @@ ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2168: \"$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 @@ -2166,12 +2187,12 @@ fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2170: checking for ANSI C header files" >&5 +echo "configure:2191: 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 < #include @@ -2179,7 +2200,7 @@ #include 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; } +{ (eval echo configure:2204: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2196,7 +2217,7 @@ 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 @@ -2214,7 +2235,7 @@ 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 @@ -2235,7 +2256,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2246,7 +2267,7 @@ 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 +if { (eval echo configure:2271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2313,6 +2334,7 @@ strings.h \ sys/file.h \ sys/ioctl.h \ + sys/msg.h \ sys/param.h \ sys/resource.h \ sys/select.h\ @@ -2333,17 +2355,17 @@ 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 +echo "configure:2359: 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 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; } +{ (eval echo configure:2369: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2371,12 +2393,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2375: checking for working const" >&5 +echo "configure:2397: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2451: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2446,14 +2468,14 @@ fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2450: checking whether byte ordering is bigendian" >&5 +echo "configure:2472: 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 < #include @@ -2464,11 +2486,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:2468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2490: \"$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 < #include @@ -2479,7 +2501,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:2483: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2499,7 +2521,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2538: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -2537,20 +2559,20 @@ echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6 -echo "configure:2541: checking if ANSI prototypes work" >&5 +echo "configure:2563: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2576: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ansi_prototypes="yes" else @@ -2572,13 +2594,13 @@ fi echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6 -echo "configure:2576: checking for tm->tm_gmtoff" >&5 +echo "configure:2598: 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 < #include @@ -2587,7 +2609,7 @@ foo.tm_gmtoff = 0; ; return 0; } EOF -if { (eval echo configure:2591: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2613: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_tm_gmoff="yes" else @@ -2609,13 +2631,13 @@ fi echo $ac_n "checking for struct mallinfo""... $ac_c" 1>&6 -echo "configure:2613: checking for struct mallinfo" >&5 +echo "configure:2635: 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 < #if HAVE_MALLOC_H @@ -2633,7 +2655,7 @@ foo.keepcost = 0; ; return 0; } EOF -if { (eval echo configure:2637: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2659: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_struct_mallinfo="yes" else @@ -2655,13 +2677,13 @@ fi echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6 -echo "configure:2659: checking for extended mallinfo" >&5 +echo "configure:2681: 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 < #include @@ -2670,7 +2692,7 @@ foo.mxfast = 0; ; return 0; } EOF -if { (eval echo configure:2674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ext_mallinfo="yes" else @@ -2692,13 +2714,13 @@ fi echo $ac_n "checking for struct rusage""... $ac_c" 1>&6 -echo "configure:2696: checking for struct rusage" >&5 +echo "configure:2718: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2737: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_struct_rusage="yes" else @@ -2733,13 +2755,13 @@ fi echo $ac_n "checking for ip->ip_hl""... $ac_c" 1>&6 -echo "configure:2737: checking for ip->ip_hl" >&5 +echo "configure:2759: 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 < #include @@ -2756,7 +2778,7 @@ ip.ip_hl= 0; ; return 0; } EOF -if { (eval echo configure:2760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2782: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ip_hl="yes" else @@ -2778,7 +2800,7 @@ fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2782: checking size of int" >&5 +echo "configure:2804: 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 @@ -2786,7 +2808,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2797,7 +2819,7 @@ 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 +if { (eval echo configure:2823: \"$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 @@ -2817,7 +2839,7 @@ echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2821: checking size of long" >&5 +echo "configure:2843: 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 @@ -2825,7 +2847,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2836,7 +2858,7 @@ 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 +if { (eval echo configure:2862: \"$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 @@ -2856,7 +2878,7 @@ echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:2860: checking size of void *" >&5 +echo "configure:2882: 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 @@ -2864,7 +2886,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2875,7 +2897,7 @@ 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 +if { (eval echo configure:2901: \"$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 @@ -2898,19 +2920,19 @@ # 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 +echo "configure:2924: 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 < 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 +if { (eval echo configure:2936: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2931,12 +2953,12 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2935: checking for alloca" >&5 +echo "configure:2957: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2991,12 +3013,12 @@ echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2995: checking whether alloca needs Cray hooks" >&5 +echo "configure:3017: 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 <&6 -echo "configure:3025: checking for $ac_func" >&5 +echo "configure:3047: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3075: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3076,7 +3098,7 @@ fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:3080: checking stack direction for C alloca" >&5 +echo "configure:3102: 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 @@ -3084,7 +3106,7 @@ ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3129: \"$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 @@ -3126,12 +3148,12 @@ echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3130: checking for pid_t" >&5 +echo "configure:3152: 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 < #if STDC_HEADERS @@ -3159,12 +3181,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3163: checking for size_t" >&5 +echo "configure:3185: 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 < #if STDC_HEADERS @@ -3192,12 +3214,12 @@ fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3196: checking for ssize_t" >&5 +echo "configure:3218: 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 < #if STDC_HEADERS @@ -3225,12 +3247,12 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3229: checking for off_t" >&5 +echo "configure:3251: 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 < #if STDC_HEADERS @@ -3258,12 +3280,12 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3262: checking for mode_t" >&5 +echo "configure:3284: 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 < #if STDC_HEADERS @@ -3291,12 +3313,12 @@ fi echo $ac_n "checking for fd_mask""... $ac_c" 1>&6 -echo "configure:3295: checking for fd_mask" >&5 +echo "configure:3317: 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 < #if STDC_HEADERS @@ -3323,15 +3345,48 @@ fi +echo $ac_n "checking for mtyp_t""... $ac_c" 1>&6 +echo "configure:3350: checking for mtyp_t" >&5 +if eval "test \"`echo '$''{'ac_cv_type_mtyp_t'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + cat > conftest.$ac_ext < +#if STDC_HEADERS +#include +#include +#endif +EOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + egrep "mtyp_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + rm -rf conftest* + ac_cv_type_mtyp_t=yes +else + rm -rf conftest* + ac_cv_type_mtyp_t=no +fi +rm -f conftest* + +fi +echo "$ac_t""$ac_cv_type_mtyp_t" 1>&6 +if test $ac_cv_type_mtyp_t = no; then + cat >> confdefs.h <<\EOF +#define mtyp_t long +EOF + +fi + echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:3329: checking for socklen_t" >&5 +echo "configure:3384: 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 < #include @@ -3362,7 +3417,7 @@ fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:3366: checking for main in -lnsl" >&5 +echo "configure:3421: 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 @@ -3370,14 +3425,14 @@ ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3436: \"$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 @@ -3405,7 +3460,7 @@ fi echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:3409: checking for main in -lsocket" >&5 +echo "configure:3464: 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 @@ -3413,14 +3468,14 @@ ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3479: \"$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 @@ -3452,7 +3507,7 @@ 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 +echo "configure:3511: 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 @@ -3460,14 +3515,14 @@ ac_save_LIBS="$LIBS" LIBS="-lgnumalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3526: \"$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 @@ -3510,7 +3565,7 @@ *) echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6 -echo "configure:3514: checking for main in -lmalloc" >&5 +echo "configure:3569: 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 @@ -3518,14 +3573,14 @@ ac_save_LIBS="$LIBS" LIBS="-lmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3584: \"$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 @@ -3558,7 +3613,7 @@ fi echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6 -echo "configure:3562: checking for main in -lbsd" >&5 +echo "configure:3617: 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 @@ -3566,14 +3621,14 @@ ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3632: \"$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 @@ -3601,7 +3656,7 @@ fi echo $ac_n "checking for main in -lregex""... $ac_c" 1>&6 -echo "configure:3605: checking for main in -lregex" >&5 +echo "configure:3660: 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 @@ -3609,14 +3664,14 @@ ac_save_LIBS="$LIBS" LIBS="-lregex $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3675: \"$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 @@ -3637,7 +3692,7 @@ fi echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6 -echo "configure:3641: checking for gethostbyname in -lbind" >&5 +echo "configure:3696: 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 @@ -3645,7 +3700,7 @@ ac_save_LIBS="$LIBS" LIBS="-lbind $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3715: \"$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 @@ -3690,7 +3745,7 @@ ;; *) echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 -echo "configure:3694: checking for inet_aton in -lresolv" >&5 +echo "configure:3749: 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 @@ -3698,7 +3753,7 @@ ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3768: \"$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 @@ -3725,7 +3780,7 @@ 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 +echo "configure:3784: 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 @@ -3733,7 +3788,7 @@ ac_save_LIBS="$LIBS" LIBS="-l44bsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3803: \"$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 @@ -3776,7 +3831,7 @@ fi echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6 -echo "configure:3780: checking for main in -lresolv" >&5 +echo "configure:3835: 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 @@ -3784,14 +3839,14 @@ ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3850: \"$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 @@ -3822,7 +3877,7 @@ esac fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:3826: checking for main in -lm" >&5 +echo "configure:3881: 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 @@ -3830,14 +3885,14 @@ ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3896: \"$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 @@ -3866,7 +3921,7 @@ echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3870: checking for crypt in -lcrypt" >&5 +echo "configure:3925: 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 @@ -3874,7 +3929,7 @@ ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3944: \"$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 @@ -3918,7 +3973,7 @@ echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6 -echo "configure:3922: checking for main in -lpthread" >&5 +echo "configure:3977: 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 @@ -3926,14 +3981,14 @@ ac_save_LIBS="$LIBS" LIBS="-lpthread $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3992: \"$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 @@ -3968,7 +4023,7 @@ 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 +echo "configure:4027: 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 @@ -3976,7 +4031,7 @@ ac_save_LIBS="$LIBS" LIBS="-lintl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4046: \"$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 @@ -4134,7 +4189,6 @@ res_init \ rint \ seteuid \ - setgroups \ setpgrp \ setrlimit \ getrlimit \ @@ -4150,12 +4204,12 @@ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4154: checking for $ac_func" >&5 +echo "configure:4208: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4236: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4211,12 +4265,12 @@ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4215: checking for $ac_func" >&5 +echo "configure:4269: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4297: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4266,7 +4320,7 @@ fi echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6 -echo "configure:4270: checking if setresuid is implemented" >&5 +echo "configure:4324: 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 @@ -4274,7 +4328,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -4287,7 +4341,7 @@ } EOF -if { (eval echo configure:4291: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_setresuid="yes" else @@ -4312,7 +4366,7 @@ 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 +echo "configure:4370: 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 @@ -4355,13 +4409,13 @@ 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 +echo "configure:4413: 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 < #include @@ -4369,7 +4423,7 @@ regex_t t; regcomp(&t,"",0); ; return 0; } EOF -if { (eval echo configure:4373: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4427: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* USE_GNUREGEX="no" else @@ -4400,12 +4454,12 @@ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4404: checking for $ac_func" >&5 +echo "configure:4458: 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 <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4486: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4456,12 +4510,12 @@ echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6 -echo "configure:4460: checking Default FD_SETSIZE value" >&5 +echo "configure:4514: checking Default FD_SETSIZE value" >&5 if test "$cross_compiling" = yes; then DEFAULT_FD_SETSIZE=256 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4544: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then DEFAULT_FD_SETSIZE=`cat conftestval` else @@ -4505,7 +4559,7 @@ 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 +echo "configure:4563: checking Maximum number of filedescriptors we can open" >&5 TLDFLAGS="$LDFLAGS" case $host in i386-unknown-freebsd*) @@ -4517,7 +4571,7 @@ SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -4574,7 +4628,7 @@ } EOF -if { (eval echo configure:4578: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4632: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_MAXFD=`cat conftestval` else @@ -4601,12 +4655,12 @@ 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 +echo "configure:4659: checking Default UDP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -4627,7 +4681,7 @@ } EOF -if { (eval echo configure:4631: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4685: \"$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 @@ -4646,12 +4700,12 @@ echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6 -echo "configure:4650: checking Default UDP receive buffer size" >&5 +echo "configure:4704: checking Default UDP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -4672,7 +4726,7 @@ } EOF -if { (eval echo configure:4676: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4730: \"$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 @@ -4691,12 +4745,12 @@ echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6 -echo "configure:4695: checking Default TCP send buffer size" >&5 +echo "configure:4749: checking Default TCP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -4717,7 +4771,7 @@ } EOF -if { (eval echo configure:4721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4775: \"$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 @@ -4736,12 +4790,12 @@ echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6 -echo "configure:4740: checking Default TCP receive buffer size" >&5 +echo "configure:4794: checking Default TCP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -4762,7 +4816,7 @@ } EOF -if { (eval echo configure:4766: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4820: \"$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 @@ -4781,19 +4835,19 @@ 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 +echo "configure:4839: 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 < int main() { char *s = sys_errlist; ; return 0; } EOF -if { (eval echo configure:4797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4851: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_needs_sys_errlist="no" else @@ -4815,16 +4869,16 @@ fi echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 -echo "configure:4819: checking for libresolv _dns_ttl_ hack" >&5 +echo "configure:4873: checking for libresolv _dns_ttl_ hack" >&5 cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:4882: \"$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 @@ -4840,12 +4894,12 @@ 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 +echo "configure:4898: checking if inet_ntoa() actually works" >&5 if test "$cross_compiling" = yes; then INET_NTOA_RESULT="broken" else cat > conftest.$ac_ext < @@ -4864,7 +4918,7 @@ } EOF -if { (eval echo configure:4868: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4922: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then INET_NTOA_RESULT=`cat conftestval` else @@ -4890,9 +4944,9 @@ 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 +echo "configure:4948: checking for working statvfs() interface" >&5 cat > conftest.$ac_ext < @@ -4909,7 +4963,7 @@ ; return 0; } EOF -if { (eval echo configure:4913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4967: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_func_statvfs=yes else @@ -4929,12 +4983,12 @@ fi echo $ac_n "checking for _res.nsaddr_list""... $ac_c" 1>&6 -echo "configure:4933: checking for _res.nsaddr_list" >&5 +echo "configure:4987: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5015: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_nsaddr_list="yes" else @@ -4979,12 +5033,12 @@ 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 +echo "configure:5037: 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 <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5065: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_ns_list="yes" else @@ -5221,6 +5275,8 @@ s%@HTCP_OBJS@%$HTCP_OBJS%g s%@ERR_LANGUAGE@%$ERR_LANGUAGE%g s%@LEAKFINDER_OBJS@%$LEAKFINDER_OBJS%g +s%@OPT_DISKD_EXE@%$OPT_DISKD_EXE%g +s%@DISKD_OBJS@%$DISKD_OBJS%g s%@CPP@%$CPP%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g s%@INSTALL_DATA@%$INSTALL_DATA%g Index: squid/configure.in =================================================================== RCS file: /cvsroot/squid-sf//squid/configure.in,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/configure.in 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/configure.in 4 Feb 2000 18:56:47 -0000 1.1.1.4 @@ -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 2000/01/26 03:25:00 hno Exp $ +dnl $Id: configure.in,v 1.1.1.4 2000/02/04 18:56:47 hno Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.1.1.3 $)dnl +AC_REVISION($Revision: 1.1.1.4 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(cfgaux) @@ -554,6 +554,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 @@ -652,6 +666,7 @@ strings.h \ sys/file.h \ sys/ioctl.h \ + sys/msg.h \ sys/param.h \ sys/resource.h \ sys/select.h\ @@ -778,6 +793,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, [ @@ -983,7 +999,6 @@ res_init \ rint \ seteuid \ - setgroups \ setpgrp \ setrlimit \ getrlimit \ @@ -1120,7 +1135,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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/makefile.in 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/makefile.in 4 Feb 2000 18:56:47 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:47 hno Exp $ # srcdir = @srcdir@ @@ -16,7 +16,7 @@ SUBDIRS = lib @makesnmplib@ scripts src icons errors AUTHDIRS = auth_modules/NCSA \ - auth_modules/getpwnam \ + = auth_modules/getpwnam \ auth_modules/PAM \ auth_modules/SMB \ auth_modules/LDAP 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.2 diff -u -r1.1.1.1 -r1.1.1.2 --- 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 4 Feb 2000 18:56:48 -0000 1.1.1.2 @@ -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.2 2000/02/04 18:56:48 hno Exp $ * * PAM authenticator module for Squid. * Copyright (C) 1999 Henrik Nordstrom 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.3 diff -u -r1.1.1.2 -r1.1.1.3 --- squid/errors/Makefile.in 26 Jan 2000 03:25:00 -0000 1.1.1.2 +++ squid/errors/Makefile.in 4 Feb 2000 18:56:48 -0000 1.1.1.3 @@ -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.3 2000/02/04 18:56:48 hno Exp $ # prefix = @prefix@ exec_prefix = @exec_prefix@ --- /dev/null Wed Feb 14 00:42:24 2007 +++ squid/errors/Finnish/ERR_FTP_FORBIDDEN Wed Feb 14 00:43:04 2007 @@ -0,0 +1,17 @@ + +ERROR: The requested URL could not be retrieved + +

ERROR

+

The requested URL could not be retrieved

+
+

+An FTP authentication failure occurred +while trying to retrieve the URL: +%U +

+Squid sent the following FTP command: +

%f
+and then received this reply +
%F
+
%g
+

Your cache administrator is %w. --- /dev/null Wed Feb 14 00:42:24 2007 +++ squid/errors/Finnish/ERR_FTP_NOT_FOUND Wed Feb 14 00:43:04 2007 @@ -0,0 +1,20 @@ + +ERROR: The requested URL could not be retrieved + +

ERROR

+

The requested URL could not be retrieved

+
+

+The following URL could not be retrieved: +%U +

+Squid sent the following FTP command: +

%f
+and then received this reply +
%F
+
%g
+

+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 %B. +

Your cache administrator is %w. --- /dev/null Wed Feb 14 00:42:24 2007 +++ squid/errors/Finnish/ERR_FTP_UNAVAILABLE Wed Feb 14 00:43:04 2007 @@ -0,0 +1,16 @@ + +ERROR: The requested URL could not be retrieved + +

ERROR

+

The requested URL could not be retrieved

+
+

+The FTP server was too busy while trying to retrieve the URL: +%U +

+Squid sent the following FTP command: +

%f
+and then received this reply +
%F
+
%g
+

Your cache administrator is %w. --- /dev/null Wed Feb 14 00:42:24 2007 +++ squid/errors/Finnish/ERR_SHUTTING_DOWN Wed Feb 14 00:43:04 2007 @@ -0,0 +1,17 @@ + +ERROR: The requested URL could not be retrieved + +

ERROR

+

The requested URL could not be retrieved

+
+

+While trying to retrieve the URL: +%U +

+The following error was encountered: +

    +

    +This cache is in the process of shutting down and can not +service your request at this time. Please retry your +request again soon. +

    Your cache administrator is %w. --- /dev/null Wed Feb 14 00:42:24 2007 +++ squid/errors/Finnish/ERR_TOO_BIG Wed Feb 14 00:43:04 2007 @@ -0,0 +1,26 @@ + +ERROR: The requested URL could not be retrieved + +

    ERROR

    +

    The requested URL could not be retrieved

    +
    +

    +While trying to retrieve the URL: +%U +

    +The following error was encountered: +

      +
    • + +The request or reply is too large. + +

      +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. +

    +

    +Your cache administrator is %w. Index: squid/include/autoconf.h.in =================================================================== RCS file: /cvsroot/squid-sf//squid/include/Attic/autoconf.h.in,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/include/autoconf.h.in 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/include/autoconf.h.in 4 Feb 2000 18:56:49 -0000 1.1.1.4 @@ -280,6 +280,16 @@ */ #undef HEAP_REPLACEMENT +/* + * Use DISKD + */ +#undef USE_DISKD + +/* + * message type for message queues + */ +#undef mtyp_t + /* The number of bytes in a int. */ #undef SIZEOF_INT @@ -379,9 +389,6 @@ /* 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 @@ -556,6 +563,9 @@ /* Define if you have the header file. */ #undef HAVE_SYS_IOCTL_H +/* Define if you have the header file. */ +#undef HAVE_SYS_MSG_H + /* Define if you have the header file. */ #undef HAVE_SYS_NDIR_H 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/include/config.h.in 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/include/config.h.in 4 Feb 2000 18:56:49 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:49 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.2 diff -u -r1.1.1.1 -r1.1.1.2 --- squid/include/heap.h 26 Jan 2000 03:25:00 -0000 1.1.1.1 +++ squid/include/heap.h 4 Feb 2000 18:56:49 -0000 1.1.1.2 @@ -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.2 2000/02/04 18:56:49 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.3 diff -u -r1.1.1.2 -r1.1.1.3 --- squid/include/splay.h 26 Jan 2000 03:25:00 -0000 1.1.1.2 +++ squid/include/splay.h 4 Feb 2000 18:56:50 -0000 1.1.1.3 @@ -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.3 2000/02/04 18:56:50 hno Exp $ */ Index: squid/include/util.h =================================================================== RCS file: /cvsroot/squid-sf//squid/include/util.h,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/include/util.h 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/include/util.h 4 Feb 2000 18:56:50 -0000 1.1.1.4 @@ -1,5 +1,5 @@ /* - * $Id: util.h,v 1.1.1.3 2000/01/26 03:25:00 hno Exp $ + * $Id: util.h,v 1.1.1.4 2000/02/04 18:56:50 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 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/include/version.h 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/include/version.h 4 Feb 2000 18:56:50 -0000 1.1.1.4 @@ -1,12 +1,12 @@ /* - * $Id: version.h,v 1.1.1.3 2000/01/26 03:25:00 hno Exp $ + * $Id: version.h,v 1.1.1.4 2000/02/04 18:56:50 hno Exp $ * * SQUID_VERSION - String for version id of this distribution */ #ifndef SQUID_VERSION -#define SQUID_VERSION "2.3.STABLE1" +#define SQUID_VERSION "2.4.DEVEL2" #endif #ifndef SQUID_RELEASE_TIME -#define SQUID_RELEASE_TIME 947484665 +#define SQUID_RELEASE_TIME squid_curtime #endif 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.3 diff -u -r1.1.1.2 -r1.1.1.3 --- squid/lib/Makefile.in 26 Jan 2000 03:25:00 -0000 1.1.1.2 +++ squid/lib/Makefile.in 4 Feb 2000 18:56:50 -0000 1.1.1.3 @@ -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.3 2000/02/04 18:56:50 hno Exp $ # prefix = @prefix@ top_srcdir = @top_srcdir@ 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.2 diff -u -r1.1.1.1 -r1.1.1.2 --- squid/lib/heap.c 26 Jan 2000 03:25:00 -0000 1.1.1.1 +++ squid/lib/heap.c 4 Feb 2000 18:56:50 -0000 1.1.1.2 @@ -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.2 2000/02/04 18:56:50 hno Exp $ * * AUTHOR: John Dilley, Hewlett Packard * Index: squid/lib/rfc1035.c =================================================================== RCS file: /cvsroot/squid-sf//squid/lib/rfc1035.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -r1.1.1.1 -r1.1.1.2 --- squid/lib/rfc1035.c 26 Jan 2000 03:25:00 -0000 1.1.1.1 +++ squid/lib/rfc1035.c 4 Feb 2000 18:56:50 -0000 1.1.1.2 @@ -1,6 +1,6 @@ /* - * $Id: rfc1035.c,v 1.1.1.1 2000/01/26 03:25:00 hno Exp $ + * $Id: rfc1035.c,v 1.1.1.2 2000/02/04 18:56:50 hno Exp $ * * Low level DNS protocol routines * AUTHOR: Duane Wessels @@ -270,7 +270,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)); @@ -424,7 +424,7 @@ } } while (l > 0); /* a zero-length label terminates */ off += 4; /* qtype, qclass */ - assert (off <= sz); + assert(off <= sz); } i = (int) hdr.ancount; if (i == 0) @@ -491,12 +491,12 @@ static char rev[32]; unsigned int i; memset(&h, '\0', sizeof(h)); - i = (unsigned int) addr.s_addr; - snprintf(rev, 32, "%u.%u.%u.%u.in-addr.arpa", - (i >> 24) & 255, - (i >> 16) & 255, + i = (unsigned int) ntohl(addr.s_addr); + snprintf(rev, 32, "%u.%u.%u.%u.in-addr.arpa.", + i & 255, (i >> 8) & 255, - i & 255); + (i >> 16) & 255, + (i >> 24) & 255); h.id = rfc1035Qid(); h.qr = 0; h.rd = 1; 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.3 diff -u -r1.1.1.2 -r1.1.1.3 --- squid/lib/rfc1738.c 26 Jan 2000 03:25:00 -0000 1.1.1.2 +++ squid/lib/rfc1738.c 4 Feb 2000 18:56:50 -0000 1.1.1.3 @@ -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.3 2000/02/04 18:56:50 hno Exp $ * * DEBUG: * AUTHOR: Harvest Derived 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.3 diff -u -r1.1.1.2 -r1.1.1.3 --- squid/lib/splay.c 26 Jan 2000 03:25:00 -0000 1.1.1.2 +++ squid/lib/splay.c 4 Feb 2000 18:56:50 -0000 1.1.1.3 @@ -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.3 2000/02/04 18:56:50 hno Exp $ */ #include "config.h" 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/lib/util.c 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/lib/util.c 4 Feb 2000 18:56:50 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:50 hno Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -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/HttpHdrCc.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpHdrCc.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/HttpHdrCc.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/HttpHdrCc.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 65 HTTP Cache Control Header * AUTHOR: Alex Rousskov 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/HttpHdrContRange.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/HttpHdrContRange.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 68 HTTP Content-Range Header * AUTHOR: Alex Rousskov 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/HttpHdrRange.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/HttpHdrRange.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 64 HTTP Range Header * AUTHOR: Alex Rousskov 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/HttpHeader.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/HttpHeader.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/HttpHeaderTools.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/HttpHeaderTools.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 66 HTTP Header Tools * AUTHOR: Alex Rousskov 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/HttpReply.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/HttpReply.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 58 HTTP Reply (Response) * AUTHOR: Alex Rousskov Index: squid/src/HttpRequest.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpRequest.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/HttpRequest.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/HttpRequest.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: HttpRequest.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: HttpRequest.c,v 1.1.1.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 73 HTTP Request * AUTHOR: Duane Wessels Index: squid/src/Makefile.in =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/Makefile.in,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/Makefile.in 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/Makefile.in 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.in,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ +# $Id: Makefile.in,v 1.1.1.4 2000/02/04 18:56:51 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 = \ @@ -154,6 +156,7 @@ store.o \ store_io.o \ store_io_ufs.o \ + @DISKD_OBJS@ \ store_client.o \ store_digest.o \ store_dir.o \ @@ -218,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/MemPool.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/MemPool.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/MemPool.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/MemPool.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 63 Low Level Memory Pool Management * AUTHOR: Alex Rousskov 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/access_log.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/access_log.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 46 Access Log * AUTHOR: Duane Wessels @@ -234,21 +234,8 @@ 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()); - } + debug(50, 0) ("%s: %s\n", LogfileName, xstrerror()); + fatalf("Cannot open %s: %s", LogfileName, xstrerror()); } LogfileStatus = LOG_ENABLE; } Index: squid/src/acl.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/acl.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/acl.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/acl.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: acl.c,v 1.1.1.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -336,8 +336,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; } @@ -2209,7 +2207,26 @@ return NULL; } - +/* + * 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 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/aiops.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/aiops.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 43 AIOPS * AUTHOR: Stewart Forster 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/asn.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/asn.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 53 AS Number handling * AUTHOR: Duane Wessels, Kostas Anagnostakis Index: squid/src/async_io.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/async_io.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/async_io.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/async_io.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: async_io.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: async_io.c,v 1.1.1.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 32 Asynchronous Disk I/O * AUTHOR: Pete Bentley Index: squid/src/cache_cf.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/cache_cf.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/cache_cf.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/cache_cf.c 4 Feb 2000 18:56:51 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: cache_cf.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: cache_cf.c,v 1.1.1.4 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 3 Configuration File Parsing * AUTHOR: Harvest Derived @@ -352,6 +352,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 @@ -742,8 +744,8 @@ } while ((t = strtok(NULL, w_space))) { if ((id = httpHeaderIdByNameDef(t, strlen(t))) == -1) - debug(3, 0) ("parse_http_header: Ignoring unknown header '%s'\n", t); - else if (allowed) + id = HDR_OTHER; + if (allowed) CBIT_CLR(*header, id); else CBIT_SET(*header, id); @@ -817,6 +819,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); } @@ -1270,6 +1276,7 @@ } #define free_onoff free_int +#define free_httpanonymizer free_int #define dump_eol dump_string #define free_eol free_string 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.3 diff -u -r1.1.1.2 -r1.1.1.3 --- squid/src/cbdata.c 26 Jan 2000 03:23:10 -0000 1.1.1.2 +++ squid/src/cbdata.c 4 Feb 2000 18:56:51 -0000 1.1.1.3 @@ -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.3 2000/02/04 18:56:51 hno Exp $ * * DEBUG: section 45 Callback Data Registry * AUTHOR: Duane Wessels @@ -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 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/cf.data.pre 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/cf.data.pre 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ +# $Id: cf.data.pre,v 1.1.1.4 2000/02/04 18:56:52 hno Exp $ # # # SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -42,7 +42,7 @@ various options happen to be. If you don't need to change the default, you shouldn't uncomment the line. Doing so may cause run-time problems. In some cases "none" refers to no default - setting at all, while in other cases it refers to a valid + setting at all, whilst in other cases it refers to a valid option - the comments for that keyword indicate if this is the case. @@ -74,7 +74,7 @@ The default port number is 3128. - If you are running Squid in accelerator mode, then you + If you are running Squid in accelerateor mode, then you probably want to listen on port 80 also, or instead. The -a command line option will override the *first* port @@ -130,7 +130,10 @@ receive replies from multicast group members. You must be very careful to NOT use a multicast address which - is already in use by another group of caches. + is already in use by another group of caches. NLANR has been + assigned a block of multicast address space for use in Web + Caching. Plese write to us at nlanr-cache@nlanr.net to receive + an address for your own use. If you are unsure about multicast, please read the Multicast chapter in the Squid FAQ (http://squid.nlanr.net/Squid/FAQ/). @@ -170,7 +173,7 @@ udp_outgoing_address is used for ICP packets sent out to other caches. - The default behavior is to not bind to any specific address. + The default behaviour is to not bind to any specific address. NOTE, udp_incoming_address and udp_outgoing_address can not have the same value (unless it is 0.0.0.0) since they both use @@ -372,14 +375,11 @@ TYPE: int LOC: Config.Timeout.icp_query_max DOC_START - Normally the ICP query timeout is determined dynamically. But - sometimes it can lead to very large values (say 5 seconds). - Use this option to put an upper limit on the dynamic timeout - value. Do NOT use this option to always use a fixed (instead - of a dynamic) timeout value. + When you use the dynamic ICP query timeout (by setting + 'icp_query_timeout' to zero) you might want to place an + upper limit on the timeout value. - If 'icp_query_timeout' is set to zero, then this value is - ignored. + If 'icp_query_timeout' is set to zero, this value is ignored. icp_query_timeout 2000 DOC_END @@ -613,11 +613,8 @@ You can specify multiple cache_dir lines to spread the cache among different disk partitions. - Type specifies the kind of storage system to use. Most - everyone will want to use "ufs" as the type. If you are using - Async I/O (--enable async-io) on Linux or Solaris, then you may - want to try "asyncufs" as the type. Async IO support may be - buggy, however, so beware. + Type specifies the kind of storage system to use. If you + don't know what to put here, then use "ufs". 'Directory' is a top-level directory where cache swap files will be stored. If you want to use an entire disk @@ -661,7 +658,7 @@ LOC: Config.Log.log DOC_START Cache logging file. This is where general information about - your cache's behavior goes. You can increase the amount of data + your cache's behaviour goes. You can increase the amount of data logged to this file with the "debug_options" tag below. cache_log @DEFAULT_CACHE_LOG@ @@ -676,7 +673,7 @@ Logs the activities of the storage manager. Shows which objects are ejected from the cache, and which objects are saved and for how long. To disable, enter "none". There are - not really utilities to analyze this data, so you can safely + not really utilities to analyse this data, so you can safely disable it. cache_store_log @DEFAULT_STORE_LOG@ @@ -725,7 +722,7 @@ programs use. To disable/enable this emulation, set emulate_httpd_log to 'off' or 'on'. The default is to use the native log format since it includes useful - information that Squid-specific log analyzers use. + information that Squid-specific log analysers use. emulate_httpd_log off DOC_END @@ -843,7 +840,7 @@ DOC_START If you want the anonymous login password to be more informative (and enable the use of picky ftp servers), set this to something - reasonable for your domain, like wwwuser@somewhere.net + resonable for your domain, like wwwuser@somewhere.net The reason why this is domainless by default is that the request can be made on the behalf of a user in any domain, @@ -943,7 +940,7 @@ LOC: Config.Program.pinger DOC_START Specify the location of the executable for the pinger process. - This is only useful if you configured Squid (during compilation) + This is only useful if you configured Squid (during compliation) with the '--enable-icmp' option. pinger_program @DEFAULT_PINGER@ @@ -1130,24 +1127,14 @@ DEFAULT: 0 LOC: Config.maxReplyBodySize DOC_START - This option specifies the maximum size of a reply body. It - can be used to prevent users from downloading very large files, - such as MP3's and movies. The reply size is checked twice. - First when we get the reply headers, we check the - content-length value. If the content length value exists and - is larger than this parameter, the request is denied and the - user receives an error message that says "the request or reply - is too large." If there is no content-length, and the reply - size exceeds this limit, the client's connection is just closed - and they will receive a partial reply. - - NOTE: downstream caches probably can not detect a partial reply - if there is no content-length header, so they will cache - partial responses and give them out as hits. You should NOT - use this option if you have downstream caches. - - If you set this parameter to zero (the default), there will be - no limit imposed. + This specifies the maximum size for an HTTP reply body. + This can be used to restrict users from downloading very + large files. If the reply headers include a content-length + value, then we can recognize large reply bodies early and + avoid downloading any of it. If not, we will download as + much data up to this limit and then ungraciously terminate + the transfer. If you set this parameter to zero, there + will be no limit imposed. reply_body_max_size 0 DOC_END @@ -1165,17 +1152,17 @@ 'Min' is the time (in minutes) an object without an explicit expiry time should be considered fresh. The recommended value is 0, any higher values may cause dynamic applications - to be erroneously cached unless the application designer + to be erronously cached unless the application designer has taken the appropriate actions. 'Percent' is a percentage of the objects age (time since last - modification age) an object without explicit expiry time + modification age) an object without explicit exipry time will be considered fresh. '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 @@ -1258,7 +1245,7 @@ to maximize the potential byte hit rate improvement of LFUDA. For more information about these cache replacement policies see - http://www.hpl.hp.com/techreports/1999/HPL-1999-69.html and + http://www.hpl.hp.com/personal/John_Dilley/caching/wcw.html and http://fog.hpl.external.hp.com/techreports/98/HPL-98-173.html. replacement_policy LFUDA @@ -1487,7 +1474,7 @@ DOC_START The maximum amount of time that a client (browser) is allowed to remain connected to the cache process. This protects the Cache - from having a lot of sockets (and hence file descriptors) tied up + from having alot of sockets (and hence file descriptors) tied up in a CLOSE_WAIT state from remote clients that go away without properly shutting down (either because of a network failure or because of a poor client implementation). The default is one @@ -1900,7 +1887,7 @@ create cache hierarchies. An 'announcement' message is sent (via UDP) to the registration - service by Squid. By default, the announcement message is NOT + service by Squid. By default, the annoucement message is NOT SENT unless you enable it with 'announce_period' below. The announcement message includes your hostname, plus the @@ -2303,14 +2290,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 @@ -2512,7 +2499,7 @@ allow specific headers (thus denying all others), or you may deny specific headers (thus allowing all others). - For example, to achieve the same behavior as the old + For example, to achieve the same behaviour as the old 'http_anonymizer standard' option, you should use: anonymize_headers deny From Referer Server @@ -2525,7 +2512,7 @@ anonymize_headers allow Content-Encoding Content-Length anonymize_headers allow Content-Type Date Expires Host anonymize_headers allow If-Modified-Since Last-Modified - anonymize_headers allow Location Pragma Accept + anonymize_headers allow Location Pragma Accept Charset anonymize_headers allow Accept-Encoding Accept-Language anonymize_headers allow Content-Language Mime-Version anonymize_headers allow Retry-After Title Connection @@ -2570,8 +2557,8 @@ DEFAULT: @DEFAULT_ERROR_DIR@ DOC_START If you wish to create your own versions of the default - (English) error files, either to customize them to suit your - language or company copy the template English files to another + (English) error files, either to customise them to suit your + language or company copy the template english files to another directory and point this tag at them. DOC_END @@ -2645,7 +2632,7 @@ snmp_access allow|deny [!]aclname ... Example: -snmp_access allow snmppublic localhost +snmp_access allow snmpppublic localhost snmp_access deny all DOC_END @@ -2668,7 +2655,7 @@ snmp_outgoing_address is used for SNMP packets returned to SNMP agents. - The default behavior is to not bind to any specific address. + The default behaviour is to not bind to any specific address. NOTE, snmp_incoming_address and snmp_outgoing_address can not have the same value since they both use port 3130. @@ -2693,10 +2680,10 @@ DEFAULT: 0.0.0.0 IFDEF: USE_WCCP DOC_START - Use this option to define your WCCP ``home'' router for - Squid. Setting the 'wccp_router' to 0.0.0.0 (the default) - disables WCCP. -wccp_router 0.0.0.0 + Specifies the router that will manage WCCP for this + cache. + +wccp_router 10.0.0.1 DOC_END NAME: wccp_incoming_address @@ -2711,21 +2698,14 @@ DEFAULT: 255.255.255.255 IFDEF: USE_WCCP DOC_START - wccp_incoming_address Use this option if you require WCCP - messages to be received on only one - interface. Do NOT use this option if - you're unsure how many interfaces you - have, or if you know you have only one - interface. - - wccp_outgoing_address Use this option if you require WCCP - messages to be sent out on only one - interface. Do NOT use this option if - you're unsure how many interfaces you - have, or if you know you have only one - interface. + Just like 'udp_incoming_address' above, but for the WCCP port. + + wccp_incoming_address is used for the WCCP socket receiving + messages from WCCP routers. + wccp_outgoing_address is used for WCCP packets returned to WCCP + routers. - The default behavior is to not bind to any specific address. + The default behaviour is to not bind to any specific address. NOTE, wccp_incoming_address and wccp_outgoing_address can not have the same value since they both use port 2048. @@ -2798,7 +2778,7 @@ LOC: Config.Delay DOC_START This is used to determine which delay pool a request falls into. - The first matched delay pool is always used, i.e., if a request falls + The first matched delay pool is always used, ie, if a request falls into delay pool number one, no more delay are checked, otherwise the rest are checked in order of their delay pool number until they have all been checked. For example, if you want some_big_clients in delay @@ -3013,7 +2993,7 @@ LOC: Config.mcast_miss.port DEFAULT: 3135 DOC_START - This is the port number to be used in conjunction with + This is the port number to be used in conjuction with 'mcast_miss_addr'. DOC_END @@ -3101,6 +3081,7 @@ This controls whether the server will generate a Cache Digest of its contents. By default, Cache Digest generation is enabled if Squid is compiled with USE_CACHE_DIGESTS defined. + digest_generation on DOC_END @@ -3113,69 +3094,61 @@ This is the number of bits of the server's Cache Digest which will be associated with the Digest entry for a given HTTP Method and URL (public key) combination. The default is 5. + digest_bits_per_entry 5 DOC_END NAME: digest_rebuild_period IFDEF: USE_CACHE_DIGESTS -COMMENT: (seconds) -TYPE: time_t +TYPE: int LOC: Config.digest.rebuild_period -DEFAULT: 1 hour +DEFAULT: 3600 DOC_START This is the number of seconds between Cache Digest rebuilds. - By default the server's Digest is rebuilt every hour. -digest_rebuild_period 1 hour + By default the server's Digest is rebuilt every hour - 60 + minutes * 60 seconds per minute, 3600 seconds. + +digest_rebuild_period 3600 DOC_END NAME: digest_rewrite_period -COMMENT: (seconds) IFDEF: USE_CACHE_DIGESTS -TYPE: time_t +TYPE: int LOC: Config.digest.rewrite_period -DEFAULT: 1 hour +DEFAULT: 3600 DOC_START This is the number of seconds between Cache Digest writes to disk. By default the server's Digest is written to disk every - hour. -digest_rewrite_period 1 hour + hour - 60 minutes * 60 seconds per minute, 3600 seconds. + +digest_rewrite_period 3600 DOC_END NAME: digest_swapout_chunk_size -COMMENT: (bytes) -TYPE: b_size_t IFDEF: USE_CACHE_DIGESTS +TYPE: int LOC: Config.digest.swapout_chunk_size -DEFAULT: 4096 bytes +DEFAULT: 4096 DOC_START This is the number of bytes of the Cache Digest to write to - disk at a time. It defaults to 4096 bytes (4KB), the Squid - default swap page. -digest_swapout_chunk_size 4096 bytes + disk at a time. It defaults to 4096 (4KB), the Squid default + swap page. + +digest_swapout_chunk_size 4096 DOC_END NAME: digest_rebuild_chunk_percentage -COMMENT: (percent, 0-100) IFDEF: USE_CACHE_DIGESTS TYPE: int LOC: Config.digest.rebuild_chunk_percentage DEFAULT: 10 DOC_START - This is the percentage of the Cache Digest to be scanned at a - time. By default it is set to 10% of the Cache Digest. + This is the portion (where 0 < portion <= 100) of the Cache Digest + to be scanned at a time. By default it is set to 10 (10%) of + the Cache Digest. + digest_rebuild_chunk_percentage 10 DOC_END -NAME: chroot -TYPE: string -LOC: Config.chroot_dir -DEFAULT: none -DOC_START - Use this to have Squid do a chroot() while initializing. This - also causes Squid to fully drop root privileges after - initializing. This means, for example, that if you use a HTTP - port less than 1024 and try to reconfigure, you will get an - error. -DOC_END EOF 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/client.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/client.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 0 WWW Client * AUTHOR: Harvest Derived 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/client_db.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/client_db.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 0 Client Database * AUTHOR: Duane Wessels Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/client_side.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/client_side.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: client_side.c,v 1.1.1.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -524,8 +524,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); @@ -575,6 +575,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); @@ -847,6 +851,10 @@ request->http_ver); debug(33, 3) ("clientSetKeepaliveFlag: method = %s\n", RequestMethodStr[request->method]); + /* + * If we wanted to limit the number of client-side idle persistent + * connections, this is a good place to do it. + */ if (httpMsgIsPersistent(request->http_ver, req_hdr)) request->flags.proxy_keepalive = 1; } @@ -1160,29 +1168,20 @@ if (request->range) clientBuildRangeHeader(http, rep); /* - * Add a estimated Age header on cache hits. + * Add Age header, not that our header must replace Age headers + * from other caches if any */ - if (is_hit) { - /* - * Remove any existing Age header sent by upstream caches - * (note that the existing header is passed along unmodified - * on cache misses) - */ + if (http->entry->timestamp > 0) { httpHeaderDelById(hdr, HDR_AGE); /* - * This adds the calculated object age. Note that the details of the - * age calculation is performed by adjusting the timestamp in - * storeTimestampsSet(), not here. - * - * BROWSER WORKAROUND: IE sometimes hangs when receiving a 0 Age - * header, so don't use it unless there is a age to report. Please - * note that Age is only used to make a conservative estimation of - * the objects age, so a Age: 0 header does not add any useful - * information to the reply in any case. - */ - if (http->entry->timestamp < squid_curtime) - httpHeaderPutInt(hdr, HDR_AGE, - squid_curtime - http->entry->timestamp); + * we do not follow HTTP/1.1 precisely here becuase we rely + * on Date header when computing entry->timestamp; we should + * be using _request_ time if Date header is not available + * or if it is out of sync + */ + httpHeaderPutInt(hdr, HDR_AGE, + http->entry->timestamp <= squid_curtime ? + squid_curtime - http->entry->timestamp : 0); } /* Append X-Cache */ httpHeaderPutStrf(hdr, HDR_X_CACHE, "%s from %s", @@ -1720,7 +1719,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. @@ -1774,7 +1773,7 @@ } else if ((done = clientCheckTransferDone(http)) != 0 || size == 0) { debug(33, 5) ("clientWriteComplete: FD %d transfer is DONE\n", fd); /* We're finished case */ - if (httpReplyBodySize(http->request->method, entry->mem_obj->reply) < 0) { + if (http->entry->mem_obj->reply->content_length < 0) { debug(33, 5) ("clientWriteComplete: closing, content_length < 0\n"); comm_close(fd); } else if (!done) { @@ -1964,8 +1963,7 @@ clientCacheHit, http); } else { - /* MISS CASE */ - http->log_type = LOG_TCP_MISS; + /* MISS CASE, http->log_type is already set! */ clientProcessMiss(http); } } @@ -2500,6 +2498,11 @@ k = conn->in.size - 1 - conn->in.offset; if (k == 0) { if (conn->in.offset >= Config.maxRequestHeaderSize) { + int fd = open("/tmp/error:request-too-large", O_WRONLY | O_CREAT | O_TRUNC); + if (fd >= 0) { + write(fd, conn->in.buf, conn->in.offset); + close(fd); + } /* The request is too large to handle */ debug(33, 1) ("Request header is too large (%d bytes)\n", (int) conn->in.offset); @@ -2606,7 +2609,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; @@ -2614,7 +2617,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) @@ -2706,7 +2709,7 @@ static int clientGotNotEnough(clientHttpRequest * http) { - int cl = httpReplyBodySize(http->request->method, http->entry->mem_obj->reply); + int cl = http->entry->mem_obj->reply->content_length; int hs = http->entry->mem_obj->reply->hdr_sz; assert(cl >= 0); if (http->out.offset < cl + hs) 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/comm.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/comm.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/comm_select.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/comm_select.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 5 Socket Functions * @@ -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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/debug.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/debug.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 0 Debug Routines * AUTHOR: Harvest Derived 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/defines.h 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/defines.h 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/delay_pools.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/delay_pools.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: David Luyer 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/dns.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/dns.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 34 Dnsserver interface * AUTHOR: Harvest Derived Index: squid/src/dns_internal.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/dns_internal.c,v retrieving revision 1.1.1.1 retrieving revision 1.1.1.2 diff -u -r1.1.1.1 -r1.1.1.2 --- squid/src/dns_internal.c 26 Jan 2000 03:25:01 -0000 1.1.1.1 +++ squid/src/dns_internal.c 4 Feb 2000 18:56:52 -0000 1.1.1.2 @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.c,v 1.1.1.1 2000/01/26 03:25:01 hno Exp $ + * $Id: dns_internal.c,v 1.1.1.2 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -130,8 +130,8 @@ 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); 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/enums.h 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/enums.h 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -655,5 +655,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 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/errorpage.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/errorpage.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: errorpage.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: errorpage.c,v 1.1.1.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 4 Error Generation * AUTHOR: Duane Wessels 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.3 diff -u -r1.1.1.2 -r1.1.1.3 --- squid/src/filemap.c 26 Jan 2000 03:25:01 -0000 1.1.1.2 +++ squid/src/filemap.c 4 Feb 2000 18:56:52 -0000 1.1.1.3 @@ -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.3 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 8 Swap File Bitmap * AUTHOR: Harvest Derived @@ -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 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/forward.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/forward.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: forward.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: forward.c,v 1.1.1.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 17 Request Forwarding * AUTHOR: Duane Wessels @@ -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); @@ -240,6 +243,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, @@ -369,6 +375,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"); @@ -436,6 +445,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); @@ -480,6 +492,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; @@ -553,6 +568,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/ftp.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/ftp.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/ftp.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/ftp.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: ftp.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: ftp.c,v 1.1.1.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/globals.h 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/globals.h 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/gopher.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/gopher.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 10 Gopher * AUTHOR: Harvest Derived 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.3 diff -u -r1.1.1.2 -r1.1.1.3 --- squid/src/htcp.c 26 Jan 2000 03:25:01 -0000 1.1.1.2 +++ squid/src/htcp.c 4 Feb 2000 18:56:52 -0000 1.1.1.3 @@ -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.3 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 31 Hypertext Caching Protocol * AUTHOR: Duane Wesssels @@ -805,7 +805,7 @@ debug(31, 3) ("htcpHandle: htcpHdr.major = %d\n", (int) htcpHdr.major); debug(31, 3) ("htcpHandle: htcpHdr.minor = %d\n", (int) htcpHdr.minor); if (sz != htcpHdr.length) { - debug(31, 1) ("htcpHandle: sz != htcpHdr.length\n"); + debug(31, 0) ("htcpHandle: sz != htcpHdr.length\n"); return; } buf += sizeof(htcpHeader); Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/http.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/http.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: http.c,v 1.1.1.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -587,6 +587,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/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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/icp_v2.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/icp_v2.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 12 Internet Cache Protocol * AUTHOR: Duane Wessels 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/internal.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/internal.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 76 Internal Squid Object handling * AUTHOR: Duane, Alex, Henrik 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/ipc.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/ipc.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 54 Interprocess Communication * AUTHOR: Duane Wessels 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/ipcache.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/ipcache.c 4 Feb 2000 18:56:52 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived 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.2 diff -u -r1.1.1.1 -r1.1.1.2 --- squid/src/leakfinder.c 26 Jan 2000 03:23:10 -0000 1.1.1.1 +++ squid/src/leakfinder.c 4 Feb 2000 18:56:52 -0000 1.1.1.2 @@ -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.2 2000/02/04 18:56:52 hno Exp $ * * DEBUG: section 45 Callback Data Registry * AUTHOR: Duane Wessels @@ -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); Index: squid/src/main.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/main.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/main.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/main.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: main.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: main.c,v 1.1.1.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -72,6 +72,8 @@ static EVH SquidShutdown; static void mainSetCwd(void); +static const char *squid_start_script = "squid_start"; + #if TEST_ACCESS #include "test_access.c" #endif @@ -429,10 +431,6 @@ static void mainInitialize(void) { - /* chroot if configured to run inside chroot */ - if (Config.chroot_dir && chroot(Config.chroot_dir)) { - fatal("failed to chroot"); - } if (opt_catch_signals) { squid_signal(SIGSEGV, death, SA_NODEFER | SA_RESETHAND); squid_signal(SIGBUS, death, SA_NODEFER | SA_RESETHAND); @@ -513,8 +511,6 @@ else debug(1, 1) ("ICP port disabled in httpd_accelerator mode\n"); } - if (Config.chroot_dir) - no_suid(); if (!configured_once) writePidFile(); /* write PID file */ @@ -625,18 +621,10 @@ /* send signal to running copy and exit */ if (opt_send_signal != -1) { - /* chroot if configured to run inside chroot */ - if (Config.chroot_dir && chroot(Config.chroot_dir)) { - fatal("failed to chroot"); - } sendSignal(); /* NOTREACHED */ } if (opt_create_swap_dirs) { - /* chroot if configured to run inside chroot */ - if (Config.chroot_dir && chroot(Config.chroot_dir)) { - fatal("failed to chroot"); - } setEffectiveUser(); debug(0, 0) ("Creating Swap Directories\n"); storeCreateSwapDirectories(); @@ -741,6 +729,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 void watch_child(char *argv[]) { @@ -773,6 +798,7 @@ for (i = 0; i < Squid_MaxFD; i++) close(i); for (;;) { + mainStartScript(argv[0]); if ((pid = fork()) == 0) { /* child */ prog = xstrdup(argv[0]); 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/mime.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/mime.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 25 MIME Parsing * AUTHOR: Harvest Derived 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/neighbors.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/neighbors.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 15 Neighbor Routines * AUTHOR: Harvest Derived 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/net_db.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/net_db.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 38 Network Measurement Database * AUTHOR: Duane Wessels 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/peer_digest.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/peer_digest.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 72 Peer Digest Routines * AUTHOR: Alex Rousskov 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/peer_select.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/peer_select.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 44 Peer Selection Algorithm * AUTHOR: Duane Wessels @@ -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/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/protos.h,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/protos.h 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/protos.h 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: protos.h,v 1.1.1.4 2000/02/04 18:56:53 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -62,6 +62,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 +111,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; @@ -725,6 +728,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); @@ -857,6 +862,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; @@ -886,6 +892,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 */ @@ -948,6 +967,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 @@ -957,9 +978,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 /* @@ -1200,7 +1225,7 @@ 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 /* @@ -1212,3 +1237,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/pump.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/Attic/pump.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/pump.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/pump.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -1,5 +1,5 @@ /* - * $Id: pump.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: pump.c,v 1.1.1.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 61 PUMP handler * AUTHOR: Kostas Anagnostakis Index: squid/src/redirect.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/redirect.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/redirect.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/redirect.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: redirect.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: redirect.c,v 1.1.1.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 29 Redirector * AUTHOR: Duane Wessels 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/refresh.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/refresh.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 22 Refresh Calculation * AUTHOR: Harvest Derived 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/send-announce.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/send-announce.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 27 Cache Announcer * AUTHOR: Duane Wessels 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/snmp_agent.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/snmp_agent.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 49 SNMP Interface * AUTHOR: Kostas Anagnostakis 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/snmp_core.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/snmp_core.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 49 SNMP support * AUTHOR: Glenn Chisholm 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/squid.h 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/squid.h 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * AUTHOR: Duane Wessels * @@ -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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/ssl.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/ssl.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels Index: squid/src/stat.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/stat.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/stat.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/stat.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: stat.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: stat.c,v 1.1.1.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -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/store.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/store.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/store.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/store.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -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->high_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 @@ -1250,24 +1254,9 @@ { const HttpReply *reply = entry->mem_obj->reply; time_t served_date = reply->date; - int age = httpHeaderGetInt(&reply->header, HDR_AGE); - /* - * The timestamp calculations below tries to mimic the properties - * of the age calculation in RFC2616 section 13.2.3. The implementaion - * isn't complete, and the most notable exception from the RFC is that - * this does not account for response_delay, but it probably does - * not matter much as this is calculated immediately when the headers - * are received, not when the whole response has been received. - */ /* make sure that 0 <= served_date <= squid_curtime */ if (served_date < 0 || served_date > squid_curtime) served_date = squid_curtime; - /* - * Compensate with Age header if origin server clock is ahead of us - * and there is a cache in between us and the origin server - */ - if (age > squid_curtime - served_date) - served_date = squid_curtime - age; entry->expires = reply->expires; entry->lastmod = reply->last_modified; entry->timestamp = served_date; @@ -1470,3 +1459,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 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/store_client.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/store_client.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: store_client.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: store_client.c,v 1.1.1.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -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,75 @@ * 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); + if (sc->flags.disk_io_pending) { + debug(20, 1) ("WARNING: Averted multiple fd operation (2)\n"); + return; + } + debug(20, 3) ("storeClientCopy3: reading from STORE\n"); + storeClientFileRead(sc); } static void @@ -293,6 +325,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 +351,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 +366,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 +378,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) ("storeClientReadHeader: 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) ("storeClientReadHeader: failed to unpack meta data\n"); - sc->callback = NULL; - callback(sc->callback_data, sc->copy_buf, -1); + storeClientCallback(sc, -1); return; } /* @@ -372,8 +400,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 +427,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 +448,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 +476,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 +494,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 +530,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; } 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/store_digest.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/store_digest.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 71 Store Digest Manager * AUTHOR: Alex Rousskov @@ -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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/store_dir.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/store_dir.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -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->high_size = (int) (((float) SD->max_size * + (float) Config.Swap.highWaterMark) / 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.2 diff -u -r1.1.1.1 -r1.1.1.2 --- squid/src/store_dir_ufs.c 26 Jan 2000 03:25:01 -0000 1.1.1.1 +++ squid/src/store_dir_ufs.c 4 Feb 2000 18:56:53 -0000 1.1.1.2 @@ -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.2 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 47 Store Directory Routines * AUTHOR: Duane Wessels @@ -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; @@ -305,8 +304,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 +397,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 +448,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 +461,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 +529,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 +550,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 +661,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 +678,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 +714,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 +778,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 +874,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 +1091,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 +1140,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, "HiWater Size: %d KB\n", SD->high_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 +1314,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.2 diff -u -r1.1.1.1 -r1.1.1.2 --- squid/src/store_heap_replacement.c 26 Jan 2000 03:25:01 -0000 1.1.1.1 +++ squid/src/store_heap_replacement.c 4 Feb 2000 18:56:53 -0000 1.1.1.2 @@ -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.2 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 20 Storage Manager Heap-based replacement * AUTHOR: John Dilley 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 retrieving revision 1.1.1.2 diff -u -r1.1.1.1 -r1.1.1.2 --- squid/src/store_io_asyncufs.c 26 Jan 2000 03:25:01 -0000 1.1.1.1 +++ squid/src/store_io_asyncufs.c 4 Feb 2000 18:56:53 -0000 1.1.1.2 @@ -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; 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.2 diff -u -r1.1.1.1 -r1.1.1.2 --- squid/src/store_io_ufs.c 26 Jan 2000 03:25:01 -0000 1.1.1.1 +++ squid/src/store_io_ufs.c 4 Feb 2000 18:56:53 -0000 1.1.1.2 @@ -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.2 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 79 Storage Manager UFS Interface * AUTHOR: Duane Wessels 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/store_key_md5.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/store_key_md5.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 20 Storage Manager MD5 Cache Keys * AUTHOR: Duane Wessels 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.3 diff -u -r1.1.1.2 -r1.1.1.3 --- squid/src/store_log.c 26 Jan 2000 03:25:01 -0000 1.1.1.2 +++ squid/src/store_log.c 4 Feb 2000 18:56:53 -0000 1.1.1.3 @@ -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.3 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 20 Storage Manager Logging Functions * AUTHOR: Duane Wessels 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/store_rebuild.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/store_rebuild.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 20 Store Rebuild Routines * AUTHOR: Duane Wessels @@ -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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/store_swapin.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/store_swapin.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 20 Storage Manager Swapin Functions * AUTHOR: Duane Wessels 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.3 diff -u -r1.1.1.2 -r1.1.1.3 --- squid/src/store_swapmeta.c 26 Jan 2000 03:25:01 -0000 1.1.1.2 +++ squid/src/store_swapmeta.c 4 Feb 2000 18:56:53 -0000 1.1.1.3 @@ -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.3 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 20 Storage Manager Swapfile Metadata * AUTHOR: Kostas Anagnostakis @@ -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 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/store_swapout.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/store_swapout.c 4 Feb 2000 18:56:53 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: store_swapout.c,v 1.1.1.4 2000/02/04 18:56:53 hno Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -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) { + sfileno bad = e->swap_file_number; debug(20, 1) ("storeSwapOutFileClosed: swapfile %08X, errflag=%d\n\t%s\n", - e->swap_file_number, errflag, xstrerror()); + 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); 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 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/structs.h 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/structs.h 4 Feb 2000 18:56:54 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: structs.h,v 1.1.1.4 2000/02/04 18:56:54 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -378,7 +378,6 @@ } Netdb; struct { int log_udp; - int enable_purge; int res_defnames; int anonymizer; int client_db; @@ -476,13 +475,12 @@ #endif HttpHeaderMask anonymize_headers; char *coredump_dir; - char *chroot_dir; #if USE_CACHE_DIGESTS struct { int bits_per_entry; - time_t rebuild_period; - time_t rewrite_period; - size_t swapout_chunk_size; + int rebuild_period; + int rewrite_period; + int swapout_chunk_size; int rebuild_chunk_percentage; } digest; #endif @@ -493,6 +491,9 @@ char *prefix; int on; } Accel; + struct { + int enable_purge; + } onoff; }; struct _close_handler { @@ -1277,6 +1278,9 @@ int id; ssize_t object_sz; size_t swap_hdr_sz; +#if URL_CHECKSUM_DEBUG + unsigned int chksum; +#endif }; struct _StoreEntry { @@ -1308,10 +1312,13 @@ swapdir_t type; fileMap *map; int cur_size; + int high_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; @@ -1335,12 +1342,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; }; @@ -1405,6 +1432,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; }; @@ -1521,6 +1558,8 @@ int clients; int requests; int hits; + int mem_hits; + int disk_hits; int errors; kb_t kbytes_in; kb_t kbytes_out; 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/tools.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/tools.c 4 Feb 2000 18:56:54 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:54 hno Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -482,7 +482,6 @@ { struct passwd *pwd = NULL; struct group *grp = NULL; - gid_t gid; debug(21, 3) ("leave_suid: PID %d called\n", getpid()); if (geteuid() != 0) return; @@ -492,15 +491,12 @@ if ((pwd = getpwnam(Config.effectiveUser)) == NULL) return; if (Config.effectiveGroup && (grp = getgrnam(Config.effectiveGroup))) { - gid = grp->gr_gid; + if (setgid(grp->gr_gid) < 0) + debug(50, 1) ("leave_suid: setgid: %s\n", xstrerror()); } else { - gid = pwd->pw_gid; + if (setgid(pwd->pw_gid) < 0) + debug(50, 1) ("leave_suid: setgid: %s\n", xstrerror()); } -#if HAVE_SETGROUPS - setgroups(1, &gid); -#endif - if (setgid(gid) < 0) - debug(50, 1) ("leave_suid: setgid: %s\n", xstrerror()); debug(21, 3) ("leave_suid: PID %d giving up root, becoming '%s'\n", getpid(), pwd->pw_name); #if HAVE_SETRESUID @@ -876,7 +872,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 retrieving revision 1.1.1.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/typedefs.h 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/typedefs.h 4 Feb 2000 18:56:54 -0000 1.1.1.4 @@ -1,6 +1,6 @@ /* - * $Id: typedefs.h,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: typedefs.h,v 1.1.1.4 2000/02/04 18:56:54 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -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; @@ -265,3 +268,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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/unlinkd.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/unlinkd.c 4 Feb 2000 18:56:54 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:54 hno Exp $ * * DEBUG: section 12 Unlink Daemon * AUTHOR: Duane Wessels 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/url.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/url.c 4 Feb 2000 18:56:54 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:54 hno Exp $ * * DEBUG: section 23 URL Parsing * AUTHOR: Duane Wessels 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/urn.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/urn.c 4 Feb 2000 18:56:54 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:54 hno Exp $ * * DEBUG: section 52 URN Parsing * AUTHOR: Kostas Anagnostakis 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.4 diff -u -r1.1.1.3 -r1.1.1.4 --- squid/src/useragent.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/useragent.c 4 Feb 2000 18:56:54 -0000 1.1.1.4 @@ -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.4 2000/02/04 18:56:54 hno Exp $ * * DEBUG: section 40 User-Agent logging * AUTHOR: Joe Ramey 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.2 diff -u -r1.1.1.1 -r1.1.1.2 --- squid/src/wccp.c 26 Jan 2000 03:25:01 -0000 1.1.1.1 +++ squid/src/wccp.c 4 Feb 2000 18:56:54 -0000 1.1.1.2 @@ -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.2 2000/02/04 18:56:54 hno Exp $ * - * DEBUG: section 80 WCCP Support + * DEBUG: section 80 WCCP Support * AUTHOR: Glenn Chisholm * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -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, @@ -265,7 +265,7 @@ wccp_here_i_am.id = wccp_i_see_you.id; send(theOutWccpConnection, - &wccp_here_i_am, + (void *) &wccp_here_i_am, sizeof(wccp_here_i_am), 0);