From: wessels <> Date: Tue, 13 Jul 1999 20:50:53 +0000 (+0000) Subject: 2.3 branch merge X-Git-Tag: SQUID_3_0_PRE1~2126 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=eb82405424e78c76fdc47eb0f4f1c40d00931e67;p=thirdparty%2Fsquid.git 2.3 branch merge --- diff --git a/ChangeLog b/ChangeLog index db4f6c9dde..2a862b7075 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +Changes to Squid-2.3.DEVEL1 (): + + - Added WCCP support. This adds the 'wccp_router' squid.conf + option. + - Added internal DNS queries; Most installations can run + without the external dnsserver processes. + - Rewrote much of the code that stores cache objects on + disk. Developed a programming interface that should + allow new storage systems to be added easily. This still + is pretty ugly and needs a lot of work, however. + - Replaced async_io.c "tags" with callback data locks. + This probably breaks async IO in a bad way. + - Tried to write an Async IO disk storage module. + - Added code to replace the StoreEntry linked list with a + heap structure. This allows for different replacement + algorithms, instead of being stuck with LRU. This adds + the 'replacement_policy' squid.conf option. (John Dilley + et al). + - Fixed HTCP queries by actually checking for freshness + based on the HTCP header fields. + - Fixed passing of redirector command line arguments. + - Added 'request_header_max_size' squid.conf option. + - Added 'request_body_max_size' squid.conf option. + - Added 'reply_body_max_size' squid.conf option. + - 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): - Removed all SNMP specific ACL code diff --git a/configure b/configure index 455a934fff..026173dc57 100755 --- a/configure +++ b/configure @@ -37,7 +37,7 @@ ac_help="$ac_help ac_help="$ac_help --enable-useragent-log Enable logging of User-Agent header" ac_help="$ac_help - --enable-wccp Enable Web Cache Coordination Protocol" + --disable-wccp Disable Web Cache Coordination Protocol" ac_help="$ac_help --enable-kill-parent-hack Kill parent on shutdown" @@ -85,6 +85,16 @@ ac_help="$ac_help --disable-ident-lookups This allows you to remove code that performs Ident (RFC 931) lookups." +ac_help="$ac_help + --disable-internal-dns This prevents Squid from directly sending and + receiving DNS messages, and instead enables the + old external 'dnsserver' processes." +ac_help="$ac_help + --enable-truncate This uses truncate() instead of unlink() when + removing cache files. Truncate gives a little + performance improvement, but may cause problems + when used with async I/O. Truncate uses more + filesystem inodes than unlink.." # Initialize some variables set by options. # The variables have the same names as the options, with @@ -593,7 +603,7 @@ fi -# From configure.in Revision: 1.175 +# From configure.in Revision: 1.176.2.3 ac_aux_dir= for ac_dir in cfgaux $srcdir/cfgaux; do if test -f $ac_dir/install-sh; then @@ -621,7 +631,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:625: checking host system type" >&5 +echo "configure:635: checking host system type" >&5 host_alias=$host case "$host_alias" in @@ -689,7 +699,7 @@ PRESET_CFLAGS="$CFLAGS" # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:693: checking for $ac_word" >&5 +echo "configure:703: 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 @@ -718,7 +728,7 @@ if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:722: checking for $ac_word" >&5 +echo "configure:732: 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 @@ -766,7 +776,7 @@ fi fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:770: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:780: 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. @@ -776,11 +786,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 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:794: \"$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 @@ -800,12 +810,12 @@ if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:804: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:814: 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:809: checking whether we are using GNU C" >&5 +echo "configure:819: 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 @@ -814,7 +824,7 @@ else yes; #endif EOF -if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:818: \"$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:828: \"$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 @@ -829,7 +839,7 @@ if test $ac_cv_prog_gcc = yes; then ac_save_CFLAGS="$CFLAGS" CFLAGS= echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:833: checking whether ${CC-cc} accepts -g" >&5 +echo "configure:843: 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 @@ -989,7 +999,6 @@ if test "$use_dlmalloc" = yes; then ac_cv_func_malloc_trim="yes" ac_cv_func_malloc_usable_size="yes" ac_cv_func_malloc_stats="yes" - ac_cv_func_mallinfo="yes" ac_cv_func_mallopt="yes" ac_cv_lib_gnumalloc="no" ac_cv_header_gnumalloc_h="no" @@ -1157,11 +1166,15 @@ fi # Check whether --enable-wccp or --disable-wccp was given. if test "${enable_wccp+set}" = set; then enableval="$enable_wccp" - if test "$enableval" = "yes" ; then - echo "Web Cache Coordination Protocol enabled" - WCCP_OBJS='$(WCCP_OBJS)' + if test "$enableval" = "no" ; then + echo "Web Cache Coordination Protocol disabled" cat >> confdefs.h <<\EOF -#define WCCP 1 +#define USE_WCCP 0 +EOF + + else + cat >> confdefs.h <<\EOF +#define USE_WCCP 1 EOF fi @@ -1169,7 +1182,6 @@ EOF fi - # Check whether --enable-kill_parent_hack or --disable-kill_parent_hack was given. if test "${enable_kill_parent_hack+set}" = set; then enableval="$enable_kill_parent_hack" @@ -1417,6 +1429,39 @@ EOF fi +# Check whether --enable-internal-dns or --disable-internal-dns was given. +if test "${enable_internal_dns+set}" = set; then + enableval="$enable_internal_dns" + if test "$enableval" = "no" ; then + echo "Disabling Internal DNS queries" + cat >> confdefs.h <<\EOF +#define USE_DNSSERVERS 1 +EOF + + else + cat >> confdefs.h <<\EOF +#define USE_DNSSERVERS 0 +EOF + + fi + +fi + + +# Check whether --enable-truncate or --disable-truncate was given. +if test "${enable_truncate+set}" = set; then + enableval="$enable_truncate" + if test "$enableval" = "yes" ; then + echo "Enabling truncate instead of unlink" + cat >> confdefs.h <<\EOF +#define USE_TRUNCATE 1 +EOF + + fi + +fi + + # Force some compilers to use ANSI features # case "$host" in @@ -1437,7 +1482,7 @@ case "$host" in esac echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:1441: checking how to run the C preprocessor" >&5 +echo "configure:1486: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -1452,13 +1497,13 @@ else # 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:1462: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1507: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1469,13 +1514,13 @@ else 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:1479: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1524: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -1508,7 +1553,7 @@ echo "$ac_t""$CPP" 1>&6 # 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:1512: checking for a BSD compatible install" >&5 +echo "configure:1557: 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 @@ -1560,7 +1605,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1564: checking for $ac_word" >&5 +echo "configure:1609: 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 @@ -1587,7 +1632,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:1591: checking whether ln -s works" >&5 +echo "configure:1636: 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 @@ -1610,7 +1655,7 @@ fi # Extract the first word of "sh", so it can be a program name with args. set dummy sh; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1614: checking for $ac_word" >&5 +echo "configure:1659: 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 @@ -1642,7 +1687,7 @@ fi # Extract the first word of "false", so it can be a program name with args. set dummy false; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1646: checking for $ac_word" >&5 +echo "configure:1691: 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 @@ -1674,7 +1719,7 @@ fi # Extract the first word of "true", so it can be a program name with args. set dummy true; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1678: checking for $ac_word" >&5 +echo "configure:1723: 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 @@ -1706,7 +1751,7 @@ fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1710: checking for $ac_word" >&5 +echo "configure:1755: 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 @@ -1738,7 +1783,7 @@ fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1742: checking for $ac_word" >&5 +echo "configure:1787: 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 @@ -1770,7 +1815,7 @@ fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1774: checking for $ac_word" >&5 +echo "configure:1819: 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 @@ -1802,7 +1847,7 @@ fi # Extract the first word of "ln", so it can be a program name with args. set dummy ln; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1806: checking for $ac_word" >&5 +echo "configure:1851: 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 @@ -1834,7 +1879,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1838: checking for $ac_word" >&5 +echo "configure:1883: 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 @@ -1866,7 +1911,7 @@ fi # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1870: checking for $ac_word" >&5 +echo "configure:1915: 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 @@ -1898,7 +1943,7 @@ fi # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1902: checking for $ac_word" >&5 +echo "configure:1947: 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 @@ -1948,12 +1993,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1952: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1997: 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> @@ -1961,7 +2006,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1965: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1986,7 +2031,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1990: checking for opendir in -ldir" >&5 +echo "configure:2035: 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 @@ -1994,7 +2039,7 @@ else 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:2054: \"$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 @@ -2027,7 +2072,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:2031: checking for opendir in -lx" >&5 +echo "configure:2076: 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 @@ -2035,7 +2080,7 @@ else 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:2095: \"$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 @@ -2069,12 +2114,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:2073: checking for ANSI C header files" >&5 +echo "configure:2118: 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 @@ -2082,7 +2127,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:2086: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2131: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2099,7 +2144,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2117,7 +2162,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -2138,7 +2183,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2149,7 +2194,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:2153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2198: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -2199,6 +2244,9 @@ for ac_hdr in \ netdb.h \ netinet/in.h \ netinet/tcp.h \ + netinet/ip_compat.h \ + netinet/ip_fil.h \ + netinet/ip_nat.h \ poll.h \ pwd.h \ regex.h \ @@ -2233,17 +2281,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:2237: checking for $ac_hdr" >&5 +echo "configure:2285: 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:2247: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:2295: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -2271,12 +2319,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2275: checking for working const" >&5 +echo "configure:2323: 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:2377: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2346,14 +2394,14 @@ EOF fi echo $ac_n "checking whether byte ordering is bigendian""... $ac_c" 1>&6 -echo "configure:2350: checking whether byte ordering is bigendian" >&5 +echo "configure:2398: 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 @@ -2364,11 +2412,11 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2368: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2416: \"$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 @@ -2379,7 +2427,7 @@ int main() { #endif ; return 0; } EOF -if { (eval echo configure:2383: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2431: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_bigendian=yes else @@ -2399,7 +2447,7 @@ if test "$cross_compiling" = yes; then { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2464: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -2437,20 +2485,20 @@ fi echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6 -echo "configure:2441: checking if ANSI prototypes work" >&5 +echo "configure:2489: 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:2502: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ansi_prototypes="yes" else @@ -2472,13 +2520,13 @@ EOF fi echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6 -echo "configure:2476: checking for tm->tm_gmtoff" >&5 +echo "configure:2524: 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 @@ -2487,7 +2535,7 @@ struct tm foo; foo.tm_gmtoff = 0; ; return 0; } EOF -if { (eval echo configure:2491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2539: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_tm_gmoff="yes" else @@ -2508,14 +2556,60 @@ EOF fi +echo $ac_n "checking for struct mallinfo""... $ac_c" 1>&6 +echo "configure:2561: 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 +#include +#endif +int main() { +struct mallinfo foo; + foo.arena = 0; + foo.ordblks = 0; + foo.smblks = 0; + foo.hblks = 0; + foo.hblkhd = 0; + foo.uordblks = 0; + foo.fordblks = 0; + foo.keepcost = 0; +; return 0; } +EOF +if { (eval echo configure:2585: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then + rm -rf conftest* + ac_cv_have_struct_mallinfo="yes" +else + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + ac_cv_have_struct_mallinfo="no" +fi +rm -f conftest* + +fi + +echo "$ac_t""$ac_cv_have_struct_mallinfo" 1>&6 +if test $ac_cv_have_struct_mallinfo = "yes" ; then + cat >> confdefs.h <<\EOF +#define HAVE_STRUCT_MALLINFO 1 +EOF + +fi + echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6 -echo "configure:2513: checking for extended mallinfo" >&5 +echo "configure:2607: 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 @@ -2524,7 +2618,7 @@ struct mallinfo foo; foo.mxfast = 0; ; return 0; } EOF -if { (eval echo configure:2528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2622: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ext_mallinfo="yes" else @@ -2546,13 +2640,13 @@ EOF fi echo $ac_n "checking for struct rusage""... $ac_c" 1>&6 -echo "configure:2550: checking for struct rusage" >&5 +echo "configure:2644: 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:2663: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_struct_rusage="yes" else @@ -2587,13 +2681,13 @@ EOF fi echo $ac_n "checking for ip->ip_hl""... $ac_c" 1>&6 -echo "configure:2591: checking for ip->ip_hl" >&5 +echo "configure:2685: 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 @@ -2610,7 +2704,7 @@ struct iphdr ip; ip.ip_hl= 0; ; return 0; } EOF -if { (eval echo configure:2614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2708: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ip_hl="yes" else @@ -2632,7 +2726,7 @@ EOF fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2636: checking size of int" >&5 +echo "configure:2730: 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 @@ -2640,7 +2734,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2651,7 +2745,7 @@ main() exit(0); } EOF -if { (eval echo configure:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2749: \"$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 @@ -2671,7 +2765,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2675: checking size of long" >&5 +echo "configure:2769: 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 @@ -2679,7 +2773,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2690,7 +2784,7 @@ main() exit(0); } EOF -if { (eval echo configure:2694: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2788: \"$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 @@ -2710,7 +2804,7 @@ EOF echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:2714: checking size of void *" >&5 +echo "configure:2808: 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 @@ -2718,7 +2812,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2729,7 +2823,7 @@ main() exit(0); } EOF -if { (eval echo configure:2733: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2827: \"$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 @@ -2752,19 +2846,19 @@ EOF # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:2756: checking for working alloca.h" >&5 +echo "configure:2850: 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:2768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2785,12 +2879,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2789: checking for alloca" >&5 +echo "configure:2883: 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:2911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2845,12 +2939,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2849: checking whether alloca needs Cray hooks" >&5 +echo "configure:2943: 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 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2879: checking for $ac_func" >&5 +echo "configure:2973: 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:3001: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2930,7 +3024,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2934: checking stack direction for C alloca" >&5 +echo "configure:3028: 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 @@ -2938,7 +3032,7 @@ else 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:3055: \"$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 @@ -2980,12 +3074,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2984: checking for pid_t" >&5 +echo "configure:3078: 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 @@ -3013,12 +3107,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3017: checking for size_t" >&5 +echo "configure:3111: 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 @@ -3046,12 +3140,12 @@ EOF fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3050: checking for ssize_t" >&5 +echo "configure:3144: 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 @@ -3079,12 +3173,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3083: checking for off_t" >&5 +echo "configure:3177: 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 @@ -3112,12 +3206,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3116: checking for mode_t" >&5 +echo "configure:3210: 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 @@ -3145,12 +3239,12 @@ EOF fi echo $ac_n "checking for fd_mask""... $ac_c" 1>&6 -echo "configure:3149: checking for fd_mask" >&5 +echo "configure:3243: 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 @@ -3179,13 +3273,13 @@ fi echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:3183: checking for socklen_t" >&5 +echo "configure:3277: 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 @@ -3216,7 +3310,7 @@ EOF fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:3220: checking for main in -lnsl" >&5 +echo "configure:3314: 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 @@ -3224,14 +3318,14 @@ else 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:3329: \"$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 @@ -3259,7 +3353,7 @@ else fi echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:3263: checking for main in -lsocket" >&5 +echo "configure:3357: 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 @@ -3267,14 +3361,14 @@ else 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:3372: \"$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 @@ -3306,7 +3400,7 @@ if test "x$ac_cv_enabled_dlmalloc" = "xyes" ; then echo "skipping libmalloc check (--enable-dlmalloc specified)" else echo $ac_n "checking for main in -lgnumalloc""... $ac_c" 1>&6 -echo "configure:3310: checking for main in -lgnumalloc" >&5 +echo "configure:3404: 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 @@ -3314,14 +3408,14 @@ else 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:3419: \"$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 @@ -3364,7 +3458,7 @@ fi *) echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6 -echo "configure:3368: checking for main in -lmalloc" >&5 +echo "configure:3462: 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 @@ -3372,14 +3466,14 @@ else 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:3477: \"$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 @@ -3412,7 +3506,7 @@ fi fi echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6 -echo "configure:3416: checking for main in -lbsd" >&5 +echo "configure:3510: 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 @@ -3420,14 +3514,14 @@ else 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:3525: \"$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 @@ -3455,7 +3549,7 @@ else fi echo $ac_n "checking for main in -lregex""... $ac_c" 1>&6 -echo "configure:3459: checking for main in -lregex" >&5 +echo "configure:3553: 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 @@ -3463,14 +3557,14 @@ else 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:3568: \"$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 @@ -3491,7 +3585,7 @@ else fi echo $ac_n "checking for gethostbyname in -lbind""... $ac_c" 1>&6 -echo "configure:3495: checking for gethostbyname in -lbind" >&5 +echo "configure:3589: 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 @@ -3499,7 +3593,7 @@ else 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:3608: \"$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 @@ -3544,7 +3638,7 @@ if test $ac_cv_lib_bind_gethostbyname = "no" ; then ;; *) echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 -echo "configure:3548: checking for inet_aton in -lresolv" >&5 +echo "configure:3642: 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 @@ -3552,7 +3646,7 @@ else 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:3661: \"$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 @@ -3579,7 +3673,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for inet_aton in -l44bsd""... $ac_c" 1>&6 -echo "configure:3583: checking for inet_aton in -l44bsd" >&5 +echo "configure:3677: 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 @@ -3587,7 +3681,7 @@ else 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:3696: \"$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 @@ -3630,7 +3724,7 @@ else fi echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6 -echo "configure:3634: checking for main in -lresolv" >&5 +echo "configure:3728: 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 @@ -3638,14 +3732,14 @@ else 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:3743: \"$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 @@ -3676,7 +3770,7 @@ fi esac fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:3680: checking for main in -lm" >&5 +echo "configure:3774: 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 @@ -3684,14 +3778,14 @@ else 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:3789: \"$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 @@ -3720,7 +3814,7 @@ fi echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3724: checking for crypt in -lcrypt" >&5 +echo "configure:3818: 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 @@ -3728,7 +3822,7 @@ else 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:3837: \"$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 @@ -3772,7 +3866,7 @@ fi echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6 -echo "configure:3776: checking for main in -lpthread" >&5 +echo "configure:3870: 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 @@ -3780,14 +3874,14 @@ else 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:3885: \"$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 +3916,7 @@ fi case "$host" in *-pc-sco3.2*) echo $ac_n "checking for strftime in -lintl""... $ac_c" 1>&6 -echo "configure:3826: checking for strftime in -lintl" >&5 +echo "configure:3920: 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 @@ -3830,7 +3924,7 @@ else 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:3939: \"$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 @@ -4003,12 +4097,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4007: checking for $ac_func" >&5 +echo "configure:4101: 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:4129: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4064,12 +4158,12 @@ if test "$async_io" = "yes" ; then do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4068: checking for $ac_func" >&5 +echo "configure:4162: 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:4190: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4119,7 +4213,7 @@ done fi echo $ac_n "checking if setresuid is implemented""... $ac_c" 1>&6 -echo "configure:4123: checking if setresuid is implemented" >&5 +echo "configure:4217: 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 @@ -4127,7 +4221,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -4140,7 +4234,7 @@ else } EOF -if { (eval echo configure:4144: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4238: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_func_setresuid="yes" else @@ -4165,19 +4259,27 @@ fi if test "$IPF_TRANSPARENT" ; then echo $ac_n "checking if IP-Filter header files are installed""... $ac_c" 1>&6 -echo "configure:4169: checking if IP-Filter header files are installed" >&5 - if test "$ac_cv_header_ip_compat_h" = "no" || - test "$ac_cv_header_ip_fil_h" = "no" || - test "$ac_cv_header_ip_nat_h" = "no" ; then - IPF_TRANSPARENT="no" +echo "configure:4263: checking if IP-Filter header files are installed" >&5 + if test "$ac_cv_header_ip_compat_h" = "yes" && + test "$ac_cv_header_ip_fil_h" = "yes" && + test "$ac_cv_header_ip_nat_h" = "yes" ; then + IPF_TRANSPARENT="yes" cat >> confdefs.h <<\EOF -#define IPF_TRANSPARENT 0 +#define IPF_TRANSPARENT 1 EOF - else + elif test "$ac_cv_header_netinet_ip_compat_h" = "yes" && + test "$ac_cv_header_netinet_ip_fil_h" = "yes" && + test "$ac_cv_header_netinet_ip_nat_h" = "yes" ; then IPF_TRANSPARENT="yes" cat >> confdefs.h <<\EOF #define IPF_TRANSPARENT 1 +EOF + + else + IPF_TRANSPARENT="no" + cat >> confdefs.h <<\EOF +#define IPF_TRANSPARENT 0 EOF fi @@ -4200,13 +4302,13 @@ if test -z "$USE_GNUREGEX" ; then esac fi echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6 -echo "configure:4204: checking if GNUregex needs to be compiled" >&5 +echo "configure:4306: 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 @@ -4214,7 +4316,7 @@ int main() { regex_t t; regcomp(&t,"",0); ; return 0; } EOF -if { (eval echo configure:4218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4320: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* USE_GNUREGEX="no" else @@ -4245,12 +4347,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4249: checking for $ac_func" >&5 +echo "configure:4351: 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:4379: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4301,12 +4403,12 @@ done echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6 -echo "configure:4305: checking Default FD_SETSIZE value" >&5 +echo "configure:4407: 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:4437: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then DEFAULT_FD_SETSIZE=`cat conftestval` else @@ -4350,7 +4452,7 @@ EOF echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6 -echo "configure:4354: checking Maximum number of filedescriptors we can open" >&5 +echo "configure:4456: checking Maximum number of filedescriptors we can open" >&5 TLDFLAGS="$LDFLAGS" case $host in i386-unknown-freebsd*) @@ -4362,7 +4464,7 @@ if test "$cross_compiling" = yes; then SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -4419,7 +4521,7 @@ main() { } EOF -if { (eval echo configure:4423: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_MAXFD=`cat conftestval` else @@ -4446,12 +4548,12 @@ fi LDFLAGS="$TLDFLAGS" echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6 -echo "configure:4450: checking Default UDP send buffer size" >&5 +echo "configure:4552: checking Default UDP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -4472,7 +4574,7 @@ main () } EOF -if { (eval echo configure:4476: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4578: \"$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 @@ -4491,12 +4593,12 @@ EOF echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6 -echo "configure:4495: checking Default UDP receive buffer size" >&5 +echo "configure:4597: checking Default UDP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -4517,7 +4619,7 @@ main () } EOF -if { (eval echo configure:4521: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4623: \"$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 @@ -4536,12 +4638,12 @@ EOF echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6 -echo "configure:4540: checking Default TCP send buffer size" >&5 +echo "configure:4642: checking Default TCP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -4562,7 +4664,7 @@ main () } EOF -if { (eval echo configure:4566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4668: \"$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 @@ -4581,12 +4683,12 @@ EOF echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6 -echo "configure:4585: checking Default TCP receive buffer size" >&5 +echo "configure:4687: checking Default TCP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -4607,7 +4709,7 @@ main () } EOF -if { (eval echo configure:4611: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4713: \"$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 @@ -4626,19 +4728,19 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 -echo "configure:4630: checking if sys_errlist is already defined" >&5 +echo "configure:4732: 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_errlist0; ; return 0; } EOF -if { (eval echo configure:4642: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4744: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_needs_sys_errlist="no" else @@ -4660,16 +4762,16 @@ EOF fi echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 -echo "configure:4664: checking for libresolv _dns_ttl_ hack" >&5 +echo "configure:4766: 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:4775: \"$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 @@ -4685,12 +4787,12 @@ fi rm -f conftest* echo $ac_n "checking if inet_ntoa() actually works""... $ac_c" 1>&6 -echo "configure:4689: checking if inet_ntoa() actually works" >&5 +echo "configure:4791: checking if inet_ntoa() actually works" >&5 if test "$cross_compiling" = yes; then INET_NTOA_RESULT="broken" else cat > conftest.$ac_ext < @@ -4709,7 +4811,7 @@ main () } EOF -if { (eval echo configure:4713: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:4815: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then INET_NTOA_RESULT=`cat conftestval` else @@ -4735,9 +4837,9 @@ fi if test "$ac_cv_header_sys_statvfs_h" = "yes" ; then echo $ac_n "checking for working statvfs() interface""... $ac_c" 1>&6 -echo "configure:4739: checking for working statvfs() interface" >&5 +echo "configure:4841: checking for working statvfs() interface" >&5 cat > conftest.$ac_ext < @@ -4754,7 +4856,7 @@ statvfs("/tmp", &sfs); ; return 0; } EOF -if { (eval echo configure:4758: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:4860: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_func_statvfs=yes else @@ -4774,12 +4876,12 @@ fi fi echo $ac_n "checking for _res.nsaddr_list""... $ac_c" 1>&6 -echo "configure:4778: checking for _res.nsaddr_list" >&5 +echo "configure:4880: 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:4908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_nsaddr_list="yes" else @@ -4824,12 +4926,12 @@ fi if test $ac_cv_have_res_nsaddr_list = "no" ; then echo $ac_n "checking for _res.ns_list""... $ac_c" 1>&6 -echo "configure:4828: checking for _res.ns_list" >&5 +echo "configure:4930: 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:4958: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_ns_list="yes" else @@ -5059,7 +5161,6 @@ s%@LIB_MALLOC@%$LIB_MALLOC%g s%@ASYNC_OBJS@%$ASYNC_OBJS%g s%@SQUID_PTHREAD_LIB@%$SQUID_PTHREAD_LIB%g s%@DELAY_OBJS@%$DELAY_OBJS%g -s%@WCCP_OBJS@%$WCCP_OBJS%g s%@SNMPLIB@%$SNMPLIB%g s%@SNMP_OBJS@%$SNMP_OBJS%g s%@makesnmplib@%$makesnmplib%g diff --git a/configure.in b/configure.in index e62e813380..e2ebdee103 100644 --- a/configure.in +++ b/configure.in @@ -3,13 +3,13 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.176 1999/05/27 03:26:10 wessels Exp $ +dnl $Id: configure.in,v 1.177 1999/07/13 14:50:57 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.176 $)dnl +AC_REVISION($Revision: 1.177 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(cfgaux) @@ -196,7 +196,6 @@ if test "$use_dlmalloc" = yes; then ac_cv_func_malloc_trim="yes" ac_cv_func_malloc_usable_size="yes" ac_cv_func_malloc_stats="yes" - ac_cv_func_mallinfo="yes" ac_cv_func_mallopt="yes" ac_cv_lib_gnumalloc="no" ac_cv_header_gnumalloc_h="no" @@ -304,14 +303,14 @@ AC_ARG_ENABLE(useragent_log, ]) AC_ARG_ENABLE(wccp, -[ --enable-wccp Enable Web Cache Coordination Protocol], -[ if test "$enableval" = "yes" ; then - echo "Web Cache Coordination Protocol enabled" - WCCP_OBJS='$(WCCP_OBJS)' - AC_DEFINE(WCCP) +[ --disable-wccp Disable Web Cache Coordination Protocol], +[ if test "$enableval" = "no" ; then + echo "Web Cache Coordination Protocol disabled" + AC_DEFINE(USE_WCCP, 0) + else + AC_DEFINE(USE_WCCP, 1) fi ]) -AC_SUBST(WCCP_OBJS) AC_ARG_ENABLE(kill_parent_hack, [ --enable-kill-parent-hack @@ -496,6 +495,30 @@ AC_ARG_ENABLE(ident-lookups, fi ]) +AC_ARG_ENABLE(internal-dns, +[ --disable-internal-dns This prevents Squid from directly sending and + receiving DNS messages, and instead enables the + old external 'dnsserver' processes.], +[ if test "$enableval" = "no" ; then + echo "Disabling Internal DNS queries" + AC_DEFINE(USE_DNSSERVERS, 1) + else + AC_DEFINE(USE_DNSSERVERS, 0) + fi +]) + +AC_ARG_ENABLE(truncate, +[ --enable-truncate This uses truncate() instead of unlink() when + removing cache files. Truncate gives a little + performance improvement, but may cause problems + when used with async I/O. Truncate uses more + filesystem inodes than unlink..], +[ if test "$enableval" = "yes" ; then + echo "Enabling truncate instead of unlink" + AC_DEFINE(USE_TRUNCATE) + fi +]) + # Force some compilers to use ANSI features # case "$host" in @@ -577,6 +600,9 @@ AC_CHECK_HEADERS( \ netdb.h \ netinet/in.h \ netinet/tcp.h \ + netinet/ip_compat.h \ + netinet/ip_fil.h \ + netinet/ip_nat.h \ poll.h \ pwd.h \ regex.h \ @@ -634,6 +660,27 @@ if test $ac_cv_have_tm_gmoff = "yes" ; then AC_DEFINE(HAVE_TM_GMTOFF) fi +AC_CACHE_CHECK(for struct mallinfo,ac_cv_have_struct_mallinfo, [ + AC_TRY_COMPILE([#include +#if HAVE_MALLOC_H +#include +#endif], + [struct mallinfo foo; + foo.arena = 0; + foo.ordblks = 0; + foo.smblks = 0; + foo.hblks = 0; + foo.hblkhd = 0; + foo.uordblks = 0; + foo.fordblks = 0; + foo.keepcost = 0;], + ac_cv_have_struct_mallinfo="yes", + ac_cv_have_struct_mallinfo="no") +]) +if test $ac_cv_have_struct_mallinfo = "yes" ; then + AC_DEFINE(HAVE_STRUCT_MALLINFO) +fi + AC_CACHE_CHECK(for extended mallinfo,ac_cv_have_ext_mallinfo, [ AC_TRY_COMPILE([#include #include ], @@ -947,14 +994,19 @@ dnl IP-Filter support requires ipf header files. These aren't dnl installed by default, so we need to check for them if test "$IPF_TRANSPARENT" ; then AC_MSG_CHECKING(if IP-Filter header files are installed) - if test "$ac_cv_header_ip_compat_h" = "no" || - test "$ac_cv_header_ip_fil_h" = "no" || - test "$ac_cv_header_ip_nat_h" = "no" ; then + if test "$ac_cv_header_ip_compat_h" = "yes" && + test "$ac_cv_header_ip_fil_h" = "yes" && + test "$ac_cv_header_ip_nat_h" = "yes" ; then + IPF_TRANSPARENT="yes" + AC_DEFINE(IPF_TRANSPARENT, 1) + elif test "$ac_cv_header_netinet_ip_compat_h" = "yes" && + test "$ac_cv_header_netinet_ip_fil_h" = "yes" && + test "$ac_cv_header_netinet_ip_nat_h" = "yes" ; then + IPF_TRANSPARENT="yes" + AC_DEFINE(IPF_TRANSPARENT, 1) + else IPF_TRANSPARENT="no" AC_DEFINE(IPF_TRANSPARENT, 0) - else - IPF_TRANSPARENT="yes" - AC_DEFINE(IPF_TRANSPARENT) fi AC_MSG_RESULT($IPF_TRANSPARENT) fi diff --git a/doc/Programming-Guide/prog-guide.sgml b/doc/Programming-Guide/prog-guide.sgml index 762487208a..2245dc50d9 100644 --- a/doc/Programming-Guide/prog-guide.sgml +++ b/doc/Programming-Guide/prog-guide.sgml @@ -809,6 +809,11 @@ Squid consists of the following major components assume the open request will succeed, and may begin reading or writing immediately. +

