Fix build with GCC 4.7 (and probably other C++11 compilers). C++11 introduced user-defined literals, it breaks some code which was valid before. In particular, whitespace is now needed after a string literal and before something that could be a valid user-defined literal. See "User-defined literals and whitespace" section at [1] for more details. There are many such cases in Squid, e.g.: outputBuffer.Printf("%"PRIu64"<=%"PRIu64, theGetSize, thePutSize); Which results in errors when building with GCC 4.7: error: unable to find string literal operator 'operator"" PRIu64' The patch adds spaces between string literals and macros. [1] http://gcc.gnu.org/gcc-4.7/porting_to.html === modified file 'src/BodyPipe.cc' --- src/BodyPipe.cc 2012-03-07 01:32:25 +0000 +++ src/BodyPipe.cc 2012-06-20 09:37:17 +0000 @@ -430,43 +430,43 @@ BodyPipe::scheduleBodyEndNotification() &BodyConsumer::noteBodyProductionEnded, this)); ScheduleCallHere(call); } else { AsyncCall::Pointer call = asyncCall(91, 7, "BodyConsumer::noteBodyProducerAborted", BodyConsumerDialer(theConsumer, &BodyConsumer::noteBodyProducerAborted, this)); ScheduleCallHere(call); } } } // a short temporary string describing buffer status for debugging const char *BodyPipe::status() const { static MemBuf outputBuffer; outputBuffer.reset(); outputBuffer.append(" [", 2); - outputBuffer.Printf("%"PRIu64"<=%"PRIu64, theGetSize, thePutSize); + outputBuffer.Printf("%" PRIu64 "<=%" PRIu64, theGetSize, thePutSize); if (theBodySize >= 0) - outputBuffer.Printf("<=%"PRId64, theBodySize); + outputBuffer.Printf("<=%" PRId64, theBodySize); else outputBuffer.append("<=?", 3); outputBuffer.Printf(" %d+%d", (int)theBuf.contentSize(), (int)theBuf.spaceSize()); outputBuffer.Printf(" pipe%p", this); if (theProducer.set()) outputBuffer.Printf(" prod%p", theProducer.get()); if (theConsumer.set()) outputBuffer.Printf(" cons%p", theConsumer.get()); if (mustAutoConsume) outputBuffer.append(" A", 2); if (abortedConsumption) outputBuffer.append(" !C", 3); if (isCheckedOut) outputBuffer.append(" L", 2); // Locked outputBuffer.append("]", 1); === modified file 'src/ClientDelayConfig.cc' --- src/ClientDelayConfig.cc 2012-01-20 18:55:04 +0000 +++ src/ClientDelayConfig.cc 2012-06-20 09:44:40 +0000 @@ -1,35 +1,35 @@ #include "squid.h" #include "squid-old.h" #include "ConfigParser.h" #include "ClientDelayConfig.h" #include "Parsing.h" #include "Store.h" #include "acl/Acl.h" #include "acl/Gadgets.h" void ClientDelayPool::dump(StoreEntry * entry, unsigned int poolNumberMinusOne) const { LOCAL_ARRAY(char, nom, 32); snprintf(nom, 32, "client_delay_access %d", poolNumberMinusOne + 1); dump_acl_access(entry, nom, access); - storeAppendPrintf(entry, "client_delay_parameters %d %d %"PRId64"\n", poolNumberMinusOne + 1, rate,highwatermark); + storeAppendPrintf(entry, "client_delay_parameters %d %d %" PRId64 "\n", poolNumberMinusOne + 1, rate,highwatermark); storeAppendPrintf(entry, "\n"); } void ClientDelayConfig::finalize() { for (unsigned int i = 0; i < pools.size(); ++i) { /* pools require explicit 'allow' to assign a client into them */ if (!pools[i].access) { debugs(77, DBG_IMPORTANT, "client_delay_pool #" << (i+1) << " has no client_delay_access configured. " << "No client will ever use it."); } } } void ClientDelayConfig::freePoolCount() { pools.clean(); } === modified file 'src/DelaySpec.cc' --- src/DelaySpec.cc 2012-01-20 18:55:04 +0000 +++ src/DelaySpec.cc 2012-06-20 09:45:00 +0000 @@ -40,48 +40,48 @@ #include "squid.h" #if USE_DELAY_POOLS #include "squid-old.h" #include "DelaySpec.h" #include "Store.h" #include "Parsing.h" DelaySpec::DelaySpec() : restore_bps(-1), max_bytes (-1) {} void DelaySpec::stats (StoreEntry * sentry, char const *label) const { if (restore_bps == -1) { storeAppendPrintf(sentry, "\t%s:\n\t\tDisabled.\n\n", label); return; } storeAppendPrintf(sentry, "\t%s:\n", label); - storeAppendPrintf(sentry, "\t\tMax: %"PRId64"\n", max_bytes); + storeAppendPrintf(sentry, "\t\tMax: %" PRId64 "\n", max_bytes); storeAppendPrintf(sentry, "\t\tRestore: %d\n", restore_bps); } void DelaySpec::dump (StoreEntry *entry) const { - storeAppendPrintf(entry, " %d/%"PRId64"", restore_bps, max_bytes); + storeAppendPrintf(entry, " %d/%" PRId64 "", restore_bps, max_bytes); } void DelaySpec::parse() { int r; char *token; token = strtok(NULL, "/"); if (token == NULL) self_destruct(); if (sscanf(token, "%d", &r) != 1) self_destruct(); restore_bps = r; max_bytes = GetInteger64(); } === modified file 'src/DiskIO/DiskDaemon/diskd.cc' --- src/DiskIO/DiskDaemon/diskd.cc 2012-01-20 18:55:04 +0000 +++ src/DiskIO/DiskDaemon/diskd.cc 2012-06-20 09:35:36 +0000 @@ -139,99 +139,99 @@ do_close(diomsg * r, int len) static int do_read(diomsg * r, int len, char *buf) { int x; int readlen = r->size; file_state *fs; fs = (file_state *) hash_lookup(hash, &r->id); if (NULL == fs) { errno = EBADF; DEBUG(1) { fprintf(stderr, "%d READ id %d: ", (int) mypid, r->id); perror("do_read"); } return -errno; } if (r->offset > -1 && r->offset != fs->offset) { DEBUG(2) { - fprintf(stderr, "seeking to %"PRId64"\n", (int64_t)r->offset); + fprintf(stderr, "seeking to %" PRId64 "\n", (int64_t)r->offset); } if (lseek(fs->fd, r->offset, SEEK_SET) < 0) { DEBUG(1) { - fprintf(stderr, "%d FD %d, offset %"PRId64": ", (int) mypid, fs->fd, (int64_t)r->offset); + fprintf(stderr, "%d FD %d, offset %" PRId64 ": ", (int) mypid, fs->fd, (int64_t)r->offset); perror("lseek"); } } } x = read(fs->fd, buf, readlen); DEBUG(2) { - fprintf(stderr, "%d READ %d,%d,%"PRId64" ret %d\n", (int) mypid, + fprintf(stderr, "%d READ %d,%d,%" PRId64 " ret %d\n", (int) mypid, fs->fd, readlen, (int64_t)r->offset, x); } if (x < 0) { DEBUG(1) { fprintf(stderr, "%d FD %d: ", (int) mypid, fs->fd); perror("read"); } return -errno; } fs->offset = r->offset + x; return x; } static int do_write(diomsg * r, int len, const char *buf) { int wrtlen = r->size; int x; file_state *fs; fs = (file_state *) hash_lookup(hash, &r->id); if (NULL == fs) { errno = EBADF; DEBUG(1) { fprintf(stderr, "%d WRITE id %d: ", (int) mypid, r->id); perror("do_write"); } return -errno; } if (r->offset > -1 && r->offset != fs->offset) { if (lseek(fs->fd, r->offset, SEEK_SET) < 0) { DEBUG(1) { - fprintf(stderr, "%d FD %d, offset %"PRId64": ", (int) mypid, fs->fd, (int64_t)r->offset); + fprintf(stderr, "%d FD %d, offset %" PRId64 ": ", (int) mypid, fs->fd, (int64_t)r->offset); perror("lseek"); } } } DEBUG(2) { - fprintf(stderr, "%d WRITE %d,%d,%"PRId64"\n", (int) mypid, + fprintf(stderr, "%d WRITE %d,%d,%" PRId64 "\n", (int) mypid, fs->fd, wrtlen, (int64_t)r->offset); } x = write(fs->fd, buf, wrtlen); if (x < 0) { DEBUG(1) { fprintf(stderr, "%d FD %d: ", (int) mypid, fs->fd); perror("write"); } return -errno; } fs->offset = r->offset + x; return x; } static int do_unlink(diomsg * r, int len, const char *buf) { === modified file 'src/HttpHdrContRange.cc' --- src/HttpHdrContRange.cc 2012-01-20 18:55:04 +0000 +++ src/HttpHdrContRange.cc 2012-06-20 09:39:30 +0000 @@ -112,41 +112,41 @@ httpHdrRangeRespSpecParseInit(HttpHdrRan /* we managed to parse, check if the result makes sence */ if (spec->length <= 0) { debugs(68, 2, "invalid range (" << spec->offset << " += " << (long int) spec->length << ") in resp-range-spec near: '" << field << "'"); return 0; } return 1; } static void httpHdrRangeRespSpecPackInto(const HttpHdrRangeSpec * spec, Packer * p) { /* Ensure typecast is safe */ assert (spec->length >= 0); if (!known_spec(spec->offset) || !known_spec(spec->length)) packerPrintf(p, "*"); else - packerPrintf(p, "bytes %"PRId64"-%"PRId64, + packerPrintf(p, "bytes %" PRId64 "-%" PRId64, spec->offset, spec->offset + spec->length - 1); } /* * Content Range */ HttpHdrContRange * httpHdrContRangeCreate(void) { HttpHdrContRange *r = (HttpHdrContRange *)memAllocate(MEM_HTTP_HDR_CONTENT_RANGE); r->spec.offset = r->spec.length = range_spec_unknown; r->elength = range_spec_unknown; return r; } HttpHdrContRange * httpHdrContRangeParseCreate(const char *str) { HttpHdrContRange *r = httpHdrContRangeCreate(); @@ -216,30 +216,30 @@ HttpHdrContRange * httpHdrContRangeDup(const HttpHdrContRange * range) { HttpHdrContRange *dup; assert(range); dup = httpHdrContRangeCreate(); *dup = *range; return dup; } void httpHdrContRangePackInto(const HttpHdrContRange * range, Packer * p) { assert(range && p); httpHdrRangeRespSpecPackInto(&range->spec, p); /* Ensure typecast is safe */ assert (range->elength >= 0); if (!known_spec(range->elength)) packerPrintf(p, "/*"); else - packerPrintf(p, "/%"PRId64, range->elength); + packerPrintf(p, "/%" PRId64, range->elength); } void httpHdrContRangeSet(HttpHdrContRange * cr, HttpHdrRangeSpec spec, int64_t ent_len) { assert(cr && ent_len >= 0); cr->spec = spec; cr->elength = ent_len; } === modified file 'src/HttpHdrRange.cc' --- src/HttpHdrRange.cc 2012-01-20 18:55:04 +0000 +++ src/HttpHdrRange.cc 2012-06-20 09:38:57 +0000 @@ -115,45 +115,45 @@ HttpHdrRangeSpec::parseInit(const char * // RFC 2616 s14.35.1 MUST: last-byte-pos >= first-byte-pos if (last_pos < offset) { debugs(64, 2, "invalid (last-byte-pos < first-byte-pos) range-spec near: " << field); return false; } HttpHdrRangeSpec::HttpRange aSpec (offset, last_pos + 1); length = aSpec.size(); } } return true; } void HttpHdrRangeSpec::packInto(Packer * packer) const { if (!known_spec(offset)) /* suffix */ - packerPrintf(packer, "-%"PRId64, length); + packerPrintf(packer, "-%" PRId64, length); else if (!known_spec(length)) /* trailer */ - packerPrintf(packer, "%"PRId64"-", offset); + packerPrintf(packer, "%" PRId64 "-", offset); else /* range */ - packerPrintf(packer, "%"PRId64"-%"PRId64, + packerPrintf(packer, "%" PRId64 "-%" PRId64, offset, offset + length - 1); } void HttpHdrRangeSpec::outputInfo( char const *note) const { debugs(64, 5, "HttpHdrRangeSpec::canonize: " << note << ": [" << offset << ", " << offset + length << ") len: " << length); } /* fills "absent" positions in range specification based on response body size * returns true if the range is still valid * range is valid if its intersection with [0,length-1] is not empty */ int HttpHdrRangeSpec::canonize(int64_t clen) { outputInfo ("have"); HttpRange object(0, clen); === modified file 'src/MemObject.cc' --- src/MemObject.cc 2012-06-18 23:13:05 +0000 +++ src/MemObject.cc 2012-06-20 09:40:12 +0000 @@ -208,47 +208,47 @@ struct LowestMemReader : public unary_fu }; struct StoreClientStats : public unary_function { StoreClientStats(MemBuf *anEntry):where(anEntry),index(0) {} void operator()(store_client const &x) { x.dumpStats(where, index++); } MemBuf *where; size_t index; }; void MemObject::stat(MemBuf * mb) const { mb->Printf("\t%s %s\n", RequestMethodStr(method), log_url); if (vary_headers) mb->Printf("\tvary_headers: %s\n", vary_headers); - mb->Printf("\tinmem_lo: %"PRId64"\n", inmem_lo); - mb->Printf("\tinmem_hi: %"PRId64"\n", data_hdr.endOffset()); - mb->Printf("\tswapout: %"PRId64" bytes queued\n", + mb->Printf("\tinmem_lo: %" PRId64 "\n", inmem_lo); + mb->Printf("\tinmem_hi: %" PRId64 "\n", data_hdr.endOffset()); + mb->Printf("\tswapout: %" PRId64 " bytes queued\n", swapout.queue_offset); if (swapout.sio.getRaw()) - mb->Printf("\tswapout: %"PRId64" bytes written\n", + mb->Printf("\tswapout: %" PRId64 " bytes written\n", (int64_t) swapout.sio->offset()); StoreClientStats statsVisitor(mb); for_each(clients, statsVisitor); } int64_t MemObject::endOffset () const { return data_hdr.endOffset(); } void MemObject::markEndOfReplyHeaders() { const int hdr_sz = endOffset(); assert(hdr_sz >= 0); assert(_reply); _reply->hdr_sz = hdr_sz; === modified file 'src/MemStore.cc' --- src/MemStore.cc 2012-02-10 00:32:44 +0000 +++ src/MemStore.cc 2012-06-20 09:43:15 +0000 @@ -59,41 +59,41 @@ MemStore::getStats(StoreInfoStats &stats stats.mem.shared = true; stats.mem.capacity = Ipc::Mem::PageLimit(Ipc::Mem::PageId::cachePage) * pageSize; stats.mem.size = Ipc::Mem::PageLevel(Ipc::Mem::PageId::cachePage) * pageSize; stats.mem.count = currentCount(); } void MemStore::stat(StoreEntry &e) const { storeAppendPrintf(&e, "\n\nShared Memory Cache\n"); storeAppendPrintf(&e, "Maximum Size: %.0f KB\n", Config.memMaxSize/1024.0); if (map) { const int limit = map->entryLimit(); storeAppendPrintf(&e, "Maximum entries: %9d\n", limit); if (limit > 0) { - storeAppendPrintf(&e, "Current entries: %"PRId64" %.2f%%\n", + storeAppendPrintf(&e, "Current entries: %" PRId64 " %.2f%%\n", currentCount(), (100.0 * currentCount() / limit)); if (limit < 100) { // XXX: otherwise too expensive to count Ipc::ReadWriteLockStats stats; map->updateStats(stats); stats.dump(e); } } } } void MemStore::maintain() { } uint64_t MemStore::minSize() const { return 0; // XXX: irrelevant, but Store parent forces us to implement this === modified file 'src/SwapDir.cc' --- src/SwapDir.cc 2012-01-20 18:55:04 +0000 +++ src/SwapDir.cc 2012-06-20 09:43:00 +0000 @@ -325,38 +325,38 @@ SwapDir::optionObjectSizeParse(char cons if (allowOptionReconfigure(option)) { debugs(3, DBG_IMPORTANT, "cache_dir '" << path << "' object " << option << " now " << size << " Bytes"); } else { debugs(3, DBG_IMPORTANT, "WARNING: cache_dir '" << path << "' " "object " << option << " cannot be changed dynamically, " << "value left unchanged (" << *val << " Bytes)"); return true; } } *val = size; return true; } void SwapDir::optionObjectSizeDump(StoreEntry * e) const { if (min_objsize != 0) - storeAppendPrintf(e, " min-size=%"PRId64, min_objsize); + storeAppendPrintf(e, " min-size=%" PRId64, min_objsize); if (max_objsize != -1) - storeAppendPrintf(e, " max-size=%"PRId64, max_objsize); + storeAppendPrintf(e, " max-size=%" PRId64, max_objsize); } // some SwapDirs may maintain their indexes and be able to lookup an entry key StoreEntry * SwapDir::get(const cache_key *key) { return NULL; } void SwapDir::get(String const key, STOREGETCLIENT aCallback, void *aCallbackData) { fatal("not implemented"); } === modified file 'src/cache_cf.cc' --- src/cache_cf.cc 2012-06-18 15:43:05 +0000 +++ src/cache_cf.cc 2012-06-20 09:36:18 +0000 @@ -3018,41 +3018,41 @@ dump_time_t(StoreEntry * entry, const ch void parse_time_t(time_t * var) { time_msec_t tval; parseTimeLine(&tval, T_SECOND_STR, false); *var = static_cast(tval/1000); } static void free_time_t(time_t * var) { *var = 0; } #if !USE_DNSHELPER static void dump_time_msec(StoreEntry * entry, const char *name, time_msec_t var) { if (var % 1000) - storeAppendPrintf(entry, "%s %"PRId64" milliseconds\n", name, var); + storeAppendPrintf(entry, "%s %" PRId64 " milliseconds\n", name, var); else storeAppendPrintf(entry, "%s %d seconds\n", name, (int)(var/1000) ); } void parse_time_msec(time_msec_t * var) { parseTimeLine(var, T_SECOND_STR, true); } static void free_time_msec(time_msec_t * var) { *var = 0; } #endif #if UNUSED_CODE static void dump_size_t(StoreEntry * entry, const char *name, size_t var) @@ -3069,47 +3069,47 @@ dump_b_size_t(StoreEntry * entry, const #if !USE_DNSHELPER static void dump_b_ssize_t(StoreEntry * entry, const char *name, ssize_t var) { storeAppendPrintf(entry, "%s %d %s\n", name, (int) var, B_BYTES_STR); } #endif #if UNUSED_CODE static void dump_kb_size_t(StoreEntry * entry, const char *name, size_t var) { storeAppendPrintf(entry, "%s %d %s\n", name, (int) var, B_KBYTES_STR); } #endif static void dump_b_int64_t(StoreEntry * entry, const char *name, int64_t var) { - storeAppendPrintf(entry, "%s %"PRId64" %s\n", name, var, B_BYTES_STR); + storeAppendPrintf(entry, "%s %" PRId64 " %s\n", name, var, B_BYTES_STR); } static void dump_kb_int64_t(StoreEntry * entry, const char *name, int64_t var) { - storeAppendPrintf(entry, "%s %"PRId64" %s\n", name, var, B_KBYTES_STR); + storeAppendPrintf(entry, "%s %" PRId64 " %s\n", name, var, B_KBYTES_STR); } #if UNUSED_CODE static void parse_size_t(size_t * var) { int i; i = GetInteger(); *var = (size_t) i; } #endif static void parse_b_size_t(size_t * var) { parseBytesLine(var, B_BYTES_STR); } #if !USE_DNSHELPER static void === modified file 'src/client_side.cc' --- src/client_side.cc 2012-06-18 15:43:05 +0000 +++ src/client_side.cc 2012-06-20 09:36:53 +0000 @@ -984,41 +984,41 @@ ClientSocketContext::sendBody(HttpReply if (mb.contentSize()) { /* write */ AsyncCall::Pointer call = commCbCall(33, 5, "clientWriteComplete", CommIoCbPtrFun(clientWriteComplete, this)); Comm::Write(clientConnection, &mb, call); } else writeComplete(clientConnection, NULL, 0, COMM_OK); } /** * Packs bodyData into mb using chunked encoding. Packs the last-chunk * if bodyData is empty. */ void ClientSocketContext::packChunk(const StoreIOBuffer &bodyData, MemBuf &mb) { const uint64_t length = static_cast(lengthToSend(bodyData.range())); noteSentBodyBytes(length); - mb.Printf("%"PRIX64"\r\n", length); + mb.Printf("%" PRIX64 "\r\n", length); mb.append(bodyData.data, length); mb.Printf("\r\n"); } /** put terminating boundary for multiparts */ static void clientPackTermBound(String boundary, MemBuf * mb) { mb->Printf("\r\n--" SQUIDSTRINGPH "--\r\n", SQUIDSTRINGPRINT(boundary)); debugs(33, 6, "clientPackTermBound: buf offset: " << mb->size); } /** appends a "part" HTTP header (as in a multi-part/range reply) to the buffer */ static void clientPackRangeHdr(const HttpReply * rep, const HttpHdrRangeSpec * spec, String boundary, MemBuf * mb) { HttpHeader hdr(hoReply); Packer p; assert(rep); assert(spec); === modified file 'src/fde.cc' --- src/fde.cc 2012-01-20 18:55:04 +0000 +++ src/fde.cc 2012-06-20 09:37:58 +0000 @@ -39,45 +39,45 @@ #include "Store.h" #include "comm.h" bool fde::readPending(int fdNumber) { if (type == FD_SOCKET) return comm_monitors_read(fdNumber); return read_handler ? true : false ; } void fde::dumpStats (StoreEntry &dumpEntry, int fdNumber) { if (!flags.open) return; #if _SQUID_MSWIN_ - storeAppendPrintf(&dumpEntry, "%4d 0x%-8lX %-6.6s %4d %7"PRId64"%c %7"PRId64"%c %-21s %s\n", + storeAppendPrintf(&dumpEntry, "%4d 0x%-8lX %-6.6s %4d %7" PRId64 "%c %7" PRId64 "%c %-21s %s\n", fdNumber, win32.handle, #else - storeAppendPrintf(&dumpEntry, "%4d %-6.6s %4d %7"PRId64"%c %7"PRId64"%c %-21s %s\n", + storeAppendPrintf(&dumpEntry, "%4d %-6.6s %4d %7" PRId64 "%c %7" PRId64 "%c %-21s %s\n", fdNumber, #endif fdTypeStr[type], timeoutHandler != NULL ? (int) (timeout - squid_curtime) : 0, bytes_read, readPending(fdNumber) ? '*' : ' ', bytes_written, write_handler ? '*' : ' ', remoteAddr(), desc); } void fde::DumpStats (StoreEntry *dumpEntry) { int i; storeAppendPrintf(dumpEntry, "Active file descriptors:\n"); #if _SQUID_MSWIN_ storeAppendPrintf(dumpEntry, "%-4s %-10s %-6s %-4s %-7s* %-7s* %-21s %s\n", === modified file 'src/fs/coss/store_dir_coss.cc' --- src/fs/coss/store_dir_coss.cc 2012-01-20 18:55:04 +0000 +++ src/fs/coss/store_dir_coss.cc 2012-06-20 09:45:27 +0000 @@ -956,41 +956,41 @@ CossSwapDir::canStore(const StoreEntry & load = io->load(); return true; } /* * storeCossDirCallback - do the IO completions */ int CossSwapDir::callback() { return io->callback(); } /* ========== LOCAL FUNCTIONS ABOVE, GLOBAL FUNCTIONS BELOW ========== */ void CossSwapDir::statfs(StoreEntry & sentry) const { storeAppendPrintf(&sentry, "\n"); - storeAppendPrintf(&sentry, "Maximum Size: %"PRIu64" KB\n", maxSize() >> 10); + storeAppendPrintf(&sentry, "Maximum Size: %" PRIu64 " KB\n", maxSize() >> 10); storeAppendPrintf(&sentry, "Current Size: %.2f KB\n", currentSize() / 1024.0); storeAppendPrintf(&sentry, "Percent Used: %0.2f%%\n", Math::doublePercent(currentSize(), maxSize()) ); storeAppendPrintf(&sentry, "Number of object collisions: %d\n", (int) numcollisions); #if 0 /* is this applicable? I Hope not .. */ storeAppendPrintf(sentry, "Filemap bits in use: %d of %d (%d%%)\n", SD->map->numFilesInMap(), SD->map->capacity(), Math::intPercent(SD->map->numFilesInMap(), SD->map->capacity())); #endif // storeAppendPrintf(&sentry, "Pending operations: %d out of %d\n", io->aq.aq_numpending, MAX_ASYNCOP); storeAppendPrintf(&sentry, "Flags:"); if (flags.selected) storeAppendPrintf(&sentry, " SELECTED"); if (flags.read_only) storeAppendPrintf(&sentry, " READ-ONLY"); @@ -1049,41 +1049,41 @@ CossSwapDir::reconfigure() else { debugs(3, 1, "Cache COSS dir '" << path << "' size changed to " << i << " MB"); max_size = size; } /* Enforce maxobjsize being set to something */ if (max_objsize == -1) fatal("COSS requires max-size to be set to something other than -1!\n"); } void CossSwapDir::swappedOut(const StoreEntry &e) { cur_size += fs.blksize * sizeInBlocks(e.swap_file_sz); ++n_disk_objects; } void CossSwapDir::dump(StoreEntry &entry)const { - storeAppendPrintf(&entry, " %"PRIu64, maxSize() >> 20); + storeAppendPrintf(&entry, " %" PRIu64, maxSize() >> 20); dumpOptions(&entry); } CossSwapDir::CossSwapDir() : SwapDir ("coss"), swaplog_fd(-1), count(0), current_membuf (NULL), current_offset(0), numcollisions(0), blksz_bits(0), io (NULL), ioModule(NULL), currentIOOptions(new ConfigOptionVector()), stripe_path(NULL), cur_size(0), n_disk_objects(0) { membufs.head = NULL; membufs.tail = NULL; cossindex.head = NULL; cossindex.tail = NULL; blksz_mask = (1 << blksz_bits) - 1; repl = NULL; } bool CossSwapDir::optionBlockSizeParse(const char *option, const char *value, int reconfiguring) { assert(option); if (strcmp(option, "block-size") != 0) return false; === modified file 'src/fs/rock/RockSwapDir.cc' --- src/fs/rock/RockSwapDir.cc 2012-01-20 18:55:04 +0000 +++ src/fs/rock/RockSwapDir.cc 2012-06-20 09:28:25 +0000 @@ -334,41 +334,41 @@ Rock::SwapDir::parseTimeOption(char cons } const time_msec_t newTime = static_cast(parsedValue); if (!reconfiguring) *storedTime = newTime; else if (*storedTime != newTime) { debugs(3, DBG_IMPORTANT, "WARNING: cache_dir " << path << ' ' << option << " cannot be changed dynamically, value left unchanged: " << *storedTime); } return true; } /// reports time-specific options; mimics ::SwapDir::optionObjectSizeDump() void Rock::SwapDir::dumpTimeOption(StoreEntry * e) const { if (fileConfig.ioTimeout) - storeAppendPrintf(e, " swap-timeout=%"PRId64, + storeAppendPrintf(e, " swap-timeout=%" PRId64, static_cast(fileConfig.ioTimeout)); } /// parses rate-specific options; mimics ::SwapDir::optionObjectSizeParse() bool Rock::SwapDir::parseRateOption(char const *option, const char *value, int isaReconfig) { int *storedRate; if (strcmp(option, "max-swap-rate") == 0) storedRate = &fileConfig.ioRate; else return false; if (!value) self_destruct(); // TODO: handle time units and detect parsing errors better const int64_t parsedValue = strtoll(value, NULL, 10); if (parsedValue < 0) { debugs(3, DBG_CRITICAL, "FATAL: cache_dir " << path << ' ' << option << " must not be negative but is: " << parsedValue); @@ -769,41 +769,41 @@ void Rock::SwapDir::trackReferences(StoreEntry &e) { debugs(47, 5, HERE << e); if (repl) repl->Add(repl, &e, &e.repl); } void Rock::SwapDir::ignoreReferences(StoreEntry &e) { debugs(47, 5, HERE << e); if (repl) repl->Remove(repl, &e, &e.repl); } void Rock::SwapDir::statfs(StoreEntry &e) const { storeAppendPrintf(&e, "\n"); - storeAppendPrintf(&e, "Maximum Size: %"PRIu64" KB\n", maxSize() >> 10); + storeAppendPrintf(&e, "Maximum Size: %" PRIu64 " KB\n", maxSize() >> 10); storeAppendPrintf(&e, "Current Size: %.2f KB %.2f%%\n", currentSize() / 1024.0, Math::doublePercent(currentSize(), maxSize())); if (map) { const int limit = map->entryLimit(); storeAppendPrintf(&e, "Maximum entries: %9d\n", limit); if (limit > 0) { const int entryCount = map->entryCount(); storeAppendPrintf(&e, "Current entries: %9d %.2f%%\n", entryCount, (100.0 * entryCount / limit)); if (limit < 100) { // XXX: otherwise too expensive to count Ipc::ReadWriteLockStats stats; map->updateStats(stats); stats.dump(e); } } } === modified file 'src/fs/ufs/store_dir_ufs.cc' --- src/fs/ufs/store_dir_ufs.cc 2012-04-10 04:26:14 +0000 +++ src/fs/ufs/store_dir_ufs.cc 2012-06-20 09:29:16 +0000 @@ -301,41 +301,41 @@ UFSSwapDir::doubleCheck(StoreEntry & e) if ((off_t)e.swap_file_sz != sb.st_size) { debugs(47, 0, "UFSSwapDir::doubleCheck: SIZE MISMATCH"); debugs(47, 0, "UFSSwapDir::doubleCheck: ENTRY SIZE: " << e.swap_file_sz << ", FILE SIZE: " << sb.st_size); dumpEntry(e); return true; } return false; } void UFSSwapDir::statfs(StoreEntry & sentry) const { int totl_kb = 0; int free_kb = 0; int totl_in = 0; int free_in = 0; int x; storeAppendPrintf(&sentry, "First level subdirectories: %d\n", l1); storeAppendPrintf(&sentry, "Second level subdirectories: %d\n", l2); - storeAppendPrintf(&sentry, "Maximum Size: %"PRIu64" KB\n", maxSize() >> 10); + storeAppendPrintf(&sentry, "Maximum Size: %" PRIu64 " KB\n", maxSize() >> 10); storeAppendPrintf(&sentry, "Current Size: %.2f KB\n", currentSize() / 1024.0); storeAppendPrintf(&sentry, "Percent Used: %0.2f%%\n", Math::doublePercent(currentSize(), maxSize())); storeAppendPrintf(&sentry, "Filemap bits in use: %d of %d (%d%%)\n", map->numFilesInMap(), map->capacity(), Math::intPercent(map->numFilesInMap(), map->capacity())); x = storeDirGetUFSStats(path, &totl_kb, &free_kb, &totl_in, &free_in); if (0 == x) { storeAppendPrintf(&sentry, "Filesystem Space in use: %d/%d KB (%d%%)\n", totl_kb - free_kb, totl_kb, Math::intPercent(totl_kb - free_kb, totl_kb)); storeAppendPrintf(&sentry, "Filesystem Inodes in use: %d/%d (%d%%)\n", totl_in - free_in, totl_in, Math::intPercent(totl_in - free_in, totl_in)); } storeAppendPrintf(&sentry, "Flags:"); @@ -1330,41 +1330,41 @@ UFSSwapDir::replacementAdd(StoreEntry * void UFSSwapDir::replacementRemove(StoreEntry * e) { StorePointer SD; if (e->swap_dirn < 0) return; SD = INDEXSD(e->swap_dirn); assert (dynamic_cast(SD.getRaw()) == this); debugs(47, 4, "UFSSwapDir::replacementRemove: remove node " << e << " from dir " << index); repl->Remove(repl, e, &e->repl); } void UFSSwapDir::dump(StoreEntry & entry) const { - storeAppendPrintf(&entry, " %"PRIu64" %d %d", maxSize() >> 20, l1, l2); + storeAppendPrintf(&entry, " %" PRIu64 " %d %d", maxSize() >> 20, l1, l2); dumpOptions(&entry); } char * UFSSwapDir::fullPath(sfileno filn, char *fullpath) const { LOCAL_ARRAY(char, fullfilename, MAXPATHLEN); int L1 = l1; int L2 = l2; if (!fullpath) fullpath = fullfilename; fullpath[0] = '\0'; snprintf(fullpath, MAXPATHLEN, "%s/%02X/%02X/%08X", path, ((filn / L2) / L2) % L1, (filn / L2) % L2, filn); === modified file 'src/ftp.cc' --- src/ftp.cc 2012-02-08 22:55:23 +0000 +++ src/ftp.cc 2012-06-20 09:38:23 +0000 @@ -1043,41 +1043,41 @@ FtpStateData::htmlifyListEntry(const cha } break; case '\0': snprintf(icon, 2048, "\"%-6s\"", mimeGetIconURL(parts->name), "[UNKNOWN]"); snprintf(chdir, 2048, "", rfc1738_escape_part(parts->name), mimeGetIconURL("internal-dir")); break; case '-': default: snprintf(icon, 2048, "\"%-6s\"", mimeGetIconURL(parts->name), "[FILE]"); - snprintf(size, 2048, " %6"PRId64"k", parts->size); + snprintf(size, 2048, " %6" PRId64 "k", parts->size); break; } if (parts->type != 'd') { if (mimeGetViewOption(parts->name)) { snprintf(view, 2048, "", prefix, href, mimeGetIconURL("internal-view")); } if (mimeGetDownloadOption(parts->name)) { snprintf(download, 2048, "", prefix, href, mimeGetIconURL("internal-download")); } } /* construct the table row from parts. */ html = new MemBuf(); html->init(); @@ -3079,41 +3079,41 @@ void FtpStateData::readStor() } else if (code == 150) { /* When client code is 150 with no data channel, Accept data channel. */ debugs(9, 3, "ftpReadStor: accepting data channel"); listenForDataChannel(data.conn, data.host); } else { debugs(9, DBG_IMPORTANT, HERE << "Unexpected reply code "<< std::setfill('0') << std::setw(3) << code); ftpFail(this); } } /// \ingroup ServerProtocolFTPInternal static void ftpSendRest(FtpStateData * ftpState) { /* check the server control channel is still available */ if (!ftpState || !ftpState->haveControlChannel("ftpSendRest")) return; debugs(9, 3, HERE); - snprintf(cbuf, CTRL_BUFLEN, "REST %"PRId64"\r\n", ftpState->restart_offset); + snprintf(cbuf, CTRL_BUFLEN, "REST %" PRId64 "\r\n", ftpState->restart_offset); ftpState->writeCommand(cbuf); ftpState->state = SENT_REST; } int FtpStateData::restartable() { if (restart_offset > 0) return 1; if (!request->range) return 0; if (!flags.binary) return 0; if (theSize <= 0) return 0; int64_t desired_offset = request->range->lowestOffset(theSize); === modified file 'src/log/FormatHttpdCombined.cc' --- src/log/FormatHttpdCombined.cc 2012-02-27 09:57:02 +0000 +++ src/log/FormatHttpdCombined.cc 2012-06-20 09:30:17 +0000 @@ -48,41 +48,41 @@ Log::Format::HttpdCombined(AccessLogEntr const char *user_auth = ::Format::QuoteUrlEncodeUsername(al->cache.authuser); const char *referer = NULL; const char *agent = NULL; if (al && al->request) { referer = al->request->header.getStr(HDR_REFERER); agent = al->request->header.getStr(HDR_USER_AGENT); } if (!referer || *referer == '\0') referer = "-"; if (!agent || *agent == '\0') agent = "-"; char clientip[MAX_IPSTRLEN]; al->getLogClientIp(clientip, MAX_IPSTRLEN); - logfilePrintf(logfile, "%s %s %s [%s] \"%s %s %s/%d.%d\" %d %"PRId64" \"%s\" \"%s\" %s%s:%s%s", + logfilePrintf(logfile, "%s %s %s [%s] \"%s %s %s/%d.%d\" %d %" PRId64 " \"%s\" \"%s\" %s%s:%s%s", clientip, user_ident ? user_ident : dash_str, user_auth ? user_auth : dash_str, Time::FormatHttpd(squid_curtime), al->_private.method_str, al->url, AnyP::ProtocolType_str[al->http.version.protocol], al->http.version.major, al->http.version.minor, al->http.code, al->cache.replySize, referer, agent, ::Format::log_tags[al->cache.code], al->http.statusSfx(), hier_code_str[al->hier.code], (Config.onoff.log_mime_hdrs?"":"\n")); safe_free(user_ident); safe_free(user_auth); === modified file 'src/log/FormatHttpdCommon.cc' --- src/log/FormatHttpdCommon.cc 2012-01-20 18:55:04 +0000 +++ src/log/FormatHttpdCommon.cc 2012-06-20 09:30:39 +0000 @@ -32,41 +32,41 @@ * */ #include "squid.h" #include "AccessLogEntry.h" #include "format/Quoting.h" #include "format/Token.h" #include "log/File.h" #include "log/Formats.h" #include "SquidTime.h" void Log::Format::HttpdCommon(AccessLogEntry * al, Logfile * logfile) { const char *user_auth = ::Format::QuoteUrlEncodeUsername(al->cache.authuser); const char *user_ident = ::Format::QuoteUrlEncodeUsername(al->cache.rfc931); char clientip[MAX_IPSTRLEN]; al->getLogClientIp(clientip, MAX_IPSTRLEN); - logfilePrintf(logfile, "%s %s %s [%s] \"%s %s %s/%d.%d\" %d %"PRId64" %s%s:%s%s", + logfilePrintf(logfile, "%s %s %s [%s] \"%s %s %s/%d.%d\" %d %" PRId64 " %s%s:%s%s", clientip, user_ident ? user_ident : dash_str, user_auth ? user_auth : dash_str, Time::FormatHttpd(squid_curtime), al->_private.method_str, al->url, AnyP::ProtocolType_str[al->http.version.protocol], al->http.version.major, al->http.version.minor, al->http.code, al->cache.replySize, ::Format::log_tags[al->cache.code], al->http.statusSfx(), hier_code_str[al->hier.code], (Config.onoff.log_mime_hdrs?"":"\n")); safe_free(user_auth); safe_free(user_ident); if (Config.onoff.log_mime_hdrs) { char *ereq = ::Format::QuoteMimeBlob(al->headers.request); === modified file 'src/log/FormatSquidIcap.cc' --- src/log/FormatSquidIcap.cc 2012-01-20 18:55:04 +0000 +++ src/log/FormatSquidIcap.cc 2012-06-20 09:31:02 +0000 @@ -58,35 +58,35 @@ Log::Format::SquidIcap(AccessLogEntry * if (!client) client = al->cache.caddr.NtoA(clientbuf, MAX_IPSTRLEN); } user = ::Format::QuoteUrlEncodeUsername(al->cache.authuser); if (!user) user = ::Format::QuoteUrlEncodeUsername(al->cache.extuser); #if USE_SSL if (!user) user = ::Format::QuoteUrlEncodeUsername(al->cache.ssluser); #endif if (!user) user = ::Format::QuoteUrlEncodeUsername(al->cache.rfc931); if (user && !*user) safe_free(user); - logfilePrintf(logfile, "%9ld.%03d %6d %s %s/%03d %"PRId64" %s %s %s -/%s -\n", + logfilePrintf(logfile, "%9ld.%03d %6d %s %s/%03d %" PRId64 " %s %s %s -/%s -\n", (long int) current_time.tv_sec, (int) current_time.tv_usec / 1000, al->icap.trTime, client, al->icap.outcome, al->icap.resStatus, al->icap.bytesRead, Adaptation::Icap::ICAP::methodStr(al->icap.reqMethod), al->icap.reqUri.termedBuf(), user ? user : "-", al->icap.hostAddr.NtoA(tmp, MAX_IPSTRLEN)); safe_free(user); } #endif === modified file 'src/log/FormatSquidNative.cc' --- src/log/FormatSquidNative.cc 2012-01-20 18:55:04 +0000 +++ src/log/FormatSquidNative.cc 2012-06-20 09:31:34 +0000 @@ -47,41 +47,41 @@ Log::Format::SquidNative(AccessLogEntry const char *user = ::Format::QuoteUrlEncodeUsername(al->cache.authuser); if (!user) user = ::Format::QuoteUrlEncodeUsername(al->cache.extuser); #if USE_SSL if (!user) user = ::Format::QuoteUrlEncodeUsername(al->cache.ssluser); #endif if (!user) user = ::Format::QuoteUrlEncodeUsername(al->cache.rfc931); if (user && !*user) safe_free(user); char clientip[MAX_IPSTRLEN]; al->getLogClientIp(clientip, MAX_IPSTRLEN); - logfilePrintf(logfile, "%9ld.%03d %6d %s %s%s/%03d %"PRId64" %s %s %s %s%s/%s %s%s", + logfilePrintf(logfile, "%9ld.%03d %6d %s %s%s/%03d %" PRId64 " %s %s %s %s%s/%s %s%s", (long int) current_time.tv_sec, (int) current_time.tv_usec / 1000, al->cache.msec, clientip, ::Format::log_tags[al->cache.code], al->http.statusSfx(), al->http.code, al->cache.replySize, al->_private.method_str, al->url, user ? user : dash_str, al->hier.ping.timedout ? "TIMEOUT_" : "", hier_code_str[al->hier.code], al->hier.tcpServer != NULL ? al->hier.tcpServer->remote.NtoA(hierHost, sizeof(hierHost)) : "-", al->http.content_type, (Config.onoff.log_mime_hdrs?"":"\n")); safe_free(user); if (Config.onoff.log_mime_hdrs) { === modified file 'src/stat.cc' --- src/stat.cc 2012-04-25 05:29:20 +0000 +++ src/stat.cc 2012-06-20 09:40:44 +0000 @@ -1996,41 +1996,41 @@ statByteHitRatio(int minutes) return (-1.0 * Math::doublePercent(s - c, c)); } static void statClientRequests(StoreEntry * s) { dlink_node *i; ClientHttpRequest *http; StoreEntry *e; char buf[MAX_IPSTRLEN]; for (i = ClientActiveRequests.head; i; i = i->next) { const char *p = NULL; http = static_cast(i->data); assert(http); ConnStateData * conn = http->getConn(); storeAppendPrintf(s, "Connection: %p\n", conn); if (conn != NULL) { const int fd = conn->clientConnection->fd; - storeAppendPrintf(s, "\tFD %d, read %"PRId64", wrote %"PRId64"\n", fd, + storeAppendPrintf(s, "\tFD %d, read %" PRId64 ", wrote %" PRId64 "\n", fd, fd_table[fd].bytes_read, fd_table[fd].bytes_written); storeAppendPrintf(s, "\tFD desc: %s\n", fd_table[fd].desc); storeAppendPrintf(s, "\tin: buf %p, offset %ld, size %ld\n", conn->in.buf, (long int) conn->in.notYetUsed, (long int) conn->in.allocatedSize); storeAppendPrintf(s, "\tremote: %s\n", conn->clientConnection->remote.ToURL(buf,MAX_IPSTRLEN)); storeAppendPrintf(s, "\tlocal: %s\n", conn->clientConnection->local.ToURL(buf,MAX_IPSTRLEN)); storeAppendPrintf(s, "\tnrequests: %d\n", conn->nrequests); } storeAppendPrintf(s, "uri %s\n", http->uri); storeAppendPrintf(s, "logType %s\n", Format::log_tags[http->logType]); storeAppendPrintf(s, "out.offset %ld, out.size %lu\n", (long int) http->out.offset, (unsigned long int) http->out.size); storeAppendPrintf(s, "req_sz %ld\n", (long int) http->req_sz); e = http->storeEntry(); storeAppendPrintf(s, "entry %p/%s\n", e, e ? e->getMD5Text() : "N/A"); #if 0 === modified file 'src/store_client.cc' --- src/store_client.cc 2012-01-20 18:55:04 +0000 +++ src/store_client.cc 2012-06-20 09:41:16 +0000 @@ -859,41 +859,41 @@ CheckQuickAbort(StoreEntry * entry) if (entry->store_status != STORE_PENDING) return; if (EBIT_TEST(entry->flags, ENTRY_SPECIAL)) return; if (CheckQuickAbort2(entry) == 0) return; entry->abort(); } void store_client::dumpStats(MemBuf * output, int clientNumber) const { if (_callback.pending()) return; output->Printf("\tClient #%d, %p\n", clientNumber, _callback.callback_data); - output->Printf("\t\tcopy_offset: %"PRId64"\n", + output->Printf("\t\tcopy_offset: %" PRId64 "\n", copyInto.offset); output->Printf("\t\tcopy_size: %d\n", (int) copyInto.length); output->Printf("\t\tflags:"); if (flags.disk_io_pending) output->Printf(" disk_io_pending"); if (flags.store_copying) output->Printf(" store_copying"); if (flags.copy_event_pending) output->Printf(" copy_event_pending"); output->Printf("\n"); } bool === modified file 'src/store_dir.cc' --- src/store_dir.cc 2012-03-08 01:41:08 +0000 +++ src/store_dir.cc 2012-06-20 09:41:38 +0000 @@ -335,41 +335,41 @@ StoreController::getStats(StoreInfoStats // move this code to a non-shared memory cache class when we have it stats.mem.shared = false; stats.mem.capacity = Config.memMaxSize; stats.mem.size = mem_node::StoreMemSize(); stats.mem.count = hot_obj_count; } swapDir->getStats(stats); // low-level info not specific to memory or disk cache stats.store_entry_count = StoreEntry::inUseCount(); stats.mem_object_count = MemObject::inUseCount(); } void StoreController::stat(StoreEntry &output) const { storeAppendPrintf(&output, "Store Directory Statistics:\n"); storeAppendPrintf(&output, "Store Entries : %lu\n", (unsigned long int)StoreEntry::inUseCount()); - storeAppendPrintf(&output, "Maximum Swap Size : %"PRIu64" KB\n", + storeAppendPrintf(&output, "Maximum Swap Size : %" PRIu64 " KB\n", maxSize() >> 10); storeAppendPrintf(&output, "Current Store Swap Size: %.2f KB\n", currentSize() / 1024.0); storeAppendPrintf(&output, "Current Capacity : %.2f%% used, %.2f%% free\n", Math::doublePercent(currentSize(), maxSize()), Math::doublePercent((maxSize() - currentSize()), maxSize())); if (memStore) memStore->stat(output); /* now the swapDir */ swapDir->stat(output); } /* if needed, this could be taught to cache the result */ uint64_t StoreController::maxSize() const { /* TODO: include memory cache ? */ return swapDir->maxSize(); === modified file 'src/store_log.cc' --- src/store_log.cc 2012-01-20 18:55:04 +0000 +++ src/store_log.cc 2012-06-20 09:42:00 +0000 @@ -69,41 +69,41 @@ storeLog(int tag, const StoreEntry * e) return; storeLogTagsCounts[tag]++; if (mem != NULL) { if (mem->log_url == NULL) { debugs(20, 1, "storeLog: NULL log_url for " << mem->url); mem->dump(); mem->log_url = xstrdup(mem->url); } reply = e->getReply(); /* * XXX Ok, where should we print the dir number here? * Because if we print it before the swap file number, it'll break * the existing log format. */ String ctype=(reply->content_type.size() ? reply->content_type.termedBuf() : str_unknown); logfileLineStart(storelog); - logfilePrintf(storelog, "%9d.%03d %-7s %02d %08X %s %4d %9d %9d %9d " SQUIDSTRINGPH " %"PRId64"/%"PRId64" %s %s\n", + logfilePrintf(storelog, "%9d.%03d %-7s %02d %08X %s %4d %9d %9d %9d " SQUIDSTRINGPH " %" PRId64 "/%" PRId64 " %s %s\n", (int) current_time.tv_sec, (int) current_time.tv_usec / 1000, storeLogTags[tag], e->swap_dirn, e->swap_filen, e->getMD5Text(), reply->sline.status, (int) reply->date, (int) reply->last_modified, (int) reply->expires, SQUIDSTRINGPRINT(ctype), reply->content_length, e->contentLen(), RequestMethodStr(mem->method), mem->log_url); logfileLineEnd(storelog); } else { /* no mem object. Most RELEASE cases */ logfileLineStart(storelog); logfilePrintf(storelog, "%9d.%03d %-7s %02d %08X %s ? ? ? ? ?/? ?/? ? ?\n", === modified file 'src/tools.cc' --- src/tools.cc 2012-04-25 05:29:20 +0000 +++ src/tools.cc 2012-06-20 09:43:40 +0000 @@ -159,41 +159,41 @@ void dumpMallocStats(void) { #if HAVE_MSTATS && HAVE_GNUMALLOC_H struct mstats ms = mstats(); fprintf(debug_log, "\ttotal space in arena: %6d KB\n", (int) (ms.bytes_total >> 10)); fprintf(debug_log, "\tTotal free: %6d KB %d%%\n", (int) (ms.bytes_free >> 10), Math::intPercent(ms.bytes_free, ms.bytes_total)); #elif HAVE_MALLINFO && HAVE_STRUCT_MALLINFO struct mallinfo mp; int t; if (!do_mallinfo) return; mp = mallinfo(); - fprintf(debug_log, "Memory usage for "APP_SHORTNAME" via mallinfo():\n"); + fprintf(debug_log, "Memory usage for " APP_SHORTNAME " via mallinfo():\n"); fprintf(debug_log, "\ttotal space in arena: %6ld KB\n", (long)mp.arena >> 10); fprintf(debug_log, "\tOrdinary blocks: %6ld KB %6ld blks\n", (long)mp.uordblks >> 10, (long)mp.ordblks); fprintf(debug_log, "\tSmall blocks: %6ld KB %6ld blks\n", (long)mp.usmblks >> 10, (long)mp.smblks); fprintf(debug_log, "\tHolding blocks: %6ld KB %6ld blks\n", (long)mp.hblkhd >> 10, (long)mp.hblks); fprintf(debug_log, "\tFree Small blocks: %6ld KB\n", (long)mp.fsmblks >> 10); fprintf(debug_log, "\tFree Ordinary blocks: %6ld KB\n", (long)mp.fordblks >> 10); t = mp.uordblks + mp.usmblks + mp.hblkhd;