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 21:38:54 GMT
On 12/16/2010 3:36 PM, Jim Jagielski wrote:
>>
>>> +    # 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...

Not arguing, suggesting that the thorough test is either to compare the
ac_cv_sizeof_off_t to 8, and then use APR_OFF_T_FMT, or failing that, instead
see if it matches long_long, and use an explicit "ll".

WDYT?

Mime
View raw message