--------------------- PatchSet 26 Date: 2000/02/06 12:30:39 Author: hno Branch: te Tag: (none) Log: Imported tepatches.02.081999 As some of you might know, I'm very interested in the hop-to-hop semantics of HTTP/1.1 as the basis for deploying new features into the network.. the deployed basis of clients and servers makes it challenging to try new techniques end-to-end; but as HTTP is defined hop to hop we can implement these changes over a large proportion of a transfer just by going from proxy to proxy. I'm in the process of conducting a study to try out the effects of a number of different transfer-encodings for this purpose and am using squid as the base proxy. Of course squid (2.3devel2) has no support for transfer-encoding, or TE (or making http/1.1 requests for that matter).. so, I created support for transfer-encoding, and TE.. I also implemented a fairly generic mechanism for including your own transfer-encodings, and implemented a few. (I implemented chunked, gzip, deflate, and a couple called jones and biff for illustrative purposes.. the last two are just byte swappers but they show how the framework operates.. the compression formats are unfortunately done with an AppliedTheory library that I can't share with you, but I left the code in there as I think the zlib stuff is an almost drop in replacement and can be adapted easily).. I'm making these patches available to anybody who's interested at: http://proximate.appliedtheory.com/transfer-encoding/ here's the basic api.. /* Transfer Encoding Filters: They work like this.. filter (a,b,c,d,e) a - is a character pointer to the data to be filtered b - is length of a c - is address of a character pointer where the resulting buffer should be stored d - pointer to integer to store length of c in e - pointer to a general data pointer that the filter may use to maintain state, it begins life as NULL. the return value is a 4 bit mask 0x01 - c is a newly allocated buffer and should be freed when the calling function has completed the filter 0x02 - reserved internally for chunking 0x04 - reserved internally for chunking 0x08 - set this bit if your function was called with input, but did not produce any out (for instance if you're buffering it in the context provided by e.) prevents squid from thinking EOF has been reached. call sequence first call: *e is NULL but a is not and b>0 body calls : a is not null, b>0 and value of *e determined by previous calls last call: b==0.. good time to clean up *e if you've stored stuff there.. you may produce output if necessary, but last call will be repeated. */ and they are installed using the new_xlat() function in client_side.c which there are several examples of.. Also, the patches are against 2.3devel2 which had a couple bugs for me out of the box.. they were trivial and I fixed them, but those fixes are in the patch too, so I should enumerate them: * dns_internal.c: parsing problem with extra \n at the end of my resolv.conf.. * strListisMember() ignored the length argument it parsed, and indeed would only return true if the the argument it was searching for was the last one in a list (i.e. list="x,y" strListisMember(list,"x") would be false but strListisMember(list,"y") would be true.. fixed.. also added a strListIsMember_q that works the same way but allows the list members to have q values and returns the qvalue * 1000. There are a few caveats however, both wrt specification and quality of implementation.. specification: rfc 2616 section 3.6 prohibits the sending of transfer-encodings to 1.0 clients which the squid<->squid hop is.. In my implementation (which is only running privately for the purposes of study and doesn't claim to be compliant to anything) I will send a transfer-encoding to a client if that encoding is explicitly mentioned on the TE line with a positive q value.. (which should be safe as both the te todo and chunked need to be explicit on that line so the client is capable) because 2616 also requires that any response with a non-identity tr-enc be chunked and no content-length be present I *did* implement those requirements.. which means squid can now both send and receive chunked encodings while preserving persistent connections.. though it will only send chunked either to a 1.1 or higher client or a 1.0 client with it on the TE header. (and because chunked is required to do more interesting things, it always puts it in it's requests.. though if it made 1.1 requests this would be superfluous.) related thought: given that chunked is in there now, what is lacking from the MUST list to make HTTP/1.1 requests? quality of implementation: There are a few things that aren't suitable for production code, but the basis of what needs to be there is in, so I thought I'd pass it on and y'all could consider if it should be dressed up. * selection of what objects to apply te's to is hardcoded to be text/* and *postscript* in the C. * new te's are just whacked into client_side.c, it lacks a good configure mechanism * squid.conf should be used to decide what TE's to announce on a request.. hardcoded in http.c for the moment. * no thought given to how an object should be stored.. right now it is stored with any t-e's it is received with.. * when sending out new responses a very naive "strip to identity, rebuild to desired output" set of filters is constructed.. this can no doubt be optimized.. all that not withstanding, it's a very handy framework for what I'm trying to do, so under normal opensource tenets I'll make the patches available. I'm very interested in dialogue and feedback, though I'm not on squid-dev@.. I could request that be changed if convenient for folks. -Patrick -- Patrick R. McManus - AppliedTheory Corportation - Software Engineering http://pat.appliedtheory.com/~mcmanus Lead Developer mcmanus@AppliedTheory.com 'Prince of Pollywood' Standards, today! *** - You Kill Nostalgia, Xenophobic Fears. It's Now or Neverland. - *** Members: acconfig.h:1.1.1.3->1.1.1.3.8.1 configure:1.1.1.3->1.1.1.3.8.1 configure.in:1.1.1.3->1.1.1.3.8.1 include/autoconf.h.in:1.1.1.3->1.1.1.3.8.1 src/HttpHeader.c:1.1.1.3->1.1.1.3.8.1 src/HttpHeaderTools.c:1.1.1.3->1.1.1.3.8.1 src/client_side.c:1.1.1.3.4.1->1.1.1.3.4.1.4.1 src/dns_internal.c:1.1.1.1.4.1->1.1.1.1.4.1.4.1 src/enums.h:1.1.1.3->1.1.1.3.8.1 src/http.c:1.1.1.3.4.1->1.1.1.3.4.1.4.1 src/protos.h:1.1.1.3->1.1.1.3.8.1 src/structs.h:1.1.1.3.4.1->1.1.1.3.4.1.4.1 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.3.8.1 diff -u -r1.1.1.3 -r1.1.1.3.8.1 --- squid/acconfig.h 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/acconfig.h 6 Feb 2000 12:30:39 -0000 1.1.1.3.8.1 @@ -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.3.8.1 2000/02/06 12:30:39 hno Exp $ */ /********************************* * START OF CONFIGURABLE OPTIONS * @@ -261,3 +261,8 @@ * Use the heap-based replacement techniques */ #undef HEAP_REPLACEMENT + +/* + * Use the AppliedTheory compression/decompression library + */ +#undef ATHY_COMPRESSION Index: squid/configure =================================================================== RCS file: /cvsroot/squid-sf//squid/Attic/configure,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.3.8.1 diff -u -r1.1.1.3 -r1.1.1.3.8.1 --- squid/configure 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/configure 6 Feb 2000 12:30:39 -0000 1.1.1.3.8.1 @@ -1,7 +1,7 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated automatically using autoconf version 2.12 +# Generated automatically using autoconf version 2.13 # Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc. # # This configure script is free software; the Free Software Foundation @@ -112,6 +112,12 @@ replacement algorithms, instead of the standard LRU algorithm. " +ac_help="$ac_help + --with-athy-compression + This option makes use of a AppliedTheory compression/ + decompression library to handle compressed transfer + encodings. + " # Initialize some variables set by options. # The variables have the same names as the options, with @@ -150,6 +156,7 @@ # Initialize some other variables. subdirs= MFLAGS= MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. ac_max_here_lines=12 @@ -433,7 +440,7 @@ verbose=yes ;; -version | --version | --versio | --versi | --vers) - echo "configure generated by autoconf version 2.12" + echo "configure generated by autoconf version 2.13" exit 0 ;; -with-* | --with-*) @@ -603,9 +610,11 @@ # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross +ac_exeext= +ac_objext=o if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu. if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then @@ -620,7 +629,7 @@ -# From configure.in Revision: 1.176.2.12 +# From configure.in Revision: 1.1.1.3 ac_aux_dir= for ac_dir in cfgaux $srcdir/cfgaux; do if test -f $ac_dir/install-sh; then @@ -643,26 +652,26 @@ # Make sure we can run config.sub. -if $ac_config_sub sun4 >/dev/null 2>&1; then : +if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then : else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; } fi echo $ac_n "checking host system type""... $ac_c" 1>&6 -echo "configure:652: checking host system type" >&5 +echo "configure:661: checking host system type" >&5 host_alias=$host case "$host_alias" in NONE) case $nonopt in NONE) - if host_alias=`$ac_config_guess`; then : + if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then : else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; } fi ;; *) host_alias=$nonopt ;; esac ;; esac -host=`$ac_config_sub $host_alias` +host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias` host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` @@ -716,15 +725,16 @@ # 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:729: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_CC="gcc" @@ -745,16 +755,17 @@ # 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:759: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" ac_prog_rejected=no - for ac_dir in $PATH; do + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then @@ -789,25 +800,61 @@ echo "$ac_t""no" 1>&6 fi + if test -z "$CC"; then + case "`uname -s`" in + *win32* | *WIN32*) + # Extract the first word of "cl", so it can be a program name with args. +set dummy cl; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:810: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_prog_CC="cl" + break + fi + done + IFS="$ac_save_ifs" +fi +fi +CC="$ac_cv_prog_CC" +if test -n "$CC"; then + echo "$ac_t""$CC" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + ;; + esac + fi test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6 -echo "configure:797: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 +echo "configure:842: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5 ac_ext=c # CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. ac_cpp='$CPP $CPPFLAGS' ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' -ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' cross_compiling=$ac_cv_prog_cc_cross -cat > conftest.$ac_ext < conftest.$ac_ext << EOF + +#line 853 "configure" #include "confdefs.h" + main(){return(0);} EOF -if { (eval echo configure:811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:858: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; 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 @@ -821,18 +868,24 @@ ac_cv_prog_cc_works=no fi rm -fr conftest* +ac_ext=c +# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options. +ac_cpp='$CPP $CPPFLAGS' +ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5' +ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5' +cross_compiling=$ac_cv_prog_cc_cross echo "$ac_t""$ac_cv_prog_cc_works" 1>&6 if test $ac_cv_prog_cc_works = no; then { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; } fi echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6 -echo "configure:831: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5 +echo "configure:884: 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:889: 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 +894,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:898: \"$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 @@ -852,11 +905,15 @@ if test $ac_cv_prog_gcc = yes; then GCC=yes - ac_test_CFLAGS="${CFLAGS+set}" - ac_save_CFLAGS="$CFLAGS" - CFLAGS= - echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 -echo "configure:860: checking whether ${CC-cc} accepts -g" >&5 +else + GCC= +fi + +ac_test_CFLAGS="${CFLAGS+set}" +ac_save_CFLAGS="$CFLAGS" +CFLAGS= +echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6 +echo "configure:917: 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 @@ -871,16 +928,20 @@ fi echo "$ac_t""$ac_cv_prog_cc_g" 1>&6 - if test "$ac_test_CFLAGS" = set; then - CFLAGS="$ac_save_CFLAGS" - elif test $ac_cv_prog_cc_g = yes; then +if test "$ac_test_CFLAGS" = set; then + CFLAGS="$ac_save_CFLAGS" +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then CFLAGS="-g -O2" else - CFLAGS="-O2" + CFLAGS="-g" fi else - GCC= - test "${CFLAGS+set}" = set || CFLAGS="-g" + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi fi @@ -1514,6 +1575,20 @@ fi +# Check whether --with-athy-compression or --without-athy-compression was given. +if test "${with_athy_compression+set}" = set; then + withval="$with_athy_compression" + if test "$enableval" = "yes" ; then + echo "Enabling ATHY_COMPRESSION" + cat >> confdefs.h <<\EOF +#define ATHY_COMPRESSION 1 +EOF + + fi + +fi + + # Force some compilers to use ANSI features # case "$host" in @@ -1534,7 +1609,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:1613: 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,14 +1624,14 @@ # 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; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1634: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -1566,14 +1641,31 @@ 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; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:1651: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` +if test -z "$ac_err"; then + : +else + echo "$ac_err" >&5 + echo "configure: failed program was:" >&5 + cat conftest.$ac_ext >&5 + rm -rf conftest* + CPP="${CC-cc} -nologo -E" + cat > conftest.$ac_ext < +Syntax Error +EOF +ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" +{ (eval echo configure:1668: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then : else @@ -1586,6 +1678,8 @@ rm -f conftest* fi rm -f conftest* +fi +rm -f conftest* ac_cv_prog_CPP="$CPP" fi CPP="$ac_cv_prog_CPP" @@ -1601,28 +1695,30 @@ # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:1609: checking for a BSD compatible install" >&5 +echo "configure:1704: checking for a BSD compatible install" >&5 if test -z "$INSTALL"; then if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else - IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS="${IFS}:" + IFS="${IFS= }"; ac_save_IFS="$IFS"; IFS=":" for ac_dir in $PATH; do # Account for people who put trailing slashes in PATH elements. case "$ac_dir/" in /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. - for ac_prog in ginstall installbsd scoinst install; do + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do if test -f $ac_dir/$ac_prog; then if test $ac_prog = install && grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. - # OSF/1 installbsd also uses dspmsg, but is usable. : else ac_cv_path_install="$ac_dir/$ac_prog -c" @@ -1652,20 +1748,23 @@ # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}' + test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1661: checking for $ac_word" >&5 +echo "configure:1759: checking for $ac_word" >&5 if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_prog_RANLIB="ranlib" @@ -1684,7 +1783,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:1787: 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 +1806,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:1810: 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 @@ -1715,9 +1814,13 @@ /*) ac_cv_path_SH="$SH" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_SH="$SH" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_SH="$ac_dir/$ac_word" @@ -1739,7 +1842,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:1846: 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 @@ -1747,9 +1850,13 @@ /*) ac_cv_path_FALSE="$FALSE" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_FALSE="$FALSE" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_FALSE="$ac_dir/$ac_word" @@ -1771,7 +1878,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:1882: 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 @@ -1779,9 +1886,13 @@ /*) ac_cv_path_TRUE="$TRUE" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_TRUE="$TRUE" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_TRUE="$ac_dir/$ac_word" @@ -1803,7 +1914,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:1918: 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 @@ -1811,9 +1922,13 @@ /*) ac_cv_path_RM="$RM" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_RM="$RM" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_RM="$ac_dir/$ac_word" @@ -1835,7 +1950,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:1954: 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 @@ -1843,9 +1958,13 @@ /*) ac_cv_path_MV="$MV" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_MV="$MV" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_MV="$ac_dir/$ac_word" @@ -1867,7 +1986,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:1990: 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 @@ -1875,9 +1994,13 @@ /*) ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_MKDIR="$ac_dir/$ac_word" @@ -1899,7 +2022,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:2026: 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 @@ -1907,9 +2030,13 @@ /*) ac_cv_path_LN="$LN" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_LN="$LN" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_LN="$ac_dir/$ac_word" @@ -1931,7 +2058,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:2062: 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 @@ -1939,9 +2066,13 @@ /*) ac_cv_path_PERL="$PERL" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_PERL="$ac_dir/$ac_word" @@ -1963,7 +2094,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:2098: 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 @@ -1971,9 +2102,13 @@ /*) ac_cv_path_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_MAKEDEPEND="$ac_dir/$ac_word" @@ -1995,7 +2130,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:2134: 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 @@ -2003,9 +2138,13 @@ /*) ac_cv_path_AR="$AR" # Let the user override the test with a path. ;; + ?:/*) + ac_cv_path_AR="$AR" # Let the user override the test with a dos path. + ;; *) - IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" - for ac_dir in $PATH; do + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":" + ac_dummy="$PATH" + for ac_dir in $ac_dummy; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then ac_cv_path_AR="$ac_dir/$ac_word" @@ -2045,12 +2184,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:2188: 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 +2197,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:2201: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -2083,7 +2222,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:2226: 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 +2230,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:2245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2124,7 +2263,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:2267: 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 +2271,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:2286: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2166,12 +2305,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:2309: 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,8 +2318,8 @@ #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; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2322: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* ac_cv_header_stdc=yes @@ -2196,7 +2335,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 +2353,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 +2374,7 @@ : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -2246,7 +2385,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:2389: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then : else @@ -2333,18 +2472,18 @@ 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:2476: 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; } -ac_err=`grep -v '^ *+' conftest.out` +{ (eval echo configure:2486: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"` if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes" @@ -2371,12 +2510,12 @@ echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:2375: checking for working const" >&5 +echo "configure:2514: 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:2568: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -2446,14 +2585,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:2589: 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 +2603,11 @@ #endif ; return 0; } EOF -if { (eval echo configure:2468: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:2607: \"$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 +2618,7 @@ #endif ; return 0; } EOF -if { (eval echo configure:2483: \"$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_c_bigendian=yes else @@ -2499,7 +2638,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:2655: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_bigendian=no else @@ -2537,20 +2676,20 @@ echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6 -echo "configure:2541: checking if ANSI prototypes work" >&5 +echo "configure:2680: 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:2693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ansi_prototypes="yes" else @@ -2572,13 +2711,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:2715: 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 +2726,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:2730: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_tm_gmoff="yes" else @@ -2609,13 +2748,13 @@ fi echo $ac_n "checking for struct mallinfo""... $ac_c" 1>&6 -echo "configure:2613: checking for struct mallinfo" >&5 +echo "configure:2752: 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 +2772,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:2776: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_struct_mallinfo="yes" else @@ -2655,13 +2794,13 @@ fi echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6 -echo "configure:2659: checking for extended mallinfo" >&5 +echo "configure:2798: 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 +2809,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:2813: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ext_mallinfo="yes" else @@ -2692,13 +2831,13 @@ fi echo $ac_n "checking for struct rusage""... $ac_c" 1>&6 -echo "configure:2696: checking for struct rusage" >&5 +echo "configure:2835: 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:2854: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_struct_rusage="yes" else @@ -2733,13 +2872,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:2876: 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 +2895,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:2899: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_ip_hl="yes" else @@ -2778,7 +2917,7 @@ fi echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:2782: checking size of int" >&5 +echo "configure:2921: 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 +2925,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2797,7 +2936,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:2940: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -2817,7 +2956,7 @@ echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:2821: checking size of long" >&5 +echo "configure:2960: 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 +2964,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2836,7 +2975,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:2979: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -2856,7 +2995,7 @@ echo $ac_n "checking size of void *""... $ac_c" 1>&6 -echo "configure:2860: checking size of void *" >&5 +echo "configure:2999: 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 +3003,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -2875,7 +3014,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:3018: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_void_p=`cat conftestval` else @@ -2898,19 +3037,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:3041: 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:3053: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -2931,25 +3070,30 @@ fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:2935: checking for alloca" >&5 +echo "configure:3074: 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 < +# ifdef _MSC_VER +# include +# define alloca _alloca # else -# ifdef _AIX - #pragma alloca +# if HAVE_ALLOCA_H +# include # else -# ifndef alloca /* predefined by HP cc +Olibcalls */ +# ifdef _AIX + #pragma alloca +# else +# ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); +# endif # endif # endif # endif @@ -2959,7 +3103,7 @@ char *p = (char *) alloca(1); ; return 0; } EOF -if { (eval echo configure:2963: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:3107: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -2984,19 +3128,19 @@ # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. - ALLOCA=alloca.o + ALLOCA=alloca.${ac_objext} cat >> confdefs.h <<\EOF #define C_ALLOCA 1 EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:2995: checking whether alloca needs Cray hooks" >&5 +echo "configure:3139: 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:3169: 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:3197: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -3076,7 +3220,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:3224: 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 +3228,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:3251: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -3126,12 +3270,12 @@ echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:3130: checking for pid_t" >&5 +echo "configure:3274: 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 @@ -3140,7 +3284,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])pid_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_pid_t=yes else @@ -3159,12 +3303,12 @@ fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:3163: checking for size_t" >&5 +echo "configure:3307: 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 @@ -3173,7 +3317,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])size_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_size_t=yes else @@ -3192,12 +3336,12 @@ fi echo $ac_n "checking for ssize_t""... $ac_c" 1>&6 -echo "configure:3196: checking for ssize_t" >&5 +echo "configure:3340: 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 @@ -3206,7 +3350,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])ssize_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_ssize_t=yes else @@ -3225,12 +3369,12 @@ fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:3229: checking for off_t" >&5 +echo "configure:3373: 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 @@ -3239,7 +3383,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])off_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_off_t=yes else @@ -3258,12 +3402,12 @@ fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:3262: checking for mode_t" >&5 +echo "configure:3406: 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 @@ -3272,7 +3416,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])mode_t[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_mode_t=yes else @@ -3291,12 +3435,12 @@ fi echo $ac_n "checking for fd_mask""... $ac_c" 1>&6 -echo "configure:3295: checking for fd_mask" >&5 +echo "configure:3439: 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 @@ -3305,7 +3449,7 @@ #endif EOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - egrep "fd_mask[^a-zA-Z_0-9]" >/dev/null 2>&1; then + egrep "(^|[^a-zA-Z_0-9])fd_mask[^a-zA-Z_0-9]" >/dev/null 2>&1; then rm -rf conftest* ac_cv_type_fd_mask=yes else @@ -3325,13 +3469,13 @@ echo $ac_n "checking for socklen_t""... $ac_c" 1>&6 -echo "configure:3329: checking for socklen_t" >&5 +echo "configure:3473: 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 +3506,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:3510: 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 +3514,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:3525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3405,7 +3549,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:3553: 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 +3557,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:3568: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3452,7 +3596,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:3600: 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 +3604,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:3615: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3510,7 +3654,7 @@ *) echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6 -echo "configure:3514: checking for main in -lmalloc" >&5 +echo "configure:3658: 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 +3662,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:3673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3558,7 +3702,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:3706: 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 +3710,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:3721: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3601,7 +3745,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:3749: 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 +3753,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:3764: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3637,7 +3781,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:3785: 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 +3789,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:3804: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3690,7 +3834,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:3838: 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 +3842,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:3857: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3725,7 +3869,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:3873: 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 +3877,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:3892: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3776,7 +3920,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:3924: 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 +3928,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:3939: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3822,7 +3966,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:3970: 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 +3974,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:3985: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3866,7 +4010,7 @@ echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:3870: checking for crypt in -lcrypt" >&5 +echo "configure:4014: 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 +4018,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:4033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3918,7 +4062,7 @@ echo $ac_n "checking for main in -lpthread""... $ac_c" 1>&6 -echo "configure:3922: checking for main in -lpthread" >&5 +echo "configure:4066: 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 +4070,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:4081: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -3968,7 +4112,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:4116: 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 +4120,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:4135: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -4150,12 +4294,12 @@ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4154: checking for $ac_func" >&5 +echo "configure:4298: 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:4326: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4211,12 +4355,12 @@ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4215: checking for $ac_func" >&5 +echo "configure:4359: 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:4387: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4266,7 +4410,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:4414: 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 +4418,7 @@ { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < @@ -4287,7 +4431,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:4435: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then ac_cv_func_setresuid="yes" else @@ -4312,7 +4456,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:4460: 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 +4499,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:4503: 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 +4513,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:4517: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* USE_GNUREGEX="no" else @@ -4400,12 +4544,12 @@ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:4404: checking for $ac_func" >&5 +echo "configure:4548: 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:4576: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -4449,19 +4593,19 @@ else echo "$ac_t""no" 1>&6 -LIBOBJS="$LIBOBJS ${ac_func}.o" +LIBOBJS="$LIBOBJS ${ac_func}.${ac_objext}" fi done echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6 -echo "configure:4460: checking Default FD_SETSIZE value" >&5 +echo "configure:4604: 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:4634: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then DEFAULT_FD_SETSIZE=`cat conftestval` else @@ -4505,7 +4649,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:4653: checking Maximum number of filedescriptors we can open" >&5 TLDFLAGS="$LDFLAGS" case $host in i386-unknown-freebsd*) @@ -4517,7 +4661,7 @@ SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -4574,7 +4718,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:4722: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SQUID_MAXFD=`cat conftestval` else @@ -4601,12 +4745,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:4749: 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 +4771,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:4775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_SNDBUF=`cat conftestval` else @@ -4646,12 +4790,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:4794: 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 +4816,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:4820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_RCVBUF=`cat conftestval` else @@ -4691,12 +4835,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:4839: 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 +4861,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:4865: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_SNDBUF=`cat conftestval` else @@ -4736,12 +4880,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:4884: 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 +4906,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:4910: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_RCVBUF=`cat conftestval` else @@ -4781,19 +4925,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:4929: 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:4941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_needs_sys_errlist="no" else @@ -4815,16 +4959,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:4963: 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:4972: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -4840,12 +4984,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:4988: checking if inet_ntoa() actually works" >&5 if test "$cross_compiling" = yes; then INET_NTOA_RESULT="broken" else cat > conftest.$ac_ext < @@ -4864,7 +5008,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:5012: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null then INET_NTOA_RESULT=`cat conftestval` else @@ -4890,9 +5034,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:5038: checking for working statvfs() interface" >&5 cat > conftest.$ac_ext < @@ -4909,7 +5053,7 @@ ; return 0; } EOF -if { (eval echo configure:4913: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:5057: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_func_statvfs=yes else @@ -4929,12 +5073,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:5077: 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:5105: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_nsaddr_list="yes" else @@ -4979,12 +5123,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:5127: 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:5155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_have_res_ns_list="yes" else @@ -5074,7 +5218,7 @@ # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. (set) 2>&1 | - case `(ac_space=' '; set) 2>&1` in + case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote substitution # turns \\\\ into \\, and sed turns \\ into \). @@ -5141,7 +5285,7 @@ echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion" exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;; -version | --version | --versio | --versi | --vers | --ver | --ve | --v) - echo "$CONFIG_STATUS generated by autoconf version 2.12" + echo "$CONFIG_STATUS generated by autoconf version 2.13" exit 0 ;; -help | --help | --hel | --he | --h) echo "\$ac_cs_usage"; exit 0 ;; @@ -5179,9 +5323,11 @@ s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF $ac_vpsub $extrasub +s%@SHELL@%$SHELL%g s%@CFLAGS@%$CFLAGS%g s%@CPPFLAGS@%$CPPFLAGS%g s%@CXXFLAGS@%$CXXFLAGS%g +s%@FFLAGS@%$FFLAGS%g s%@DEFS@%$DEFS%g s%@LDFLAGS@%$LDFLAGS%g s%@LIBS@%$LIBS%g @@ -5223,6 +5369,7 @@ s%@LEAKFINDER_OBJS@%$LEAKFINDER_OBJS%g s%@CPP@%$CPP%g s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g +s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g s%@INSTALL_DATA@%$INSTALL_DATA%g s%@RANLIB@%$RANLIB%g s%@LN_S@%$LN_S%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.3.8.1 diff -u -r1.1.1.3 -r1.1.1.3.8.1 --- squid/configure.in 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/configure.in 6 Feb 2000 12:30:39 -0000 1.1.1.3.8.1 @@ -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.3.8.1 2000/02/06 12:30:39 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.3.8.1 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(cfgaux) @@ -554,6 +554,19 @@ fi ]) +dnl With ATHY_COMPRESSION +AC_ARG_WITH(athy-compression, +[ --with-athy-compression + This option makes use of a AppliedTheory compression/ + decompression library to handle compressed transfer + encodings. + ], +[ if test "$enableval" = "yes" ; then + echo "Enabling ATHY_COMPRESSION" + AC_DEFINE(ATHY_COMPRESSION, 1) + fi +]) + # Force some compilers to use ANSI features # case "$host" in 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.3.8.1 diff -u -r1.1.1.3 -r1.1.1.3.8.1 --- squid/include/autoconf.h.in 26 Jan 2000 03:25:00 -0000 1.1.1.3 +++ squid/include/autoconf.h.in 6 Feb 2000 12:31:47 -0000 1.1.1.3.8.1 @@ -280,6 +280,11 @@ */ #undef HEAP_REPLACEMENT +/* + * Use the AppliedTheory compression/decompression library + */ +#undef ATHY_COMPRESSION + /* The number of bytes in a int. */ #undef SIZEOF_INT Index: squid/src/HttpHeader.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpHeader.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.3.8.1 diff -u -r1.1.1.3 -r1.1.1.3.8.1 --- squid/src/HttpHeader.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/HttpHeader.c 6 Feb 2000 12:32:53 -0000 1.1.1.3.8.1 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: HttpHeader.c,v 1.1.1.3.8.1 2000/02/06 12:32:53 hno Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -109,7 +109,9 @@ {"Retry-After", HDR_RETRY_AFTER, ftStr}, /* for now (ftDate_1123 or ftInt!) */ {"Server", HDR_SERVER, ftStr}, {"Set-Cookie", HDR_SET_COOKIE, ftStr}, + {"TE",HDR_TE, ftStr}, {"Title", HDR_TITLE, ftStr}, + {"Transfer-Encoding", HDR_TRANSFER_ENCODING,ftStr}, {"Upgrade", HDR_UPGRADE, ftStr}, /* for now */ {"User-Agent", HDR_USER_AGENT, ftStr}, {"Vary", HDR_VARY, ftStr}, /* for now */ @@ -142,13 +144,15 @@ HDR_IF_MATCH, HDR_IF_NONE_MATCH, HDR_LINK, HDR_PRAGMA, HDR_PROXY_CONNECTION, - /* HDR_TRANSFER_ENCODING, */ + /* HDR_EXPECT */ + HDR_TE, + HDR_TRANSFER_ENCODING, HDR_UPGRADE, HDR_VARY, HDR_VIA, /* HDR_WARNING, */ HDR_WWW_AUTHENTICATE, - /* HDR_EXPECT, HDR_TE, HDR_TRAILER */ + /* HDR_TRAILER */ HDR_X_FORWARDED_FOR }; @@ -156,7 +160,7 @@ static http_hdr_type GeneralHeadersArr[] = { HDR_CACHE_CONTROL, HDR_CONNECTION, HDR_DATE, HDR_PRAGMA, - /* HDR_TRANSFER_ENCODING, */ + HDR_TRANSFER_ENCODING, HDR_UPGRADE, /* HDR_TRAILER, */ HDR_VIA @@ -192,6 +196,7 @@ HDR_IF_MATCH, HDR_IF_MODIFIED_SINCE, HDR_IF_NONE_MATCH, HDR_IF_RANGE, HDR_MAX_FORWARDS, HDR_PROXY_CONNECTION, HDR_PROXY_AUTHORIZATION, HDR_RANGE, HDR_REFERER, HDR_REQUEST_RANGE, + HDR_TE, HDR_USER_AGENT, HDR_X_FORWARDED_FOR }; Index: squid/src/HttpHeaderTools.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/HttpHeaderTools.c,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.3.8.1 diff -u -r1.1.1.3 -r1.1.1.3.8.1 --- squid/src/HttpHeaderTools.c 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/HttpHeaderTools.c 6 Feb 2000 12:32:53 -0000 1.1.1.3.8.1 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeaderTools.c,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: HttpHeaderTools.c,v 1.1.1.3.8.1 2000/02/06 12:32:53 hno Exp $ * * DEBUG: section 66 HTTP Header Tools * AUTHOR: Alex Rousskov @@ -188,6 +188,38 @@ return 0; } +int +strListIsMember_q(const String * list, const char *m, char del) +{ + int rv; + const char *pos = NULL; + const char *item, *l; + int matchsize, len_m; + + assert(list && m); + len_m = strlen(m); + rv = 1000; + + while (strListGetItem(list, del, &item, &matchsize, &pos)) { + if (((l = strchr(item, ';'))) && ((l - item) < matchsize)) { + matchsize = l - item; + /* rtrim again */ + for (l--; (l >= item) && xisspace(*l); matchsize--); + l = strchr(item + matchsize, 'q'); + if (l) + l++; + for (; l && *l && xisspace(*l); l++); + if (l && (*l == '=')) + rv = ((double) atof(l + 1)) * 1000; + + } + + if ((len_m == matchsize) && (!strncasecmp(item, m, matchsize))) + return rv; + } + return 0; +} + /* returns true iff "s" is a substring of a member of the list */ int strListIsSubstr(const String * list, const char *s, char del) Index: squid/src/client_side.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/client_side.c,v retrieving revision 1.1.1.3.4.1 retrieving revision 1.1.1.3.4.1.4.1 diff -u -r1.1.1.3.4.1 -r1.1.1.3.4.1.4.1 --- squid/src/client_side.c 4 Feb 2000 19:39:40 -0000 1.1.1.3.4.1 +++ squid/src/client_side.c 6 Feb 2000 12:32:53 -0000 1.1.1.3.4.1.4.1 @@ -1,6 +1,6 @@ /* - * $Id: client_side.c,v 1.1.1.3.4.1 2000/02/04 19:39:40 hno Exp $ + * $Id: client_side.c,v 1.1.1.3.4.1.4.1 2000/02/06 12:32:53 hno Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -58,7 +58,11 @@ #endif #endif +#ifdef ATHY_COMPRESSION +#include + +#endif #if LINGERING_CLOSE #define comm_close comm_lingering_close @@ -684,6 +688,11 @@ } if (http->acl_checklist) aclChecklistFree(http->acl_checklist); + while (http->te_translations) { + TE_list *tf = http->te_translations; + http->te_translations = http->te_translations->next; + xfree (tf); + } if (request) checkFailureRatio(request->err_type, http->al.hier.code); safe_free(http->uri); @@ -1116,6 +1125,566 @@ } } +/* Transfer Encoding Filters: They work like this.. + + filter (a,b,c,d,e) + a - is a character pointer to the data to be filtered + b - is length of a + c - is address of a character pointer where the resulting buffer should be stored + d - pointer to integer to store length of c in + e - pointer to a general data pointer that the filter may use to maintain state, + it begins life as NULL. + +the return value is a 4 bit mask + 0x01 - c is a newly allocated buffer and should be freed when the calling + function has completed the filter + 0x02 - reserved internally for chunking + 0x04 - reserved internally for chunking + 0x08 - set this bit if your funciton was called with input, but did not + produce any (for instance if you're buffering it in the context provided by e.) + prevents squid from thinking EOF has been reached. + + call sequence + first call: *e is NULL but a is not and b>0 + body calls : a is not null, b>0 and value of *e determined by previous calls + last call: b==0.. good time to clean up *e if you've stored stuff there.. you + may produce output if necessary, but last call will be repeated. +*/ + +/* this is a TE filter */ +static int unbiff (char *ibuf, int ibufl, char **obuf, int *obufl, void **d) +{ + + *obuf = ibuf; + *obufl = ibufl; + + if (!ibufl) return 0; + + for (;ibufl>0;ibufl--) + if (ibuf[ibufl-1] == 'a') + ibuf[ibufl-1] ='b'; + else + if (ibuf[ibufl-1] == 'b') + ibuf[ibufl-1] ='a'; + return 0; +} + +/* this is a TE filter */ +static int unjones (char *ibuf, int ibufl, char **obuf, int *obufl, void **d) +{ + + *obufl = ibufl; + *obuf = ibuf; + + if (!ibufl) return 0; + + for (;ibufl>0;ibufl--) + if (ibuf[ibufl-1] == 'c') + ibuf[ibufl-1] ='b'; + else + if (ibuf[ibufl-1] == 'b') + ibuf[ibufl-1] ='c'; + return 0; +} + +#ifdef ATHY_COMPRESSION + +/* this is a TE filter */ +static int dogzip (char *ibuf, int ibufl, char **obuf, int *obufl, void **d) +{ + compression_t *m13; + char *tb; + int tbl, of,created; + + m13 = *((compression_t **) d); + + if (!m13) + { + if (!ibufl) /* no input, nothing to finish.. */ + { + *obufl = 0; + return 0; + } + + m13 = compression_init (COMPRESSION_GZIP,COMPRESSION_STD); + *d = (void *) m13; + } + + tbl = ibufl+512; + tb = xmalloc (tbl); + + if (ibufl > 0) + { + created = 0; + do + { + created += compression_shrink (m13,ibuf,ibufl,tb+created,tbl,&of); + if (of>0) + { + tbl = of+16; + tb = xrealloc (tb,created+tbl); + ibufl = 0; + } + } + while (of>0); + + } + else /* end signal */ + { + created = compression_free (m13,tb); + *d = NULL; + } + + + *obuf = tb; + *obufl = created; + + return 1; +} + +/* this is a TE filter */ +static int undogzip (char *ibuf, int ibufl, char **obuf, int *obufl, void **d) +{ + compression_t *m13; + char *tb; + int tbl, of,created; + + m13 = *((compression_t **) d); + if (!m13) + { + m13 = compression_init (COMPRESSION_GZIP,COMPRESSION_STD); + *d = (void *) m13; + } + + tbl = ibufl*2+512; + tb = xmalloc (tbl); + + created = 0; + if (ibuf) + { + do + { + created += compression_expand (m13,ibuf,ibufl,tb+created,tbl,&of); + if (of>0) + { + tbl = of+16; + tb = xrealloc (tb,created+tbl); + ibufl = 0; + } + } + while (of>0); + } + + else + { + do + { + created += compression_finish_expand (m13,tb+created,tbl,&of); + if (of>0) + { + tbl = of+16; + tb = xrealloc (tb,created+tbl); + } + } + while (of > 0); + + compression_free (m13,tb); + *d = NULL; + } + + + *obuf = tb; + *obufl = created; + + return 1; +} + + +/* this is a TE filter */ +static int dodeflate (char *ibuf, int ibufl, char **obuf, int *obufl, void **d) +{ + compression_t *m13; + char *tb; + int tbl, of,created; + + m13 = *((compression_t **) d); + + if (!m13) + { + if (!ibufl) /* no input, nothing to finish.. */ + { + *obufl = 0; + return 0; + } + + m13 = compression_init (COMPRESSION_ZLIB,COMPRESSION_STD); + *d = (void *) m13; + } + + tbl = ibufl+512; + tb = xmalloc (tbl); + + if (ibufl > 0) + { + created = 0; + do + { + created += compression_shrink (m13,ibuf,ibufl,tb+created,tbl,&of); + if (of>0) + { + tbl = of+16; + tb = xrealloc (tb,created+tbl); + ibufl = 0; + } + } + while (of>0); + + } + else /* end signal */ + { + created = compression_free (m13,tb); + *d = NULL; + } + + + *obuf = tb; + *obufl = created; + + return 1; +} + +/* this is a TE filter */ +static int undodeflate(char *ibuf, int ibufl, char **obuf, int *obufl, void **d) +{ + compression_t *m13; + char *tb; + int tbl, of,created; + + m13 = *((compression_t **) d); + + if (!m13) + { + m13 = compression_init (COMPRESSION_ZLIB,COMPRESSION_STD); /* rfc 1950 */ + *d = (void *) m13; + } + + tbl = ibufl*2+512; + tb = xmalloc (tbl); + + created = 0; + if (ibuf) + { + do + { + created += compression_expand (m13,ibuf,ibufl,tb+created,tbl,&of); + if (of>0) + { + tbl = of+16; + tb = xrealloc (tb,created+tbl); + ibufl = 0; + } + } + while (of>0); + } + + else + { + do + { + created += compression_finish_expand (m13,tb+created,tbl,&of); + if (of>0) + { + tbl = of+16; + tb = xrealloc (tb,created+tbl); + } + } + while (of > 0); + + compression_free (m13,tb); + *d = NULL; + } + + + *obuf = tb; + *obufl = created; + + return 1; +} + +#endif + +static int hexvalue (char i) +{ + if ((i >= '0') && (i<='9')) + i= i - '0'; + else + i = toupper (i) - 'A' + 10; + return i; +} + + +/* this is a TE filter */ +static int dochunk (char *ibuf, int ibufl, char **obuf, int *obufl, void **d) +{ + char *tb, *w; + int tbl, created, rv; + + tbl = ibufl+128; + tb = xmalloc (tbl); + rv = 0x00; + + if (ibufl > 0) + { + created = 0; + snprintf (tb,tbl,"%X\r\n", ibufl); + debug(33, 8) ("created chunk of %d\n",ibufl); + + w = tb + strlen (tb); + memcpy (w,ibuf,ibufl); + created = ibufl + (w-tb) + 2; + strcpy (w+ibufl,"\r\n"); + *d = (void *) 0x01; + } + else /* end signal */ + if (*d) + { + strcpy (tb,"0\r\n\r\n"); + created = 5; + debug(33,8) ("created chunk of %d\n",ibufl); + *d = NULL; + rv = 0x08; + } + else + { + *obuf = tb; + *obufl = 0; + return 0x02 | 0x01; /* signal that dochunk() is complete */ + } + + *obuf = tb; + *obufl = created; + + return rv | 0x01; +} + + +static int undochunked + (char *ibuf, int ibufl, char **obuf, int *obufl, void **d) +{ + chunked_t *h; + char *tb, *w, *l; + int tbl, created,rv = 1,tr; + + h = *((chunked_t **) d); + + if (!h) + { + h = xmalloc (sizeof (chunked_t)); + h->state = 1; + *d = (void *) h; + } + + tbl = ibufl; + tb = xmalloc (tbl); + + created = 0; + w=ibuf; + l = ibuf+ibufl; + + state_machine_repeat: + + if (ibufl) + switch (h->state) + { + case 1: /* new chunk */ + h->pos = 0; + h->toread = 0; + h->half_crlf = 0; + + for (; (w < l) && !isxdigit (*w); w++); + if (w>=l) + break; + /* no default break! */ + h->state = 2; /* for 1 fallthru */ + + case 2: /* reading hexl */ + for (; (w < l) && isxdigit (*w); w++) + { + h->toread = h->toread << 4; + h->toread += hexvalue(*w); + } + if (w>=l) + break; + h->state = 3; + h->pos = h->toread; + debug(33,8) ("read chunk of %d\n",h->toread); + + + case 3: /* searching for CRLF */ + do + { + if (!h->half_crlf) + { + for (; (w < l) && (*w != '\r') ; w++); + if (w>=l) + break; + h->half_crlf = 1; + w++; + if (w>=l) + break; + } + if (*w != '\n') + h->half_crlf = 0; + else + { + h->state = 4; + } + w++; + if (w>=l) + break; + }while (h->state == 3); + + case 4: + /* gotta read h->toread bytes */ + if (h->toread) + { + tr = min (h->toread, l-w); + memcpy (tb+created, w, tr); + w += tr; + h->toread -= tr; + created += tr; + } + if (h->toread == 0) + { + h->state = 5; + h->half_crlf = 0; + } + if (w>=l) + break; + + case 5: /* seeking CRLF */ + do + { + if (!h->half_crlf) + { + for (; (w < l) && (*w != '\r') ; w++); + if (w>=l) + break; + h->half_crlf = 1; + w++; + if (w>=l) + break; + } + if (*(w++) != '\n') + h->half_crlf = 0; + else + { + debug(33,8) ("completed %d chunk\n",h->pos); + if (h->pos) + { + h->state = 1; + goto state_machine_repeat; + } + else + { + h->state =6; + h->half_crlf = 2; + } + } + + + + if (w>=l) + break; + }while (h->state == 5); + + case 6: + while (h->half_crlf < 4) + { + if (w>=l) + break; + if (!(h->half_crlf % 2)) + if (*w == '\r') + h->half_crlf++; + else + h->half_crlf =0; + else + if (*w == '\n') + h->half_crlf++; + else + h->half_crlf =0; + w++; + } + + /* chunked complete */ + h->state = 7; + rv = 0x04 | 0x01; /* signal that undochunk() is complete */ + + case 7: /* done, ignore */ + break; + } + else + { + xfree (h); + xfree (tb); + *d = NULL; + *obufl = 0; + return 0; + } + + + *obuf = tb; + *obufl = created; + + return rv; +} + + +/* this is a TE filter */ +int biff (char *ibuf, int ibufl, char **obuf, int *obufl, void **d) +{ + /* like ROT13.. symmetrical mappings */ + return unbiff (ibuf,ibufl,obuf,obufl,d); +} + +/* this is a TE filter */ +int jones (char *ibuf, int ibufl, char **obuf, int *obufl, void **d) +{ + /* like ROT13.. symmetrical mappings */ + return unjones (ibuf,ibufl,obuf,obufl,d); +} + + +void new_xlat (clientHttpRequest *http, int beg_or_end, + int (*func)(char *, int , char **, int *, void **), + void *data) +{ + TE_list *tp,*tx; + + tp = xmalloc (sizeof (TE_list)); + tp->func = func; + tp->data = data; + + if (beg_or_end == 0) + { /* beginning */ + tp->next = http->te_translations; + http->te_translations = tp; + } + else + { + /* end */ + tp->next = NULL; + for (tx = http->te_translations; tx && tx->next; tx =tx->next); + if (!tx) /* root node */ + http->te_translations = tp; + else + tx->next = tp; + } + + return; +} + + /* * filters out unwanted entries from original reply header * adds extra entries if we have more info than origin server @@ -1127,6 +1696,16 @@ HttpHeader *hdr = &rep->header; int is_hit = isTcpHit(http->log_type); request_t *request = http->request; + String s_transfer_encoding, s_te, s_ce; + const char *pos = NULL; + const char *item; + int y, may_apply_tes; + HttpHeader *ohdr; + const char *s_ct; + char added_te = 0; + + ohdr = &request->header; + #if DONT_FILTER_THESE /* but you might want to if you run Squid as an HTTP accelerator */ /* httpHeaderDelById(hdr, HDR_ACCEPT_RANGES); */ @@ -1138,6 +1717,149 @@ /* remove Set-Cookie if a hit */ if (is_hit) httpHeaderDelById(hdr, HDR_SET_COOKIE); + may_apply_tes = 0; + + if (httpHeaderHas(hdr, HDR_CONTENT_TYPE)) { + s_ct = httpHeaderGetStr(hdr, HDR_CONTENT_TYPE); + y = strlen(s_ct); + if (((y >= 5) && !strncasecmp(s_ct, "text/", 5)) + || strstr(s_ct, "postscript")) { + may_apply_tes = 1; + debug(33, 8) ("Content-Type of Application: %s\n", s_ct); + if (httpHeaderHas(hdr, HDR_CONTENT_ENCODING)) { + /* oh, base entity might be compressed.. don't want + * to double *that* */ + s_ce = httpHeaderGetList(hdr, HDR_CONTENT_ENCODING); + + if ((strListIsMember(&s_ce, "gzip", ',')) || + (strListIsMember(&s_ce, "deflate", ',')) || + (strListIsMember(&s_ce, "x-deflate", ',')) || + (strListIsMember(&s_ce, "x-gzip", ',')) || + (strListIsMember(&s_ce, "x-compress", ',')) || + (strListIsMember(&s_ce, "compress", ','))) + may_apply_tes |= 0x02; /* 02 is the compress exception */ + + stringClean(&s_ce); + } + } + } + + if (httpHeaderHas(hdr, HDR_TRANSFER_ENCODING)) { + s_transfer_encoding = httpHeaderGetList(hdr, HDR_TRANSFER_ENCODING); + + /* REMOVE ALL TRANSFER ENCODINGS */ + /* order is impt here.. want those entries at end of transfer-encoding + * list to be undone first and they are listed in the order they are + * applied .. TE's are HOP BY HOP */ + + pos = NULL; + while (strListGetItem(&s_transfer_encoding, ',', &item, &y, &pos)) + if (!strncasecmp(item, "biff", y)) { + /* need to remove the TE.. and rewrite the header */ + + debug(33, 7) ("removing biff\n"); + new_xlat(http, 0, unbiff, NULL); + + } else if (!strncasecmp(item, "jones", y)) { + /* need to remove the TE.. and rewrite the header */ + + debug(33, 7) ("removing jones\n"); + new_xlat(http, 0, unjones, NULL); + } +#ifdef ATHY_COMPRESSION + else if (!strncasecmp(item, "gzip", y)) { + /* need to remove the TE.. and rewrite the header */ + + debug(33, 7) ("removing gzip\n"); + new_xlat(http, 0, undogzip, NULL); + } else if (!strncasecmp(item, "deflate", y)) { + /* need to remove the TE.. and rewrite the header */ + + debug(33, 7) ("removing deflate\n"); + new_xlat(http, 0, undodeflate, NULL); + } +#endif + else if (!strncasecmp(item, "chunked", y)) { + /* need to remove the TE.. and rewrite the header */ + + debug(33, 7) ("removing chunked\n"); + new_xlat(http, 0, undochunked, NULL); + } + + + httpHeaderDelById(hdr, HDR_TRANSFER_ENCODING); + stringClean(&s_transfer_encoding); + } + + /* ADD NEW TRANSFER ENCODINGS.. check announcements */ + if (may_apply_tes && httpHeaderHas(ohdr, HDR_TE)) { + char vlb[128]; + vlb[0] = '\0'; + s_te = httpHeaderGetList(ohdr, HDR_TE); + if ((strListIsMember_q(&s_te, "chunked", ',')) || + (request->http_ver > 1.099)) { + /* chunked is known.. we can add te's. */ + + if (strListIsMember_q(&s_te, "biff", ',')) { + debug(33, 7) ("will add biff\n"); + new_xlat(http, 1, biff, NULL); + + if (added_te) + strcat(vlb, ", "); + else + added_te = 1; + strcat(vlb, "biff"); + } + + if (strListIsMember_q(&s_te, "jones", ',')) { + debug(33, 7) ("will add jones\n"); + new_xlat(http, 1, jones, NULL); + + if (added_te) + strcat(vlb, ", "); + else + added_te = 1; + strcat(vlb, "jones"); + } + +#ifdef ATHY_COMPRESSION + if ((strListIsMember_q(&s_te, "deflate", ',')) + && (!(may_apply_tes & 0x02))) { /* the ce: compressed */ + debug(33, 7) ("will add deflate\n"); + new_xlat(http, 1, dodeflate, NULL); + + if (added_te) + strcat(vlb, ", "); + else + added_te = 1; + strcat(vlb, "deflate"); + } + else /* ONLY IF NOT DEFLATE */ if ((strListIsMember_q(&s_te, + "gzip", ',')) + && (!(may_apply_tes & 0x02))) { /* the ce: compressed */ + debug(33, 7) ("will add gzip\n"); + new_xlat(http, 1, dogzip, NULL); + + if (added_te) + strcat(vlb, ", "); + else + added_te = 1; + strcat(vlb, "gzip"); + } +#endif + + if (added_te) { + debug(33, 7) ("will add chunked\n"); + new_xlat(http, 1, dochunk, NULL); + strcat(vlb, ", chunked"); + httpHeaderPutStr(hdr, HDR_TRANSFER_ENCODING, vlb); + httpHeaderDelById(hdr, HDR_CONTENT_LENGTH); + } + + } + stringClean(&s_te); + } + /* handle Connection header */ if (httpHeaderHas(hdr, HDR_CONNECTION)) { /* anything that matches Connection list member will be deleted */ @@ -1153,12 +1875,14 @@ * from strConnection first? */ while ((e = httpHeaderGetEntry(hdr, &pos))) { + if (strListIsMember(&strConnection, strBuf(e->name), ',')) httpHeaderDelAt(hdr, pos); } httpHeaderDelById(hdr, HDR_CONNECTION); stringClean(&strConnection); } + /* Handle Ranges */ if (request->range) clientBuildRangeHeader(http, rep); @@ -1197,13 +1921,19 @@ getMyHostname(), ntohs(Config.Sockaddr.http->s.sin_port)); #endif if (httpReplyBodySize(request->method, rep) < 0) { - debug(33, 3) ("clientBuildReplyHeader: can't keep-alive, unknown body size\n"); + debug(33, + 3) + ("clientBuildReplyHeader: can't keep-alive, unknown body size\n"); request->flags.proxy_keepalive = 0; } /* Signal keep-alive if needed */ httpHeaderPutStr(hdr, http->flags.accel ? HDR_CONNECTION : HDR_PROXY_CONNECTION, request->flags.proxy_keepalive ? "keep-alive" : "close"); + + if (added_te) + httpHeaderPutStr(hdr, HDR_CONNECTION, "Transfer-Encoding"); + #if ADD_X_REQUEST_URI /* * Knowing the URI of the request is useful when debugging persistent @@ -1215,7 +1945,6 @@ http->entry->mem_obj->url ? http->entry->mem_obj->url : http->uri); #endif } - static HttpReply * clientBuildReply(clientHttpRequest * http, const char *buf, size_t size) { @@ -1224,6 +1953,7 @@ if (k && httpReplyParse(rep, buf, k)) { /* enforce 1.0 reply version */ rep->sline.version = 1.0; + /* do header conversions */ clientBuildReplyHeader(http, rep); /* if we do ranges, change status to "Partial Content" */ @@ -1585,6 +2315,48 @@ return 0; } + +static int perform_te (TE_list *xlat, char *ibuf, int ibufl, + char **obuf, int *obufl) +{ + int rv = 0, made_new, orig_len; + + *obuf = ibuf; + *obufl = ibufl; + orig_len = ibufl; + + made_new = 0; + + while (xlat) + { + /* xlat func is likely to be unbiff or dogzip() or something */ + + rv &= 0xFE; /* turn off low bit, for reuse, while + preserving chunk indicators */ + + rv |= (*(xlat->func)) ((char *)ibuf, ibufl, obuf, obufl,&(xlat->data)); + + /* FREE SOME STUFF HERE if (rv & 0x01) */ + if ((made_new) && (rv & 0x01)) + xfree (ibuf); + + made_new = made_new | (rv & 0x01); + + ibuf = *obuf; + ibufl = *obufl; + xlat = xlat->next; + } + + if ((rv & 0x08) /* a 0 length chunk was created */ + && (orig_len > 0)) /* and there was actually input */ + { + *obufl = 0; /* don't write the chunk, as it means EOT */ + debug(33,8) ("EOT PREVENTION\n"); + } + + return rv | made_new; +} + /* * accepts chunk of a http message in buf, parses prefix, filters headers and * such, writes processed message to the client's socket @@ -1598,7 +2370,9 @@ int fd = conn->fd; HttpReply *rep = NULL; const char *body_buf = buf; - ssize_t body_size = size; + char *te_body_buf; + ssize_t body_size = size, te_body_size; + int free_te; MemBuf mb; ssize_t check_size = 0; debug(33, 5) ("clientSendMoreData: %s, %d bytes\n", http->uri, (int) size); @@ -1710,7 +2484,24 @@ } else if (body_buf && body_size) { http->out.offset += body_size; check_size += body_size; - memBufAppend(&mb, body_buf, body_size); + if (body_size) + { + http->oldte_rv = free_te = + perform_te (http->te_translations,(char *)body_buf, + body_size, &te_body_buf, &te_body_size); + + + if (te_body_size != body_size) + debug(33,1) ("%s:%d:%d\n",http->log_uri, body_size,te_body_size); + if (te_body_size) + memBufAppend(&mb, te_body_buf, te_body_size); + } + + if (free_te & 0x01) + xfree (te_body_buf); + + if (free_te & 0x04) + http->flags.done_copying = 1; } if (!http->request->range && http->request->method == METHOD_GET) assert(check_size == size); @@ -1720,6 +2511,8 @@ memFree(buf, MEM_CLIENT_SOCK_BUF); } + + static void clientKeepaliveNextRequest(clientHttpRequest * http) { @@ -1768,7 +2561,11 @@ { clientHttpRequest *http = data; StoreEntry *entry = http->entry; - int done; + int done, stuckdatasize,free_te; + char *stuck_data; + MemBuf mb; + + stuckdatasize = 0; http->out.size += size; debug(33, 5) ("clientWriteComplete: FD %d, sz %d, err %d, off %d, len %d\n", fd, size, errflag, (int) http->out.offset, entry ? objectLen(entry) : 0); @@ -1786,9 +2583,36 @@ comm_close(fd); /* yuk */ } else if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) { comm_close(fd); - } else if ((done = clientCheckTransferDone(http)) != 0 || size == 0) { + } else if ((done = clientCheckTransferDone(http)) != 0 || + (size == 0 && !(http->oldte_rv & 0x08))) { debug(33, 5) ("clientWriteComplete: FD %d transfer is DONE\n", fd); /* We're finished case */ + http->oldte_rv = free_te = perform_te (http->te_translations,NULL,0, + &stuck_data, &stuckdatasize); + if (stuckdatasize > 0) + { + debug(33,1) ("%s:0:%d\n",http->log_uri,stuckdatasize); + + memBufDefInit(&mb); + memBufAppend(&mb, stuck_data, stuckdatasize); + + comm_write_mbuf(fd, mb, clientWriteComplete, http); + + /* don't need this, as write may happen async, it's dangerous + too.. plus, it is done after the write but the hook function + within it */ + /* memBufClean(&mb); */ + + + if (free_te & 0x01) + xfree (stuck_data); + return; + } + if (free_te & 0x02) /* signal from dochunk() that + data has been chunked */ + { + http->flags.done_copying = 1; + } if (httpReplyBodySize(http->request->method, entry->mem_obj->reply) < 0) { debug(33, 5) ("clientWriteComplete: closing, content_length < 0\n"); comm_close(fd); @@ -1809,6 +2633,7 @@ } else { /* More data will be coming from primary server; register with * storage manager. */ + http->oldte_rv = 0x00; if (EBIT_TEST(entry->flags, ENTRY_ABORTED)) debug(33, 0) ("clientWriteComplete 2: ENTRY_ABORTED\n"); storeClientCopy(entry, @@ -1819,6 +2644,7 @@ clientSendMoreData, http); } + } /* @@ -2650,6 +3476,7 @@ #define SENDING_BODY 0 #define SENDING_HDRSONLY 1 +/* checks status of sending to original client */ static int clientCheckTransferDone(clientHttpRequest * http) { Index: squid/src/dns_internal.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/dns_internal.c,v retrieving revision 1.1.1.1.4.1 retrieving revision 1.1.1.1.4.1.4.1 diff -u -r1.1.1.1.4.1 -r1.1.1.1.4.1.4.1 --- squid/src/dns_internal.c 4 Feb 2000 19:39:40 -0000 1.1.1.1.4.1 +++ squid/src/dns_internal.c 6 Feb 2000 12:32:53 -0000 1.1.1.1.4.1.4.1 @@ -1,6 +1,6 @@ /* - * $Id: dns_internal.c,v 1.1.1.1.4.1 2000/02/04 19:39:40 hno Exp $ + * $Id: dns_internal.c,v 1.1.1.1.4.1.4.1 2000/02/06 12:32:53 hno Exp $ * * DEBUG: section 78 DNS lookups; interacts with lib/rfc1035.c * AUTHOR: Duane Wessels @@ -117,12 +117,12 @@ nns = nns_alloc = 0; } -static void -idnsParseResolvConf(void) +static void idnsParseResolvConf(void) { FILE *fp; char buf[512]; char *t; + fp = fopen(_PATH_RESOLV_CONF, "r"); if (fp == NULL) { debug(78, 1) ("%s: %s\n", _PATH_RESOLV_CONF, xstrerror()); Index: squid/src/enums.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/enums.h,v retrieving revision 1.1.1.3 retrieving revision 1.1.1.3.8.1 diff -u -r1.1.1.3 -r1.1.1.3.8.1 --- squid/src/enums.h 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/enums.h 6 Feb 2000 12:32:53 -0000 1.1.1.3.8.1 @@ -1,6 +1,6 @@ /* - * $Id: enums.h,v 1.1.1.3 2000/01/26 03:25:01 hno Exp $ + * $Id: enums.h,v 1.1.1.3.8.1 2000/02/06 12:32:53 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -222,7 +222,9 @@ HDR_RETRY_AFTER, HDR_SERVER, HDR_SET_COOKIE, + HDR_TE, HDR_TITLE, + HDR_TRANSFER_ENCODING, HDR_UPGRADE, HDR_USER_AGENT, HDR_VARY, Index: squid/src/http.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/http.c,v retrieving revision 1.1.1.3.4.1 retrieving revision 1.1.1.3.4.1.4.1 diff -u -r1.1.1.3.4.1 -r1.1.1.3.4.1.4.1 --- squid/src/http.c 4 Feb 2000 19:39:40 -0000 1.1.1.3.4.1 +++ squid/src/http.c 6 Feb 2000 12:32:53 -0000 1.1.1.3.4.1.4.1 @@ -1,6 +1,6 @@ /* - * $Id: http.c,v 1.1.1.3.4.1 2000/02/04 19:39:40 hno Exp $ + * $Id: http.c,v 1.1.1.3.4.1.4.1 2000/02/06 12:32:53 hno Exp $ * * DEBUG: section 11 Hypertext Transfer Protocol (HTTP) * AUTHOR: Harvest Derived @@ -476,8 +476,10 @@ read_sz = delayBytesWanted(delay_id, 1, read_sz); #endif Counter.syscalls.sock.reads++; + len = read(fd, buf, read_sz); debug(11, 5) ("httpReadReply: FD %d: len %d.\n", fd, len); + if (len > 0) { fd_bytes(fd, len, FD_READ); #if DELAY_POOLS @@ -727,6 +729,24 @@ if (Config.fake_ua && !httpHeaderHas(hdr_out, HDR_USER_AGENT)) httpHeaderPutStr(hdr_out, HDR_USER_AGENT, Config.fake_ua); + /* append TE */ + { + char strTE[128]; + + httpHeaderDelById(hdr_out, HDR_TE); /* hop by hop.. that's what last + hop could do*/ +#ifdef ATHY_COMPRESSION + strcpy (strTE,"biff;q=0.0, gzip;q=1.0, deflate;q=1.0, jones;q=0.0, chunked;q=1.0"); +#else + strcpy (strTE,"biff;q=1.0, gzip;q=0.0, deflate;q=0.0, jones;q=1.0, chunked;q=1.0"); +#endif + + httpHeaderPutStr (hdr_out,HDR_TE,strTE); + httpHeaderPutStr(hdr_out,HDR_CONNECTION, "TE"); /* its hop by hop */ + + } + + /* append Via */ if (httpRequestHdrAllowedByName(HDR_VIA)) { String strVia = httpHeaderGetList(hdr_in, HDR_VIA); 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.3.8.1 diff -u -r1.1.1.3 -r1.1.1.3.8.1 --- squid/src/protos.h 26 Jan 2000 03:25:01 -0000 1.1.1.3 +++ squid/src/protos.h 6 Feb 2000 12:32:53 -0000 1.1.1.3.8.1 @@ -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.3.8.1 2000/02/06 12:32:53 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -377,6 +377,7 @@ extern void httpHeaderAddContRange(HttpHeader *, HttpHdrRangeSpec, ssize_t); extern void strListAdd(String * str, const char *item, char del); extern int strListIsMember(const String * str, const char *item, char del); +extern int strListIsMember_q (const String * list, const char *m, char del); extern int strListIsSubstr(const String * list, const char *s, char del); extern int strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos); extern const char *getStringPrefix(const char *str, const char *end); Index: squid/src/structs.h =================================================================== RCS file: /cvsroot/squid-sf//squid/src/structs.h,v retrieving revision 1.1.1.3.4.1 retrieving revision 1.1.1.3.4.1.4.1 diff -u -r1.1.1.3.4.1 -r1.1.1.3.4.1.4.1 --- squid/src/structs.h 4 Feb 2000 19:39:41 -0000 1.1.1.3.4.1 +++ squid/src/structs.h 6 Feb 2000 12:32:53 -0000 1.1.1.3.4.1.4.1 @@ -1,6 +1,6 @@ /* - * $Id: structs.h,v 1.1.1.3.4.1 2000/02/04 19:39:41 hno Exp $ + * $Id: structs.h,v 1.1.1.3.4.1.4.1 2000/02/06 12:32:53 hno Exp $ * * * SQUID Internet Object Cache http://squid.nlanr.net/Squid/ @@ -837,6 +837,16 @@ HierarchyLogEntry hier; }; + +typedef struct _TE_list +{ + int (*func)(char *ibuf, int ibufl, char **obuf, int *obufl, void **data); + void *data; + struct _TE_list *next; +} +TE_list; + + struct _clientHttpRequest { ConnStateData *conn; request_t *request; /* Parsed URL ... */ @@ -871,6 +881,8 @@ char *location; } redirect; dlink_node active; + TE_list *te_translations; + int oldte_rv; }; struct _ConnStateData { @@ -1824,3 +1836,13 @@ int bad_log_op; int zero_object_sz; }; + +typedef struct chunked_tag +{ + int state; /* 1 - in between */ + int pos; /* 2 - reading hexl */ + int toread; /* 3 - seeking CRLF from hexl */ + int half_crlf; /* 4 - reading data */ + /* 5 - seeking CRLF from data */ + /* 6 - looking for double CRLF */ +} chunked_t;