]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Summary: Merge Gerard's AIX signed and datatype size patches.
authorrobertc <>
Mon, 29 Sep 2003 16:24:00 +0000 (16:24 +0000)
committerrobertc <>
Mon, 29 Sep 2003 16:24:00 +0000 (16:24 +0000)
Keywords:

Patches applied:

 * gerard@eviston.net--squid/squid--aix-fixes--3.0--patch-5
   typecast ntohl() in wccp.cc

 * ports@eviston.net--aix/squid--aix-fixes--3.0--patch-3
   debug() ==> debugs() round 1

 * ports@eviston.net--aix/squid--aix-fixes--3.0--patch-4
   casts and format strings

 * ports@eviston.net--aix/squid--aix-fixes--3.0--patch-5
   debug() => debugs() round 2: peer_digest.cc

 * ports@eviston.net--aix/squid--aix-fixes--3.0--patch-6
   casts in stat.cc

 * ports@eviston.net--aix/squid--aix-fixes--3.0--patch-7
   debug() => debugs() round 3

 * ports@eviston.net--aix/squid--aix-fixes--3.0--patch-8
   cast for ntohl() in wccp.cc

 * ports@eviston.net--aix/squid--aix-fixes--3.0--patch-9
   casts in tools.cc

13 files changed:
src/HttpHdrRange.cc
src/HttpHeader.cc
src/HttpReply.cc
src/client_side.cc
src/mem.cc
src/peer_digest.cc
src/repl/heap/store_heap_replacement.cc
src/stat.cc
src/stmem.cc
src/store.cc
src/store_digest.cc
src/tools.cc
src/wccp.cc

index 1d0fe8fbd72bbca5e0adf4d903651a120409948c..1e8d849a2aa6fc89b931daa1a2243a59b20cc95b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHdrRange.cc,v 1.37 2003/08/04 22:14:40 robertc Exp $
+ * $Id: HttpHdrRange.cc,v 1.38 2003/09/29 10:24:00 robertc Exp $
  *
  * DEBUG: section 64    HTTP Range Header
  * AUTHOR: Alex Rousskov
@@ -313,7 +313,8 @@ HttpHdrRange::parseInit(const String * range_spec)
         ++count;
     }
 
-    debug(64, 8) ("parsed range range count: %d, kept %d\n", count, specs.size());
+    debugs(64, 8, "parsed range range count: " << count << ", kept " <<
+           specs.size());
     return specs.count != 0;
 }
 
@@ -394,8 +395,8 @@ HttpHdrRange::merge (Vector<HttpHdrRangeSpec *> &basis)
         ++i;                   /* progress */
     }
 
-    debug(64, 3) ("HttpHdrRange::merge: had %d specs, merged %d specs\n",
-                  basis.size(), basis.size() - specs.size());
+    debugs(64, 3, "HttpHdrRange::merge: had " << basis.size() <<
+           " specs, merged " << basis.size() - specs.size() << " specs");
 }
 
 
@@ -411,8 +412,8 @@ HttpHdrRange::getCanonizedSpecs (Vector<HttpHdrRangeSpec *> &copy)
             delete (*pos);
     }
 
-    debug(64, 3) ("HttpHdrRange::getCanonizedSpecs: found %d bad specs\n",
-                  specs.size() - copy.size());
+    debugs(64, 3, "HttpHdrRange::getCanonizedSpecs: found " <<
+           specs.size() - copy.size() << " bad specs");
 }
 
 #include "HttpHdrContRange.h"
@@ -441,12 +442,13 @@ int
 HttpHdrRange::canonize (size_t newClen)
 {
     clen = newClen;
-    debug(64, 3) ("HttpHdrRange::canonize: started with %d specs, clen: %ld\n", specs.count, (long int) clen);
+    debugs(64, 3, "HttpHdrRange::canonize: started with " << specs.count <<
+           " specs, clen: " << clen);
     Vector<HttpHdrRangeSpec*> goods;
     getCanonizedSpecs(goods);
     merge (goods);
-    debug(64, 3) ("HttpHdrRange::canonize: finished with %d specs\n",
-                  specs.count);
+    debugs(64, 3, "HttpHdrRange::canonize: finished with " << specs.count <<
+           " specs");
     return specs.count > 0;
 }
 
