apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dan Poirier <poir...@pobox.com>
Subject Re: [PATCH] Re: [PATCH] %lld support in apr_snprintf()
Date Fri, 17 Dec 2010 12:07:33 GMT
On Thu. 2010-12-16 at 03:44 PM EST, "William A. Rowe Jr." <wrowe@rowe-clan.net> 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.
>
> WDYT?

This is a pre-existing problem and not something new with Jim's patch,
right?  Maybe we can fix it separately.

Mime
View raw message