--------------------- PatchSet 10480 Date: 2008/03/30 15:13:24 Author: adri Branch: s2_delaywork Tag: (none) Log: Use uintmax_t for printing 64 bit values. I wish there were a nicer way to print out 64 bit unsigned values in printf.. Members: src/delay_pools.c:1.18.12.3->1.18.12.4 Index: squid/src/delay_pools.c =================================================================== RCS file: /cvsroot/squid-sf//squid/src/delay_pools.c,v retrieving revision 1.18.12.3 retrieving revision 1.18.12.4 diff -u -r1.18.12.3 -r1.18.12.4 --- squid/src/delay_pools.c 30 Mar 2008 11:22:56 -0000 1.18.12.3 +++ squid/src/delay_pools.c 30 Mar 2008 15:13:24 -0000 1.18.12.4 @@ -1,6 +1,6 @@ /* - * $Id: delay_pools.c,v 1.18.12.3 2008/03/30 11:22:56 adri Exp $ + * $Id: delay_pools.c,v 1.18.12.4 2008/03/30 15:13:24 adri Exp $ * * DEBUG: section 77 Delay Pools * AUTHOR: David Luyer @@ -722,7 +722,7 @@ storeAppendPrintf(sentry, "\t\tMax: %d\n", rate->aggregate.max_bytes); storeAppendPrintf(sentry, "\t\tRestore: %d\n", rate->aggregate.restore_bps); storeAppendPrintf(sentry, "\t\tCurrent: %d\n", ag); - storeAppendPrintf(sentry, "\t\tBytes Transferred: %" PRINTF_OFF_T "\n\n", bytes); + storeAppendPrintf(sentry, "\t\tBytes Transferred: %ju\n\n", (uintmax_t) bytes); } static void @@ -757,12 +757,12 @@ for (i = 0; i < IND_MAP_SZ; i++) { if (class2->individual_map[i] == 255) break; - storeAppendPrintf(sentry, "%d:%d (%" PRINTF_OFF_T ") ", class2->individual_map[i], - class2->individual[i], class2->individual_bytes[i]); + storeAppendPrintf(sentry, "%d:%d (%ju) ", class2->individual_map[i], + class2->individual[i], (uintmax_t) class2->individual_bytes[i]); shown = 1; } if (class2->individual_255_used) { - storeAppendPrintf(sentry, "%d:%d (%" PRINTF_OFF_T ")", 255, class2->individual[255], class2->individual_bytes[255]); + storeAppendPrintf(sentry, "%d:%d (%ju)", 255, class2->individual[255], (uintmax_t) class2->individual_bytes[255]); shown = 1; } if (!shown) @@ -792,12 +792,12 @@ for (i = 0; i < NET_MAP_SZ; i++) { if (class3->network_map[i] == 255) break; - storeAppendPrintf(sentry, "%d:%d (%" PRINTF_OFF_T ") ", class3->network_map[i], - class3->network[i], class3->network_bytes[i]); + storeAppendPrintf(sentry, "%d:%d (%ju) ", class3->network_map[i], + class3->network[i], (uintmax_t) class3->network_bytes[i]); shown = 1; } if (class3->network_255_used) { - storeAppendPrintf(sentry, "%d:%d (%" PRINTF_OFF_T ") ", 255, class3->network[255], class3->network_bytes[255]); + storeAppendPrintf(sentry, "%d:%d (%ju) ", 255, class3->network[255], (uintmax_t) class3->network_bytes[255]); shown = 1; } if (!shown) @@ -820,11 +820,11 @@ for (j = 0; j < IND_MAP_SZ; j++) { if (class3->individual_map[i][j] == 255) break; - storeAppendPrintf(sentry, "%d:%d (%" PRINTF_OFF_T ") ", class3->individual_map[i][j], - class3->individual[(i << 8) | j], class3->individual_bytes[(i << 8) | j]); + storeAppendPrintf(sentry, "%d:%d (%ju) ", class3->individual_map[i][j], + class3->individual[(i << 8) | j], (uintmax_t) class3->individual_bytes[(i << 8) | j]); } if (class3->individual_255_used[i / 8] & (1 << (i % 8))) { - storeAppendPrintf(sentry, "%d:%d (%" PRINTF_OFF_T ") ", 255, class3->individual[(i << 8) | 255], class3->individual_bytes[(i << 8) | 255]); + storeAppendPrintf(sentry, "%d:%d (%ju) ", 255, class3->individual[(i << 8) | 255], (uintmax_t) class3->individual_bytes[(i << 8) | 255]); } storeAppendPrintf(sentry, "\n"); }