index c4ef40a10221d553c0e15ccf460ddc41e841e62b..91f573806ce98ab52202da5f2229130b48170a39 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpHeader.cc,v 1.94 2003/07/17 22:08:15 wessels Exp $
+ * $Id: HttpHeader.cc,v 1.95 2003/09/29 10:24:00 robertc Exp $
  *
  * DEBUG: section 55    HTTP Header
  * AUTHOR: Alex Rousskov
@@ -680,8 +680,8 @@ httpHeaderAddEntry(HttpHeader * hdr, HttpHeaderEntry * e)
     assert(hdr && e);
     assert_eid(e->id);
 
-    debug(55, 7) ("%p adding entry: %d at %d\n",
-                  hdr, e->id, hdr->entries.count);
+    debugs(55, 7, hdr << " adding entry: " << e->id << " at " <<
+           hdr->entries.count);
 
     if (CBIT_TEST(hdr->mask, e->id))
         Headers[e->id].stat.repCount++;
index 33b8d285e2a423688c016eb86d118bf0dc3cf6f8..104631f3c0d0f7a1f28d643952b61a2cb4b1ef05 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: HttpReply.cc,v 1.63 2003/09/01 03:49:37 robertc Exp $
+ * $Id: HttpReply.cc,v 1.64 2003/09/29 10:24:00 robertc Exp $
  *
  * DEBUG: section 58    HTTP Reply (Response)
  * AUTHOR: Alex Rousskov
@@ -153,7 +153,7 @@ httpReplyParse(HttpReply * rep, const char *buf, ssize_t end)
      */
     char *headers = (char *)memAllocate(MEM_4K_BUF);
     int success;
