apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thom May <t...@planetarytramp.net>
Subject Re: atol
Date Wed, 24 Jul 2002 16:12:01 GMT
* Wilfredo Sanchez (wsanchez@apache.org) 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 -> thom@planetarytramp.net


Mime
View raw message