diff -ruN squid-2.5.STABLE8/ChangeLog squid-2.5.STABLE9-RC1/ChangeLog --- squid-2.5.STABLE8/ChangeLog Fri Feb 11 04:25:14 2005 +++ squid-2.5.STABLE9-RC1/ChangeLog Sun Feb 20 03:44:07 2005 @@ -1,3 +1,17 @@ +Changes to squid-2.5.STABLE9 () + + - [Minor] relaxed_header_parser extended to work around even more + broken web servers (Bug #1242) + - [Minor] FTP gatewaying URLs cleaned up slightly, mainly to work + better with Mozilla but also to improve security slightly on + non-anonymous FTP. + - [Minor] High characters allowed un-encoded in FTP and Gopher + listings to allow the user-agent to display data in non-iso8859-1 + charsets. (Bug #1220) + - [Cosmetic] format fixes to silence compiler warnings on many + platforms. + - [Major] Assertion failures on certain odd DNS responses (Bug #1234) + Changes to squid-2.5.STABLE8 (11 Feb 2005) - [Minor] 100% CPU usage on half-closed PUT/POST requests (Bug #354, diff -ruN squid-2.5.STABLE8/RELEASENOTES.html squid-2.5.STABLE9-RC1/RELEASENOTES.html --- squid-2.5.STABLE8/RELEASENOTES.html Fri Feb 11 04:30:25 2005 +++ squid-2.5.STABLE9-RC1/RELEASENOTES.html Sun Feb 20 03:53:17 2005 @@ -1,13 +1,13 @@ - + Squid 2.5 release notes

Squid 2.5 release notes

-

Squid Developers

$Id: release-2.5.html,v 1.1.2.41 2005/02/04 14:39:49 hno Exp $ +

Squid Developers

$Id: release-2.5.html,v 1.1.2.42 2005/02/20 10:46:51 hno Exp $
This document contains the release notes for version 2.5 of Squid. Squid is a WWW Cache application developed by the National Laboratory @@ -368,6 +368,19 @@
  • Properly handle oversized reply headers
  • a number of other minor and cosmetic bugfixes. See the list of squid-2.5.STABLE7 patches and the +ChangeLog file for details.
  • + +

    + +

    11. Key changes squid-2.5.STABLE8 to 2.5.STABLE9:

    + +

    +

    diff -ruN squid-2.5.STABLE8/configure squid-2.5.STABLE9-RC1/configure --- squid-2.5.STABLE8/configure Fri Feb 11 04:30:17 2005 +++ squid-2.5.STABLE9-RC1/configure Sun Feb 20 03:53:06 2005 @@ -1000,7 +1000,7 @@ # Define the identity of the package. PACKAGE=squid -VERSION=2.5.STABLE8 +VERSION=2.5.STABLE9-RC1 cat >> confdefs.h <&6 echo "configure:1057: checking whether to enable maintainer-specific portions of Makefiles" >&5 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. @@ -2273,7 +2273,7 @@ case "$host" in *-linux-*) ;; - *-solaris-*) + *-solaris*) ;; *-freebsd*) ;; diff -ruN squid-2.5.STABLE8/configure.in squid-2.5.STABLE9-RC1/configure.in --- squid-2.5.STABLE8/configure.in Fri Feb 11 04:30:17 2005 +++ squid-2.5.STABLE9-RC1/configure.in Sun Feb 20 03:53:06 2005 @@ -3,15 +3,15 @@ dnl dnl Duane Wessels, wessels@nlanr.net, February 1996 (autoconf v2.9) dnl -dnl $Id: configure.in,v 1.251.2.78 2005/02/11 11:25:14 hno Exp $ +dnl $Id: configure.in,v 1.251.2.80 2005/02/20 10:50:43 hno Exp $ dnl dnl dnl AC_INIT(src/main.c) AC_CONFIG_AUX_DIR(cfgaux) -AM_INIT_AUTOMAKE(squid, 2.5.STABLE8) +AM_INIT_AUTOMAKE(squid, 2.5.STABLE9-RC1) AM_CONFIG_HEADER(include/autoconf.h) -AC_REVISION($Revision: 1.251.2.78 $)dnl +AC_REVISION($Revision: 1.251.2.80 $)dnl AC_PREFIX_DEFAULT(/usr/local/squid) AM_MAINTAINER_MODE @@ -535,7 +535,7 @@ case "$host" in *-linux-*) ;; - *-solaris-*) + *-solaris*) ;; *-freebsd*) ;; diff -ruN squid-2.5.STABLE8/include/version.h squid-2.5.STABLE9-RC1/include/version.h --- squid-2.5.STABLE8/include/version.h Fri Feb 11 04:30:17 2005 +++ squid-2.5.STABLE9-RC1/include/version.h Sun Feb 20 03:53:06 2005 @@ -9,5 +9,5 @@ */ #ifndef SQUID_RELEASE_TIME -#define SQUID_RELEASE_TIME 1108121414 +#define SQUID_RELEASE_TIME 1108896783 #endif diff -ruN squid-2.5.STABLE8/lib/html_quote.c squid-2.5.STABLE9-RC1/lib/html_quote.c --- squid-2.5.STABLE8/lib/html_quote.c Wed Oct 17 13:46:43 2001 +++ squid-2.5.STABLE9-RC1/lib/html_quote.c Mon Feb 14 17:27:33 2005 @@ -1,5 +1,5 @@ /* - * $Id: html_quote.c,v 1.4 2001/10/17 19:46:43 hno Exp $ + * $Id: html_quote.c,v 1.4.2.1 2005/02/15 00:27:33 hno Exp $ * * DEBUG: * AUTHOR: Robert Collins @@ -109,15 +109,6 @@ escape = htmlstandardentities[i].quote; break; } - } - /* Encode control chars just to be on the safe side, and make - * sure all 8-bit characters are encoded to protect from buggy - * clients - */ - if (!escape && (ch <= 0x1F || ch >= 0x7f) && ch != '\n' && ch != '\r' && ch != '\t') { - static char dec_encoded[7]; - snprintf(dec_encoded, sizeof dec_encoded, "&#%3d;", (int) ch); - escape = dec_encoded; } if (escape) { /* Ok, An escaped form was found above. Use it */ diff -ruN squid-2.5.STABLE8/src/HttpHeader.c squid-2.5.STABLE9-RC1/src/HttpHeader.c --- squid-2.5.STABLE8/src/HttpHeader.c Thu Feb 10 03:07:05 2005 +++ squid-2.5.STABLE9-RC1/src/HttpHeader.c Sun Feb 20 03:32:41 2005 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.c,v 1.74.2.24 2005/02/10 10:07:05 hno Exp $ + * $Id: HttpHeader.c,v 1.74.2.25 2005/02/20 10:32:41 hno Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -439,13 +439,18 @@ } /* Barf on stray CR characters */ if (memchr(this_line, '\r', field_end - this_line)) { - debug(55, 1) ("WARNING: suspicious CR characters in HTTP header near {%s}\n", - getStringPrefix(field_start, header_end)); - return httpHeaderReset(hdr); + debug(55, 1) ("WARNING: suspicious CR characters in HTTP header {%s}\n", + getStringPrefix(field_start, field_end)); + if (Config.onoff.relaxed_header_parser) { + char *p = (char *) this_line; /* XXX Warning! This destroys original header content and violates specifications somewhat */ + while ((p = memchr(p, '\r', field_end - p)) != NULL) + *p++ = ' '; + } else + return httpHeaderReset(hdr); } if (this_line + 1 == field_end && this_line > field_start) { - debug(55, 1) ("WARNING: Blank continuation line in HTTP header near {%s}\n", - getStringPrefix(field_start, header_end)); + debug(55, 1) ("WARNING: Blank continuation line in HTTP header {%s}\n", + getStringPrefix(header_start, header_end)); return httpHeaderReset(hdr); } } while (field_ptr < header_end && (*field_ptr == ' ' || *field_ptr == '\t')); @@ -459,13 +464,18 @@ } e = httpHeaderEntryParseCreate(field_start, field_end); if (NULL == e) { - debug(55, 1) ("WARNING: unparseable HTTP header field near {%s}\n", - getStringPrefix(field_start, header_end)); - return httpHeaderReset(hdr); + debug(55, 1) ("WARNING: unparseable HTTP header field {%s}\n", + getStringPrefix(field_start, field_end)); + debug(55, Config.onoff.relaxed_header_parser <= 0 ? 1 : 2) + (" in {%s}\n", getStringPrefix(header_start, header_end)); + if (Config.onoff.relaxed_header_parser) + continue; + else + return httpHeaderReset(hdr); } if (e->id == HDR_CONTENT_LENGTH && (e2 = httpHeaderFindEntry(hdr, e->id)) != NULL) { if (!Config.onoff.relaxed_header_parser || strCmp(e->value, strBuf(e2->value)) != 0) { - debug(55, 1) ("WARNING: found two conflicting content-length headers\n"); + debug(55, 1) ("WARNING: found two conflicting content-length headers in {%s}\n", getStringPrefix(header_start, header_end)); httpHeaderEntryDestroy(e); return httpHeaderReset(hdr); } else { diff -ruN squid-2.5.STABLE8/src/acl.c squid-2.5.STABLE9-RC1/src/acl.c --- squid-2.5.STABLE8/src/acl.c Mon Jan 10 08:31:00 2005 +++ squid-2.5.STABLE9-RC1/src/acl.c Sun Feb 13 11:03:20 2005 @@ -1,6 +1,6 @@ /* - * $Id: acl.c,v 1.270.2.32 2005/01/10 15:31:00 hno Exp $ + * $Id: acl.c,v 1.270.2.33 2005/02/13 18:03:20 serassio Exp $ * * DEBUG: section 28 Access Control * AUTHOR: Duane Wessels @@ -2781,7 +2781,7 @@ #include #endif #include -#ifdef _SQUID_FREEBSD__ +#ifdef _SQUID_FREEBSD_ #include #endif #if HAVE_NETINET_IF_ETHER_H @@ -2969,10 +2969,6 @@ #elif defined(_SQUID_SOLARIS_) struct arpreq arpReq; struct sockaddr_in ipAddr; - unsigned char ifbuffer[sizeof(struct ifreq) * 64]; - struct ifconf ifc; - struct ifreq *ifr; - int offset; splayNode **Top = dataptr; /* * Set up structures for ARP lookup with blank interface name @@ -3007,10 +3003,6 @@ #elif defined(_SQUID_FREEBSD_) struct arpreq arpReq; struct sockaddr_in ipAddr; - unsigned char ifbuffer[sizeof(struct ifreq) * 64]; - struct ifconf ifc; - struct ifreq *ifr; - int offset; splayNode **Top = dataptr; int mib[6]; diff -ruN squid-2.5.STABLE8/src/carp.c squid-2.5.STABLE9-RC1/src/carp.c --- squid-2.5.STABLE8/src/carp.c Thu Sep 30 03:23:30 2004 +++ squid-2.5.STABLE9-RC1/src/carp.c Sun Feb 13 13:54:09 2005 @@ -1,6 +1,6 @@ /* - * $Id: carp.c,v 1.15.2.2 2004/09/30 09:23:30 hno Exp $ + * $Id: carp.c,v 1.15.2.3 2005/02/13 20:54:09 serassio Exp $ * * DEBUG: section 39 Cache Array Routing Protocol * AUTHOR: Eric Stern @@ -126,7 +126,7 @@ combined_hash += combined_hash * 0x62531965; combined_hash = ROTATE_LEFT(combined_hash, 21); combined_hash = combined_hash * tp->carp.load_multiplier; - debug(39, 3) ("carpSelectParent: %s combined_hash %d\n", + debug(39, 3) ("carpSelectParent: %s combined_hash %ld\n", tp->host, combined_hash); if ((combined_hash > high_score) && neighborUp(tp)) { p = tp; diff -ruN squid-2.5.STABLE8/src/comm.c squid-2.5.STABLE9-RC1/src/comm.c --- squid-2.5.STABLE8/src/comm.c Mon Sep 27 12:17:39 2004 +++ squid-2.5.STABLE9-RC1/src/comm.c Sat Feb 12 22:53:56 2005 @@ -1,6 +1,6 @@ /* - * $Id: comm.c,v 1.324.2.4 2004/09/27 18:17:39 hno Exp $ + * $Id: comm.c,v 1.324.2.5 2005/02/13 05:53:56 hno Exp $ * * DEBUG: section 5 Socket Functions * AUTHOR: Harvest Derived @@ -411,8 +411,6 @@ cs->S.sin_family = AF_INET; cs->S.sin_addr = cs->in_addr; cs->S.sin_port = htons(cs->port); - if (Config.onoff.log_fqdn) - fqdncache_gethostbyaddr(cs->S.sin_addr, FQDN_LOOKUP_IF_MISS); } switch (comm_connect_addr(fd, &cs->S)) { case COMM_INPROGRESS: diff -ruN squid-2.5.STABLE8/src/external_acl.c squid-2.5.STABLE9-RC1/src/external_acl.c --- squid-2.5.STABLE8/src/external_acl.c Sat Aug 14 15:01:33 2004 +++ squid-2.5.STABLE9-RC1/src/external_acl.c Sun Feb 13 14:23:19 2005 @@ -1,6 +1,6 @@ /* - * $Id: external_acl.c,v 1.1.2.31 2004/08/14 21:01:33 hno Exp $ + * $Id: external_acl.c,v 1.1.2.32 2005/02/13 21:23:19 serassio Exp $ * * DEBUG: section 82 External ACL * AUTHOR: Henrik Nordstrom, MARA Systems AB @@ -231,7 +231,7 @@ if (member) { /* Split in header and member */ *member++ = '\0'; - if (!isalnum(*member)) + if (!isalnum((int) *member)) format->separator = *member++; else format->separator = ','; diff -ruN squid-2.5.STABLE8/src/fqdncache.c squid-2.5.STABLE9-RC1/src/fqdncache.c --- squid-2.5.STABLE8/src/fqdncache.c Tue Dec 7 16:40:57 2004 +++ squid-2.5.STABLE9-RC1/src/fqdncache.c Sat Feb 12 22:53:56 2005 @@ -1,6 +1,6 @@ /* - * $Id: fqdncache.c,v 1.149.2.5 2004/12/07 23:40:57 hno Exp $ + * $Id: fqdncache.c,v 1.149.2.6 2005/02/13 05:53:56 hno Exp $ * * DEBUG: section 35 FQDN Cache * AUTHOR: Harvest Derived @@ -303,7 +303,9 @@ continue; if (answers[k].class != RFC1035_CLASS_IN) continue; - f->names[f->name_count++] = xstrndup(answers[k].rdata, answers[k].rdlength); + if (!answers[k].rdata[0]) + continue; + f->names[f->name_count++] = xstrdup(answers[k].rdata); if (ttl == 0 || answers[k].ttl < ttl) ttl = answers[k].ttl; if (f->name_count >= FQDN_MAX_NAMES) diff -ruN squid-2.5.STABLE8/src/ftp.c squid-2.5.STABLE9-RC1/src/ftp.c --- squid-2.5.STABLE8/src/ftp.c Sat Feb 5 17:53:29 2005 +++ squid-2.5.STABLE9-RC1/src/ftp.c Mon Feb 14 19:13:13 2005 @@ -1,6 +1,6 @@ /* - * $Id: ftp.c,v 1.316.2.17 2005/02/06 00:53:29 hno Exp $ + * $Id: ftp.c,v 1.316.2.20 2005/02/15 02:13:13 hno Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -433,7 +433,8 @@ if (ftpState->flags.listformat_unknown && !ftpState->flags.tried_nlst) { storeAppendPrintf(e, "[As plain directory]\n"); } else if (ftpState->typecode == 'D') { - storeAppendPrintf(e, "[As extended directory]\n"); + const char *path = ftpState->filepath ? ftpState->filepath : "."; + storeAppendPrintf(e, "[As extended directory]\n", html_quote(path)); } storeAppendPrintf(e, "
    \n"); storeAppendPrintf(e, "
    \n"); @@ -707,7 +708,7 @@ "Back"); } else { /* NO_DOTDOT && ROOT_DIR */ /* "UNIX Root" directory */ - strcpy(href, "../"); + strcpy(href, "/"); strcpy(text, "Home Directory"); } snprintf(html, 8192, "%s %s %s\n", @@ -1011,20 +1012,18 @@ } } l = strLen(request->urlpath); - ftpState->flags.use_base = 1; /* check for null path */ if (!l) { ftpState->flags.isdir = 1; ftpState->flags.root_dir = 1; + ftpState->flags.use_base = 1; /* Work around broken browsers */ } else if (!strCmp(request->urlpath, "/%2f/")) { /* UNIX root directory */ - ftpState->flags.use_base = 0; ftpState->flags.isdir = 1; ftpState->flags.root_dir = 1; } else if ((l >= 1) && (*(strBuf(request->urlpath) + l - 1) == '/')) { /* Directory URL, ending in / */ ftpState->flags.isdir = 1; - ftpState->flags.use_base = 0; if (l == 1) ftpState->flags.root_dir = 1; } @@ -1518,7 +1517,8 @@ if (*p) *p++ = '\0'; rfc1738_unescape(d); - wordlistAdd(&ftpState->pathcomps, d); + if (*d) + wordlistAdd(&ftpState->pathcomps, d); } xfree(path); if (ftpState->pathcomps) @@ -1569,10 +1569,7 @@ } else { ftpState->flags.no_dotdot = 0; } - if (*path) - snprintf(cbuf, 1024, "CWD %s\r\n", path); - else - snprintf(cbuf, 1024, "CWD\r\n"); + snprintf(cbuf, 1024, "CWD %s\r\n", path); ftpWriteCommand(cbuf, ftpState); ftpState->state = SENT_CWD; } @@ -1645,7 +1642,6 @@ debug(9, 3) ("Directory path did not end in /\n"); strCat(ftpState->title_url, "/"); ftpState->flags.isdir = 1; - ftpState->flags.use_base = 1; } ftpSendPasv(ftpState); } @@ -2010,7 +2006,6 @@ debug(9, 3) ("This is ftpRestOrList\n"); if (ftpState->typecode == 'D') { ftpState->flags.isdir = 1; - ftpState->flags.use_base = 1; if (ftpState->flags.put) { ftpSendMkdir(ftpState); /* PUT name;type=d */ } else { @@ -2144,7 +2139,6 @@ { ftpState->flags.tried_nlst = 1; if (ftpState->filepath) { - ftpState->flags.use_base = 1; snprintf(cbuf, 1024, "NLST %s\r\n", ftpState->filepath); } else { snprintf(cbuf, 1024, "NLST\r\n"); diff -ruN squid-2.5.STABLE8/src/ipcache.c squid-2.5.STABLE9-RC1/src/ipcache.c --- squid-2.5.STABLE8/src/ipcache.c Tue Dec 7 16:40:57 2004 +++ squid-2.5.STABLE9-RC1/src/ipcache.c Sat Feb 12 22:53:56 2005 @@ -1,6 +1,6 @@ /* - * $Id: ipcache.c,v 1.236.2.5 2004/12/07 23:40:57 hno Exp $ + * $Id: ipcache.c,v 1.236.2.6 2005/02/13 05:53:56 hno Exp $ * * DEBUG: section 14 IP Cache * AUTHOR: Harvest Derived @@ -338,6 +338,10 @@ continue; if (answers[k].class != RFC1035_CLASS_IN) continue; + if (answers[k].rdlength != 4) { + debug(14, 1) ("ipcacheParse: Invalid IP address in response to '%s'\n", name); + continue; + } na++; } if (na == 0) { @@ -353,9 +357,10 @@ continue; if (answers[k].class != RFC1035_CLASS_IN) continue; + if (answers[k].rdlength != 4) + continue; if (ttl == 0 || ttl > answers[k].ttl) ttl = answers[k].ttl; - assert(answers[k].rdlength == 4); xmemcpy(&i->addrs.in_addrs[j++], answers[k].rdata, 4); debug(14, 3) ("ipcacheParse: #%d %s\n", j - 1, diff -ruN squid-2.5.STABLE8/src/main.c squid-2.5.STABLE9-RC1/src/main.c --- squid-2.5.STABLE8/src/main.c Tue Dec 28 05:54:35 2004 +++ squid-2.5.STABLE9-RC1/src/main.c Sun Feb 13 14:19:44 2005 @@ -1,6 +1,6 @@ /* - * $Id: main.c,v 1.345.2.15 2004/12/28 12:54:35 hno Exp $ + * $Id: main.c,v 1.345.2.17 2005/02/13 21:19:44 serassio Exp $ * * DEBUG: section 1 Startup and Main Loop * AUTHOR: Harvest Derived @@ -836,7 +836,7 @@ return 0; if (kill(pid, 0) < 0) return 0; - debug(0, 0) ("Squid is already running! Process ID %d\n", pid); + debug(0, 0) ("Squid is already running! Process ID %ld\n", (long int) pid); return 1; } @@ -853,7 +853,9 @@ int status; #endif pid_t pid; +#ifdef TIOCNOTTY int i; +#endif int nullfd; if (*(argv[0]) == '(') return; diff -ruN squid-2.5.STABLE8/src/net_db.c squid-2.5.STABLE9-RC1/src/net_db.c --- squid-2.5.STABLE8/src/net_db.c Thu Jan 2 16:21:57 2003 +++ squid-2.5.STABLE9-RC1/src/net_db.c Sun Feb 13 14:23:19 2005 @@ -1,6 +1,6 @@ /* - * $Id: net_db.c,v 1.158.2.4 2003/01/02 23:21:57 wessels Exp $ + * $Id: net_db.c,v 1.158.2.5 2005/02/13 21:23:19 serassio Exp $ * * DEBUG: section 38 Network Measurement Database * AUTHOR: Duane Wessels @@ -621,7 +621,7 @@ } debug(38, 3) ("netdbExchangeHandleReply: used %d entries, (x %d bytes) == %d bytes total\n", nused, rec_sz, nused * rec_sz); - debug(38, 3) ("netdbExchangeHandleReply: seen %d, used %d\n", ex->seen, ex->used); + debug(38, 3) ("netdbExchangeHandleReply: seen %ld, used %ld\n", (long int) ex->seen, (long int) ex->used); if (EBIT_TEST(ex->e->flags, ENTRY_ABORTED)) { debug(38, 3) ("netdbExchangeHandleReply: ENTRY_ABORTED\n"); netdbExchangeDone(ex); diff -ruN squid-2.5.STABLE8/src/repl/heap/store_heap_replacement.c squid-2.5.STABLE9-RC1/src/repl/heap/store_heap_replacement.c --- squid-2.5.STABLE8/src/repl/heap/store_heap_replacement.c Tue Oct 23 23:26:22 2001 +++ squid-2.5.STABLE9-RC1/src/repl/heap/store_heap_replacement.c Sun Feb 13 14:23:19 2005 @@ -1,6 +1,6 @@ /* - * $Id: store_heap_replacement.c,v 1.7 2001/10/24 05:26:22 hno Exp $ + * $Id: store_heap_replacement.c,v 1.7.2.1 2005/02/13 21:23:19 serassio Exp $ * * DEBUG: section 20 Storage Manager Heap-based replacement * AUTHOR: John Dilley @@ -79,7 +79,7 @@ tie = 1.0 - exp((double) (e->lastref - squid_curtime) / 86400.0); key = age + (double) e->refcount - tie; debug(81, 3) ("HeapKeyGen_StoreEntry_LFUDA: %s refcnt=%d lastref=%ld age=%f tie=%f -> %f\n", - storeKeyText(e->hash.key), (int)e->refcount, e->lastref, age, tie, key); + storeKeyText(e->hash.key), (int) e->refcount, (long int) e->lastref, age, tie, key); if (e->mem_obj && e->mem_obj->url) debug(81, 3) ("HeapKeyGen_StoreEntry_LFUDA: url=%s\n", e->mem_obj->url); @@ -115,7 +115,7 @@ double tie = (e->lastref > 1) ? (1.0 / e->lastref) : 1.0; key = age + ((double) e->refcount / size) - tie; debug(81, 3) ("HeapKeyGen_StoreEntry_GDSF: %s size=%f refcnt=%d lastref=%ld age=%f tie=%f -> %f\n", - storeKeyText(e->hash.key), size, (int)e->refcount, e->lastref, age, tie, key); + storeKeyText(e->hash.key), size, (int) e->refcount, (long int) e->lastref, age, tie, key); if (e->mem_obj && e->mem_obj->url) debug(81, 3) ("HeapKeyGen_StoreEntry_GDSF: url=%s\n", e->mem_obj->url); diff -ruN squid-2.5.STABLE8/src/stat.c squid-2.5.STABLE9-RC1/src/stat.c --- squid-2.5.STABLE8/src/stat.c Tue Dec 7 18:00:56 2004 +++ squid-2.5.STABLE9-RC1/src/stat.c Sun Feb 13 14:19:44 2005 @@ -1,6 +1,6 @@ /* - * $Id: stat.c,v 1.351.2.11 2004/12/08 01:00:56 hno Exp $ + * $Id: stat.c,v 1.351.2.12 2005/02/13 21:19:44 serassio Exp $ * * DEBUG: section 18 Cache Manager Statistics * AUTHOR: Harvest Derived @@ -567,18 +567,18 @@ mp = mallinfo(); storeAppendPrintf(sentry, "Memory usage for %s via mallinfo():\n", appname); - storeAppendPrintf(sentry, "\tTotal space in arena: %6d KB\n", - mp.arena >> 10); - storeAppendPrintf(sentry, "\tOrdinary blocks: %6d KB %6d blks\n", - mp.uordblks >> 10, mp.ordblks); - storeAppendPrintf(sentry, "\tSmall blocks: %6d KB %6d blks\n", - mp.usmblks >> 10, mp.smblks); - storeAppendPrintf(sentry, "\tHolding blocks: %6d KB %6d blks\n", - mp.hblkhd >> 10, mp.hblks); - storeAppendPrintf(sentry, "\tFree Small blocks: %6d KB\n", - mp.fsmblks >> 10); - storeAppendPrintf(sentry, "\tFree Ordinary blocks: %6d KB\n", - mp.fordblks >> 10); + storeAppendPrintf(sentry, "\tTotal space in arena: %6ld KB\n", + (long int) mp.arena >> 10); + storeAppendPrintf(sentry, "\tOrdinary blocks: %6ld KB %6ld blks\n", + (long int) mp.uordblks >> 10, (long int) mp.ordblks); + storeAppendPrintf(sentry, "\tSmall blocks: %6ld KB %6ld blks\n", + (long int) mp.usmblks >> 10, (long int) mp.smblks); + storeAppendPrintf(sentry, "\tHolding blocks: %6ld KB %6ld blks\n", + (long int) mp.hblkhd >> 10, (long int) mp.hblks); + storeAppendPrintf(sentry, "\tFree Small blocks: %6ld KB\n", + (long int) mp.fsmblks >> 10); + storeAppendPrintf(sentry, "\tFree Ordinary blocks: %6ld KB\n", + (long int) mp.fordblks >> 10); t = mp.uordblks + mp.usmblks + mp.hblkhd; storeAppendPrintf(sentry, "\tTotal in use: %6d KB %d%%\n", t >> 10, percent(t, mp.arena + mp.hblkhd)); diff -ruN squid-2.5.STABLE8/src/tools.c squid-2.5.STABLE9-RC1/src/tools.c --- squid-2.5.STABLE8/src/tools.c Sat Aug 14 15:01:33 2004 +++ squid-2.5.STABLE9-RC1/src/tools.c Sun Feb 13 14:19:44 2005 @@ -1,6 +1,6 @@ /* - * $Id: tools.c,v 1.213.2.10 2004/08/14 21:01:33 hno Exp $ + * $Id: tools.c,v 1.213.2.11 2005/02/13 21:19:44 serassio Exp $ * * DEBUG: section 21 Misc Functions * AUTHOR: Harvest Derived @@ -132,18 +132,18 @@ return; mp = mallinfo(); fprintf(debug_log, "Memory usage for %s via mallinfo():\n", appname); - fprintf(debug_log, "\ttotal space in arena: %6d KB\n", - mp.arena >> 10); - fprintf(debug_log, "\tOrdinary blocks: %6d KB %6d blks\n", - mp.uordblks >> 10, mp.ordblks); - fprintf(debug_log, "\tSmall blocks: %6d KB %6d blks\n", - mp.usmblks >> 10, mp.smblks); - fprintf(debug_log, "\tHolding blocks: %6d KB %6d blks\n", - mp.hblkhd >> 10, mp.hblks); - fprintf(debug_log, "\tFree Small blocks: %6d KB\n", - mp.fsmblks >> 10); - fprintf(debug_log, "\tFree Ordinary blocks: %6d KB\n", - mp.fordblks >> 10); + fprintf(debug_log, "\ttotal space in arena: %6ld KB\n", + (long int) mp.arena >> 10); + fprintf(debug_log, "\tOrdinary blocks: %6ld KB %6ld blks\n", + (long int) mp.uordblks >> 10, (long int) mp.ordblks); + fprintf(debug_log, "\tSmall blocks: %6ld KB %6ld blks\n", + (long int) mp.usmblks >> 10, (long int) mp.smblks); + fprintf(debug_log, "\tHolding blocks: %6ld KB %6ld blks\n", + (long int) mp.hblkhd >> 10, (long int) mp.hblks); + fprintf(debug_log, "\tFree Small blocks: %6ld KB\n", + (long int) mp.fsmblks >> 10); + fprintf(debug_log, "\tFree Ordinary blocks: %6ld KB\n", + (long int) mp.fordblks >> 10); t = mp.uordblks + mp.usmblks + mp.hblkhd; fprintf(debug_log, "\tTotal in use: %6d KB %d%%\n", t >> 10, percent(t, mp.arena));