-    size_t s = XMIN(end + 1, 4096);
+    size_t s = XMIN(end + 1, (ssize_t)4096);
     /* reset current state, because we are not used in incremental fashion */
     httpReplyReset(rep);
     /* put a string terminator.  s is how many bytes to touch in
index a499fcb52f3793215faee243b65bf1977da0662f..6758a5e96e71ffa541258f98471153c78a4b8257 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.661 2003/09/27 23:17:46 robertc Exp $
+ * $Id: client_side.cc,v 1.662 2003/09/29 10:24:00 robertc Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -1479,8 +1479,9 @@ ClientSocketContext::writeComplete(int fd, char *bufnotused, size_t size, comm_e
     StoreEntry *entry = http->storeEntry();
     http->out.size += size;
     assert(fd > -1);
-    debug(33, 5) ("clientWriteComplete: FD %d, sz %ld, err %d, off %ld, len %d\n",
-                  fd, (long int) size, errflag, (long int) http->out.size, entry ? objectLen(entry) : 0);
+    debugs(33, 5, "clientWriteComplete: FD " << fd << ", sz " << size <<
+           ", err " << errflag << ", off " << http->out.size << ", len " <<
+           entry ? objectLen(entry) : 0);
     clientUpdateSocketStats(http->logType, size);
     assert (this->fd() == fd);
 
index 6315ceb45db8fff954cfc257ebb3fb616fe9bf22..1ba8ece1f0ef441a8cd9d5d625d9dcfcee7cbcf1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: mem.cc,v 1.83 2003/09/14 22:41:24 robertc Exp $
+ * $Id: mem.cc,v 1.84 2003/09/29 10:24:01 robertc Exp $
  *
  * DEBUG: section 13    High Level Memory Pool Management
  * AUTHOR: Harvest Derived
@@ -120,9 +120,9 @@ memStringStats(StoreEntry * sentry)
 static void
 memBufStats(StoreEntry * sentry)
 {
-    storeAppendPrintf(sentry, "Large buffers: %d (%d KB)\n",
-                      HugeBufCountMeter.level,
-                      HugeBufVolumeMeter.level / 1024);
+    storeAppendPrintf(sentry, "Large buffers: %ld (%ld KB)\n",
+                      (long int) HugeBufCountMeter.level,
+                      (long int) HugeBufVolumeMeter.level / 1024);
 }
 
 void
@@ -418,7 +418,9 @@ Mem::Init(void)
         StrPools[i].pool = memPoolCreate(StrPoolsAttrs[i].name, StrPoolsAttrs[i].obj_size);
 
         if (StrPools[i].pool->obj_size != StrPoolsAttrs[i].obj_size)
-            debug(13, 1) ("Notice: %s is %d bytes instead of requested %d bytes\n", StrPoolsAttrs[i].name, StrPoolsAttrs[i].obj_size, StrPoolsAttrs[i].obj_size);
+            debugs(13, 1, "Notice: " << StrPoolsAttrs[i].name << " is " <<
+                   StrPools[i].pool->obj_size << " bytes instead of requested "
+                   << StrPoolsAttrs[i].obj_size << " bytes");
     }
 
     cachemgrRegister("mem",
@@ -592,25 +594,25 @@ Mem::PoolReport(const MemPoolStats * mp_st, const MemPoolMeter * AllMeter, Store
      */
 
     storeAppendPrintf(e,
-                      "%d\t %d\t %d\t %.2f\t %.1f\t"   /* alloc */
-                      "%d\t %d\t %d\t %.1f\t"  /* in use */
-                      "%d\t %d\t %d\t" /* idle */
+                      "%d\t %ld\t %ld\t %.2f\t %.1f\t" /* alloc */
+                      "%d\t %ld\t %ld\t %.1f\t"        /* in use */
+                      "%d\t %ld\t %ld\t"       /* idle */
                       "%.0f\t %.1f\t %.1f\t %.1f\n",   /* saved */
                       /* alloc */
                       mp_st->items_alloc,
-                      toKB(mp_st->obj_size * pm->alloc.level),
-                      toKB(mp_st->obj_size * pm->alloc.hwater_level),
+                      (long) toKB(mp_st->obj_size * pm->alloc.level),
+                      (long) toKB(mp_st->obj_size * pm->alloc.hwater_level),
                       (double) ((squid_curtime - pm->alloc.hwater_stamp) / 3600.),
                       xpercent(mp_st->obj_size * pm->alloc.level, AllMeter->alloc.level),
                       /* in use */
                       mp_st->items_inuse,
-                      toKB(mp_st->obj_size * pm->inuse.level),
-                      toKB(mp_st->obj_size * pm->inuse.hwater_level),
+                      (long) toKB(mp_st->obj_size * pm->inuse.level),
+                      (long) toKB(mp_st->obj_size * pm->inuse.hwater_level),
                       xpercent(pm->inuse.level, pm->alloc.level),
                       /* idle */
                       mp_st->items_idle,
-                      toKB(mp_st->obj_size * pm->idle.level),
-                      toKB(mp_st->obj_size * pm->idle.hwater_level),
+                      (long) toKB(mp_st->obj_size * pm->idle.level),
+                      (long) toKB(mp_st->obj_size * pm->idle.hwater_level),
                       /* saved */
                       pm->gb_saved.count,
                       xpercent(pm->gb_saved.count, AllMeter->gb_saved.count),
index ca9bc1499709336ffc603a44dd18b0a75c088755..fb5a0296c4ceccfd8e4485e8adfc92bda58cc0e1 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: peer_digest.cc,v 1.100 2003/09/06 12:47:35 robertc Exp $
+ * $Id: peer_digest.cc,v 1.101 2003/09/29 10:24:01 robertc Exp $
  *
  * DEBUG: section 72    Peer Digest Routines
  * AUTHOR: Alex Rousskov
@@ -699,8 +699,8 @@ peerDigestSwapInMask(void *data, char *buf, ssize_t size)
     fetch->mask_offset += size;
 
     if (fetch->mask_offset >= (off_t)pd->cd->mask_size) {
-        debug(72, 2) ("peerDigestSwapInMask: Done! Got %d, expected %d\n",
-                      fetch->mask_offset, pd->cd->mask_size);
+        debugs(72, 2, "peerDigestSwapInMask: Done! Got " <<
+               fetch->mask_offset << ", expected " << pd->cd->mask_size);
         assert(fetch->mask_offset == (off_t)pd->cd->mask_size);
         assert(peerDigestFetchedEnough(fetch, NULL, 0, "peerDigestSwapInMask"));
         return -1;             /* XXX! */
@@ -740,9 +740,8 @@ peerDigestFetchedEnough(DigestFetchState * fetch, char *buf, ssize_t size, const
             host = pd->host.buf();
     }
 
-    debug(72, 6) ("%s: peer %s, offset: %d size: %d.\n",
-                  step_name, host,
-                  fetch->offset, size);
+    debugs(72, 6, step_name << ": peer " << host << ", offset: " <<
+           fetch->offset << " size: " << size << ".");
 
     /* continue checking (with pd and host known and valid) */
 
@@ -1003,8 +1002,10 @@ peerDigestSetCBlock(PeerDigest * pd, const char *buf)
 
     /* check consistency further */
     if ((size_t)cblock.mask_size != cacheDigestCalcMaskSize(cblock.capacity, cblock.bits_per_entry)) {
-        debug(72, 0) ("%s digest cblock is corrupted (mask size mismatch: %d ? %d).\n",
-                      host, cblock.mask_size, cacheDigestCalcMaskSize(cblock.capacity, cblock.bits_per_entry));
+        debugs(72, 0, host << " digest cblock is corrupted " <<
+               "(mask size mismatch: " << cblock.mask_size << " ? " <<
+               cacheDigestCalcMaskSize(cblock.capacity, cblock.bits_per_entry)
+               << ").");
         return 0;
     }
 
@@ -1020,8 +1021,8 @@ peerDigestSetCBlock(PeerDigest * pd, const char *buf)
      */
     /* check size changes */
     if (pd->cd && cblock.mask_size != (ssize_t)pd->cd->mask_size) {
-        debug(72, 2) ("%s digest changed size: %d -> %d\n",
-                      host, cblock.mask_size, pd->cd->mask_size);
+        debugs(72, 2, host << " digest changed size: " << cblock.mask_size <<
+               " -> " << pd->cd->mask_size);
         freed_size = pd->cd->mask_size;
         cacheDigestDestroy(pd->cd);
         pd->cd = NULL;
index ebb9012cde60aeaf9c66440e3baf91d3d8ba5c5c..3bf01d346866d57f546e48d7c21c03dd940a30ba 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_heap_replacement.cc,v 1.12 2003/02/21 22:50:50 robertc Exp $
+ * $Id: store_heap_replacement.cc,v 1.13 2003/09/29 10:24:00 robertc Exp $
  *
  * DEBUG: section 20    Storage Manager Heap-based replacement
  * AUTHOR: John Dilley
@@ -83,8 +83,9 @@ HeapKeyGen_StoreEntry_LFUDA(void *entry, double heap_age)
 
     key = heap_age + (double) e->refcount - tie;
 
-    debug(81, 3) ("HeapKeyGen_StoreEntry_LFUDA: %s refcnt=%d lastref=%ld heap_age=%f tie=%f -> %f\n",
-                  e->getMD5Text(), (int)e->refcount, e->lastref, heap_age, tie, key);
+    debugs(81, 3, "HeapKeyGen_StoreEntry_LFUDA: " << e->getMD5Text() <<
+           " refcnt=" << e->refcount << " lastref=" << e->lastref <<
+           " heap_age=" << heap_age << " tie=" << tie << " -> " << key);
 
     if (e->mem_obj && e->mem_obj->url)
         debug(81, 3) ("HeapKeyGen_StoreEntry_LFUDA: url=%s\n",
@@ -121,8 +122,10 @@ HeapKeyGen_StoreEntry_GDSF(void *entry, double heap_age)
     double size = e->swap_file_sz ? (double) e->swap_file_sz : 1.0;
     double tie = (e->lastref > 1) ? (1.0 / e->lastref) : 1.0;
     key = heap_age + ((double) e->refcount / size) - tie;
-    debug(81, 3) ("HeapKeyGen_StoreEntry_GDSF: %s size=%f refcnt=%d lastref=%ld heap_age=%f tie=%f -> %f\n",
-                  e->getMD5Text(), size, (int)e->refcount, e->lastref, heap_age, tie, key);
+    debugs(81, 3, "HeapKeyGen_StoreEntry_GDSF: " << e->getMD5Text() <<
+           " size=" << size << " refcnt=" << e->refcount << " lastref=" <<
+           e->lastref << " heap_age=" << heap_age << " tie=" << tie <<
+           " -> " << key);
 
     if (e->mem_obj && e->mem_obj->url)
         debug(81, 3) ("HeapKeyGen_StoreEntry_GDSF: url=%s\n",
index baa5c2089701a538721ae9573b561f3d3deaf24f..d623440507d55c7e3a2d87a2769de252c1ac1f2a 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * $Id: stat.cc,v 1.380 2003/08/27 22:45:37 hno Exp $
+ * $Id: stat.cc,v 1.381 2003/09/29 10:24:01 robertc Exp $
  *
  * DEBUG: section 18    Cache Manager Statistics
  * AUTHOR: Harvest Derived
@@ -624,23 +624,23 @@ info_get(StoreEntry * sentry)
     storeAppendPrintf(sentry, "Memory usage for %s via mallinfo():\n",
                       appname);
 
-    storeAppendPrintf(sentry, "\tTotal space in arena:  %6d KB\n",
-                      mp.arena >> 10);
+    storeAppendPrintf(sentry, "\tTotal space in arena:  %6ld KB\n",
+                      (long)mp.arena >> 10);
 
-    storeAppendPrintf(sentry, "\tOrdinary blocks:       %6d KB %6d blks\n",
-                      mp.uordblks >> 10, mp.ordblks);
+    storeAppendPrintf(sentry, "\tOrdinary blocks:       %6ld KB %6ld blks\n",
+                      (long)mp.uordblks >> 10, (long)mp.ordblks);
 
-    storeAppendPrintf(sentry, "\tSmall blocks:          %6d KB %6d blks\n",
-                      mp.usmblks >> 10, mp.smblks);
+    storeAppendPrintf(sentry, "\tSmall blocks:          %6ld KB %6ld blks\n",
+                      (long)mp.usmblks >> 10, (long)mp.smblks);
 
-    storeAppendPrintf(sentry, "\tHolding blocks:        %6d KB %6d blks\n",
-                      mp.hblkhd >> 10, mp.hblks);
+    storeAppendPrintf(sentry, "\tHolding blocks:        %6ld KB %6ld blks\n",
+                      (long)mp.hblkhd >> 10, (long)mp.hblks);
 
-    storeAppendPrintf(sentry, "\tFree Small blocks:     %6d KB\n",
-                      mp.fsmblks >> 10);
+    storeAppendPrintf(sentry, "\tFree Small blocks:     %6ld KB\n",
+                      (long)mp.fsmblks >> 10);
 
-    storeAppendPrintf(sentry, "\tFree Ordinary blocks:  %6d KB\n",
-                      mp.fordblks >> 10);
+    storeAppendPrintf(sentry, "\tFree Ordinary blocks:  %6ld KB\n",
+                      (long)mp.fordblks >> 10);
 
     t = mp.uordblks + mp.usmblks + mp.hblkhd;
 
@@ -697,9 +697,11 @@ info_get(StoreEntry * sentry)
 #if !(HAVE_MSTATS && HAVE_GNUMALLOC_H) && HAVE_MALLINFO && HAVE_STRUCT_MALLINFO
 
         storeAppendPrintf(sentry, "\tmemPool accounted:     %6d KB %3d%%\n",
-                          mp_stats.TheMeter->alloc.level >> 10, percent(mp_stats.TheMeter->alloc.level, t));
+                          (int) mp_stats.TheMeter->alloc.level >> 10,
+                          percent(mp_stats.TheMeter->alloc.level, t));
         storeAppendPrintf(sentry, "\tmemPool unaccounted:   %6d KB %3d%%\n",
-                          (t - mp_stats.TheMeter->alloc.level) >> 10, percent((t - mp_stats.TheMeter->alloc.level), t));
+                          (t - (int) mp_stats.TheMeter->alloc.level) >> 10,
+                          percent((t - mp_stats.TheMeter->alloc.level), t));
 #endif
 
         storeAppendPrintf(sentry, "\tmemPoolAlloc calls: %9.0f\n",
@@ -1567,7 +1569,7 @@ extern double
     cd = CountHist[0].cd.kbytes_recv.kb - CountHist[minutes].cd.kbytes_recv.kb;
 
     if (s < cd)
-        debug(18, 1) ("STRANGE: srv_kbytes=%d, cd_kbytes=%d\n", s, cd);
+        debugs(18, 1, "STRANGE: srv_kbytes=" << s << ", cd_kbytes=" << cd);
 
     s -= cd;
 
index 0ad1a12cfa3309404bc40217e018c8d2eb964a64..be16f6e933edeee905bc7770bcbf05965aac8623 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: stmem.cc,v 1.82 2003/09/22 08:50:50 robertc Exp $
+ * $Id: stmem.cc,v 1.83 2003/09/29 10:24:01 robertc Exp $
  *
  * DEBUG: section 19    Store Memory Primitives
  * AUTHOR: Harvest Derived
@@ -219,7 +219,7 @@ ssize_t
 mem_hdr::copy(off_t offset, char *buf, size_t size) const
 {
 
-    debug(19, 6) ("memCopy: offset %ld: size %u\n", (long int) offset, size);
+    debugs(19, 6, "memCopy: offset " << offset << ": size " <<  size);
 
     /* we shouldn't ever ask for absent offsets */
 
@@ -237,7 +237,8 @@ mem_hdr::copy(off_t offset, char *buf, size_t size) const
     mem_node *p = getBlockContainingLocation((size_t)offset);
 
     if (!p) {
-        debug(19, 1) ("memCopy: could not find offset %u in memory.\n", (size_t) offset);
+        debugs(19, 1, "memCopy: could not find offset " << offset <<
+               " in memory.");
         debugDump();
         /* we shouldn't ever ask for absent offsets */
         assert (0);
index dbe5b0946293f7254f9b94538abd0ca301932eb9..621bde64a8ded798a372b2df317880f78add375d 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store.cc,v 1.575 2003/09/25 00:06:56 wessels Exp $
+ * $Id: store.cc,v 1.576 2003/09/29 10:24:01 robertc Exp $
  *
  * DEBUG: section 20    Storage Manager
  * AUTHOR: Harvest Derived
@@ -790,8 +790,8 @@ StoreEntry::write (StoreIOBuffer writeBuffer)
 
     PROF_start(StoreEntry_write);
 
-    debug(20, 5) ("storeWrite: writing %u bytes for '%s'\n",
-                  writeBuffer.length, getMD5Text());
+    debugs(20, 5, "storeWrite: writing " << writeBuffer.length <<
+           " bytes for '" << getMD5Text() << "'");
 
     storeGetMemSpace(writeBuffer.length);
 
@@ -1126,7 +1126,8 @@ storeGetMemSpace(int size)
         return;
     }
 
-    debug(20, 2) ("storeGetMemSpace: Starting, need %d pages\n", pages_needed);
+    debugs(20, 2, "storeGetMemSpace: Starting, need " << pages_needed <<
+           " pages");
 
     /* XXX what to set as max_scan here? */
     walker = mem_policy->PurgeInit(mem_policy, 100000);
@@ -1312,8 +1313,8 @@ StoreEntry::validLength() const
     assert(mem_obj != NULL);
     reply = getReply();
     debug(20, 3) ("storeEntryValidLength: Checking '%s'\n", getMD5Text());
-    debug(20, 5) ("storeEntryValidLength:     object_len = %d\n",
-                  objectLen(this));
+    debugs(20, 5, "storeEntryValidLength:     object_len = " <<
+           objectLen(this));
     debug(20, 5) ("storeEntryValidLength:         hdr_sz = %d\n",
                   reply->hdr_sz);
     debug(20, 5) ("storeEntryValidLength: content_length = %d\n",
index 2b65b1fe10a35b079cc6c0f521c5d7839bb65f69..532cfa0fd6d0fc04a86649c5589ce38aecff14c8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_digest.cc,v 1.57 2003/09/01 03:49:40 robertc Exp $
+ * $Id: store_digest.cc,v 1.58 2003/09/29 10:24:02 robertc Exp $
  *
  * DEBUG: section 71    Store Digest Manager
  * AUTHOR: Alex Rousskov
@@ -482,8 +482,9 @@ storeDigestSwapOutStep(void *data)
 
     storeAppend(e, store_digest->mask + sd_state.rewrite_offset, chunk_size);
 
-    debug(71, 3) ("storeDigestSwapOutStep: size: %d offset: %d chunk: %d bytes\n",
-                  store_digest->mask_size, sd_state.rewrite_offset, chunk_size);
+    debugs(71, 3, "storeDigestSwapOutStep: size: " << store_digest->mask_size <<
+           " offset: " << sd_state.rewrite_offset << " chunk: " <<
+           chunk_size << " bytes");
 
     sd_state.rewrite_offset += chunk_size;
 
index 9f0c988b693de3d04df196751e20b0513359b2ac..037ff43e2253f48614bd0a5f024acd24422ac8a8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: tools.cc,v 1.239 2003/08/03 10:05:12 robertc Exp $
+ * $Id: tools.cc,v 1.240 2003/09/29 10:24:02 robertc Exp $
  *
  * DEBUG: section 21    Misc Functions
  * AUTHOR: Harvest Derived
@@ -157,23 +157,23 @@ dumpMallocStats(void)
 
     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, "\ttotal space in arena:  %6ld KB\n",
+            (long)mp.arena >> 10);
 
-    fprintf(debug_log, "\tOrdinary blocks:       %6d KB %6d blks\n",
-            mp.uordblks >> 10, mp.ordblks);
+    fprintf(debug_log, "\tOrdinary blocks:       %6ld KB %6ld blks\n",
+            (long)mp.uordblks >> 10, (long)mp.ordblks);
 
-    fprintf(debug_log, "\tSmall blocks:          %6d KB %6d blks\n",
-            mp.usmblks >> 10, mp.smblks);
+    fprintf(debug_log, "\tSmall blocks:          %6ld KB %6ld blks\n",
+            (long)mp.usmblks >> 10, (long)mp.smblks);
 
-    fprintf(debug_log, "\tHolding blocks:        %6d KB %6d blks\n",
-            mp.hblkhd >> 10, mp.hblks);
+    fprintf(debug_log, "\tHolding blocks:        %6ld KB %6ld blks\n",
+            (long)mp.hblkhd >> 10, (long)mp.hblks);
 
-    fprintf(debug_log, "\tFree Small blocks:     %6d KB\n",
-            mp.fsmblks >> 10);
+    fprintf(debug_log, "\tFree Small blocks:     %6ld KB\n",
+            (long)mp.fsmblks >> 10);
 
-    fprintf(debug_log, "\tFree Ordinary blocks:  %6d KB\n",
-            mp.fordblks >> 10);
+    fprintf(debug_log, "\tFree Ordinary blocks:  %6ld KB\n",
+            (long)mp.fordblks >> 10);
 
     t = mp.uordblks + mp.usmblks + mp.hblkhd;
 
index f5c99f5825dad1096948acb753e2b4a1f81f7a24..970c8370faad6b29fbdbe4fceb7b1057a19ce012 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: wccp.cc,v 1.34 2003/02/23 00:08:04 robertc Exp $
+ * $Id: wccp.cc,v 1.35 2003/09/29 10:24:02 robertc Exp $
  *
  * DEBUG: section 80    WCCP Support
  * AUTHOR: Glenn Chisholm
@@ -277,13 +277,13 @@ wccpHandleUdp(int sock, void *not_used)
     if (Config.Wccp.router.s_addr != from.sin_addr.s_addr)
         return;
 
-    if (ntohl(wccp_i_see_you.version) != (unsigned)Config.Wccp.version)
+    if ((unsigned) ntohl(wccp_i_see_you.version) != (unsigned) Config.Wccp.version)
         return;
 
     if (ntohl(wccp_i_see_you.type) != WCCP_I_SEE_YOU)
         return;
 
-    if ((0 == change) && (number_caches == ntohl(wccp_i_see_you.number))) {
+    if ((0 == change) && (number_caches == (unsigned) ntohl(wccp_i_see_you.number))) {
         if (last_assign_buckets_change == wccp_i_see_you.change) {
             /*
              * After a WCCP_ASSIGN_BUCKET message, the router should
@@ -315,7 +315,7 @@ wccpLowestIP(void)
 {
     unsigned int loop;
 
-    for (loop = 0; loop < ntohl(wccp_i_see_you.number); loop++) {
+    for (loop = 0; loop < (unsigned) ntohl(wccp_i_see_you.number); loop++) {
         if (wccp_i_see_you.wccp_cache_entry[loop].ip_addr.s_addr < local_ip.s_addr)
             return 0;
     }