]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
format fixes
authorhno <>
Wed, 24 Oct 2001 13:45:33 +0000 (13:45 +0000)
committerhno <>
Wed, 24 Oct 2001 13:45:33 +0000 (13:45 +0000)
18 files changed:
src/asn.cc
src/authenticate.cc
src/cache_cf.cc
src/client_side.cc
src/comm.cc
src/dns_internal.cc
src/errorpage.cc
src/filemap.cc
src/fs/aufs/store_dir_aufs.cc
src/fs/aufs/store_io_aufs.cc
src/fs/coss/store_io_coss.cc
src/fs/diskd/store_dir_diskd.cc
src/fs/ufs/store_dir_ufs.cc
src/fs/ufs/store_io_ufs.cc
src/ftp.cc
src/gopher.cc
src/helper.cc
src/structs.h

index 5b824a65171b032f14d18b02643a83603dcdbdad..4b2b0730396de80d31635eb647cb733da92296fc 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: asn.cc,v 1.76 2001/10/24 06:55:44 hno Exp $
+ * $Id: asn.cc,v 1.77 2001/10/24 07:45:33 hno Exp $
  *
  * DEBUG: section 53    AS Number handling
  * AUTHOR: Duane Wessels, Kostas Anagnostakis
@@ -223,7 +223,7 @@ asHandleReply(void *data, char *buf, ssize_t size)
     StoreEntry *e = asState->entry;
     char *s;
     char *t;
-    debug(53, 3) ("asHandleReply: Called with size=%d\n", size);
+    debug(53, 3) ("asHandleReply: Called with size=%ld\n", (long int) size);
     if (EBIT_TEST(e->flags, ENTRY_ABORTED)) {
        memFree(buf, MEM_4K_BUF);
        asStateFree(asState);
@@ -234,7 +234,7 @@ asHandleReply(void *data, char *buf, ssize_t size)
        asStateFree(asState);
        return;
     } else if (size < 0) {
-       debug(53, 1) ("asHandleReply: Called with size=%d\n", size);
+       debug(53, 1) ("asHandleReply: Called with size=%ld\n", (long int) size);
        memFree(buf, MEM_4K_BUF);
        asStateFree(asState);
        return;
index f93f1005fa47e96fd1804810c0272398a7cb3702..f6779e1ad58c3769f84cdc7a9162cf670bd374fa 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: authenticate.cc,v 1.33 2001/10/24 06:55:44 hno Exp $
+ * $Id: authenticate.cc,v 1.34 2001/10/24 07:45:34 hno Exp $
  *
  * DEBUG: section 29    Authenticator
  * AUTHOR: Duane Wessels
@@ -740,7 +740,7 @@ authenticateAuthUserLock(auth_user_t * auth_user)
     debug(29, 9) ("authenticateAuthUserLock auth_user '%p'.\n", auth_user);
     assert(auth_user != NULL);
     auth_user->references++;
-    debug(29, 9) ("authenticateAuthUserLock auth_user '%p' now at '%d'.\n", auth_user, auth_user->references);
+    debug(29, 9) ("authenticateAuthUserLock auth_user '%p' now at '%ld'.\n", auth_user, (long int) auth_user->references);
 }
 
 void
@@ -753,7 +753,7 @@ authenticateAuthUserUnlock(auth_user_t * auth_user)
     } else {
        debug(29, 1) ("Attempt to lower Auth User %p refcount below 0!\n", auth_user);
     }
-    debug(29, 9) ("authenticateAuthUserUnlock auth_user '%p' now at '%d'.\n", auth_user, auth_user->references);
+    debug(29, 9) ("authenticateAuthUserUnlock auth_user '%p' now at '%ld'.\n", auth_user, (long int) auth_user->references);
     if (auth_user->references == 0)
        authenticateFreeProxyAuthUser(auth_user);
 }
@@ -764,7 +764,7 @@ authenticateAuthUserRequestLock(auth_user_request_t * auth_user_request)
     debug(29, 9) ("authenticateAuthUserRequestLock auth_user request '%p'.\n", auth_user_request);
     assert(auth_user_request != NULL);
     auth_user_request->references++;
-    debug(29, 9) ("authenticateAuthUserRequestLock auth_user request '%p' now at '%d'.\n", auth_user_request, auth_user_request->references);
+    debug(29, 9) ("authenticateAuthUserRequestLock auth_user request '%p' now at '%ld'.\n", auth_user_request, (long int) auth_user_request->references);
 }
 
 void
@@ -777,7 +777,7 @@ authenticateAuthUserRequestUnlock(auth_user_request_t * auth_user_request)
     } else {
        debug(29, 1) ("Attempt to lower Auth User request %p refcount below 0!\n", auth_user_request);
     }
