]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
64 bit broken again !!!!
authorwessels <>
Thu, 24 Nov 2005 07:54:15 +0000 (07:54 +0000)
committerwessels <>
Thu, 24 Nov 2005 07:54:15 +0000 (07:54 +0000)
This patch casts long ints to 32-bit ints for printfs so gcc doesn't bail

src/ICAP/ICAPModXact.cc
src/http.cc

index 062a04643f963b18b8bdb228261c5ca283c3d535..0a7ec96fa8cbcf24397716b8bdd8b1228cc0689a 100644 (file)
@@ -305,7 +305,7 @@ void ICAPModXact::addLastRequestChunk(MemBuf &buf)
 
 void ICAPModXact::openChunk(MemBuf &buf, size_t chunkSize)
 {
-    buf.Printf("%x\r\n", chunkSize);
+    buf.Printf("%x\r\n", (int) chunkSize);
 }
 
 void ICAPModXact::closeChunk(MemBuf &buf, bool ieof)
@@ -892,11 +892,11 @@ void ICAPModXact::makeRequestHeaders(MemBuf &buf)
             encapsulateHead(buf, "res-hdr", httpBuf, prime);
 
     if (!virginBody.expected())
-        buf.Printf("null-body=%d", httpBuf.contentSize());
+        buf.Printf("null-body=%d", (int) httpBuf.contentSize());
     else if (ICAP::methodReqmod == m)
-        buf.Printf("req-body=%d", httpBuf.contentSize());
+        buf.Printf("req-body=%d", (int) httpBuf.contentSize());
     else
-        buf.Printf("res-body=%d", httpBuf.contentSize());
+        buf.Printf("res-body=%d", (int) httpBuf.contentSize());
 
     buf.append(ICAP::crlf, 2); // terminate Encapsulated line
 
@@ -922,7 +922,7 @@ void ICAPModXact::makeRequestHeaders(MemBuf &buf)
 void ICAPModXact::encapsulateHead(MemBuf &icapBuf, const char *section, MemBuf &httpBuf, const HttpMsg *head)
 {
     // update ICAP header
-    icapBuf.Printf("%s=%d,", section, httpBuf.contentSize());
+    icapBuf.Printf("%s=%d,", section, (int) httpBuf.contentSize());
 
     // pack HTTP head
     packHead(httpBuf, head);
@@ -994,7 +994,7 @@ void ICAPModXact::fillPendingStatus(MemBuf &buf) const
 
     if (preview.enabled()) {
         if (!preview.done())
-            buf.Printf("P(%d)", preview.debt());
+            buf.Printf("P(%d)", (int) preview.debt());
     }
 
     if (virginSendClaim.active())
index b5dc30ea6f632606d2125229e78ff6d3cb94ab1a..3e072219bd3022d13af56407a441a63a80f56b08 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: http.cc,v 1.467 2005/11/21 23:29:08 wessels Exp $
+ * $Id: http.cc,v 1.468 2005/11/24 00:54:15 wessels Exp $
  *
  * DEBUG: section 11    Hypertext Transfer Protocol (HTTP)
  * AUTHOR: Harvest Derived
@@ -2093,7 +2093,7 @@ void
 HttpStateData::takeAdaptedBody(MemBuf *buf)
 {
     debug(11,5)("HttpStateData::takeAdaptedBody() called\n");
-    debug(11,5)("\t%d bytes\n", buf->contentSize());
+    debug(11,5)("\t%d bytes\n", (int) buf->contentSize());
     debug(11,5)("\t%d is current offset\n", (int)currentOffset);
 
     if (!entry->isAccepting()) {