httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@apache.org>
Subject Re: [PATCH] byterange patches for 2.2.19 and 2.2.20
Date Fri, 09 Sep 2011 13:53:43 GMT
Same hereā€¦

On Sep 9, 2011, at 6:54 AM, Jeff Trawick wrote:

> On Fri, Sep 9, 2011 at 4:29 AM, Joe Orton <jorton@redhat.com> wrote:
>> On Thu, Sep 08, 2011 at 05:36:06PM -0400, Jeff Trawick wrote:
>>> static apr_status_t base10_strtoff(apr_off_t *offset, const char *buf,
>>>                                    char **endptr)
>>> {
>>>     const char *last;
>>> 
>>>     *offset = apr_atoi64(buf);
>> 
>> I think this needs to DTRT with a 32-bit off_t.
>> 
>> How about this?
>> 
>> static apr_status_t strtoff(apr_off_t *offset, const char *nptr,
>>                            char **endptr, int base)
>> {
>>    errno = 0;
>>    if (sizeof(apr_off_t) == 4) {
>>        *offset = strtol(nptr, endptr, base);
>>    }
>>    else {
>>        *offset = apr_strtoi64(ptr, endptr, base);
>>    }
>>    return APR_FROM_OS_ERROR(errno);
>> }
> 
> works for me
> 
> http://people.apache.org/~trawick/draft3-2.0.64-byterange-fixes.txt
> 
> Thanks!
> 


Mime
View raw message