+ diff --git a/include/autoconf.h.in b/include/autoconf.h.in index 21e9b72e68..8ab6bfa692 100644 --- a/include/autoconf.h.in +++ b/include/autoconf.h.in @@ -104,8 +104,10 @@ /* Define to enable SNMP monitoring of Squid */ #undef SQUID_SNMP -/* Define to enable WCCP */ -#undef WCCP +/* + * Define to enable WCCP + */ +#define USE_WCCP 1 /* * Squid frequently calls gettimeofday() for accurate timestamping. @@ -249,6 +251,22 @@ */ #undef HAVE_STATVFS +/* + * If --disable-internal-dns was given to configure, then we'll use + * the dnsserver processes instead. + */ +#undef USE_DNSSERVERS + +/* + * we check for the existance of struct mallinfo + */ +#undef HAVE_STRUCT_MALLINFO + +/* + * Do we want to use truncate(2) or unlink(2)? + */ +#undef USE_TRUNCATE + /* The number of bytes in a int. */ #undef SIZEOF_INT @@ -465,6 +483,15 @@ /* Define if you have the header file. */ #undef HAVE_NETINET_IN_H +/* Define if you have the header file. */ +#undef HAVE_NETINET_IP_COMPAT_H + +/* Define if you have the header file. */ +#undef HAVE_NETINET_IP_FIL_H + +/* Define if you have the header file. */ +#undef HAVE_NETINET_IP_NAT_H + /* Define if you have the header file. */ #undef HAVE_NETINET_TCP_H diff --git a/lib/Makefile.in b/lib/Makefile.in index bd42b6234d..df1d6bb5d6 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.44 1999/06/24 20:19:55 wessels Exp $ +# $Id: Makefile.in,v 1.45 1999/07/13 14:51:03 wessels Exp $ # prefix = @prefix@ top_srcdir = @top_srcdir@ @@ -42,8 +42,7 @@ UTILOBJS = rfc1123.o \ $(LIBOBJS) REGEXOBJS = GNUregex.o DLMALLOCOBJS = dlmalloc.o -GREOBJS = libgre.o -LIBS = libmiscutil.a libgre.a @LIBREGEX@ @LIBDLMALLOC@ +LIBS = libmiscutil.a @LIBREGEX@ @LIBDLMALLOC@ CFLAGS = $(AC_CFLAGS) $(INCLUDE) @@ -66,11 +65,6 @@ libdlmalloc.a: $(DLMALLOCOBJS) $(AR_R) $@ $(DLMALLOCOBJS) $(RANLIB) $@ -libgre.a: $(GREOBJS) - $(RM) -f $@ - $(AR_R) $@ $(GREOBJS) - $(RANLIB) $@ - clean: -rm -f *.o $(LIBS) core diff --git a/src/Makefile.in b/src/Makefile.in index 25ec28f783..58503e7a7c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,7 +1,7 @@ # # Makefile for the Squid Object Cache server # -# $Id: Makefile.in,v 1.178 1999/06/30 06:28:58 wessels Exp $ +# $Id: Makefile.in,v 1.179 1999/07/13 14:51:05 wessels Exp $ # # Uncomment and customize the following to suit your needs: # @@ -174,7 +174,7 @@ OBJS = \ urn.o \ useragent.o \ wais.o \ - @WCCP_OBJS@ \ + wccp.o \ whois.o \ $(XTRA_OBJS) @@ -194,9 +194,6 @@ ASYNC_OBJS = \ LEAKFINDER_OBJS = \ leakfinder.o -WCCP_OBJS = \ - wccp.o - DEFAULTS = \ -DDEFAULT_CONFIG_FILE=\"$(DEFAULT_CONFIG_FILE)\" diff --git a/src/cf.data.pre b/src/cf.data.pre index 4330c9e942..1ff3aebae3 100644 --- a/src/cf.data.pre +++ b/src/cf.data.pre @@ -1,6 +1,6 @@ # -# $Id: cf.data.pre,v 1.159 1999/06/25 16:21:21 wessels Exp $ +# $Id: cf.data.pre,v 1.160 1999/07/13 14:51:07 wessels Exp $ # # # SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -488,13 +488,6 @@ DOC_START reached. Thereafter, blocks will be used to store hot objects. - The values of cache_mem_low and cache_mem_high (below) can be - used to tune the use of the memory pool. When the high mark is - reached, in-transit and hot objects will be released to clear - space. When an object transfer is completed, it will remain in - memory only if the current memory usage is below the low water - mark. - The default is 8 Megabytes. cache_mem 8 MB @@ -2624,7 +2617,7 @@ NAME: wccp_router TYPE: address LOC: Config.Wccp.router DEFAULT: 0.0.0.0 -IFDEF: WCCP +IFDEF: USE_WCCP DOC_START Specifies the router that will manage WCCP for this cache. @@ -2634,15 +2627,15 @@ DOC_END NAME: wccp_incoming_address TYPE: address -LOC: Config.Addrs.wccp_outgoing +LOC: Config.Wccp.incoming DEFAULT: 0.0.0.0 -IFDEF: WCCP +IFDEF: USE_WCCP DOC_NONE NAME: wccp_outgoing_address TYPE: address -LOC: Config.Addrs.wccp_outgoing +LOC: Config.Wccp.outgoing DEFAULT: 255.255.255.255 -IFDEF: WCCP +IFDEF: USE_WCCP DOC_START Just like 'udp_incoming_address' above, but for the WCCP port. diff --git a/src/client_side.cc b/src/client_side.cc index 397404c744..b72c7b131d 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.459 1999/06/24 22:53:43 wessels Exp $ + * $Id: client_side.cc,v 1.460 1999/07/13 14:51:09 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -172,7 +172,7 @@ clientCreateStoreEntry(clientHttpRequest * h, method_t m, request_flags flags) * so make a fake one. */ if (h->request == NULL) - h->request = requestLink(requestCreate(m, PROTO_NONE, NULL)); + h->request = requestLink(requestCreate(m, PROTO_NONE, null_string)); e = storeCreateEntry(h->uri, h->log_uri, flags, m); storeClientListAdd(e, h); #if DELAY_POOLS diff --git a/src/comm_select.cc b/src/comm_select.cc index 18d7c86fe3..14f752e13d 100644 --- a/src/comm_select.cc +++ b/src/comm_select.cc @@ -1,6 +1,6 @@ /* - * $Id: comm_select.cc,v 1.36 1999/06/30 05:49:40 wessels Exp $ + * $Id: comm_select.cc,v 1.37 1999/07/13 14:51:10 wessels Exp $ * * DEBUG: section 5 Socket Functions * @@ -215,7 +215,7 @@ comm_check_incoming_poll_handlers(int nfds, int *fds) if ((hdl = fd_table[fd].read_handler)) { fd_table[fd].read_handler = NULL; hdl(fd, &incame); - } else + } else if (pfds[i].events & POLLRDNORM) debug(5, 1) ("comm_poll_incoming: FD %d NULL read handler\n", fd); } @@ -223,7 +223,7 @@ comm_check_incoming_poll_handlers(int nfds, int *fds) if ((hdl = fd_table[fd].write_handler)) { fd_table[fd].write_handler = NULL; hdl(fd, &incame); - } else + } else if (pfds[i].events & POLLWRNORM) debug(5, 1) ("comm_poll_incoming: FD %d NULL write_handler\n", fd); } diff --git a/src/defines.h b/src/defines.h index 389ae3dd73..0c5b0a0182 100644 --- a/src/defines.h +++ b/src/defines.h @@ -1,6 +1,6 @@ /* - * $Id: defines.h,v 1.74 1999/05/26 03:18:15 wessels Exp $ + * $Id: defines.h,v 1.75 1999/07/13 14:51:10 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -270,5 +270,3 @@ #ifndef _PATH_DEVNULL #define _PATH_DEVNULL "/dev/null" #endif - -#define USE_TRUNCATE_NOT_UNLINK 1 diff --git a/src/dns_internal.cc b/src/dns_internal.cc index 57ecfa3f58..1acc10f36c 100644 --- a/src/dns_internal.cc +++ b/src/dns_internal.cc @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.cc,v 1.13 1999/04/26 22:34:06 wessels Exp $ + * $Id: dns_internal.cc,v 1.14 1999/07/13 14:51:11 wessels Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -35,6 +35,8 @@ #include "squid.h" +#if !USE_DNSSERVERS + #ifndef _PATH_RESOLV_CONF #define _PATH_RESOLV_CONF "/etc/resolv.conf" #endif @@ -412,3 +414,5 @@ idnsPTRLookup(const struct in_addr addr, IDNSCB * callback, void *data) q->start_t = current_time; idnsSendQuery(q); } + +#endif /* !USE_DNSSERVERS */ diff --git a/src/enums.h b/src/enums.h index 899573a4d8..a7b7fb5583 100644 --- a/src/enums.h +++ b/src/enums.h @@ -1,6 +1,6 @@ /* - * $Id: enums.h,v 1.158 1999/06/30 05:49:41 wessels Exp $ + * $Id: enums.h,v 1.159 1999/07/13 14:51:12 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -565,7 +565,9 @@ typedef enum { MEM_USHORTLIST, MEM_WORDLIST, MEM_STORE_IO, +#if !USE_DNSSERVERS MEM_IDNS_QUERY, +#endif MEM_EVENT, MEM_MAX } mem_type; diff --git a/src/globals.h b/src/globals.h index efd02a816d..77969dac1c 100644 --- a/src/globals.h +++ b/src/globals.h @@ -1,6 +1,6 @@ /* - * $Id: globals.h,v 1.84 1999/06/24 20:20:03 wessels Exp $ + * $Id: globals.h,v 1.85 1999/07/13 14:51:13 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -98,10 +98,6 @@ extern int theInSnmpConnection; /* -1 */ extern int theOutSnmpConnection; /* -1 */ extern char *snmp_agentinfo; #endif -#ifdef WCCP -extern int theInWccpConnection; /* -1 */ -extern int theOutWccpConnection; /* -1 */ -#endif extern int vhost_mode; /* 0 */ extern int n_disk_objects; /* 0 */ extern iostats IOStats; diff --git a/src/http.cc b/src/http.cc index 850629ee63..d28034ec22 100644 --- a/src/http.cc +++ b/src/http.cc @@ -1,6 +1,6 @@ /* - * $Id: http.cc,v 1.350 1999/06/24 22:53:46 wessels Exp $ + * $Id: http.cc,v 1.351 1999/07/13 14:51:14 wessels Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -800,7 +800,7 @@ httpSendRequest(HttpStateData * httpState) debug(11, 5) ("httpSendRequest: FD %d: httpState %p.\n", httpState->fd, httpState); - if (req->body) + if (httpState->orig_request->body) sendHeaderDone = httpSendRequestEntry; else sendHeaderDone = httpSendComplete; diff --git a/src/main.cc b/src/main.cc index 88dd9670f5..8e890cda8e 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,6 +1,6 @@ /* - * $Id: main.cc,v 1.302 1999/06/24 23:07:09 wessels Exp $ + * $Id: main.cc,v 1.303 1999/07/13 14:51:15 wessels Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -280,7 +280,7 @@ serverConnectionsOpen(void) #ifdef SQUID_SNMP snmpConnectionOpen(); #endif -#ifdef WCCP +#if USE_WCCP wccpConnectionOpen(); #endif clientdbInit(); @@ -306,7 +306,7 @@ serverConnectionsClose(void) #ifdef SQUID_SNMP snmpConnectionShutdown(); #endif -#ifdef WCCP +#if USE_WCCP wccpConnectionShutdown(); #endif asnFreeMemory(); @@ -326,11 +326,13 @@ mainReconfigure(void) #ifdef SQUID_SNMP snmpConnectionClose(); #endif -#ifdef WCCP +#if USE_WCCP wccpConnectionClose(); #endif dnsShutdown(); +#if !USE_DNSSERVERS idnsShutdown(); +#endif redirectShutdown(); authenticateShutdown(); storeDirCloseSwapLogs(); @@ -342,7 +344,9 @@ mainReconfigure(void) fqdncache_restart(); /* sigh, fqdncache too */ errorInitialize(); /* reload error pages */ dnsInit(); +#if !USE_DNSSERVERS idnsInit(); +#endif redirectInit(); authenticateInit(); serverConnectionsOpen(); @@ -448,7 +452,9 @@ mainInitialize(void) ipcache_init(); fqdncache_init(); dnsInit(); +#if !USE_DNSSERVERS idnsInit(); +#endif redirectInit(); authenticateInit(); useragentOpenLog(); @@ -462,7 +468,7 @@ mainInitialize(void) #ifdef SQUID_SNMP snmpInit(); #endif -#ifdef WCCP +#if USE_WCCP wccpInit(); #endif #if MALLOC_DBG @@ -519,7 +525,7 @@ mainInitialize(void) eventAdd("start_announce", start_announce, NULL, 3600.0, 1); eventAdd("ipcache_purgelru", ipcache_purgelru, NULL, 10.0, 1); eventAdd("fqdncache_purgelru", fqdncache_purgelru, NULL, 15.0, 1); -#ifdef WCCP +#if USE_WCCP if (Config.Wccp.router.s_addr != inet_addr("0.0.0.0")) eventAdd("wccpHereIam", wccpHereIam, NULL, 10.0, 1); #endif @@ -635,7 +641,9 @@ main(int argc, char **argv) shutting_down = 1; serverConnectionsClose(); dnsShutdown(); +#if !USE_DNSSERVERS idnsShutdown(); +#endif redirectShutdown(); authenticateShutdown(); eventAdd("SquidShutdown", SquidShutdown, NULL, (double) (wait + 1), 1); @@ -790,7 +798,7 @@ SquidShutdown(void *unused) #ifdef SQUID_SNMP snmpConnectionClose(); #endif -#ifdef WCCP +#if USE_WCCP wccpConnectionClose(); #endif releaseServerSockets(); diff --git a/src/protos.h b/src/protos.h index 06dd592787..e03a9400a9 100644 --- a/src/protos.h +++ b/src/protos.h @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.341 1999/06/30 05:49:42 wessels Exp $ + * $Id: protos.h,v 1.342 1999/07/13 14:51:17 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -523,7 +523,7 @@ extern variable_list *snmp_meshPtblFn(variable_list *, snint *); extern variable_list *snmp_meshCtblFn(variable_list *, snint *); #endif /* SQUID_SNMP */ -#ifdef WCCP +#if USE_WCCP extern PF wccpHandleUdp; extern PF wccpHandleGre; extern EVH wccpHereIam; @@ -531,7 +531,7 @@ extern void wccpInit(void); extern void wccpConnectionOpen(void); extern void wccpConnectionShutdown(void); extern void wccpConnectionClose(void); -#endif /* WCCP */ +#endif /* USE_WCCP */ extern void icpHandleIcpV3(int, struct sockaddr_in, char *, int); extern int icpCheckUdpHit(StoreEntry *, request_t * request); diff --git a/src/ssl.cc b/src/ssl.cc index 9dad0e1c0c..7769b70867 100644 --- a/src/ssl.cc +++ b/src/ssl.cc @@ -1,6 +1,6 @@ /* - * $Id: ssl.cc,v 1.97 1999/06/10 21:06:26 wessels Exp $ + * $Id: ssl.cc,v 1.98 1999/07/13 14:51:18 wessels Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels @@ -240,7 +240,7 @@ sslReadClient(int fd, void *data) } cbdataLock(sslState); if (len < 0) { - debug(50, 1) ("sslReadClient: FD %d: read failure: %s\n", + debug(50, ECONNRESET == errno ? 3 : 1) ("sslReadClient: FD %d: read failure: %s\n", fd, xstrerror()); if (!ignoreErrno(errno)) comm_close(fd); diff --git a/src/stat.cc b/src/stat.cc index 1ac30ecff4..7e89ae9d68 100644 --- a/src/stat.cc +++ b/src/stat.cc @@ -1,6 +1,6 @@ /* - * $Id: stat.cc,v 1.319 1999/06/24 20:20:08 wessels Exp $ + * $Id: stat.cc,v 1.320 1999/07/13 14:51:19 wessels Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -440,7 +440,7 @@ info_get(StoreEntry * sentry) double runtime; #if HAVE_MSTATS && HAVE_GNUMALLOC_H struct mstats ms; -#elif HAVE_MALLINFO +#elif HAVE_MALLINFO && HAVE_STRUCT_MALLINFO struct mallinfo mp; int t; #endif @@ -546,7 +546,7 @@ info_get(StoreEntry * sentry) ms.bytes_total >> 10); storeAppendPrintf(sentry, "\tTotal free: %6d KB %d%%\n", ms.bytes_free >> 10, percent(ms.bytes_free, ms.bytes_total)); -#elif HAVE_MALLINFO +#elif HAVE_MALLINFO && HAVE_STRUCT_MALLINFO mp = mallinfo(); storeAppendPrintf(sentry, "Memory usage for %s via mallinfo():\n", appname); diff --git a/src/store.cc b/src/store.cc index e2a901a8d4..8554039db0 100644 --- a/src/store.cc +++ b/src/store.cc @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.505 1999/06/24 20:26:31 wessels Exp $ + * $Id: store.cc,v 1.506 1999/07/13 14:51:21 wessels Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -693,8 +693,7 @@ storeGetMemSpace(int size) #else heap *heap = inmem_heap; heap_key age, min_age = 0.0; - dlink_list locked_entries; - locked_entries.head = locked_entries.tail = NULL; + linklist *locked_entries = NULL; #endif if (squid_curtime == last_check) return; @@ -713,7 +712,7 @@ storeGetMemSpace(int size) if (storeEntryLocked(e)) { locked++; debug(20, 5) ("storeGetMemSpace: locked key %s\n", storeKeyText(e->key)); - dlinkAdd(e, &e->lock_list, &locked_entries); + linklistPush(e, &locked_entries); continue; } released++; @@ -732,11 +731,8 @@ storeGetMemSpace(int size) /* * Reinsert all bumped locked entries back into heap... */ - for (m = locked_entries.tail; m; m = prev) { - prev = m->prev; - e = m->data; + while ((e = linklistPop(&locked_entries))) e->mem_obj->node = heap_insert(inmem_heap, e); - } #else head = inmem_list.head; for (m = inmem_list.tail; m; m = prev) { @@ -790,8 +786,7 @@ storeMaintainSwapSpace(void *datanotused) #if HEAP_REPLACEMENT heap *heap = store_heap; heap_key age, min_age = 0.0; - dlink_list locked_entries; - locked_entries.head = locked_entries.tail = NULL; + linklist *locked_entries = NULL; #if HEAP_REPLACEMENT_DEBUG if (!verify_heap_property(store_heap)) { debug(20, 1) ("Heap property violated!\n"); @@ -828,7 +823,7 @@ storeMaintainSwapSpace(void *datanotused) */ debug(20, 4) ("storeMaintainSwapSpace: locked url %s\n", (e->mem_obj && e->mem_obj->url) ? e->mem_obj->url : storeKeyText(e->key)); - dlinkAdd(e, &e->lock_list, &locked_entries); + linklistPush(e, &locked_entries); } locked++; continue; @@ -847,7 +842,7 @@ storeMaintainSwapSpace(void *datanotused) * Did not expire the object so we need to add it back into the heap! */ debug(20, 5) ("storeMaintainSwapSpace: non-expired %s\n", storeKeyText(e->key)); - dlinkAdd(e, &e->lock_list, &locked_entries); + linklistAdd(e, &locked_entries); continue; } if ((store_swap_size < store_swap_low) @@ -863,11 +858,8 @@ storeMaintainSwapSpace(void *datanotused) /* * Reinsert all bumped locked entries back into heap... */ - for (m = locked_entries.tail; m; m = prev) { - prev = m->prev; - e = m->data; + while ((e = linklistPop(&locked_entries))) e->node = heap_insert(store_heap, e); - } #else for (m = store_list.tail; m; m = prev) { prev = m->prev; diff --git a/src/store_client.cc b/src/store_client.cc index ee94b6b673..24c817b468 100644 --- a/src/store_client.cc +++ b/src/store_client.cc @@ -1,6 +1,6 @@ /* - * $Id: store_client.cc,v 1.73 1999/06/25 23:37:31 wessels Exp $ + * $Id: store_client.cc,v 1.74 1999/07/13 14:51:23 wessels Exp $ * * DEBUG: section 20 Storage Manager Client-Side Interface * AUTHOR: Duane Wessels @@ -419,8 +419,10 @@ storeUnregister(StoreEntry * e, void *data) sc->flags.disk_io_pending = 0; if (e->store_status == STORE_OK && e->swap_status != SWAPOUT_DONE) storeSwapOut(e); - if (sc->swapin_sio) + if (sc->swapin_sio) { storeClose(sc->swapin_sio); + sc->swapin_sio = NULL; + } if ((callback = sc->callback) != NULL) { /* callback with ssize = -1 to indicate unexpected termination */ debug(20, 3) ("storeUnregister: store_client for %s has a callback\n", diff --git a/src/store_swapout.cc b/src/store_swapout.cc index f92b4f1b72..b65349a26a 100644 --- a/src/store_swapout.cc +++ b/src/store_swapout.cc @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.cc,v 1.56 1999/06/30 05:19:36 wessels Exp $ + * $Id: store_swapout.cc,v 1.57 1999/07/13 14:51:26 wessels Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -117,9 +117,16 @@ storeSwapOut(StoreEntry * e) * will be a chunk of the data which is not in memory and is * not yet on disk. */ - if (storeSwapOutAble(e)) + if (storeSwapOutAble(e)) { if ((on_disk = storeSwapOutObjectBytesOnDisk(mem)) < new_mem_lo) new_mem_lo = on_disk; + } + /* + * Else its not swap-able, and if we're freeing its data then + * we must make it private + */ + else if (new_mem_lo > 0) + storeReleaseRequest(e); stmemFreeDataUpto(&mem->data_hdr, new_mem_lo); mem->inmem_lo = new_mem_lo; if (e->swap_status == SWAPOUT_WRITING) diff --git a/src/structs.h b/src/structs.h index 3c12571ea6..490be500bf 100644 --- a/src/structs.h +++ b/src/structs.h @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.303 1999/06/30 06:29:02 wessels Exp $ + * $Id: structs.h,v 1.304 1999/07/13 14:51:27 wessels Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -280,9 +280,11 @@ struct _SquidConfig { u_short localPort; } Snmp; #endif -#if WCCP +#if USE_WCCP struct { struct in_addr router; + struct in_addr incoming; + struct in_addr outgoing; } Wccp; #endif char *as_whois_server; @@ -334,10 +336,6 @@ struct _SquidConfig { #if SQUID_SNMP struct in_addr snmp_incoming; struct in_addr snmp_outgoing; -#endif -#if WCCP - struct in_addr wccp_incoming; - struct in_addr wccp_outgoing; #endif struct in_addr client_netmask; } Addrs; @@ -1269,7 +1267,6 @@ struct _StoreEntry { sfileno swap_file_number; #if HEAP_REPLACEMENT heap_node *node; - dlink_node lock_list; #else dlink_node lru; #endif diff --git a/src/tools.cc b/src/tools.cc index b09c64ed4a..42339f18f6 100644 --- a/src/tools.cc +++ b/src/tools.cc @@ -1,6 +1,6 @@ /* - * $Id: tools.cc,v 1.184 1999/06/30 06:29:03 wessels Exp $ + * $Id: tools.cc,v 1.185 1999/07/13 14:51:28 wessels Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -105,7 +105,7 @@ dumpMallocStats(void) fprintf(debug_log, "\tTotal free: %6d KB %d%%\n", (int) (ms.bytes_free >> 10), percent(ms.bytes_free, ms.bytes_total)); -#elif HAVE_MALLINFO +#elif HAVE_MALLINFO && HAVE_STRUCT_MALLINFO struct mallinfo mp; int t; if (!do_mallinfo) diff --git a/src/tunnel.cc b/src/tunnel.cc index 1e587be50a..3987087f6f 100644 --- a/src/tunnel.cc +++ b/src/tunnel.cc @@ -1,6 +1,6 @@ /* - * $Id: tunnel.cc,v 1.97 1999/06/10 21:06:26 wessels Exp $ + * $Id: tunnel.cc,v 1.98 1999/07/13 14:51:18 wessels Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels @@ -240,7 +240,7 @@ sslReadClient(int fd, void *data) } cbdataLock(sslState); if (len < 0) { - debug(50, 1) ("sslReadClient: FD %d: read failure: %s\n", + debug(50, ECONNRESET == errno ? 3 : 1) ("sslReadClient: FD %d: read failure: %s\n", fd, xstrerror()); if (!ignoreErrno(errno)) comm_close(fd); diff --git a/src/unlinkd.cc b/src/unlinkd.cc index d4e50f4c08..52bb82b255 100644 --- a/src/unlinkd.cc +++ b/src/unlinkd.cc @@ -1,5 +1,5 @@ /* - * $Id: unlinkd.cc,v 1.30 1999/04/23 02:57:40 wessels Exp $ + * $Id: unlinkd.cc,v 1.31 1999/07/13 14:51:29 wessels Exp $ * * DEBUG: section 12 Unlink Daemon * AUTHOR: Duane Wessels @@ -49,7 +49,7 @@ main(int argc, char *argv[]) while (fgets(buf, UNLINK_BUF_LEN, stdin)) { if ((t = strchr(buf, '\n'))) *t = '\0'; -#if USE_TRUNCATE_NOT_UNLINK +#if USE_TRUNCATE truncate(buf, 0); #else unlink(buf); diff --git a/src/wccp.cc b/src/wccp.cc index 4ae384b4c3..a031e2d223 100644 --- a/src/wccp.cc +++ b/src/wccp.cc @@ -1,6 +1,6 @@ /* - * $Id: wccp.cc,v 1.4 1999/06/11 23:30:37 glenn Exp $ + * $Id: wccp.cc,v 1.5 1999/07/13 14:51:30 wessels Exp $ * * DEBUG: section 80 WCCP Support * AUTHOR: Glenn Chisholm @@ -34,6 +34,8 @@ */ #include "squid.h" +#if USE_WCCP + #define WCCP_PORT 2048 #define WCCP_VERSION 4 #define WCCP_REVISION 0 @@ -79,6 +81,8 @@ struct wccp_assign_bucket_t { char bucket[WCCP_BUCKETS]; }; +static int theInWccpConnection = -1; +static int theOutWccpConnection = -1; static struct wccp_here_i_am_t wccp_here_i_am; static struct sockaddr_in router; static int router_len; @@ -126,7 +130,7 @@ wccpConnectionOpen(void) enter_suid(); theInWccpConnection = comm_open(SOCK_DGRAM, 0, - Config.Addrs.wccp_incoming, + Config.Wccp.incoming, port, COMM_NONBLOCKING, "WCCP Port"); @@ -136,11 +140,11 @@ wccpConnectionOpen(void) commSetSelect(theInWccpConnection, COMM_SELECT_READ, wccpHandleUdp, NULL, 0); debug(1, 1) ("Accepting WCCP UDP messages on port %d, FD %d.\n", (int) port, theInWccpConnection); - if (Config.Addrs.wccp_outgoing.s_addr != no_addr.s_addr) { + if (Config.Wccp.outgoing.s_addr != no_addr.s_addr) { enter_suid(); theOutWccpConnection = comm_open(SOCK_DGRAM, 0, - Config.Addrs.wccp_outgoing, + Config.Wccp.outgoing, port, COMM_NONBLOCKING, "WCCP Port"); @@ -295,3 +299,5 @@ wccpAssignBuckets(struct wccp_i_see_you_t *wccp_i_see_you) (struct sockaddr *) &router, router_len); } + +#endif /* USE_WCCP */