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
export CPPFLAGS="-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" ./configure
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 */ #if defined(USE_LARGE_FILES) && APR_HAS_LARGE_FILES #define MP_LARGE_FILES_ENABLED #endif
__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com