--------------------- PatchSet 4283 Date: 2007/04/19 04:43:25 Author: dwsquid Branch: squid3-largeobj Tag: (none) Log: off_t is not a good choice for representing the size of large objects because on some OSes (Linux) it is 32-bits by default. int64_t looks like a better choice. Members: src/AccessLogEntry.h:1.7.10.1->1.7.10.2 src/HttpHeader.cc:1.40.6.1->1.40.6.2 src/HttpHeader.h:1.18.6.1->1.18.6.2 src/HttpHeaderTools.cc:1.21.6.1->1.21.6.2 src/HttpMsg.h:1.14.6.1->1.14.6.2 src/HttpReply.cc:1.38.6.1->1.38.6.2 src/HttpReply.h:1.18.10.1->1.18.10.2 src/Store.h:1.27.2.1->1.27.2.2 src/StoreIOBuffer.h:1.6.6.1->1.6.6.2 src/access_log.cc:1.41.6.1->1.41.6.2 src/client_side.cc:1.121.2.1->1.121.2.2 src/client_side.h:1.18.6.1->1.18.6.2 src/client_side_reply.cc:1.91.2.1->1.91.2.2 src/client_side_request.h:1.25.6.1->1.25.6.2 src/ftp.cc:1.63.2.1->1.63.2.2 src/mem_node.cc:1.10.6.1->1.10.6.2 src/mem_node.h:1.10.14.1->1.10.14.2 src/protos.h:1.80.4.1->1.80.4.2 src/stmem.cc:1.16.14.1->1.16.14.2 src/stmem.h:1.9.14.1->1.9.14.2 src/store.cc:1.53.2.1->1.53.2.2 src/store_swapout.cc:1.19.2.1->1.19.2.2 src/tunnel.cc:1.28.6.1->1.28.6.2 src/tests/stub_HttpReply.cc:1.3.10.1->1.3.10.2 Index: squid3/src/AccessLogEntry.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/AccessLogEntry.h,v retrieving revision 1.7.10.1 retrieving revision 1.7.10.2 diff -u -r1.7.10.1 -r1.7.10.2 --- squid3/src/AccessLogEntry.h 18 Apr 2007 05:02:51 -0000 1.7.10.1 +++ squid3/src/AccessLogEntry.h 19 Apr 2007 04:43:25 -0000 1.7.10.2 @@ -1,6 +1,6 @@ /* - * $Id: AccessLogEntry.h,v 1.7.10.1 2007/04/18 05:02:51 dwsquid Exp $ + * $Id: AccessLogEntry.h,v 1.7.10.2 2007/04/19 04:43:25 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -95,9 +95,9 @@ } struct IN_ADDR caddr; - off_t size; + int64_t size; off_t highOffset; - off_t objectSize; + int64_t objectSize; log_type code; int msec; const char *rfc931; Index: squid3/src/HttpHeader.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpHeader.cc,v retrieving revision 1.40.6.1 retrieving revision 1.40.6.2 diff -u -r1.40.6.1 -r1.40.6.2 --- squid3/src/HttpHeader.cc 18 Apr 2007 05:02:59 -0000 1.40.6.1 +++ squid3/src/HttpHeader.cc 19 Apr 2007 04:43:31 -0000 1.40.6.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.cc,v 1.40.6.1 2007/04/18 05:02:59 dwsquid Exp $ + * $Id: HttpHeader.cc,v 1.40.6.2 2007/04/19 04:43:31 dwsquid Exp $ * * DEBUG: section 55 HTTP Header * AUTHOR: Alex Rousskov @@ -1008,7 +1008,7 @@ } void -HttpHeader::putOffset(http_hdr_type id, off_t number) +HttpHeader::putOffset(http_hdr_type id, int64_t number) { assert_eid(id); assert(Headers[id].type == ftOffset); /* must be of an appropriate type */ @@ -1148,7 +1148,7 @@ return -1; } -off_t +int64_t HttpHeader::getOffset(http_hdr_type id) const { assert_eid(id); @@ -1516,12 +1516,12 @@ return val; } -off_t +int64_t HttpHeaderEntry::getOffset() const { assert_eid (id); assert (Headers[id].type == ftOffset); - off_t val = -1; + int64_t val = -1; int ok = httpHeaderParseOffset(value.buf(), &val); httpHeaderNoteParsedEntry(id, value, !ok); /* XXX: Should we check ok - ie Index: squid3/src/HttpHeader.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpHeader.h,v retrieving revision 1.18.6.1 retrieving revision 1.18.6.2 diff -u -r1.18.6.1 -r1.18.6.2 --- squid3/src/HttpHeader.h 18 Apr 2007 05:03:03 -0000 1.18.6.1 +++ squid3/src/HttpHeader.h 19 Apr 2007 04:43:33 -0000 1.18.6.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeader.h,v 1.18.6.1 2007/04/18 05:03:03 dwsquid Exp $ + * $Id: HttpHeader.h,v 1.18.6.2 2007/04/19 04:43:33 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -182,7 +182,7 @@ HttpHeaderEntry *clone() const; void packInto(Packer *p) const; int getInt() const; - off_t getOffset() const; + int64_t getOffset() const; MEMPROXY_CLASS(HttpHeaderEntry); http_hdr_type id; String name; @@ -220,7 +220,7 @@ String getListMember(http_hdr_type id, const char *member, const char separator) const; int has(http_hdr_type id) const; void putInt(http_hdr_type id, int number); - void putOffset(http_hdr_type id, off_t number); + void putOffset(http_hdr_type id, int64_t number); void putTime(http_hdr_type id, time_t htime); void insertTime(http_hdr_type id, time_t htime); void putStr(http_hdr_type id, const char *str); @@ -231,7 +231,7 @@ void putSc(HttpHdrSc *sc); void putExt(const char *name, const char *value); int getInt(http_hdr_type id) const; - off_t getOffset(http_hdr_type id) const; + int64_t getOffset(http_hdr_type id) const; time_t getTime(http_hdr_type id) const; const char *getStr(http_hdr_type id) const; const char *getLastStr(http_hdr_type id) const; Index: squid3/src/HttpHeaderTools.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpHeaderTools.cc,v retrieving revision 1.21.6.1 retrieving revision 1.21.6.2 diff -u -r1.21.6.1 -r1.21.6.2 --- squid3/src/HttpHeaderTools.cc 18 Apr 2007 05:03:24 -0000 1.21.6.1 +++ squid3/src/HttpHeaderTools.cc 19 Apr 2007 04:43:35 -0000 1.21.6.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpHeaderTools.cc,v 1.21.6.1 2007/04/18 05:03:24 dwsquid Exp $ + * $Id: HttpHeaderTools.cc,v 1.21.6.2 2007/04/19 04:43:35 dwsquid Exp $ * * DEBUG: section 66 HTTP Header Tools * AUTHOR: Alex Rousskov @@ -360,9 +360,9 @@ } int -httpHeaderParseOffset(const char *start, off_t * value) +httpHeaderParseOffset(const char *start, int64_t * value) { - off_t res = strtoll(start, NULL, 10); + int64_t res = strtoll(start, NULL, 10); if (!res && EINVAL == errno) /* maybe not portable? */ return 0; *value = res; Index: squid3/src/HttpMsg.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpMsg.h,v retrieving revision 1.14.6.1 retrieving revision 1.14.6.2 diff -u -r1.14.6.1 -r1.14.6.2 --- squid3/src/HttpMsg.h 18 Apr 2007 05:03:32 -0000 1.14.6.1 +++ squid3/src/HttpMsg.h 19 Apr 2007 04:43:38 -0000 1.14.6.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpMsg.h,v 1.14.6.1 2007/04/18 05:03:32 dwsquid Exp $ + * $Id: HttpMsg.h,v 1.14.6.2 2007/04/19 04:43:38 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -67,7 +67,7 @@ * Also used to report parsed header size if parse() is successful */ int hdr_sz; - off_t content_length; + int64_t content_length; protocol_t protocol; Index: squid3/src/HttpReply.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpReply.cc,v retrieving revision 1.38.6.1 retrieving revision 1.38.6.2 diff -u -r1.38.6.1 -r1.38.6.2 --- squid3/src/HttpReply.cc 18 Apr 2007 05:03:37 -0000 1.38.6.1 +++ squid3/src/HttpReply.cc 19 Apr 2007 04:45:11 -0000 1.38.6.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpReply.cc,v 1.38.6.1 2007/04/18 05:03:37 dwsquid Exp $ + * $Id: HttpReply.cc,v 1.38.6.2 2007/04/19 04:45:11 dwsquid Exp $ * * DEBUG: section 58 HTTP Reply (Response) * AUTHOR: Alex Rousskov @@ -172,7 +172,7 @@ MemBuf * httpPackedReply(HttpVersion ver, http_status status, const char *ctype, - off_t clen, time_t lmt, time_t expires) + int64_t clen, time_t lmt, time_t expires) { HttpReply *rep = new HttpReply; rep->setHeaders(ver, status, ctype, NULL, clen, lmt, expires); @@ -224,7 +224,7 @@ void HttpReply::setHeaders(HttpVersion ver, http_status status, const char *reason, - const char *ctype, off_t clen, time_t lmt, time_t expires) + const char *ctype, int64_t clen, time_t lmt, time_t expires) { HttpHeader *hdr; httpStatusLineSet(&sline, ver, status, reason); Index: squid3/src/HttpReply.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/HttpReply.h,v retrieving revision 1.18.10.1 retrieving revision 1.18.10.2 diff -u -r1.18.10.1 -r1.18.10.2 --- squid3/src/HttpReply.h 18 Apr 2007 05:05:30 -0000 1.18.10.1 +++ squid3/src/HttpReply.h 19 Apr 2007 04:45:16 -0000 1.18.10.2 @@ -1,6 +1,6 @@ /* - * $Id: HttpReply.h,v 1.18.10.1 2007/04/18 05:05:30 dwsquid Exp $ + * $Id: HttpReply.h,v 1.18.10.2 2007/04/19 04:45:16 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -39,7 +39,7 @@ extern void httpReplyInitModule(void); /* do everything in one call: init, set, pack, clean, return MemBuf */ -extern MemBuf *httpPackedReply(HttpVersion ver, http_status status, const char *ctype, off_t clen, time_t lmt, time_t expires); +extern MemBuf *httpPackedReply(HttpVersion ver, http_status status, const char *ctype, int64_t clen, time_t lmt, time_t expires); /* Sync changes here with HttpReply.cc */ @@ -106,7 +106,7 @@ /* set commonly used info with one call */ void setHeaders(HttpVersion ver, http_status status, - const char *reason, const char *ctype, off_t clen, time_t lmt, time_t expires); + const char *reason, const char *ctype, int64_t clen, time_t lmt, time_t expires); /* mem-pack: returns a ready to use mem buffer with a packed reply */ MemBuf *pack(); Index: squid3/src/Store.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/Store.h,v retrieving revision 1.27.2.1 retrieving revision 1.27.2.2 diff -u -r1.27.2.1 -r1.27.2.2 --- squid3/src/Store.h 18 Apr 2007 05:05:38 -0000 1.27.2.1 +++ squid3/src/Store.h 19 Apr 2007 04:45:26 -0000 1.27.2.2 @@ -1,6 +1,6 @@ /* - * $Id: Store.h,v 1.27.2.1 2007/04/18 05:05:38 dwsquid Exp $ + * $Id: Store.h,v 1.27.2.2 2007/04/19 04:45:26 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -151,7 +151,7 @@ virtual int unlock(); /* increate the memory lock count on the entry */ virtual ssize_t objectLen() const; - virtual off_t contentLen() const; + virtual int64_t contentLen() const; virtual void lock() Index: squid3/src/StoreIOBuffer.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/StoreIOBuffer.h,v retrieving revision 1.6.6.1 retrieving revision 1.6.6.2 diff -u -r1.6.6.1 -r1.6.6.2 --- squid3/src/StoreIOBuffer.h 18 Apr 2007 05:05:42 -0000 1.6.6.1 +++ squid3/src/StoreIOBuffer.h 19 Apr 2007 04:45:29 -0000 1.6.6.2 @@ -1,6 +1,6 @@ /* - * $Id: StoreIOBuffer.h,v 1.6.6.1 2007/04/18 05:05:42 dwsquid Exp $ + * $Id: StoreIOBuffer.h,v 1.6.6.2 2007/04/19 04:45:29 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -61,9 +61,9 @@ flags.error = 0; } - Range range() const + Range range() const { - return Range(offset, offset + length); + return Range(offset, offset + length); } void dump() const Index: squid3/src/access_log.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/access_log.cc,v retrieving revision 1.41.6.1 retrieving revision 1.41.6.2 diff -u -r1.41.6.1 -r1.41.6.2 --- squid3/src/access_log.cc 18 Apr 2007 05:06:18 -0000 1.41.6.1 +++ squid3/src/access_log.cc 19 Apr 2007 04:45:33 -0000 1.41.6.2 @@ -1,6 +1,6 @@ /* - * $Id: access_log.cc,v 1.41.6.1 2007/04/18 05:06:18 dwsquid Exp $ + * $Id: access_log.cc,v 1.41.6.2 2007/04/19 04:45:33 dwsquid Exp $ * * DEBUG: section 46 Access Log * AUTHOR: Duane Wessels @@ -526,7 +526,7 @@ long int outint = 0; int doint = 0; int dofree = 0; - off_t outoff = 0; + int64_t outoff = 0; int dooff = 0; switch (fmt->type) { Index: squid3/src/client_side.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side.cc,v retrieving revision 1.121.2.1 retrieving revision 1.121.2.2 diff -u -r1.121.2.1 -r1.121.2.2 --- squid3/src/client_side.cc 18 Apr 2007 05:06:22 -0000 1.121.2.1 +++ squid3/src/client_side.cc 19 Apr 2007 04:45:37 -0000 1.121.2.2 @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.121.2.1 2007/04/18 05:06:22 dwsquid Exp $ + * $Id: client_side.cc,v 1.121.2.2 2007/04/19 04:45:37 dwsquid Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -757,7 +757,7 @@ } size_t -ClientSocketContext::lengthToSend(Range const &available) +ClientSocketContext::lengthToSend(Range const &available) { size_t maximum = available.size(); @@ -879,7 +879,7 @@ ClientSocketContext::packRange(StoreIOBuffer const &source, MemBuf * mb) { HttpHdrRangeIter * i = &http->range_iter; - Range available (source.range()); + Range available (source.range()); char const *buf = source.data; while (i->currentSpec() && available.size()) { Index: squid3/src/client_side.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side.h,v retrieving revision 1.18.6.1 retrieving revision 1.18.6.2 diff -u -r1.18.6.1 -r1.18.6.2 --- squid3/src/client_side.h 18 Apr 2007 05:06:25 -0000 1.18.6.1 +++ squid3/src/client_side.h 19 Apr 2007 04:45:43 -0000 1.18.6.2 @@ -1,6 +1,6 @@ /* - * $Id: client_side.h,v 1.18.6.1 2007/04/18 05:06:25 dwsquid Exp $ + * $Id: client_side.h,v 1.18.6.2 2007/04/19 04:45:43 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -101,7 +101,7 @@ clientStream_status_t socketState(); void sendBody(HttpReply * rep, StoreIOBuffer bodyData); void sendStartOfMessage(HttpReply * rep, StoreIOBuffer bodyData); - size_t lengthToSend(Range const &available); + size_t lengthToSend(Range const &available); void noteSentBodyBytes(size_t); void buildRangeHeader(HttpReply * rep); int fd() const; Index: squid3/src/client_side_reply.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side_reply.cc,v retrieving revision 1.91.2.1 retrieving revision 1.91.2.2 diff -u -r1.91.2.1 -r1.91.2.2 --- squid3/src/client_side_reply.cc 18 Apr 2007 05:06:30 -0000 1.91.2.1 +++ squid3/src/client_side_reply.cc 19 Apr 2007 04:45:50 -0000 1.91.2.2 @@ -1,6 +1,6 @@ /* - * $Id: client_side_reply.cc,v 1.91.2.1 2007/04/18 05:06:30 dwsquid Exp $ + * $Id: client_side_reply.cc,v 1.91.2.2 2007/04/19 04:45:50 dwsquid Exp $ * * DEBUG: section 88 Client-side Reply Routines * AUTHOR: Robert Collins (Originally Duane Wessels in client_side.c) @@ -1032,7 +1032,7 @@ if (reply->content_length < 0) return 0; - off_t expectedLength = reply->content_length + http->out.headers_sz; + int64_t expectedLength = reply->content_length + http->out.headers_sz; if (http->out.size < expectedLength) return 0; Index: squid3/src/client_side_request.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/client_side_request.h,v retrieving revision 1.25.6.1 retrieving revision 1.25.6.2 diff -u -r1.25.6.1 -r1.25.6.2 --- squid3/src/client_side_request.h 18 Apr 2007 05:06:36 -0000 1.25.6.1 +++ squid3/src/client_side_request.h 19 Apr 2007 04:45:53 -0000 1.25.6.2 @@ -1,6 +1,6 @@ /* - * $Id: client_side_request.h,v 1.25.6.1 2007/04/18 05:06:36 dwsquid Exp $ + * $Id: client_side_request.h,v 1.25.6.2 2007/04/19 04:45:53 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -101,7 +101,7 @@ struct { off_t offset; - off_t size; + int64_t size; size_t headers_sz; } @@ -195,7 +195,7 @@ /* ones that should be elsewhere */ SQUIDCEXTERN void redirectStart(ClientHttpRequest *, RH *, void *); -SQUIDCEXTERN void sslStart(ClientHttpRequest *, off_t *, int *); +SQUIDCEXTERN void sslStart(ClientHttpRequest *, int64_t *, int *); #ifdef _USE_INLINE_ #include "Store.h" Index: squid3/src/ftp.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ftp.cc,v retrieving revision 1.63.2.1 retrieving revision 1.63.2.2 diff -u -r1.63.2.1 -r1.63.2.2 --- squid3/src/ftp.cc 18 Apr 2007 05:06:46 -0000 1.63.2.1 +++ squid3/src/ftp.cc 19 Apr 2007 04:45:55 -0000 1.63.2.2 @@ -1,6 +1,6 @@ /* - * $Id: ftp.cc,v 1.63.2.1 2007/04/18 05:06:46 dwsquid Exp $ + * $Id: ftp.cc,v 1.63.2.2 2007/04/19 04:45:55 dwsquid Exp $ * * DEBUG: section 9 File Transfer Protocol (FTP) * AUTHOR: Harvest Derived @@ -133,12 +133,12 @@ int login_att; ftp_state_t state; time_t mdtm; - off_t theSize; + int64_t theSize; wordlist *pathcomps; char *filepath; char *dirpath; - off_t restart_offset; - off_t restarted_offset; + int64_t restart_offset; + int64_t restarted_offset; char *proxy_host; size_t list_width; wordlist *cwd_message; Index: squid3/src/mem_node.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/mem_node.cc,v retrieving revision 1.10.6.1 retrieving revision 1.10.6.2 diff -u -r1.10.6.1 -r1.10.6.2 --- squid3/src/mem_node.cc 18 Apr 2007 05:06:53 -0000 1.10.6.1 +++ squid3/src/mem_node.cc 19 Apr 2007 04:45:58 -0000 1.10.6.2 @@ -1,6 +1,6 @@ /* - * $Id: mem_node.cc,v 1.10.6.1 2007/04/18 05:06:53 dwsquid Exp $ + * $Id: mem_node.cc,v 1.10.6.2 2007/04/19 04:45:58 dwsquid Exp $ * * DEBUG: section 19 Store Memory Primitives * AUTHOR: Robert Collins @@ -80,23 +80,23 @@ return Pool().inUseCount(); } -off_t +int64_t mem_node::start() const { assert (nodeBuffer.offset >= 0); return nodeBuffer.offset; } -off_t +int64_t mem_node::end() const { return nodeBuffer.offset + nodeBuffer.length; } -Range +Range mem_node::dataRange() const { - return Range (start(), end()); + return Range (start(), end()); } size_t @@ -106,7 +106,7 @@ } bool -mem_node::contains (off_t const &location) const +mem_node::contains (int64_t const &location) const { if (start() <= location && end() > location) return true; @@ -116,7 +116,7 @@ /* nodes can not be sparse */ bool -mem_node::canAccept (off_t const &location) const +mem_node::canAccept (int64_t const &location) const { if (location == end() && space() > 0) return true; Index: squid3/src/mem_node.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/mem_node.h,v retrieving revision 1.10.14.1 retrieving revision 1.10.14.2 diff -u -r1.10.14.1 -r1.10.14.2 --- squid3/src/mem_node.h 18 Apr 2007 05:06:58 -0000 1.10.14.1 +++ squid3/src/mem_node.h 19 Apr 2007 04:46:02 -0000 1.10.14.2 @@ -1,6 +1,6 @@ /* - * $Id: mem_node.h,v 1.10.14.1 2007/04/18 05:06:58 dwsquid Exp $ + * $Id: mem_node.h,v 1.10.14.2 2007/04/19 04:46:02 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -48,11 +48,11 @@ mem_node(off_t); ~mem_node(); size_t space() const; - off_t start() const; - off_t end() const; - Range dataRange() const; - bool contains (off_t const &location) const; - bool canAccept (off_t const &location) const; + int64_t start() const; + int64_t end() const; + Range dataRange() const; + bool contains (int64_t const &location) const; + bool canAccept (int64_t const &location) const; bool operator < (mem_node const & rhs) const; /* public */ StoreIOBuffer nodeBuffer; Index: squid3/src/protos.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/protos.h,v retrieving revision 1.80.4.1 retrieving revision 1.80.4.2 diff -u -r1.80.4.1 -r1.80.4.2 --- squid3/src/protos.h 18 Apr 2007 05:07:01 -0000 1.80.4.1 +++ squid3/src/protos.h 19 Apr 2007 04:46:08 -0000 1.80.4.2 @@ -1,6 +1,6 @@ /* - * $Id: protos.h,v 1.80.4.1 2007/04/18 05:07:01 dwsquid Exp $ + * $Id: protos.h,v 1.80.4.2 2007/04/19 04:46:08 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -245,7 +245,7 @@ SQUIDCEXTERN const char *getStringPrefix(const char *str, const char *end); SQUIDCEXTERN int httpHeaderParseInt(const char *start, int *val); SQUIDCEXTERN int httpHeaderParseSize(const char *start, ssize_t * sz); -SQUIDCEXTERN int httpHeaderParseOffset(const char *start, off_t * off); +SQUIDCEXTERN int httpHeaderParseOffset(const char *start, int64_t * off); #if STDC_HEADERS SQUIDCEXTERN void httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id, const char *fmt,...) PRINTF_FORMAT_ARG3; Index: squid3/src/stmem.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/stmem.cc,v retrieving revision 1.16.14.1 retrieving revision 1.16.14.2 diff -u -r1.16.14.1 -r1.16.14.2 --- squid3/src/stmem.cc 18 Apr 2007 05:07:07 -0000 1.16.14.1 +++ squid3/src/stmem.cc 19 Apr 2007 04:46:15 -0000 1.16.14.2 @@ -1,6 +1,6 @@ /* - * $Id: stmem.cc,v 1.16.14.1 2007/04/18 05:07:07 dwsquid Exp $ + * $Id: stmem.cc,v 1.16.14.2 2007/04/19 04:46:15 dwsquid Exp $ * * DEBUG: section 19 Store Memory Primitives * AUTHOR: Harvest Derived @@ -55,7 +55,7 @@ return aNode->data; } -off_t +int64_t mem_hdr::lowestOffset () const { const SplayNode *theStart = nodes.start(); @@ -100,8 +100,8 @@ return true; } -off_t -mem_hdr::freeDataUpto(off_t target_offset) +int64_t +mem_hdr::freeDataUpto(int64_t target_offset) { /* keep the last one to avoid change to other part of code */ @@ -131,7 +131,7 @@ } size_t -mem_hdr::writeAvailable(mem_node *aNode, off_t location, size_t amount, char const *source) +mem_hdr::writeAvailable(mem_node *aNode, int64_t location, size_t amount, char const *source) { /* if we attempt to overwrite existing data or leave a gap within a node */ assert (location == aNode->nodeBuffer.offset + aNode->nodeBuffer.length); @@ -194,7 +194,7 @@ * If no node contains the start, it returns NULL. */ mem_node * -mem_hdr::getBlockContainingLocation (off_t location) const +mem_hdr::getBlockContainingLocation (int64_t location) const { mem_node target (location); target.nodeBuffer.length = 1; @@ -207,7 +207,7 @@ } size_t -mem_hdr::copyAvailable(mem_node *aNode, off_t location, size_t amount, char *target) const +mem_hdr::copyAvailable(mem_node *aNode, int64_t location, size_t amount, char *target) const { if (aNode->nodeBuffer.offset > location) return 0; Index: squid3/src/stmem.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/stmem.h,v retrieving revision 1.9.14.1 retrieving revision 1.9.14.2 diff -u -r1.9.14.1 -r1.9.14.2 --- squid3/src/stmem.h 18 Apr 2007 05:07:12 -0000 1.9.14.1 +++ squid3/src/stmem.h 19 Apr 2007 04:46:19 -0000 1.9.14.2 @@ -1,6 +1,6 @@ /* - * $Id: stmem.h,v 1.9.14.1 2007/04/18 05:07:12 dwsquid Exp $ + * $Id: stmem.h,v 1.9.14.2 2007/04/19 04:46:19 dwsquid Exp $ * * * SQUID Web Proxy Cache http://www.squid-cache.org/ @@ -49,9 +49,9 @@ mem_hdr(); ~mem_hdr(); void freeContent(); - off_t lowestOffset () const; + int64_t lowestOffset () const; off_t endOffset () const; - off_t freeDataUpto (off_t); + int64_t freeDataUpto (int64_t); ssize_t copy (StoreIOBuffer const &) const; bool hasContigousContentRange(Range const &range) const; /* success or fail */ @@ -60,7 +60,7 @@ size_t size() const; /* Not an iterator - thus the start, not begin() */ mem_node const *start() const; - mem_node *getBlockContainingLocation (off_t location) const; + mem_node *getBlockContainingLocation (int64_t location) const; /* access the contained nodes - easier than punning * as a contianer ourselves */ @@ -78,10 +78,10 @@ void makeAppendSpace(); int appendToNode(mem_node *aNode, const char *data, int maxLength); void appendNode (mem_node *aNode); - size_t copyAvailable(mem_node *aNode, off_t location, size_t amount, char *target) const; + size_t copyAvailable(mem_node *aNode, int64_t location, size_t amount, char *target) const; bool unionNotEmpty (StoreIOBuffer const &); mem_node *nodeToRecieve(off_t offset); - size_t writeAvailable(mem_node *aNode, off_t location, size_t amount, char const *source); + size_t writeAvailable(mem_node *aNode, int64_t location, size_t amount, char const *source); off_t inmem_hi; Splay nodes; }; Index: squid3/src/store.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/store.cc,v retrieving revision 1.53.2.1 retrieving revision 1.53.2.2 diff -u -r1.53.2.1 -r1.53.2.2 --- squid3/src/store.cc 18 Apr 2007 05:07:16 -0000 1.53.2.1 +++ squid3/src/store.cc 19 Apr 2007 04:46:25 -0000 1.53.2.2 @@ -1,6 +1,6 @@ /* - * $Id: store.cc,v 1.53.2.1 2007/04/18 05:07:16 dwsquid Exp $ + * $Id: store.cc,v 1.53.2.2 2007/04/19 04:46:25 dwsquid Exp $ * * DEBUG: section 20 Storage Manager * AUTHOR: Harvest Derived @@ -1715,7 +1715,7 @@ return mem_obj->object_sz; } -off_t +int64_t StoreEntry::contentLen() const { assert(mem_obj != NULL); Index: squid3/src/store_swapout.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/store_swapout.cc,v retrieving revision 1.19.2.1 retrieving revision 1.19.2.2 diff -u -r1.19.2.1 -r1.19.2.2 --- squid3/src/store_swapout.cc 18 Apr 2007 05:08:30 -0000 1.19.2.1 +++ squid3/src/store_swapout.cc 19 Apr 2007 04:46:29 -0000 1.19.2.2 @@ -1,6 +1,6 @@ /* - * $Id: store_swapout.cc,v 1.19.2.1 2007/04/18 05:08:30 dwsquid Exp $ + * $Id: store_swapout.cc,v 1.19.2.2 2007/04/19 04:46:29 dwsquid Exp $ * * DEBUG: section 20 Storage Manager Swapout Functions * AUTHOR: Duane Wessels @@ -204,7 +204,7 @@ debug(20, 7) ("storeSwapOut: storeOffset() = %d\n", (int) mem->swapout.sio->offset()); - off_t swapout_maxsize = mem->endOffset() - mem->swapout.queue_offset; + int64_t swapout_maxsize = mem->endOffset() - mem->swapout.queue_offset; assert(swapout_maxsize >= 0); Index: squid3/src/tunnel.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/tunnel.cc,v retrieving revision 1.28.6.1 retrieving revision 1.28.6.2 diff -u -r1.28.6.1 -r1.28.6.2 --- squid3/src/tunnel.cc 18 Apr 2007 05:08:32 -0000 1.28.6.1 +++ squid3/src/tunnel.cc 19 Apr 2007 04:46:31 -0000 1.28.6.2 @@ -1,6 +1,6 @@ /* - * $Id: tunnel.cc,v 1.28.6.1 2007/04/18 05:08:32 dwsquid Exp $ + * $Id: tunnel.cc,v 1.28.6.2 2007/04/19 04:46:31 dwsquid Exp $ * * DEBUG: section 26 Secure Sockets Layer Proxy * AUTHOR: Duane Wessels @@ -90,7 +90,7 @@ void dataSent (size_t amount); int len; char *buf; - off_t *size_ptr; /* pointer to size in an ConnStateData for logging */ + int64_t *size_ptr; /* pointer to size in an ConnStateData for logging */ private: int fd_; @@ -575,7 +575,7 @@ } void -sslStart(ClientHttpRequest * http, off_t * size_ptr, int *status_ptr) +sslStart(ClientHttpRequest * http, int64_t * size_ptr, int *status_ptr) { /* Create state structure. */ SslStateData *sslState = NULL; Index: squid3/src/tests/stub_HttpReply.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/tests/stub_HttpReply.cc,v retrieving revision 1.3.10.1 retrieving revision 1.3.10.2 diff -u -r1.3.10.1 -r1.3.10.2 --- squid3/src/tests/stub_HttpReply.cc 18 Apr 2007 05:08:40 -0000 1.3.10.1 +++ squid3/src/tests/stub_HttpReply.cc 19 Apr 2007 04:46:38 -0000 1.3.10.2 @@ -1,5 +1,5 @@ /* - * $Id: stub_HttpReply.cc,v 1.3.10.1 2007/04/18 05:08:40 dwsquid Exp $ + * $Id: stub_HttpReply.cc,v 1.3.10.2 2007/04/19 04:46:38 dwsquid Exp $ * * DEBUG: section 84 Helper process maintenance * AUTHOR: Robert Collins @@ -53,7 +53,7 @@ void HttpReply::setHeaders(HttpVersion ver, http_status status, const char *reason, - const char *ctype, off_t clen, time_t lmt, time_t expires) + const char *ctype, int64_t clen, time_t lmt, time_t expires) { fatal ("Not implemented"); }