-    debug(29, 9) ("authenticateAuthUserRequestUnlock auth_user_request '%p' now at '%d'.\n", auth_user_request, auth_user_request->references);
+    debug(29, 9) ("authenticateAuthUserRequestUnlock auth_user_request '%p' now at '%ld'.\n", auth_user_request, (long int) auth_user_request->references);
     if (auth_user_request->references == 0) {
        /* not locked anymore */
        authenticateAuthUserRequestFree(auth_user_request);
@@ -825,7 +825,7 @@ authenticateFreeProxyAuthUser(void *data)
     auth_user_request_t *auth_user_request;
     dlink_node *link, *tmplink;
     assert(data != NULL);
-    debug(29, 5) ("authenticateFreeProxyAuthUser: Freeing auth_user '%p' with refcount '%d'.\n", u, u->references);
+    debug(29, 5) ("authenticateFreeProxyAuthUser: Freeing auth_user '%p' with refcount '%ld'.\n", u, (long int) u->references);
     assert(u->references == 0);
     /* were they linked in by username ? */
     if (u->usernamehash) {
@@ -891,7 +891,7 @@ authenticateProxyUserCacheCleanup(void *datanotused)
 
        /* if we need to have inpedendent expiry clauses, insert a module call
         * here */
-       debug(29, 4) ("authenticateProxyUserCacheCleanup: Cache entry:\n\tType: %d\n\tUsername: %s\n\texpires: %ld\n\treferences: %d\n", auth_user->auth_type, username, (long int) (auth_user->expiretime + Config.authenticateTTL), auth_user->references);
+       debug(29, 4) ("authenticateProxyUserCacheCleanup: Cache entry:\n\tType: %d\n\tUsername: %s\n\texpires: %ld\n\treferences: %ld\n", auth_user->auth_type, username, (long int) (auth_user->expiretime + Config.authenticateTTL), (long int) auth_user->references);
        if (auth_user->expiretime + Config.authenticateTTL <= current_time.tv_sec) {
            debug(29, 5) ("authenticateProxyUserCacheCleanup: Removing user %s from cache due to timeout.\n", username);
            /* the minus 1 accounts for the cache lock */
index ed58b0813f07d1a07e6fa8b7f2647ede3f4d67ab..e3062777067b5085ed7abf0ad41d508c8aca0633 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: cache_cf.cc,v 1.395 2001/10/24 05:46:26 hno Exp $
+ * $Id: cache_cf.cc,v 1.396 2001/10/24 07:45:34 hno Exp $
  *
  * DEBUG: section 3     Configuration File Parsing
  * AUTHOR: Harvest Derived
@@ -1260,7 +1260,7 @@ parse_cachedir_option_maxsize(SwapDir * sd, const char *option, const char *valu
     size = atoi(value);
 
     if (reconfiguring && sd->max_objsize != size)
-       debug(3, 1) ("Cache dir '%s' max object size now %d\n", sd->path, size);
+       debug(3, 1) ("Cache dir '%s' max object size now %ld\n", sd->path, (long int) size);
 
     sd->max_objsize = size;
 }
@@ -1269,7 +1269,7 @@ static void
 dump_cachedir_option_maxsize(StoreEntry * e, const char *option, SwapDir * sd)
 {
     if (sd->max_objsize != -1)
-       storeAppendPrintf(e, " %s=%d", option, sd->max_objsize);
+       storeAppendPrintf(e, " %s=%ld", option, (long int) sd->max_objsize);
 }
 
 void
@@ -2001,7 +2001,7 @@ dump_body_size_t(StoreEntry * entry, const char *name, dlink_list bodylist)
        acl_list *l;
        acl_access *head = bs->access_list;
        while (head != NULL) {
-           storeAppendPrintf(entry, "%s %d %s", name, bs->maxsize,
+           storeAppendPrintf(entry, "%s %ld %s", name, (long int) bs->maxsize,
                head->allow ? "Allow" : "Deny");
            for (l = head->acl_list; l != NULL; l = l->next) {
                storeAppendPrintf(entry, " %s%s",
index c257b98a9b6a4538b39f48229ec5fe542b002185..5de622bd8571435d94ea16b8c0e818982cacc865 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: client_side.cc,v 1.554 2001/10/24 06:55:44 hno Exp $
+ * $Id: client_side.cc,v 1.555 2001/10/24 07:45:34 hno Exp $
  *
  * DEBUG: section 33    Client-side Routines
  * AUTHOR: Duane Wessels
@@ -114,7 +114,7 @@ static int clientHierarchical(clientHttpRequest * http);
 static int clientCheckContentLength(request_t * r);
 static DEFER httpAcceptDefer;
 static log_type clientProcessRequest2(clientHttpRequest * http);
-static int clientReplyBodyTooLarge(HttpReply *, int clen);
+static int clientReplyBodyTooLarge(HttpReply *, ssize_t clen);
 static int clientRequestBodyTooLarge(int clen);
 static void clientProcessBody(ConnStateData * conn);
 
@@ -390,7 +390,7 @@ clientProcessExpired(void *data)
     delaySetStoreClient(http->sc, delayClient(http->request));
 #endif
     http->request->lastmod = http->old_entry->lastmod;
-    debug(33, 5) ("clientProcessExpired: lastmod %d\n", (int) entry->lastmod);
+    debug(33, 5) ("clientProcessExpired: lastmod %ld\n", (long int) entry->lastmod);
     http->entry = entry;
     http->out.offset = 0;
     fwdStart(http->conn->fd, http->entry, http->request);
@@ -435,8 +435,8 @@ clientGetsOldEntry(StoreEntry * new_entry, StoreEntry * old_entry, request_t * r
     /* If the client IMS time is prior to the entry LASTMOD time we
      * need to send the old object */
     if (modifiedSince(old_entry, request)) {
-       debug(33, 5) ("clientGetsOldEntry: YES, modified since %d\n",
-           (int) request->ims);
+       debug(33, 5) ("clientGetsOldEntry: YES, modified since %ld\n",
+           (long int) request->ims);
        return 1;
     }
     debug(33, 5) ("clientGetsOldEntry: NO, new one is fine\n");
@@ -455,7 +455,7 @@ clientHandleIMSReply(void *data, char *buf, ssize_t size)
     StoreEntry *oldentry;
     int recopy = 1;
     http_status status;
-    debug(33, 3) ("clientHandleIMSReply: %s, %d bytes\n", url, (int) size);
+    debug(33, 3) ("clientHandleIMSReply: %s, %ld bytes\n", url, (long int) size);
     if (entry == NULL) {
        memFree(buf, MEM_CLIENT_SOCK_BUF);
        return;
@@ -560,7 +560,7 @@ modifiedSince(StoreEntry * entry, request_t * request)
     debug(33, 3) ("modifiedSince: '%s'\n", storeUrl(entry));
     if (mod_time < 0)
        mod_time = entry->timestamp;
-    debug(33, 3) ("modifiedSince: mod_time = %d\n", (int) mod_time);
+    debug(33, 3) ("modifiedSince: mod_time = %ld\n", (long int) mod_time);
     if (mod_time < 0)
        return 1;
     /* Find size of the object */
@@ -1176,8 +1176,8 @@ clientMRangeCLen(clientHttpRequest * http)
        /* account for range content */
        clen += spec->length;
 
-       debug(33, 6) ("clientMRangeCLen: (clen += %d + %d) == %d\n",
-           mb.size, spec->length, clen);
+       debug(33, 6) ("clientMRangeCLen: (clen += %ld + %ld) == %d\n",
+           (long int) mb.size, (long int) spec->length, clen);
     }
     /* account for the terminating boundary */
     memBufReset(&mb);
@@ -1606,7 +1606,7 @@ static void
 clientPackTermBound(String boundary, MemBuf * mb)
 {
     memBufPrintf(mb, "\r\n--%s--\r\n", strBuf(boundary));
-    debug(33, 6) ("clientPackTermBound: buf offset: %d\n", mb->size);
+    debug(33, 6) ("clientPackTermBound: buf offset: %ld\n", (long int) mb->size);
 }
 
 /* appends a "part" HTTP header (as in a multi-part/range reply) to the buffer */
@@ -1673,7 +1673,7 @@ clientPackRange(clientHttpRequest * http,
     /*
      * append content
      */
-    debug(33, 3) ("clientPackRange: appending %d bytes\n", copy_sz);
+    debug(33, 3) ("clientPackRange: appending %ld bytes\n", (long int) copy_sz);
     memBufAppend(mb, *buf, copy_sz);
     /*
      * update offsets
@@ -1721,10 +1721,10 @@ clientPackMoreRanges(clientHttpRequest * http, const char *buf, ssize_t size, Me
        off_t start;            /* offset of still missing data */
        assert(i->spec);
        start = i->spec->offset + i->spec->length - i->debt_size;
-       debug(33, 3) ("clientPackMoreRanges: in:  offset: %d size: %d\n",
-           (int) body_off, size);
-       debug(33, 3) ("clientPackMoreRanges: out: start: %d spec[%d]: [%d, %d), len: %d debt: %d\n",
-           (int) start, (int) i->pos, i->spec->offset, (int) (i->spec->offset + i->spec->length), i->spec->length, i->debt_size);
+       debug(33, 3) ("clientPackMoreRanges: in:  offset: %ld size: %ld\n",
+           (long int) body_off, (long int) size);
+       debug(33, 3) ("clientPackMoreRanges: out: start: %ld spec[%ld]: [%ld, %ld), len: %ld debt: %ld\n",
+           (long int) start, (long int) i->pos, (long int) i->spec->offset, (long int) (i->spec->offset + i->spec->length), (long int) i->spec->length, (long int) i->debt_size);
        assert(body_off <= start);      /* we did not miss it */
        /* skip up to start */
        if (body_off + size > start) {
@@ -1746,11 +1746,11 @@ clientPackMoreRanges(clientHttpRequest * http, const char *buf, ssize_t size, Me
        }
     }
     assert(!i->debt_size == !i->spec); /* paranoid sync condition */
-    debug(33, 3) ("clientPackMoreRanges: buf exhausted: in:  offset: %d size: %d need_more: %d\n",
-       (int) body_off, size, i->debt_size);
+    debug(33, 3) ("clientPackMoreRanges: buf exhausted: in:  offset: %ld size: %ld need_more: %ld\n",
+       (long int) body_off, (long int) size, (long int) i->debt_size);
     if (i->debt_size) {
-       debug(33, 3) ("clientPackMoreRanges: need more: spec[%d]: [%d, %d), len: %d\n",
-           (int) i->pos, i->spec->offset, (int) (i->spec->offset + i->spec->length), i->spec->length);
+       debug(33, 3) ("clientPackMoreRanges: need more: spec[%ld]: [%ld, %ld), len: %ld\n",
+           (long int) i->pos, (long int) i->spec->offset, (long int) (i->spec->offset + i->spec->length), (long int) i->spec->length);
        /* skip the data we do not need if possible */
        if (i->debt_size == i->spec->length)    /* at the start of the cur. spec */
            body_off = i->spec->offset;
@@ -1765,7 +1765,7 @@ clientPackMoreRanges(clientHttpRequest * http, const char *buf, ssize_t size, Me
 }
 
 static int
-clientReplyBodyTooLarge(HttpReply * rep, int clen)
+clientReplyBodyTooLarge(HttpReply * rep, ssize_t clen)
 {
     if (0 == rep->maxBodySize)
        return 0;               /* disabled */
@@ -1837,8 +1837,8 @@ clientSendMoreData(void *data, char *buf, ssize_t size)
     assert(http->request != NULL);
     dlinkDelete(&http->active, &ClientActiveRequests);
     dlinkAdd(http, &http->active, &ClientActiveRequests);
-    debug(33, 5) ("clientSendMoreData: FD %d '%s', out.offset=%d \n",
-       fd, storeUrl(entry), (int) http->out.offset);
+    debug(33, 5) ("clientSendMoreData: FD %d '%s', out.offset=%ld \n",
+       fd, storeUrl(entry), (long int) http->out.offset);
     if (conn->chr != http) {
        /* there is another object in progress, defer this one */
        debug(33, 1) ("clientSendMoreData: Deferring %s\n", storeUrl(entry));
@@ -1891,7 +1891,7 @@ clientSendMoreData(void *data, char *buf, ssize_t size)
            body_buf = buf + rep->hdr_sz;
            http->range_iter.prefix_size = rep->hdr_sz;
            debug(33, 3) ("clientSendMoreData: Appending %d bytes after %d bytes of headers\n",
-               body_size, rep->hdr_sz);
+               (int) body_size, rep->hdr_sz);
            ch = aclChecklistCreate(Config.accessList.reply, http->request, NULL);
            ch->reply = rep;
            rv = aclCheckFast(Config.accessList.reply, ch);
@@ -2068,8 +2068,8 @@ clientWriteComplete(int fd, char *bufnotused, size_t size, int errflag, void *da
     StoreEntry *entry = http->entry;
     int done;
     http->out.size += size;
-    debug(33, 5) ("clientWriteComplete: FD %d, sz %d, err %d, off %d, len %d\n",
-       fd, size, errflag, (int) http->out.offset, entry ? objectLen(entry) : 0);
+    debug(33, 5) ("clientWriteComplete: FD %d, sz %ld, err %d, off %ld, len %d\n",
+       fd, (long int) size, errflag, (long int) http->out.offset, entry ? objectLen(entry) : 0);
     if (size > 0) {
        kb_incr(&statCounter.client_http.kbytes_out, size);
        if (isTcpHit(http->log_type))
@@ -2102,7 +2102,7 @@ clientWriteComplete(int fd, char *bufnotused, size_t size, int errflag, void *da
        } else {
            comm_close(fd);
        }
-    } else if (clientReplyBodyTooLarge(entry->mem_obj->reply, (int) http->out.offset)) {
+    } else if (clientReplyBodyTooLarge(entry->mem_obj->reply, http->out.offset)) {
        comm_close(fd);
     } else {
        /* More data will be coming from primary server; register with 
@@ -2943,8 +2943,8 @@ clientReadRequest(int fd, void *data)
                /* The request is too large to handle */
                debug(33, 1) ("Request header is too large (%d bytes)\n",
                    (int) conn->in.offset);
-               debug(33, 1) ("Config 'request_header_max_size'= %d bytes.\n",
-                   Config.maxRequestHeaderSize);
+               debug(33, 1) ("Config 'request_header_max_size'= %ld bytes.\n",
+                   (long int) Config.maxRequestHeaderSize);
                err = errorCon(ERR_TOO_BIG, HTTP_REQUEST_ENTITY_TOO_LARGE);
                http = parseHttpRequestAbort(conn, "error:request-too-large");
                /* add to the client request queue */
index 7cc1d42102da6fe0d9f3c65bf6778670e15b25da..8fc67ddb810906701b344fa769662266298d3570 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: comm.cc,v 1.323 2001/10/19 22:34:49 hno Exp $
+ * $Id: comm.cc,v 1.324 2001/10/24 07:45:34 hno Exp $
  *
  * DEBUG: section 5     Socket Functions
  * AUTHOR: Harvest Derived
@@ -865,8 +865,8 @@ commHandleWrite(int fd, void *data)
     int len = 0;
     int nleft;
 
-    debug(5, 5) ("commHandleWrite: FD %d: off %d, sz %d.\n",
-       fd, (int) state->offset, state->size);
+    debug(5, 5) ("commHandleWrite: FD %d: off %ld, sz %ld.\n",
+       fd, (long int) state->offset, (long int) state->size);
 
     nleft = state->size - state->offset;
     len = FD_WRITE_METHOD(fd, state->buf + state->offset, nleft);
index 2e7427656036e07527c9f8d04d91383b9a30563e..91a74ce8b663b4e5aa90db7bc2257b41161c61fe 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: dns_internal.cc,v 1.43 2001/10/24 06:16:16 hno Exp $
+ * $Id: dns_internal.cc,v 1.44 2001/10/24 07:45:34 hno Exp $
  *
  * DEBUG: section 78    DNS lookups; interacts with lib/rfc1035.c
  * AUTHOR: Duane Wessels
@@ -335,7 +335,7 @@ idnsStats(StoreEntry * sentry)
     for (n = lru_list.head; n; n = n->next) {
        q = n->data;
        storeAppendPrintf(sentry, "%#06x %4d %5d %10.3f %9.3f\n",
-           (int) q->id, q->sz, q->nsends,
+           (int) q->id, (int) q->sz, q->nsends,
            tvSubDsec(q->start_t, current_time),
            tvSubDsec(q->sent_t, current_time));
     }
@@ -520,7 +520,7 @@ idnsRead(int fd, void *data)
        (*N)++;
        debug(78, 3) ("idnsRead: FD %d: received %d bytes from %s.\n",
            fd,
-           len,
+           (int) len,
            inet_ntoa(from.sin_addr));
        ns = idnsFromKnownNameserver(&from);
        if (ns >= 0) {
index 3c13005ff629cf07afae5d845e310f580692a59f..a459de376e8f31a0fb117be65dfd23e5bebdeaf3 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: errorpage.cc,v 1.166 2001/08/29 14:57:34 robertc Exp $
+ * $Id: errorpage.cc,v 1.167 2001/10/24 07:45:34 hno Exp $
  *
  * DEBUG: section 4     Error Generation
  * AUTHOR: Duane Wessels
@@ -345,7 +345,7 @@ static void
 errorSendComplete(int fd, char *bufnotused, size_t size, int errflag, void *data)
 {
     ErrorState *err = data;
-    debug(4, 3) ("errorSendComplete: FD %d, size=%d\n", fd, size);
+    debug(4, 3) ("errorSendComplete: FD %d, size=%ld\n", fd, (long int) size);
     if (errflag != COMM_ERR_CLOSING) {
        if (err->callback) {
            debug(4, 3) ("errorSendComplete: callback\n");
index 01b7704cf7bd3ceabaadb74f649ed6758bf93cc1..9ed083dc561ec472f3da2dd6a338d784ea3c75e9 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: filemap.cc,v 1.38 2001/01/12 00:37:17 wessels Exp $
+ * $Id: filemap.cc,v 1.39 2001/10/24 07:45:34 hno Exp $
  *
  * DEBUG: section 8     Swap File Bitmap
  * AUTHOR: Harvest Derived
@@ -63,7 +63,7 @@ file_map_create(void)
     fm->nwords = fm->max_n_files >> LONG_BIT_SHIFT;
     debug(8, 3) ("file_map_create: creating space for %d files\n", fm->max_n_files);
     debug(8, 5) ("--> %d words of %d bytes each\n",
-       fm->nwords, sizeof(*fm->file_map));
+       fm->nwords, (int) sizeof(*fm->file_map));
     fm->file_map = xcalloc(fm->nwords, sizeof(*fm->file_map));
     /* XXX account fm->file_map */
     return fm;
index 28bd3a087c4f345f49dcdf30e3680405d96d0297..8d436669bfc14460370c4dbe57b16f389f575f7f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_aufs.cc,v 1.38 2001/10/17 15:00:54 hno Exp $
+ * $Id: store_dir_aufs.cc,v 1.39 2001/10/24 07:45:37 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -471,8 +471,8 @@ storeAufsDirRebuildFromDirectory(void *data)
        } else if (tmpe.swap_file_sz == sb.st_size - swap_hdr_len) {
            tmpe.swap_file_sz = sb.st_size;
        } else if (tmpe.swap_file_sz != sb.st_size) {
-           debug(20, 1) ("storeAufsDirRebuildFromDirectory: SIZE MISMATCH %d!=%d\n",
-               tmpe.swap_file_sz, (int) sb.st_size);
+           debug(20, 1) ("storeAufsDirRebuildFromDirectory: SIZE MISMATCH %ld!=%ld\n",
+               (long int) tmpe.swap_file_sz, (long int) sb.st_size);
            storeAufsDirUnlinkFile(SD, filn);
            continue;
        }
@@ -687,7 +687,7 @@ storeAufsDirRebuildFromSwapLog(void *data)
 }
 
 static int
-storeAufsDirGetNextFile(RebuildState * rb, sfileno *filn_p, int *size)
+storeAufsDirGetNextFile(RebuildState * rb, sfileno * filn_p, int *size)
 {
     SwapDir *SD = rb->sd;
     squidaioinfo_t *aioinfo = (squidaioinfo_t *) SD->fsdata;
@@ -1604,8 +1604,8 @@ storeAufsCleanupDoubleCheck(SwapDir * sd, StoreEntry * e)
        debug(20, 0) ("storeAufsCleanupDoubleCheck: FILENO %08X\n", e->swap_filen);
        debug(20, 0) ("storeAufsCleanupDoubleCheck: PATH %s\n",
            storeAufsDirFullPath(sd, e->swap_filen, NULL));
-       debug(20, 0) ("storeAufsCleanupDoubleCheck: ENTRY SIZE: %d, FILE SIZE: %d\n",
-           e->swap_file_sz, (int) sb.st_size);
+       debug(20, 0) ("storeAufsCleanupDoubleCheck: ENTRY SIZE: %ld, FILE SIZE: %ld\n",
+           (long int) e->swap_file_sz, (long int) sb.st_size);
        storeEntryDump(e, 0);
        return -1;
     }
index 9a7dec0337ef5f53da9dbd18f244ef33b1952c24..eaacb0c4526d473a484f059df69587291c884e5d 100644 (file)
@@ -248,8 +248,8 @@ storeAufsKickWriteQueue(storeIOState * sio)
     struct _queued_write *q = linklistShift(&aiostate->pending_writes);
     if (NULL == q)
        return 0;
-    debug(78, 3) ("storeAufsKickWriteQueue: writing queued chunk of %d bytes\n",
-       q->size);
+    debug(78, 3) ("storeAufsKickWriteQueue: writing queued chunk of %ld bytes\n",
+       (long int) q->size);
     storeAufsWrite(INDEXSD(sio->swap_dirn), sio, q->buf, q->size, q->offset, q->free_func);
     memPoolFree(aufs_qwrite_pool, q);
     return 1;
@@ -262,8 +262,8 @@ storeAufsKickReadQueue(storeIOState * sio)
     struct _queued_read *q = linklistShift(&(aiostate->pending_reads));
     if (NULL == q)
        return 0;
-    debug(78, 3) ("storeAufsKickReadQueue: reading queued request of %d bytes\n",
-       q->size);
+    debug(78, 3) ("storeAufsKickReadQueue: reading queued request of %ld bytes\n",
+       (long int) q->size);
     storeAufsRead(INDEXSD(sio->swap_dirn), sio, q->buf, q->size, q->offset, q->callback, q->callback_data);
     memPoolFree(aufs_qread_pool, q);
     return 1;
@@ -354,8 +354,8 @@ storeAufsWriteDone(int fd, int errflag, size_t len, void *my_data)
     static int loop_detect = 0;
     storeIOState *sio = my_data;
     squidaiostate_t *aiostate = (squidaiostate_t *) sio->fsstate;
-    debug(78, 3) ("storeAufsWriteDone: dirno %d, fileno %08X, FD %d, len %d, err=%d\n",
-       sio->swap_dirn, sio->swap_filen, fd, len, errflag);
+    debug(78, 3) ("storeAufsWriteDone: dirno %d, fileno %08X, FD %d, len %ld, err=%d\n",
+       sio->swap_dirn, sio->swap_filen, fd, (long int) len, errflag);
 #if ASYNC_WRITE
     /* Translate from errno to Squid disk error */
     errno = errflag;
index 0675aeebf8085ed74038e8de38eb8f761ca31b09..04bceb1cbe941bc7be2fbb95aeebf0697b22dfaa 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_coss.cc,v 1.12 2001/10/24 05:26:22 hno Exp $
+ * $Id: store_io_coss.cc,v 1.13 2001/10/24 07:45:37 hno Exp $
  *
  * DEBUG: section 81    Storage Manager COSS Interface
  * AUTHOR: Eric Stern
@@ -109,8 +109,8 @@ storeCossAllocate(SwapDir * SD, const StoreEntry * e, int which)
         */
        cs->current_membuf->flags.full = 1;
        cs->current_offset = cs->current_membuf->diskend + 1;
-       debug(81, 2) ("storeCossAllocate: New offset - %d\n",
-           cs->current_offset);
+       debug(81, 2) ("storeCossAllocate: New offset - %ld\n",
+           (long int) cs->current_offset);
        newmb = storeCossCreateMemBuf(SD, cs->current_offset, checkf, &coll);
        cs->current_membuf = newmb;
     }
@@ -159,7 +159,7 @@ storeCossCreate(SwapDir * SD, StoreEntry * e, STFNCB * file_callback, STIOCB * c
     sio->st_size = objectLen(e) + e->mem_obj->swap_hdr_sz;
     sio->swap_dirn = SD->index;
     sio->swap_filen = storeCossAllocate(SD, e, COSS_ALLOC_ALLOCATE);
-    debug(81, 3) ("storeCossCreate: offset %d, size %d, end %d\n", sio->swap_filen, sio->st_size, sio->swap_filen + sio->st_size);
+    debug(81, 3) ("storeCossCreate: offset %d, size %ld, end %ld\n", sio->swap_filen, (long int) sio->st_size, (long int) (sio->swap_filen + sio->st_size));
 
     sio->callback = callback;
     sio->file_callback = file_callback;
@@ -282,7 +282,7 @@ storeCossRead(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t of
     assert(sio->read.callback_data == NULL);
     sio->read.callback = callback;
     sio->read.callback_data = callback_data;
-    debug(81, 3) ("storeCossRead: offset %ld\n", (long int)offset);
+    debug(81, 3) ("storeCossRead: offset %ld\n", (long int) offset);
     sio->offset = offset;
     cstate->flags.reading = 1;
     if ((offset + size) > sio->st_size)
@@ -322,7 +322,7 @@ storeCossWrite(SwapDir * SD, storeIOState * sio, char *buf, size_t size, off_t o
      */
     assert(sio->e->mem_obj->object_sz != -1);
 
-    debug(81, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int)sio->offset, (unsigned long int)size);
+    debug(81, 3) ("storeCossWrite: offset %ld, len %lu\n", (long int) sio->offset, (unsigned long int) size);
     diskoffset = sio->swap_filen + sio->offset;
     dest = storeCossMemPointerFromDiskOffset(SD, diskoffset, &membuf);
     assert(dest != NULL);
@@ -476,8 +476,8 @@ static void
 storeCossWriteMemBuf(SwapDir * SD, CossMemBuf * t)
 {
     CossInfo *cs = (CossInfo *) SD->fsdata;
-    debug(81, 3) ("storeCossWriteMemBuf: offset %d, len %d\n",
-       t->diskstart, t->diskend - t->diskstart);
+    debug(81, 3) ("storeCossWriteMemBuf: offset %ld, len %ld\n",
+       (long int) t->diskstart, (long int) (t->diskend - t->diskstart));
     t->flags.writing = 1;
     /* Remember that diskstart/diskend are block offsets! */
     a_file_write(&cs->aq, cs->fd, t->diskstart, &t->buffer,
@@ -491,7 +491,7 @@ storeCossWriteMemBufDone(int fd, int errflag, size_t len, void *my_data)
     CossMemBuf *t = my_data;
     CossInfo *cs = (CossInfo *) t->SD->fsdata;
 
-    debug(81, 3) ("storeCossWriteMemBufDone: buf %p, len %ld\n", t, (long int)len);
+    debug(81, 3) ("storeCossWriteMemBufDone: buf %p, len %ld\n", t, (long int) len);
     if (errflag)
        debug(81, 0) ("storeCossMemBufWriteDone: got failure (%d)\n", errflag);
 
@@ -512,7 +512,7 @@ storeCossCreateMemBuf(SwapDir * SD, size_t start,
     CBDATA_INIT_TYPE_FREECB(CossMemBuf, NULL);
     newmb = cbdataAlloc(CossMemBuf);
     newmb->diskstart = start;
-    debug(81, 3) ("storeCossCreateMemBuf: creating new membuf at %d\n", newmb->diskstart);
+    debug(81, 3) ("storeCossCreateMemBuf: creating new membuf at %ld\n", (long int) newmb->diskstart);
     debug(81, 3) ("storeCossCreateMemBuf: at %p\n", newmb);
     newmb->diskend = newmb->diskstart + COSS_MEMBUF_SZ - 1;
     newmb->flags.full = 0;
@@ -525,7 +525,7 @@ storeCossCreateMemBuf(SwapDir * SD, size_t start,
     /* Print out the list of membufs */
     for (m = cs->membufs.head; m; m = m->next) {
        t = m->data;
-       debug(81, 3) ("storeCossCreateMemBuf: membuflist %d lockcount %d\n", t->diskstart, t->lockcount);
+       debug(81, 3) ("storeCossCreateMemBuf: membuflist %ld lockcount %d\n", (long int) t->diskstart, t->lockcount);
     }
 
     /*
index 839c8574aad5418de93b2c392e7719b40f33eede..b1fb78a18df61b0e77af09f4f373ae8bf3878229 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_diskd.cc,v 1.56 2001/10/17 19:33:06 hno Exp $
+ * $Id: store_dir_diskd.cc,v 1.57 2001/10/24 07:45:38 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -636,8 +636,8 @@ storeDiskdDirRebuildFromDirectory(void *data)
        } else if (tmpe.swap_file_sz == sb.st_size - swap_hdr_len) {
            tmpe.swap_file_sz = sb.st_size;
        } else if (tmpe.swap_file_sz != sb.st_size) {
-           debug(20, 1) ("storeDiskdDirRebuildFromDirectory: SIZE MISMATCH %d!=%d\n",
-               tmpe.swap_file_sz, (int) sb.st_size);
+           debug(20, 1) ("storeDiskdDirRebuildFromDirectory: SIZE MISMATCH %ld!=%ld\n",
+               (long int) tmpe.swap_file_sz, (long int) sb.st_size);
            storeDiskdDirUnlinkFile(SD, filn);
            continue;
        }
@@ -877,7 +877,7 @@ storeDiskdDirRebuildFromSwapLog(void *data)
 }
 
 static int
-storeDiskdDirGetNextFile(RebuildState * rb, sfileno *filn_p, int *size)
+storeDiskdDirGetNextFile(RebuildState * rb, sfileno * filn_p, int *size)
 {
     SwapDir *SD = rb->sd;
     diskdinfo_t *diskdinfo = SD->fsdata;
@@ -1863,8 +1863,8 @@ storeDiskdCleanupDoubleCheck(SwapDir * sd, StoreEntry * e)
        debug(20, 0) ("storeDiskdCleanupDoubleCheck: FILENO %08X\n", e->swap_filen);
        debug(20, 0) ("storeDiskdCleanupDoubleCheck: PATH %s\n",
            storeDiskdDirFullPath(sd, e->swap_filen, NULL));
-       debug(20, 0) ("storeDiskdCleanupDoubleCheck: ENTRY SIZE: %d, FILE SIZE: %d\n",
-           e->swap_file_sz, (int) sb.st_size);
+       debug(20, 0) ("storeDiskdCleanupDoubleCheck: ENTRY SIZE: %ld, FILE SIZE: %ld\n",
+           (long int) e->swap_file_sz, (long int) sb.st_size);
        storeEntryDump(e, 0);
        return -1;
     }
index 4b552466d1a0d499a7d484a6388903b769620ebc..5511aaa52718606eee4488b112b520189f70055e 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_dir_ufs.cc,v 1.37 2001/10/24 06:55:45 hno Exp $
+ * $Id: store_dir_ufs.cc,v 1.38 2001/10/24 07:45:38 hno Exp $
  *
  * DEBUG: section 47    Store Directory Routines
  * AUTHOR: Duane Wessels
@@ -471,7 +471,7 @@ storeUfsDirRebuildFromDirectory(void *data)
            tmpe.swap_file_sz = sb.st_size;
        } else if (tmpe.swap_file_sz != sb.st_size) {
            debug(20, 1) ("storeUfsDirRebuildFromDirectory: SIZE MISMATCH %ld!=%ld\n",
-               (long int)tmpe.swap_file_sz, (long int) sb.st_size);
+               (long int) tmpe.swap_file_sz, (long int) sb.st_size);
            storeUfsDirUnlinkFile(SD, filn);
            continue;
        }
@@ -686,7 +686,7 @@ storeUfsDirRebuildFromSwapLog(void *data)
 }
 
 static int
-storeUfsDirGetNextFile(RebuildState * rb, sfileno *filn_p, int *size)
+storeUfsDirGetNextFile(RebuildState * rb, sfileno * filn_p, int *size)
 {
     SwapDir *SD = rb->sd;
     ufsinfo_t *ufsinfo = (ufsinfo_t *) SD->fsdata;
@@ -1588,7 +1588,7 @@ storeUfsCleanupDoubleCheck(SwapDir * sd, StoreEntry * e)
        debug(20, 0) ("storeUfsCleanupDoubleCheck: PATH %s\n",
            storeUfsDirFullPath(sd, e->swap_filen, NULL));
        debug(20, 0) ("storeUfsCleanupDoubleCheck: ENTRY SIZE: %ld, FILE SIZE: %ld\n",
-           (long int)e->swap_file_sz, (long int) sb.st_size);
+           (long int) e->swap_file_sz, (long int) sb.st_size);
        storeEntryDump(e, 0);
        return -1;
     }
index 704316cb1387114c8489cc1027e2ea77288b7df6..1ae035da8f7cec70a7e68e8bb2cad72aaf4c321b 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: store_io_ufs.cc,v 1.8 2001/10/24 06:55:45 hno Exp $
+ * $Id: store_io_ufs.cc,v 1.9 2001/10/24 07:45:38 hno Exp $
  *
  * DEBUG: section 79    Storage Manager UFS Interface
  * AUTHOR: Duane Wessels
@@ -228,7 +228,7 @@ storeUfsWriteDone(int fd, int errflag, size_t len, void *my_data)
     storeIOState *sio = my_data;
     ufsstate_t *ufsstate = (ufsstate_t *) sio->fsstate;
     debug(79, 3) ("storeUfsWriteDone: dirno %d, fileno %08X, FD %d, len %ld\n",
-       sio->swap_dirn, sio->swap_filen, fd, (long int)len);
+       sio->swap_dirn, sio->swap_filen, fd, (long int) len);
     ufsstate->flags.writing = 0;
     if (errflag) {
        debug(79, 0) ("storeUfsWriteDone: got failure (%d)\n", errflag);
index c4b32bc271c3e7f6fbb43ecbe35bd8dc9b9e7d29..76c1876e46ec59192508dd10f638a06fd21ebe15 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: ftp.cc,v 1.314 2001/10/24 06:16:16 hno Exp $
+ * $Id: ftp.cc,v 1.315 2001/10/24 07:45:34 hno Exp $
  *
  * DEBUG: section 9     File Transfer Protocol (FTP)
  * AUTHOR: Harvest Derived
@@ -799,7 +799,7 @@ ftpParseListing(FtpStateData * ftpState)
     while (*end != '\r' && *end != '\n' && end > sbuf)
        end--;
     usable = end - sbuf;
-    debug(9, 3) ("ftpParseListing: usable = %d\n", usable);
+    debug(9, 3) ("ftpParseListing: usable = %d\n", (int) usable);
     if (usable == 0) {
        debug(9, 3) ("ftpParseListing: didn't find end for %s\n", storeUrl(e));
        xfree(sbuf);
@@ -1126,7 +1126,7 @@ static void
 ftpWriteCommandCallback(int fd, char *bufnotused, size_t size, int errflag, void *data)
 {
     FtpStateData *ftpState = data;
-    debug(9, 7) ("ftpWriteCommandCallback: wrote %d bytes\n", size);
+    debug(9, 7) ("ftpWriteCommandCallback: wrote %d bytes\n", (int) size);
     if (size > 0) {
        fd_bytes(fd, size, FD_WRITE);
        kb_incr(&statCounter.server.all.kbytes_out, size);
@@ -1172,7 +1172,7 @@ ftpParseControlReply(char *buf, size_t len, int *codep, int *used)
        safe_free(sbuf);
        return NULL;
     }
-    debug(9, 3) ("ftpParseControlReply: %d bytes to play with\n", len);
+    debug(9, 3) ("ftpParseControlReply: %d bytes to play with\n", (int) len);
     end++;
     s = sbuf;
     s += strspn(s, crlf);
@@ -2189,7 +2189,7 @@ static void
 ftpRequestBody(char *buf, size_t size, void *data)
 {
     FtpStateData *ftpState = (FtpStateData *) data;
-    debug(9, 3) ("ftpRequestBody: buf=%p size=%d ftpState=%p\n", buf, size, data);
+    debug(9, 3) ("ftpRequestBody: buf=%p size=%d ftpState=%p\n", buf, (int) size, data);
     ftpState->data.offset = size;
     if (size > 0) {
        /* DataWrite */
index 7bfe50a615947a6b4c137ff1768f11a1207e0917..16b032678ec13af0477f1423775ac95056740354 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: gopher.cc,v 1.161 2001/04/14 00:03:22 hno Exp $
+ * $Id: gopher.cc,v 1.162 2001/10/24 07:45:35 hno Exp $
  *
  * DEBUG: section 10    Gopher
  * AUTHOR: Harvest Derived
@@ -682,7 +682,7 @@ gopherSendComplete(int fd, char *buf, size_t size, int errflag, void *data)
     GopherStateData *gopherState = (GopherStateData *) data;
     StoreEntry *entry = gopherState->entry;
     debug(10, 5) ("gopherSendComplete: FD %d size: %d errflag: %d\n",
-       fd, size, errflag);
+       fd, (int) size, errflag);
     if (size > 0) {
        fd_bytes(fd, size, FD_WRITE);
        kb_incr(&statCounter.server.all.kbytes_out, size);
index 67c3e90047d142cfcf41b6d60bbeb011a001536d..ac7d4fb60789874b152d2624c327aeecb7f51a1f 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: helper.cc,v 1.32 2001/10/24 06:16:16 hno Exp $
+ * $Id: helper.cc,v 1.33 2001/10/24 07:45:35 hno Exp $
  *
  * DEBUG: section 29    Helper process maintenance
  * AUTHOR: Harvest Derived?
@@ -482,7 +482,7 @@ helperStatefulStats(StoreEntry * sentry, statefulhelper * hlp)
            srv->rfd,
            srv->pid,
            srv->stats.uses,
-           srv->deferred_requests,
+           (int) srv->deferred_requests,
            srv->flags.alive ? 'A' : ' ',
            srv->flags.busy ? 'B' : ' ',
            srv->flags.closing ? 'C' : ' ',
@@ -1014,7 +1014,7 @@ helperDispatch(helper_server * srv, helper_request * r)
        helperHandleRead,
        srv, 0);
     debug(29, 5) ("helperDispatch: Request sent to %s #%d, %d bytes\n",
-       hlp->id_name, srv->index + 1, strlen(r->buf));
+       hlp->id_name, srv->index + 1, (int) strlen(r->buf));
     srv->stats.uses++;
     hlp->stats.requests++;
 }
@@ -1067,7 +1067,7 @@ helperStatefulDispatch(helper_stateful_server * srv, helper_stateful_request * r
        helperStatefulHandleRead,
        srv, 0);
     debug(29, 5) ("helperStatefulDispatch: Request sent to %s #%d, %d bytes\n",
-       hlp->id_name, srv->index + 1, strlen(r->buf));
+       hlp->id_name, srv->index + 1, (int) strlen(r->buf));
     srv->stats.uses++;
     hlp->stats.requests++;
 }
index 6f2a1ee7b42bdb8b3e638a2d01b83d0f68eef377..8bf225269df2b80878bd7b704ebe45a730d0bcb8 100644 (file)
@@ -1,6 +1,6 @@
 
 /*
- * $Id: structs.h,v 1.406 2001/10/19 22:34:49 hno Exp $
+ * $Id: structs.h,v 1.407 2001/10/24 07:45:35 hno Exp $
  *
  *
  * SQUID Web Proxy Cache          http://www.squid-cache.org/
@@ -2081,7 +2081,7 @@ struct _helper_stateful_server {
        int deferbyfunc;
        int deferbycb;
     } stats;
-    size_t deferred_requests;  /* current number of deferred requests */
+    int deferred_requests;     /* current number of deferred requests */
     void *data;                        /* State data used by the calling routines */
 };