From: wessels <> Date: Mon, 28 Apr 1997 10:29:54 +0000 (+0000) Subject: merge 1.1.8->1.1.10; just get it to compile X-Git-Tag: SQUID_3_0_PRE1~5047 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6ad85e8a98877f871e56cc89be32c68a229743dc;p=thirdparty%2Fsquid.git merge 1.1.8->1.1.10; just get it to compile --- diff --git a/CONTRIBUTORS b/CONTRIBUTORS index f2136692f6..b680b377be 100644 --- a/CONTRIBUTORS +++ b/CONTRIBUTORS @@ -53,6 +53,7 @@ Special thanks go to people who have volunteered their time, effort, and ideas t Taketo Kabe Mukaigawa Shin'ichi Lutz Donnerhacke + Gerben Wierda Development of this caching software is funded by the National Science Foundation (grant NCR-9521745). Paid staff members on the caching diff --git a/ChangeLog b/ChangeLog index 9375f7d969..347a89d607 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,19 +5,116 @@ Changes to squid-1.2.alpha1 (): asynchronous file operations (Stewart Forster). - async_io.c and async_io.h are complete rewrites of the old versions (Stewart Forster). - - I have rewritten all disk file operations of squid to support + - Rewrote all disk file operations of squid to support the idea of callbacks except where not required (Stewart Forster). - - UDP_HIT_OBJ not support removed. - Background validation of 'tainted' swap log entries (Stewart Forster). - Modified storeWriteCleanLog to create the log file using the open/write rather than fopen/printf (Stewart Forster). - Added the EINTR error response to handle badly interrupted system calls (Stewart Forster). + - UDP_HIT_OBJ not supported, removed. + - Different sized 'cache_dirs' supported. ============================================================================== +Changes to squid-1.1.10 (April 24, 1997): + + - Require 0 <= multicast ttl <= 128. + - Changed 'unsigned int inaddr_none' to 'struct in_addr no_addr'. + - Added debug_trap() if unlocking a StoreEntry which still + has registered clients. + - Added missing storeUnregister() calls. + - Fixed storeClientListAdd() bug of adding same FD twice. + - Fixed reconfigure/SIGHUP to wait 'shutdown_lifetime' seconds + after receiving signal (Ron Gomes). + - Added missing commSetSelect() in icpDetectClientClose() + (Mark Treacy). + - Fixed multicast group member counting bug with fake + StoreEntry's. + - Only enable ICP_FLAG_SRC_RTT if the peer is ICP_VERSION_2. + - Fixed compiling unlinkd in a separate directory (Assar Westerlund). + - Fixed comm_select_incoming SEGV for poll() version when using + udp_{incoming,outgoing}_address (Mark Treacy). + - Fixed some SIGHUP related memory problems with redirectors, + ipcache, and fqdncache, and peerCountMcastPeers*(). + - Make the unlinkd and pinger programs configurable (Ron Gomes, + Neil Murray). + - Add handshake to unlinkd program (Ron Gomes). + - Exit if a configured program doesn't exist (Neil Murray). + - Abort if unlinkd fails to start (Ron Gomes). + - Added -m option to ftpget for defining default MIME type. + (Neil Murray). + - Optimized comm_select() functions (Mark Treacy). + - Fixed ipcache_release() to not release locked entries; + instead expire them immediately. + - Fixed up rebuild code to handle swapfile/URL clash + cases better. + - Added safe_inet_addr() to protect from bogus IP addresses + (Arjan de Vet). + - Fixed handling of ssl_proxy and passthrough_proxy when not + behind a firewall. + + +Changes to squid-1.1.9 (March 30, 1997): + + - Fixed aclIpNetworkCompare for USE_SPLAY_TREE; was applying + netmask to non-local variable through pointer. (Ansgar + Hockmann). + - Fixed cachemgr bug incorrectly assigning connect() return + value (Nigel Metheringham). + - Fixed diskHandleWrite bug: not setting write_daemon = PRESENT. + - Fixed situation where all requests would be handled by + "single parent" and other peers would never be queried + again. + - Fixed ftpget bug causing program to continue after printing + usage. + - Changed 'reference_age' to be the maximum for the dynamcially + computed value (Mark Treacy). + - Added external 'unlinkd' process to unlink swap files. + - Added more dnsserver status information to cachemgr output. + - In httpReadReply: extend FD lifetime only after successful + read, not every read. + - In httpBuildRequestHeader: link size of 'ybuf' to MAX_URL. + - Added routines to count number of members of each multicast + peer. + - Fixed multicast ICP bug causing unnecessary timeouts. + - Added error messages if setuid/setgid functions fail. + - Added non-POSIX tempnam.c replacement for NeXTStep (Gerben + Wierda). + - Removed redundant file:// --> ftp:// check (Willy TARREAU). + - Removed check for reply->code == 200 in icpGetHeadersForIMS(). + - Fixed IP cache bug which caused 'dns_children 0' to break; + - Deny access to dangerous TCP ports (7, 9, 19). + - Removed single-line functions: fdstat_biggest_fd(), + comm_get_fd_lifetime(), comm_get_fd_timeout(). + - Removed storeCheckExpired() from storeGetSwapSpace() as + likely cause of slowing down cache when exceeding the high + water mark. + - Fixed storeCheckExpired() to not always check the + LRU expiration age (Mark Treacy). + - Lowered 'store_objects_per_bucket' to 20 so that + storeMaintainSwapSpace() runs frequently enough to + keep up with incoming objects. + - Fixed FTP to use the Authorization header only when the + usernames match. + - Fixed another continuation-lines-not-starting-with-NNN bug + in ftpget. + - Added 'client_db' config option to disable keeping statistics + for each client address. + - Added support for using ICMP data stuffed into ICP replies + for peer selection algorithm. Enable with 'query_icmp' + in squid.conf. + - Fixed net_db design bug where _net_db_peer structures pointed + to 'peer' structures that get freed and reallocated during a + reconfigure. + - Moved comm.c fd_lifetime[] array into FD_ENTRY structure. + - Cleaned up storeCopy(). debug_trap on requested offset < + e_lowest_offset. + - Cleaned up fdstat_init() and fdstat_update(). + - Cleaned up ftp_login_parser(). + Changes to squid-1.1.8 (March 3, 1997): - Fixed neighborsUdpAck() coredump bug for source-ping and @@ -42,6 +139,7 @@ Changes to squid-1.1.8 (March 3, 1997): Changes to squid-1.1.7 (February 25, 1997): + - Fixed non-default port numbers for FTP URLs (John Saunders). - Fixed urlParse to leave trailing slashes on FTP URLs. Although stripping the slashes offers a slight hit rate increase, it breaks some proxies which return HTTP redirects. diff --git a/configure b/configure index 02e514b195..14fbd144e4 100755 --- a/configure +++ b/configure @@ -783,6 +783,12 @@ if test $ac_cv_prog_gcc = no; then sleep 5 fi +case "$host" in + mab-next-nextstep3) + CC="$CC -arch m68k -arch i486 -arch hppa -arch sparc" + ;; +esac + if test -z "$PRESET_CFLAGS"; then if test "$GCC" = "yes"; then case "$host" in @@ -795,13 +801,6 @@ if test -z "$PRESET_CFLAGS"; then ;; esac fi - - case "$host" in - *-hp-hpux*) - echo "Disabling 'ranlib' for HP-UX..." - RANLIB=":" - ;; - esac fi if test -z "$PRESET_LDFLAGS"; then @@ -815,7 +814,7 @@ if test -z "$PRESET_LDFLAGS"; then fi echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6 -echo "configure:819: checking how to run the C preprocessor" >&5 +echo "configure:818: checking how to run the C preprocessor" >&5 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= @@ -830,13 +829,13 @@ else # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:840: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:839: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -847,13 +846,13 @@ else rm -rf conftest* CPP="${CC-cc} -E -traditional-cpp" cat > conftest.$ac_ext < Syntax Error EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:856: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then : @@ -886,7 +885,7 @@ echo "$ac_t""$CPP" 1>&6 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6 -echo "configure:890: checking for a BSD compatible install" >&5 +echo "configure:889: 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 @@ -938,7 +937,7 @@ test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:942: checking for $ac_word" >&5 +echo "configure:941: 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 @@ -965,7 +964,7 @@ else fi echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6 -echo "configure:969: checking whether ln -s works" >&5 +echo "configure:968: 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 @@ -988,7 +987,7 @@ fi # Extract the first word of "false", so it can be a program name with args. set dummy false; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:992: checking for $ac_word" >&5 +echo "configure:991: 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 @@ -1020,7 +1019,7 @@ fi # Extract the first word of "true", so it can be a program name with args. set dummy true; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1024: checking for $ac_word" >&5 +echo "configure:1023: 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 @@ -1052,7 +1051,7 @@ fi # Extract the first word of "rm", so it can be a program name with args. set dummy rm; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1056: checking for $ac_word" >&5 +echo "configure:1055: 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 @@ -1084,7 +1083,7 @@ fi # Extract the first word of "mv", so it can be a program name with args. set dummy mv; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1088: checking for $ac_word" >&5 +echo "configure:1087: 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 @@ -1116,7 +1115,7 @@ fi # Extract the first word of "mkdir", so it can be a program name with args. set dummy mkdir; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1120: checking for $ac_word" >&5 +echo "configure:1119: 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 @@ -1148,7 +1147,7 @@ fi # Extract the first word of "ln", so it can be a program name with args. set dummy ln; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1152: checking for $ac_word" >&5 +echo "configure:1151: 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 @@ -1180,7 +1179,7 @@ fi # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1184: checking for $ac_word" >&5 +echo "configure:1183: 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 @@ -1212,7 +1211,7 @@ fi # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 -echo "configure:1216: checking for $ac_word" >&5 +echo "configure:1215: 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 @@ -1241,6 +1240,52 @@ else echo "$ac_t""no" 1>&6 fi +# Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo $ac_n "checking for $ac_word""... $ac_c" 1>&6 +echo "configure:1247: checking for $ac_word" >&5 +if eval "test \"`echo '$''{'ac_cv_path_AR'+set}'`\" = set"; then + echo $ac_n "(cached) $ac_c" 1>&6 +else + case "$AR" in + /*) + ac_cv_path_AR="$AR" # Let the user override the test with a path. + ;; + *) + IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" + for ac_dir in $PATH; do + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$ac_word; then + ac_cv_path_AR="$ac_dir/$ac_word" + break + fi + done + IFS="$ac_save_ifs" + test -z "$ac_cv_path_AR" && ac_cv_path_AR="$FALSE" + ;; +esac +fi +AR="$ac_cv_path_AR" +if test -n "$AR"; then + echo "$ac_t""$AR" 1>&6 +else + echo "$ac_t""no" 1>&6 +fi + + +case "$host" in + *-hp-hpux*) + echo "Disabling 'ranlib' for HP-UX..." + RANLIB=":" + ;; +esac + +AR_R="$AR r" +case "$host" in + *-next-nextstep3) + AR="libtool -o" + ;; +esac ac_header_dirent=no @@ -1248,12 +1293,12 @@ for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr that defines DIR""... $ac_c" 1>&6 -echo "configure:1252: checking for $ac_hdr that defines DIR" >&5 +echo "configure:1297: 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> @@ -1261,7 +1306,7 @@ int main() { DIR *dirp = 0; ; return 0; } EOF -if { (eval echo configure:1265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1310: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* eval "ac_cv_header_dirent_$ac_safe=yes" else @@ -1286,7 +1331,7 @@ done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then echo $ac_n "checking for opendir in -ldir""... $ac_c" 1>&6 -echo "configure:1290: checking for opendir in -ldir" >&5 +echo "configure:1335: 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 @@ -1294,7 +1339,7 @@ else ac_save_LIBS="$LIBS" LIBS="-ldir $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1354: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1327,7 +1372,7 @@ fi else echo $ac_n "checking for opendir in -lx""... $ac_c" 1>&6 -echo "configure:1331: checking for opendir in -lx" >&5 +echo "configure:1376: 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 @@ -1335,7 +1380,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lx $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1395: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -1369,12 +1414,12 @@ fi fi echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6 -echo "configure:1373: checking for ANSI C header files" >&5 +echo "configure:1418: 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 @@ -1382,7 +1427,7 @@ else #include EOF ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out" -{ (eval echo configure:1386: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1431: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1399,7 +1444,7 @@ rm -f conftest* if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1417,7 +1462,7 @@ fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat > conftest.$ac_ext < EOF @@ -1438,7 +1483,7 @@ if test "$cross_compiling" = yes; then : else cat > conftest.$ac_ext < #define ISLOWER(c) ('a' <= (c) && (c) <= 'z') @@ -1449,7 +1494,7 @@ if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } EOF -if { (eval echo configure:1453: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1498: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then : else @@ -1487,6 +1532,7 @@ for ac_hdr in \ getopt.h \ grp.h \ libc.h \ + limits.h \ malloc.h \ math.h \ memory.h \ @@ -1523,17 +1569,17 @@ for ac_hdr in \ do ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'` echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6 -echo "configure:1527: checking for $ac_hdr" >&5 +echo "configure:1573: 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:1537: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } +{ (eval echo configure:1583: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; } ac_err=`grep -v '^ *+' conftest.out` if test -z "$ac_err"; then rm -rf conftest* @@ -1561,12 +1607,12 @@ done echo $ac_n "checking for working const""... $ac_c" 1>&6 -echo "configure:1565: checking for working const" >&5 +echo "configure:1611: 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:1665: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yes else @@ -1637,16 +1683,16 @@ fi echo $ac_n "checking if ANSI prototypes work""... $ac_c" 1>&6 -echo "configure:1641: checking if ANSI prototypes work" >&5 +echo "configure:1687: checking if ANSI prototypes work" >&5 cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1696: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_ANSI_PROTOTYPES 1 @@ -1662,9 +1708,9 @@ fi rm -f conftest* echo $ac_n "checking for tm->tm_gmtoff""... $ac_c" 1>&6 -echo "configure:1666: checking for tm->tm_gmtoff" >&5 +echo "configure:1712: checking for tm->tm_gmtoff" >&5 cat > conftest.$ac_ext < #include @@ -1673,7 +1719,7 @@ struct tm foo; foo.tm_gmtoff = 0; ; return 0; } EOF -if { (eval echo configure:1677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1723: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_TM_GMTOFF 1 @@ -1689,9 +1735,9 @@ fi rm -f conftest* echo $ac_n "checking for extended mallinfo""... $ac_c" 1>&6 -echo "configure:1693: checking for extended mallinfo" >&5 +echo "configure:1739: checking for extended mallinfo" >&5 cat > conftest.$ac_ext < #include @@ -1700,7 +1746,7 @@ struct mallinfo foo; foo.mxfast = 0; ; return 0; } EOF -if { (eval echo configure:1704: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1750: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_EXT_MALLINFO 1 @@ -1716,20 +1762,26 @@ fi rm -f conftest* echo $ac_n "checking for ip->ip_hl""... $ac_c" 1>&6 -echo "configure:1720: checking for ip->ip_hl" >&5 +echo "configure:1766: checking for ip->ip_hl" >&5 cat > conftest.$ac_ext < #include #include #include +#ifdef __linux__ +#define ip_hl ihl +#endif +#ifndef __linux__ +#define iphdr ip +#endif int main() { -struct ip ip; +struct iphdr ip; ip.ip_hl= 0; ; return 0; } EOF -if { (eval echo configure:1733: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:1785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* cat >> confdefs.h <<\EOF #define HAVE_IP_HL 1 @@ -1745,7 +1797,7 @@ fi rm -f conftest* echo $ac_n "checking size of int""... $ac_c" 1>&6 -echo "configure:1749: checking size of int" >&5 +echo "configure:1801: 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 @@ -1753,7 +1805,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1764,7 +1816,7 @@ main() exit(0); } EOF -if { (eval echo configure:1768: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1820: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_int=`cat conftestval` else @@ -1784,7 +1836,7 @@ EOF echo $ac_n "checking size of long""... $ac_c" 1>&6 -echo "configure:1788: checking size of long" >&5 +echo "configure:1840: 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 @@ -1792,7 +1844,7 @@ else { echo "configure: error: can not run test program while cross compiling" 1>&2; exit 1; } else cat > conftest.$ac_ext < main() @@ -1803,7 +1855,7 @@ main() exit(0); } EOF -if { (eval echo configure:1807: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:1859: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_sizeof_long=`cat conftestval` else @@ -1826,19 +1878,19 @@ EOF # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! echo $ac_n "checking for working alloca.h""... $ac_c" 1>&6 -echo "configure:1830: checking for working alloca.h" >&5 +echo "configure:1882: 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:1842: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1894: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_header_alloca_h=yes else @@ -1859,12 +1911,12 @@ EOF fi echo $ac_n "checking for alloca""... $ac_c" 1>&6 -echo "configure:1863: checking for alloca" >&5 +echo "configure:1915: checking for alloca" >&5 if eval "test \"`echo '$''{'ac_cv_func_alloca_works'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:1943: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* ac_cv_func_alloca_works=yes else @@ -1919,12 +1971,12 @@ EOF echo $ac_n "checking whether alloca needs Cray hooks""... $ac_c" 1>&6 -echo "configure:1923: checking whether alloca needs Cray hooks" >&5 +echo "configure:1975: checking whether alloca needs Cray hooks" >&5 if eval "test \"`echo '$''{'ac_cv_os_cray'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6 else cat > conftest.$ac_ext <&6 if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:1953: checking for $ac_func" >&5 +echo "configure:2005: 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:2033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2004,7 +2056,7 @@ done fi echo $ac_n "checking stack direction for C alloca""... $ac_c" 1>&6 -echo "configure:2008: checking stack direction for C alloca" >&5 +echo "configure:2060: 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 @@ -2012,7 +2064,7 @@ else ac_cv_c_stack_direction=0 else cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:2087: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then ac_cv_c_stack_direction=1 else @@ -2054,12 +2106,12 @@ fi echo $ac_n "checking for pid_t""... $ac_c" 1>&6 -echo "configure:2058: checking for pid_t" >&5 +echo "configure:2110: 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 @@ -2087,12 +2139,12 @@ EOF fi echo $ac_n "checking for size_t""... $ac_c" 1>&6 -echo "configure:2091: checking for size_t" >&5 +echo "configure:2143: 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 @@ -2120,12 +2172,12 @@ EOF fi echo $ac_n "checking for off_t""... $ac_c" 1>&6 -echo "configure:2124: checking for off_t" >&5 +echo "configure:2176: 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 @@ -2153,12 +2205,12 @@ EOF fi echo $ac_n "checking for mode_t""... $ac_c" 1>&6 -echo "configure:2157: checking for mode_t" >&5 +echo "configure:2209: 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 @@ -2187,7 +2239,7 @@ fi echo $ac_n "checking for main in -lnsl""... $ac_c" 1>&6 -echo "configure:2191: checking for main in -lnsl" >&5 +echo "configure:2243: 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 @@ -2195,14 +2247,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lnsl $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2258: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2230,7 +2282,7 @@ else fi echo $ac_n "checking for main in -lsocket""... $ac_c" 1>&6 -echo "configure:2234: checking for main in -lsocket" >&5 +echo "configure:2286: 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 @@ -2238,14 +2290,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lsocket $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2301: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2273,7 +2325,7 @@ else fi echo $ac_n "checking for main in -lgnumalloc""... $ac_c" 1>&6 -echo "configure:2277: checking for main in -lgnumalloc" >&5 +echo "configure:2329: 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 @@ -2281,14 +2333,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lgnumalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2344: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2325,7 +2377,7 @@ if test "$ac_cv_lib_gnumalloc_main" = "no"; then ;; *) echo $ac_n "checking for main in -lmalloc""... $ac_c" 1>&6 -echo "configure:2329: checking for main in -lmalloc" >&5 +echo "configure:2381: 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 @@ -2333,14 +2385,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lmalloc $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2396: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2371,7 +2423,7 @@ fi esac fi echo $ac_n "checking for main in -lbsd""... $ac_c" 1>&6 -echo "configure:2375: checking for main in -lbsd" >&5 +echo "configure:2427: 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 @@ -2379,14 +2431,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lbsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2414,7 +2466,7 @@ else fi echo $ac_n "checking for main in -lregex""... $ac_c" 1>&6 -echo "configure:2418: checking for main in -lregex" >&5 +echo "configure:2470: 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 @@ -2422,14 +2474,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lregex $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2485: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2450,7 +2502,7 @@ else fi echo $ac_n "checking for inet_aton in -lresolv""... $ac_c" 1>&6 -echo "configure:2454: checking for inet_aton in -lresolv" >&5 +echo "configure:2506: 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 @@ -2458,7 +2510,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2525: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2485,7 +2537,7 @@ fi if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for inet_aton in -l44bsd""... $ac_c" 1>&6 -echo "configure:2489: checking for inet_aton in -l44bsd" >&5 +echo "configure:2541: 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 @@ -2493,7 +2545,7 @@ else ac_save_LIBS="$LIBS" LIBS="-l44bsd $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2560: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2536,7 +2588,7 @@ else fi echo $ac_n "checking for main in -lresolv""... $ac_c" 1>&6 -echo "configure:2540: checking for main in -lresolv" >&5 +echo "configure:2592: 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 @@ -2544,14 +2596,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lresolv $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2607: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2579,7 +2631,7 @@ else fi echo $ac_n "checking for main in -lm""... $ac_c" 1>&6 -echo "configure:2583: checking for main in -lm" >&5 +echo "configure:2635: 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 @@ -2587,14 +2639,14 @@ else ac_save_LIBS="$LIBS" LIBS="-lm $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2650: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2623,7 +2675,7 @@ fi echo $ac_n "checking for crypt in -lcrypt""... $ac_c" 1>&6 -echo "configure:2627: checking for crypt in -lcrypt" >&5 +echo "configure:2679: 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 @@ -2631,7 +2683,7 @@ else ac_save_LIBS="$LIBS" LIBS="-lcrypt $LIBS" cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest; then +if { (eval echo configure:2698: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes" else @@ -2743,12 +2795,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2747: checking for $ac_func" >&5 +echo "configure:2799: 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:2827: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2797,7 +2849,7 @@ done echo $ac_n "checking if GNUregex needs to be compiled""... $ac_c" 1>&6 -echo "configure:2801: checking if GNUregex needs to be compiled" >&5 +echo "configure:2853: checking if GNUregex needs to be compiled" >&5 if test "$ac_cv_func_regcomp" = "no" ; then USE_GNUREGEX="yes" else @@ -2829,12 +2881,12 @@ for ac_func in \ do echo $ac_n "checking for $ac_func""... $ac_c" 1>&6 -echo "configure:2833: checking for $ac_func" >&5 +echo "configure:2885: 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:2913: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes" else @@ -2885,12 +2937,12 @@ done echo $ac_n "checking Default FD_SETSIZE value""... $ac_c" 1>&6 -echo "configure:2889: checking Default FD_SETSIZE value" >&5 +echo "configure:2941: 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:2970: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then DEFAULT_FD_SETSIZE=`cat conftestval` else @@ -2933,12 +2985,12 @@ EOF echo $ac_n "checking Maximum number of filedescriptors we can open""... $ac_c" 1>&6 -echo "configure:2937: checking Maximum number of filedescriptors we can open" >&5 +echo "configure:2989: checking Maximum number of filedescriptors we can open" >&5 if test "$cross_compiling" = yes; then SQUID_MAXFD=256 else cat > conftest.$ac_ext < @@ -2990,7 +3042,7 @@ main() { } EOF -if { (eval echo configure:2994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3046: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_MAXFD=`cat conftestval` else @@ -3009,12 +3061,12 @@ EOF echo $ac_n "checking Default UDP send buffer size""... $ac_c" 1>&6 -echo "configure:3013: checking Default UDP send buffer size" >&5 +echo "configure:3065: checking Default UDP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -3033,7 +3085,7 @@ main () } EOF -if { (eval echo configure:3037: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3089: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_SNDBUF=`cat conftestval` else @@ -3052,12 +3104,12 @@ EOF echo $ac_n "checking Default UDP receive buffer size""... $ac_c" 1>&6 -echo "configure:3056: checking Default UDP receive buffer size" >&5 +echo "configure:3108: checking Default UDP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_UDP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -3076,7 +3128,7 @@ main () } EOF -if { (eval echo configure:3080: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3132: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_UDP_SO_RCVBUF=`cat conftestval` else @@ -3095,12 +3147,12 @@ EOF echo $ac_n "checking Default TCP send buffer size""... $ac_c" 1>&6 -echo "configure:3099: checking Default TCP send buffer size" >&5 +echo "configure:3151: checking Default TCP send buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_SNDBUF=16384 else cat > conftest.$ac_ext < @@ -3119,7 +3171,7 @@ main () } EOF -if { (eval echo configure:3123: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3175: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_SNDBUF=`cat conftestval` else @@ -3138,12 +3190,12 @@ EOF echo $ac_n "checking Default TCP receive buffer size""... $ac_c" 1>&6 -echo "configure:3142: checking Default TCP receive buffer size" >&5 +echo "configure:3194: checking Default TCP receive buffer size" >&5 if test "$cross_compiling" = yes; then SQUID_TCP_SO_RCVBUF=16384 else cat > conftest.$ac_ext < @@ -3162,7 +3214,7 @@ main () } EOF -if { (eval echo configure:3166: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null +if { (eval echo configure:3218: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null then SQUID_TCP_SO_RCVBUF=`cat conftestval` else @@ -3181,16 +3233,16 @@ EOF echo $ac_n "checking if sys_errlist is already defined""... $ac_c" 1>&6 -echo "configure:3185: checking if sys_errlist is already defined" >&5 +echo "configure:3237: checking if sys_errlist is already defined" >&5 cat > conftest.$ac_ext < int main() { char *s = sys_errlist[0]; ; return 0; } EOF -if { (eval echo configure:3194: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then +if { (eval echo configure:3246: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* echo "$ac_t""yes" 1>&6 else @@ -3206,16 +3258,16 @@ fi rm -f conftest* echo $ac_n "checking for libresolv _dns_ttl_ hack""... $ac_c" 1>&6 -echo "configure:3210: checking for libresolv _dns_ttl_ hack" >&5 +echo "configure:3262: 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:3271: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then rm -rf conftest* echo "$ac_t""yes" 1>&6 cat >> confdefs.h <<\EOF @@ -3411,6 +3463,8 @@ s%@MKDIR@%$MKDIR%g s%@LN@%$LN%g s%@PERL@%$PERL%g s%@MAKEDEPEND@%$MAKEDEPEND%g +s%@AR@%$AR%g +s%@AR_R@%$AR_R%g s%@ALLOCA@%$ALLOCA%g s%@CRYPTLIB@%$CRYPTLIB%g s%@REGEXLIB@%$REGEXLIB%g diff --git a/configure.in b/configure.in index c2ec90fc6e..2609642046 100644 --- a/configure.in +++ b/configure.in @@ -3,13 +3,13 @@ dnl Configuration input file for Squid dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.70 1997/03/04 05:16:21 wessels Exp $ +dnl $Id: configure.in,v 1.71 1997/04/28 04:29:57 wessels Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.70 $)dnl +AC_REVISION($Revision: 1.71 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AC_CONFIG_AUX_DIR(aux) @@ -62,6 +62,13 @@ if test $ac_cv_prog_gcc = no; then sleep 5 fi +dnl Gerben Wierda +case "$host" in + mab-next-nextstep3) + CC="$CC -arch m68k -arch i486 -arch hppa -arch sparc" + ;; +esac + dnl Set Default CFLAGS if test -z "$PRESET_CFLAGS"; then if test "$GCC" = "yes"; then @@ -75,13 +82,6 @@ if test -z "$PRESET_CFLAGS"; then ;; esac fi - - case "$host" in - *-hp-hpux*) - echo "Disabling 'ranlib' for HP-UX..." - RANLIB=":" - ;; - esac fi dnl Set LDFLAGS @@ -108,7 +108,23 @@ AC_PATH_PROG(MKDIR, mkdir, $FALSE) AC_PATH_PROG(LN, ln, cp) AC_PATH_PROG(PERL, perl, /usr/local/bin/perl) AC_PATH_PROG(MAKEDEPEND, makedepend, $TRUE) +AC_PATH_PROG(AR, ar, $FALSE) + +case "$host" in + *-hp-hpux*) + echo "Disabling 'ranlib' for HP-UX..." + RANLIB=":" + ;; +esac +dnl set $(AR) +AR_R="$AR r" +case "$host" in + *-next-nextstep3) + AR="libtool -o" + ;; +esac +AC_SUBST(AR_R) dnl Check for headers AC_HEADER_DIRENT @@ -128,6 +144,7 @@ AC_CHECK_HEADERS( \ getopt.h \ grp.h \ libc.h \ + limits.h \ malloc.h \ math.h \ memory.h \ @@ -193,8 +210,14 @@ AC_MSG_CHECKING(for ip->ip_hl) AC_TRY_COMPILE([#include #include #include -#include ], -[struct ip ip; +#include +#ifdef __linux__ +#define ip_hl ihl +#endif +#ifndef __linux__ +#define iphdr ip +#endif], +[struct iphdr ip; ip.ip_hl= 0;], [AC_DEFINE(HAVE_IP_HL) AC_MSG_RESULT(yes)], diff --git a/include/autoconf.h.in b/include/autoconf.h.in index 93dc7f02b9..be624f7bc5 100644 --- a/include/autoconf.h.in +++ b/include/autoconf.h.in @@ -223,6 +223,9 @@ /* Define if you have the header file. */ #undef HAVE_LIBC_H +/* Define if you have the header file. */ +#undef HAVE_LIMITS_H + /* Define if you have the header file. */ #undef HAVE_MALLOC_H diff --git a/include/util.h b/include/util.h index 2cf1c85775..5d15187ed6 100644 --- a/include/util.h +++ b/include/util.h @@ -1,5 +1,5 @@ /* - * $Id: util.h,v 1.28 1996/12/01 07:42:34 wessels Exp $ + * $Id: util.h,v 1.29 1997/04/28 04:30:02 wessels Exp $ * * AUTHOR: Harvest Derived * @@ -151,4 +151,7 @@ extern char *rfc1738_escape _PARAMS((const char *)); void malloc_statistics _PARAMS((void (*)_PARAMS((int, int, void *)), void *)); #endif +typedef struct in_addr SIA; +extern int safe_inet_addr _PARAMS((const char *, SIA *)); + #endif /* ndef _UTIL_H_ */ diff --git a/lib/Makefile.in b/lib/Makefile.in index d16f070c63..1761cb0188 100644 --- a/lib/Makefile.in +++ b/lib/Makefile.in @@ -3,7 +3,7 @@ # # Darren Hardy, hardy@cs.colorado.edu, April 1994 # -# $Id: Makefile.in,v 1.21 1997/02/20 21:04:07 wessels Exp $ +# $Id: Makefile.in,v 1.22 1997/04/28 04:30:03 wessels Exp $ # prefix = @prefix@ srcdir = @srcdir@ @@ -21,6 +21,7 @@ LDFLAGS = @LDFLAGS@ XTRA_LIBS = @XTRA_LIBS@ RM = @RM@ LIBOBJS = @LIBOBJS@ +AR_R = @AR_R@ INCLUDE = -I../include -I$(srcdir)/../include UTILOBJS = rfc1123.o \ @@ -31,6 +32,7 @@ UTILOBJS = rfc1123.o \ uudecode.o \ tree.o \ splay.o \ + safe_inet_addr.o \ $(LIBOBJS) REGEXOBJS = GNUregex.o LIBS = libmiscutil.a @LIBREGEX@ @@ -43,11 +45,12 @@ $(UTILOBJS): ../include/version.h libmiscutil.a: $(UTILOBJS) $(RM) -f $@ - ar r $@ $(UTILOBJS) + $(AR_R) $@ $(UTILOBJS) $(RANLIB) $@ libregex.a: $(REGEXOBJS) - ar r $@ $(REGEXOBJS) + $(RM) -f $@ + $(AR_R) $@ $(REGEXOBJS) $(RANLIB) $@ clean: diff --git a/lib/getfullhostname.c b/lib/getfullhostname.c index 0461b3b466..045108304a 100644 --- a/lib/getfullhostname.c +++ b/lib/getfullhostname.c @@ -1,6 +1,6 @@ /* - * $Id: getfullhostname.c,v 1.12 1996/11/06 23:14:13 wessels Exp $ + * $Id: getfullhostname.c,v 1.13 1997/04/28 04:30:04 wessels Exp $ * * DEBUG: * AUTHOR: Harvest Derived @@ -156,6 +156,6 @@ getfullhostname(void) if (gethostname(buf, SQUIDHOSTNAMELEN) < 0) return NULL; if ((hp = gethostbyname(buf)) != NULL) - strncpy(buf, hp->h_name, SQUIDHOSTNAMELEN); + xstrncpy(buf, hp->h_name, SQUIDHOSTNAMELEN); return buf; } diff --git a/lib/safe_inet_addr.c b/lib/safe_inet_addr.c new file mode 100644 index 0000000000..ce29c0f372 --- /dev/null +++ b/lib/safe_inet_addr.c @@ -0,0 +1,40 @@ +#include "config.h" + +#if HAVE_STDIO_H +#include +#endif +#if HAVE_STDLIB_H +#include +#endif +#if HAVE_UNISTD_H +#include +#endif +#if HAVE_NETINET_IN_H +#include +#endif +#if HAVE_ARPA_INET_H +#include +#endif + +int +safe_inet_addr(const char *buf, struct in_addr *addr) +{ + static char addrbuf[32]; + int a1 = 0, a2 = 0, a3 = 0, a4 = 0; + struct in_addr A; + if (sscanf(buf, "%d.%d.%d.%d", &a1, &a2, &a3, &a4) != 4) + return 0; + if (a1 < 0 || a1 > 255) + return 0; + if (a2 < 0 || a2 > 255) + return 0; + if (a3 < 0 || a3 > 255) + return 0; + if (a4 < 0 || a4 > 255) + return 0; + sprintf(addrbuf, "%d.%d.%d.%d", a1, a2, a3, a4); + A.s_addr = inet_addr(addrbuf); + if (addr) + addr->s_addr = A.s_addr; + return 1; +} diff --git a/lib/tempnam.c b/lib/tempnam.c index e442be80d9..082787ad85 100644 --- a/lib/tempnam.c +++ b/lib/tempnam.c @@ -1,268 +1,129 @@ -/* Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. - * This file is part of the GNU C Library. - * - * The GNU C Library is free software; you can redistribute it and/or - * modify it under the terms of the GNU Library General Public License as - * published by the Free Software Foundation; either version 2 of the - * License, or (at your option) any later version. - * - * The GNU C Library is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Library General Public License for more details. - * - * You should have received a copy of the GNU Library General Public - * License along with the GNU C Library; see the file COPYING.LIB. If - * not, write to the Free Software Foundation, Inc., 675 Mass Ave, - * Cambridge, MA 02139, USA. */ +/* A reasonably functional tmpnam. */ -/* tempnam for NEXTSTEP. from Linux GNU libc. Hacked by lukeh@schnet.edu.au */ +/* Originally by Tom Hageman, tom@basil.icce.rug.nl */ -#include "config.h" - -#if !HAVE_TEMPNAM +/* + * This tmpnam() was changed by Gerben_Wierda@RnA.nl to serve as + * tempnam() for squid-1.1.6. It ignores the directory parameter, every + * temp file is written in /tmp. + */ -#ifdef __NeXT__ -#ifndef _POSIX_SOURCE -#define _POSIX_SOURCE -#endif /* _POSIX_SOURCE_ */ -#endif /* __NeXT__ */ +#include "config.h" #if HAVE_STDIO_H #include #endif -#if HAVE_ERRNO_H -#include -#endif -#ifdef __STDC__ -#if HAVE_STDDEF_H -#include -#endif -#endif -#if HAVE_STDLIB_H -#include -#endif -#if HAVE_STRING_H -#include -#endif -#if HAVE_SYS_TYPES_H -#include -#endif -#if HAVE_SYS_STAT_H -#include -#endif -#if HAVE_FCNTL_H -#include +#if HAVE_LIMITS_H +#include #endif #if HAVE_UNISTD_H #include #endif -#ifndef FILENAME_MAX -#define FILENAME_MAX 1024 -#endif - -#define P_tmpdir "/tmp" - -/* These are the characters used in temporary filenames. */ -static const char letters[] = +#undef TMP_MAX -"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"; +#define _tmp "/tmp/" +#define lengthof_tmp 5 -/* Return nonzero if DIR is an existent directory. */ -static int -diraccess(const char *dir) -{ - struct stat buf; - uid_t euid; - - if (stat(dir, &buf) != 0 || !S_ISDIR(buf.st_mode)) - return 0; - - /* That is going to be tough. */ - - euid = geteuid(); - - /* super user */ - if (!euid) - return 1; - - if (euid == buf.st_uid) - return ((buf.st_mode & S_IWUSR) && (buf.st_mode & S_IXUSR)); - - if (getegid() == buf.st_gid) - return ((buf.st_mode & S_IWGRP) && (buf.st_mode & S_IXGRP)); - - return ((buf.st_mode & S_IWOTH) && (buf.st_mode & S_IXOTH)); -} +#ifndef LONG_BIT +#define LONG_BIT (CHAR_BIT * 4) /* assume sizeof(long) == 4 */ +#endif -/* Return nonzero if FILE exists. */ -static int -exists(const char *file) -{ - /* We can stat the file even if we can't read its data. */ - struct stat st; - int save = errno; - if (stat(file, &st) == 0) - return 1; - else { - /* We report that the file exists if stat failed for a - * reason other - * than nonexistence. In this case, it may or may not exist, and - * we - * don't know; but reporting that it does exist will never cause - * any - * trouble, while reporting that it doesn't exist when it does - * would - * violate the interface of __stdio_gen_tempname. */ - int exists = errno != ENOENT; - errno = save; - return exists; - } -} +#define L_tmpmin (lengthof_tmp + 5) /* 5 chars for pid. */ +#if (L_tmpnam > L_tmpmin) +#if (L_tmpnam > L_tmpmin + LONG_BIT / 6) /* base 64 */ +#define TMP_MAX ULONG_MAX +#else +#define TMP_MAX ((1L << (6 * (L_tmpnam - L_tmpmin))) - 1) +#endif +#else +#ifndef L_tmpnam +#error "tmpnam: L_tmpnam undefined" +#else +#error "tmpnam: L_tmpnam too small" +#endif +#endif -/* Generate a temporary filename and return it (in a static buffer). If - * STREAMPTR is not NULL, open a stream "w+b" on the file and set - * *STREAMPTR to it. If DIR_SEARCH is nonzero, DIR and PFX are used as - * described for tempnam. If not, a temporary filename in P_tmpdir with - * no special prefix is generated. If LENPTR is not NULL, *LENPTR is - * set the to length (including the terminating '\0') of the resultant - * filename, which is returned. This goes through a cyclic pattern of - * all possible filenames consisting of five decimal digits of the - * current pid and three of the characters in `letters'. Data for - * tempnam and tmpnam is kept separate, but when tempnam is using - * P_tmpdir and no prefix (i.e, it is identical to tmpnam), the same - * data is used. Each potential filename is tested for an - * already-existing file of the same name, and no name of an existing - * file will be returned. When the cycle reaches its end (12345ZZZ), - * NULL is returned. */ static char * -gen_tempname( - const char *dir, - const char *pfx, - int dir_search, - size_t * lenptr, - FILE ** streamptr -) +_tmpnam(void) { - int saverrno = errno; - static const char tmpdir[] = P_tmpdir; - static struct { - unsigned char digits[4]; - } infos[2], *info; - static char buf[FILENAME_MAX]; - static pid_t oldpid = (pid_t) 0; + static const char digits[] = +#if (L_tmpnam >= L_tmpmin + LONG_BIT / 4) + "0123456789abcdef"; +#define TMP_BASE 16 +#else + "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-"; +#define TMP_BASE 64 +#endif + static unsigned long lastcount = 0; + static char buffer[L_tmpnam + 1]; + char *s = buffer; + unsigned long count = lastcount; pid_t pid = getpid(); - register size_t len, plen, dlen, flen; - int i, carry; - - if (dir_search) { - register const char *d = getenv("TMPDIR"); - if (d != NULL && !diraccess(d)) - d = NULL; - if (d == NULL && dir != NULL && diraccess(dir)) - d = dir; - if (d == NULL && diraccess(tmpdir)) - d = tmpdir; - if (d == NULL && diraccess("/tmp")) - d = "/tmp"; - if (d == NULL) { - errno = ENOENT; - return NULL; - } - dir = d; - } else - dir = tmpdir; - dlen = strlen(dir); - - /* Remove trailing slashes from the directory name. */ - while (dlen > 1 && dir[dlen - 1] == '/') - --dlen; - if (pfx != NULL && *pfx != '\0') { - plen = strlen(pfx); - if (plen > 5) - plen = 5; - } else - plen = 0; + if (sizeof(_tmp) - 1 != lengthof_tmp) + abort(); /* Consistency error. */ - if (dir != tmpdir && !strcmp(dir, tmpdir)) - dir = tmpdir; - info = &infos[(plen == 0 && dir == tmpdir) ? 1 : 0]; - - if (pid != oldpid) { - oldpid = pid; - for (i = 0; i < sizeof(info->digits); i++) - infos[0].digits[i] = infos[1].digits[i] = 0; - } - flen = dlen + 1 + plen + 5; for (;;) { - if (info->digits[sizeof(info->digits) - 1]) { - errno = EEXIST; - return NULL; - } - len = flen; - if ((sizeof(buf) - sizeof(info->digits)) < len || - sprintf(buf, "%.*s/%.*s%.5d", (int) dlen, dir, - (int) plen, pfx, pid % 100000) != (int) len) - return NULL; - - /* Get the last part of string */ - for (i = 0; i < sizeof(info->digits) - 1; i++) - buf[len++] = letters[info->digits[i]]; - buf[len] = '\0'; - - /* Always return a unique string. */ - carry = ++info->digits[0] / (sizeof(letters) - 1); - info->digits[0] %= (sizeof(letters) - 1); - for (i = 1; i < sizeof(info->digits); i++) { - info->digits[i] += carry; - carry = info->digits[i] / (sizeof(letters) - 1); - info->digits[i] %= (sizeof(letters) - 1); - } + register int i = L_tmpnam; + register unsigned long c; + register unsigned int p; + + /* Build filename. (the hard way) */ + s += i; + *s = '\0'; + + c = (count == TMP_MAX) ? 0 : ++count; + do { + *--s = digits[c % TMP_BASE]; + c /= TMP_BASE; + } while (--i > L_tmpmin); + + p = (unsigned int) pid; + do { + *--s = digits[p % 10]; + p /= 10; + } while (--i > lengthof_tmp); + + do { + *--s = _tmp[--i]; + } while (i > 0); + + /* Check that the file doesn't exist. */ + if (access(s, 0) != 0) + break; - if (streamptr != NULL) { - int fd = open(buf, O_RDWR | O_CREAT | O_EXCL, 0666); - if (fd >= 0) { - *streamptr = fdopen(fd, "w+b"); - if (*streamptr == NULL) { - int save = errno; - (void) close(fd); - errno = save; - return NULL; - } - break; - } - } else if (!exists(buf)) + /* It exists; retry unless we tried them all. */ + if (count == lastcount) { + s = NULL; break; + } } - errno = saverrno; + lastcount = count; - if (lenptr != NULL) - *lenptr = len + 1; - return buf; + return s; } char * tempnam(const char *dir, const char *pfx) { - size_t len; - register char *s; - register char *t = gen_tempname(dir, pfx, 1, &len, (FILE **) - NULL); - - if (t == NULL) - return NULL; - - s = (char *) malloc(len); - if (s == NULL) - return NULL; - - (void) memcpy(s, t, len); - return s; + return _tmpnam(); } -#endif /* !HAVE_TEMPNAM */ +#ifdef TEST +int +main() +{ + char *t; + int n = 0; + while ((t = tempnam(NULL, NULL))) { + printf("%s\n", t); + if (++n == 1000) + break; + } + return 1; +} +#endif