--------------------- PatchSet 905 Date: 2003/08/28 20:14:23 Author: serassio Branch: nt Tag: (none) Log: Added support for C9x standard printf() 64 bit format specifiers Members: src/ProfStats.cc:1.6.2.2->1.6.2.3 src/squid.h:1.7.2.13->1.7.2.14 Index: squid3/src/ProfStats.cc =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/ProfStats.cc,v retrieving revision 1.6.2.2 retrieving revision 1.6.2.3 diff -u -r1.6.2.2 -r1.6.2.3 --- squid3/src/ProfStats.cc 11 Mar 2003 08:26:54 -0000 1.6.2.2 +++ squid3/src/ProfStats.cc 28 Aug 2003 20:14:24 -0000 1.6.2.3 @@ -1,6 +1,6 @@ /* - * $Id: ProfStats.cc,v 1.6.2.2 2003/03/11 08:26:54 serassio Exp $ + * $Id: ProfStats.cc,v 1.6.2.3 2003/08/28 20:14:24 serassio Exp $ * * DEBUG: section 81 CPU Profiling Routines * AUTHOR: Andres Kroonmaa @@ -111,7 +111,7 @@ xprof_show_item(StoreEntry * sentry, const char *name, xprof_stats_data * hist) { storeAppendPrintf(sentry, - "%s\t %" INT64PRFX "u\t %" INT64PRFX "u\t %" INT64PRFX "u\t %" INT64PRFX "u\t %" INT64PRFX "u\t %.2f\t %6.3f\t\n", + "%s\t %" PRIu64 "\t %" PRIu64 "\t %" PRIu64 "\t %" PRIu64 "\t %" PRIu64 "\t %.2f\t %6.3f\t\n", name, hist->count, hist->summ, @@ -141,7 +141,7 @@ storeAppendPrintf(sentry, "\n%s:", descr); - storeAppendPrintf(sentry, " (Cumulated time: %" INT64PRFX "u, %.2f sec)\n", + storeAppendPrintf(sentry, " (Cumulated time: %" PRIu64 ", %.2f sec)\n", show->delta, time_frame ); @@ -236,7 +236,7 @@ " (CPU times are in arbitrary units, most probably in CPU clock ticks)\n"); storeAppendPrintf(sentry, "Probe Name\t Event Count\t last Interval \t Avg Interval \t since squid start \t (since system boot) \n"); - storeAppendPrintf(sentry, "Total\t %lu\t %" INT64PRFX "u \t %" INT64PRFX "u \t %" INT64PRFX "u \t %" INT64PRFX "u\n", + storeAppendPrintf(sentry, "Total\t %lu\t %" PRIu64 " \t %" PRIu64 " \t %" PRIu64 " \t %" PRIu64 "\n", (long unsigned) xprof_events, xprof_delta, xprof_average_delta, Index: squid3/src/squid.h =================================================================== RCS file: /cvsroot/squid-sf//squid3/src/squid.h,v retrieving revision 1.7.2.13 retrieving revision 1.7.2.14 diff -u -r1.7.2.13 -r1.7.2.14 --- squid3/src/squid.h 15 Jul 2003 18:38:06 -0000 1.7.2.13 +++ squid3/src/squid.h 28 Aug 2003 20:14:23 -0000 1.7.2.14 @@ -1,6 +1,6 @@ /* - * $Id: squid.h,v 1.7.2.13 2003/07/15 18:38:06 serassio Exp $ + * $Id: squid.h,v 1.7.2.14 2003/08/28 20:14:23 serassio Exp $ * * AUTHOR: Duane Wessels * @@ -467,10 +467,12 @@ #define IPPROTO_TCP 0 #endif +#ifndef PRIu64 /* ISO C99 Standard printf() macro */ #if defined(_SQUID_MSWIN_) && defined(_MSC_VER) /* Microsoft C Compiler ONLY */ -#define INT64PRFX "I64" +#define PRIu64 "I64u" #else -#define INT64PRFX "ll" +#define PRIu64 "llu" #endif /* _SQUID_MSWIN_ && _MSC_VER */ +#endif /* PRIu64 */ #endif /* SQUID_H */