jim 99/11/28 07:47:02
Modified: src CHANGES src/ap ap_snprintf.c Log: The real fix for ap_snprintf :) Revision Changes Path 1.1462 +1 -1 apache-1.3/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache-1.3/src/CHANGES,v retrieving revision 1.1461 retrieving revision 1.1462 diff -u -r1.1461 -r1.1462 --- CHANGES 1999/11/28 14:15:32 1.1461 +++ CHANGES 1999/11/28 15:46:59 1.1462 @@ -6,7 +6,7 @@ [Ralf S. Engelschall] *) Fixed `quad integer' (aka `long long') handling in ap_snprintf.c - [Ralf S. Engelschall] + [Jim Jagielski, Ralf S. Engelschall] *) Fixed error handling in dbmmanage script. [Andrew McRae <[EMAIL PROTECTED]>] PR#4973 1.40 +4 -3 apache-1.3/src/ap/ap_snprintf.c Index: ap_snprintf.c =================================================================== RCS file: /export/home/cvs/apache-1.3/src/ap/ap_snprintf.c,v retrieving revision 1.39 retrieving revision 1.40 diff -u -r1.39 -r1.40 --- ap_snprintf.c 1999/11/28 13:53:40 1.39 +++ ap_snprintf.c 1999/11/28 15:47:02 1.40 @@ -410,10 +410,11 @@ u_widest_int magnitude; /* - * If the value is less than the maximum unsigned long value, - * then we know we aren't using quads, so use the faster function + * We see if we can use the faster non-quad version by checking the + * number against the largest long value it can be. If <=, we + * punt to the quicker version. */ - if (num <= ULONG_MAX && is_unsigned) + if ((num <= ULONG_MAX && is_unsigned) || (num <= LONG_MAX && !is_unsigned)) return(conv_10( (wide_int)num, is_unsigned, is_negative, buf_end, len));