apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: apr_strfsize cannot handle sizes bigger than a few MiBs without largefiles support
Date Tue, 29 Jan 2002 18:50:45 GMT
William A. Rowe, Jr. wrote:

> From: "Stas Bekman" <stas@stason.org>
> Sent: Tuesday, January 29, 2002 12:39 PM
> 
> 
> 
>>apr_strfsize accepts the size arg as apr_off_t, so unless apache it
>>built with largefiles support, apr_off_t == long int, which means that
>>apr_strfsize is unusable for sizes bigger than a few MiBs.
>>
> 
> This is correct.  If the platform supports LARGEFILES, then it better
> danged well say so and own up to the responsibilities of implementing
> them in APR (seek, etc - all supporting apr_off_t sized jumps).
> 
> 
>>I've checked mod_autoindex, and it has this problem too as it uses
>>apr_off_t for its size and feeds it to apr_strfsize.
>>
> 
> That is correct.


which means that if you build Apache with no LARGEFILES, and you have a 
"large" file it's your problem.

So apr_strfsize is not a general purpose functions anymore, since it's 
tied to files. Which means that we again need to reimplement it, if we 
want to have a general purpose function for formatting sizes and handle 
big files without imposing a LARGEFILES requirement.


_____________________________________________________________________
Stas Bekman             JAm_pH      --   Just Another mod_perl Hacker
http://stason.org/      mod_perl Guide   http://perl.apache.org/guide
mailto:stas@stason.org  http://ticketmaster.com http://apacheweek.com
http://singlesheaven.com http://perl.apache.org http://perlmonth.com/


Mime
View raw message