Re: atol
We need to make sure that we're not using bigger values that what we're using internally anyway. After all, if when all is said and done, we only "honor" long in ranges, then supporting long longs sporadically doesn't make full sense. But I'm +1 on looking into this.! -- === Jim Jagielski [|] [EMAIL PROTECTED] [|] http://www.jaguNET.com/ "A society that will trade a little liberty for a little order will lose both and deserve neither" - T.Jefferson
Re: atol
* Wilfredo Sanchez ([EMAIL PROTECTED]) wrote : > There are several places in HTTPD where we use atol to parse ranges from > HTTP headers. Problem (at least on Darwin) is that a long is smaller > than size_t, and we're unable to handle large files in the 2-4GB range. > > atol is the same as calling strtol with NULL and 10 as the last to args, > and we can use strtoll instead, so this is an easy fix, except than > strtoll may not be on all of our platforms, so this seems like a job for > APR, lest we have #ifdef HAVE_STRTOLL all over the place. The patch I > got from Shantonu adds an APR function apr_atoll which returns a long > long. It uses strtoll is available, otherwise falls back to strtol. > > Questions: > > 1- Is adding apr_strtoll kosher? +1 > 2- Should I also add apr_strtoll for completeness? +1 -Thom -- Thom May -> [EMAIL PROTECTED]
Re: atol
On Wed, Jul 24, 2002 at 10:45:40AM -0400, Wilfredo Sanchez wrote: > 1- Is adding apr_strtoll kosher? +1. > 2- Should I also add apr_strtoll for completeness? +1. -- justin
atol
There are several places in HTTPD where we use atol to parse ranges from HTTP headers. Problem (at least on Darwin) is that a long is smaller than size_t, and we're unable to handle large files in the 2-4GB range. atol is the same as calling strtol with NULL and 10 as the last to args, and we can use strtoll instead, so this is an easy fix, except than strtoll may not be on all of our platforms, so this seems like a job for APR, lest we have #ifdef HAVE_STRTOLL all over the place. The patch I got from Shantonu adds an APR function apr_atoll which returns a long long. It uses strtoll is available, otherwise falls back to strtol. Questions: 1- Is adding apr_strtoll kosher? 2- Should I also add apr_strtoll for completeness? -wsv