From 1dd6edf2e37e893c6515fce0452228d96f987442 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Thu, 24 Nov 2005 07:54:15 +0000 Subject: [PATCH] 64 bit broken again !!!! This patch casts long ints to 32-bit ints for printfs so gcc doesn't bail --- src/ICAP/ICAPModXact.cc | 12 ++++++------ src/http.cc | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ICAP/ICAPModXact.cc b/src/ICAP/ICAPModXact.cc index 062a04643f..0a7ec96fa8 100644 --- a/src/ICAP/ICAPModXact.cc +++ b/src/ICAP/ICAPModXact.cc @@ -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()) diff --git a/src/http.cc b/src/http.cc index b5dc30ea6f..3e072219bd 100644 --- a/src/http.cc +++ b/src/http.cc @@ -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()) { -- 2.47.3