httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: svn commit: r517238 - in /httpd/httpd/trunk: CHANGES modules/http/http_etag.c
Date Mon, 12 Mar 2007 20:38:34 GMT


On 03/12/2007 04:05 PM, jorton@apache.org wrote:
> Author: jorton
> Date: Mon Mar 12 08:05:50 2007
> New Revision: 517238
> 
> URL: http://svn.apache.org/viewvc?view=rev&rev=517238
> Log:
> Generate etags consistently across 32-bit and 64-bit platforms:
> 
> * modules/http/http_etag.c (etag_uint64_to_hex): Renamed from
> etag_ulong_to_hex; take an apr_uint64_t argument.
> (ap_make_etag): Adjust to use new function and macro names.
> Pass arguments directly to etag_uint64_to_hex without casting
> down to unsigned long.
> 
> PR: 40064
> 
> Modified:
>     httpd/httpd/trunk/CHANGES
>     httpd/httpd/trunk/modules/http/http_etag.c
> 


> Modified: httpd/httpd/trunk/modules/http/http_etag.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/http/http_etag.c?view=diff&rev=517238&r1=517237&r2=517238
> ==============================================================================
> --- httpd/httpd/trunk/modules/http/http_etag.c (original)
> +++ httpd/httpd/trunk/modules/http/http_etag.c Mon Mar 12 08:05:50 2007
> @@ -28,16 +28,16 @@
>  #include "http_protocol.h"   /* For index_of_response().  Grump. */
>  #include "http_request.h"
>  
> -/* Generate the human-readable hex representation of an unsigned long
> - * (basically a faster version of 'sprintf("%lx")')
> +/* Generate the human-readable hex representation of an apr_uint64_t
> + * (basically a faster version of 'sprintf("%llx")')
>   */
>  #define HEX_DIGITS "0123456789abcdef"
> -static char *etag_ulong_to_hex(char *next, unsigned long u)
> +static char *etag_uint64_to_hex(char *next, apr_uint64_t u)
>  {
>      int printing = 0;
>      int shift = sizeof(unsigned long) * 8 - 4;

Shouldn't this be

int shift = sizeof(apr_uint64_t) * 8 - 4;

instead of the above?

Regards

RĂ¼diger


Mime
View raw message