apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wilfredo Sanchez <wsanc...@apache.org>
Subject atol
Date Wed, 24 Jul 2002 14:45:40 GMT
   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


Mime
View raw message