At 02:00 PM 2/28/2002, Greg Stein wrote:

On Thu, Feb 28, 2002 at 09:21:36AM -0800, Justin Erenkrantz wrote:
>...
> This shouldn't be too much of a problem because BDB will try to
> hide that, but APR will *not* handle large files on Linux since
> they disable sendfile() with 64bit files.  Since APR is
> network-oriented and we like sendfile(), we don't allow 64-bit
> file mode in APR on Linux.  And, consequently, we've never enabled
> 64-bit support on Unix - only Win32 has largefile support in
> APR.  -- justin

Couldn't we have large file support in APR for Linux, but just not allow
sendfile on those files?

So we are saying that the apr_ssize_t == apr_off_t == +/-2^63 or did I miss something entirely?

If they are not equal, the current code defines a bucket in terms of an
apr_size_t max.  Ergo you cannot 'accidentally' attempt to send more
than an int's worth of data.  If they were both 64 bits, we would need to
move the code into sendfile.

But not really --- we have a wrapper, APR_HAS_LARGEFILES or some
such, that forces sendfile into multiple chunks.

There should be zero issue with enabling largefile support today, except
perhaps in the apr code itself.  Apache and apr_util are ready.

I find it pretty awful to not have large file support in APR, from a basic
portability library standpoint.

I concur, files get big :)

Bill



Reply via email to