apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe Jr." <wr...@rowe-clan.net>
Subject Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()
Date Thu, 16 Dec 2010 20:44:48 GMT
On 12/16/2010 2:35 PM, Jim Jagielski wrote:
> 
> On Dec 16, 2010, at 3:23 PM, Jim Jagielski wrote:
> 
>>
>> Here is my idea... currently, when looking for sizes
>> and formats for off_t, we do from smallest to largest
>> (int -> long -> long long). We also do the same when
>> checking apr_int64_t as well...

> +    # where int and long are the same size. Use the longest
> +    # type that fits
> +    if test "$ac_cv_sizeof_off_t" = "$ac_cv_sizeof_long_long"; then
> +        off_t_fmt='#define APR_OFF_T_FMT APR_INT64_T_FMT'
> +        off_t_strfn='apr_strtoi64'

This is bad, no?  We don't know that long_long and off_t aren't 128 bytes.
It seems better to use the explicit "ll" format here instead of the value
reserved for 64 bit ints.

WDYT?

Mime
View raw message