--------------------- PatchSet 12008 Date: 2008/03/18 02:58:47 Author: hno Branch: SQUID_2_6 Tag: (none) Log: Bug #2263: Custom log formats fail to log file sizes >2GB properly on 32-bit platforms Members: src/access_log.c:1.95.2.2->1.95.2.3 Index: squid/src/access_log.c =================================================================== RCS file: /cvsroot/squid/squid/src/access_log.c,v retrieving revision 1.95.2.2 retrieving revision 1.95.2.3 diff -u -r1.95.2.2 -r1.95.2.3 --- squid/src/access_log.c 3 Jun 2007 00:40:32 -0000 1.95.2.2 +++ squid/src/access_log.c 18 Mar 2008 02:58:47 -0000 1.95.2.3 @@ -1,6 +1,6 @@ /* - * $Id: access_log.c,v 1.95.2.2 2007/06/03 00:40:32 hno Exp $ + * $Id: access_log.c,v 1.95.2.3 2008/03/18 02:58:47 hno Exp $ * * DEBUG: section 46 Access Log * AUTHOR: Duane Wessels @@ -442,7 +442,7 @@ for (fmt = lf->format; fmt != NULL; fmt = fmt->next) { /* for each token */ const char *out = NULL; int quote = 0; - long int outint = 0; + squid_off_t outint = 0; int doint = 0; int dofree = 0; switch (fmt->type) { @@ -674,7 +674,7 @@ } if (doint) { - snprintf(tmp, sizeof(tmp), "%0*ld", fmt->zero ? (int) fmt->width : 0, outint); + snprintf(tmp, sizeof(tmp), "%0*" PRINTF_OFF_T, fmt->zero ? (int) fmt->width : 0, outint); out = tmp; } if (out && *out) {