apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stas Bekman <s...@stason.org>
Subject Re: RFC: APR_LARGEFILE flag for APR 0.9
Date Fri, 26 Mar 2004 00:44:02 GMT
Joe Orton wrote:
> On Thu, Mar 25, 2004 at 03:49:09PM -0800, Stas Bekman wrote:
>>Jeff Trawick wrote:
>>>(Related trivia: Maybe README.dev needs notes on large file support, 
>>>starting with the basic Unix requirement you outlined in a PR yesterday
>>>and then having folks add comments on platforms where it has been tested 
>>>and/or where there are special considerations.)
>>That's a bad idea, IMHO, because ARP_HAS_LARGE_FILES will still report 
>>false. You suggest to create a mess, where the library will report one 
>>thing but behave as another.
> I was thinking about this today as well... what do you expect
> APR_HAS_LARGE_FILES to actually mean?  "sizeof(apr_off_t) >
> sizeof(apr_size_t)"?  or "sizeof(apr_off_t) > off_t"?  or
> sizeof(apr_off_t)==8?  Any of these are trivial to implement in the
> configure script.

I expect a true value of APR_HAS_LARGE_FILES to mean "-D_LARGEFILE_SOURCE 
-D_FILE_OFFSET_BITS=64" on linux, and whatever are the equivalents are on 
other platforms (are they different or the same?) and whatever that implies 
for the type sizes.

Since I have to glue perl and apr, I want to be able to say:

  seek file, pos, whence

and non-zero pos and whence passed correctly from/to the C(Perl)/C(APR) side. 
If we have a disagreement in type lengths things go randomly broken and lots 
of hair gets lost.

>>>From below I take it you really want "sizeof(apr_off_t) > off_t"?
> That is consistent with what APR implements for Netware and Win32.
> It's inconsistent in that for e.g. FreeBSD or any 64-bit Unix, you get
> "large files" by default courtesy of a 64-bit off_t, yet
> APR_HAS_LARGE_FILES would be 0.

I think that's fine. Since in that case USE_LARGE_FILES will be false, no? and 
perl and apr will agree on the type lengths. Am I correct?

>>/* both perl and apr have largefile support enabled */

Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

View raw message