apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@apache.org>
Subject Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()
Date Thu, 16 Dec 2010 21:36:44 GMT

On Dec 16, 2010, at 3:44 PM, William A. Rowe Jr. wrote:

> 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.
> 

All I did was re-arrange the order...


Mime
View raw message