You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Doug MacEachern <do...@covalent.net> on 2001/01/21 19:31:10 UTC

largefile support

as some of you may know, perl 5.6.0+ enables largefile support by default.
in order for mod_perl+apache to cooperate, the lfs flags must either be
stripped when mod_perl is built or apache must be built with these flags,
e.g. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64

however, this is not possible due to sys/sendfile.h (linux kernel 2.2.16):

#ifdef __USE_FILE_OFFSET64
# error "<sendfile.h> cannot be used with _FILE_OFFSET_BITS=64"
#endif

any ideas howto workaround this?
and any plans on adding largefile support to 2.0?


RE: largefile support

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
> From: rbb@covalent.net [mailto:rbb@covalent.net]
> Sent: Sunday, January 21, 2001 8:04 PM
> 
> > > any ideas howto workaround this?
> > > and any plans on adding largefile support to 2.0?
> > 
> > If it's supported I'd like to see it (Win32 does).  However, we need to
> > make an executive decision.  Does apr (ignoring the httpd issue for the
> > moment, do we have programs faulting over arithmetic conversions, or
> > define apr_off_t as apr_int64_t?  There are faults to both methods.
> 
> I guess I would like to see us add --with-largefile, and let 
> the user of APR decide what they need.

So apr_off_t will vary in length by platform/flags?  A module that is
compiled for --with-largefile isn't compatable with one built without
the flag, since the offset of the next member of the apr_finfo_t and
apr_file_t just jumped addr offset by a dword.

Just clarifing.

Bill

Re: largefile support

Posted by rb...@covalent.net.
> > any ideas howto workaround this?
> > and any plans on adding largefile support to 2.0?
> 
> If it's supported I'd like to see it (Win32 does).  However, we need to
> make an executive decision.  Does apr (ignoring the httpd issue for the
> moment, do we have programs faulting over arithmetic conversions, or
> define apr_off_t as apr_int64_t?  There are faults to both methods.

I guess I would like to see us add --with-largefile, and let the user of
APR decide what they need.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: largefile support

Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
From: "Doug MacEachern" <do...@covalent.net>
Sent: Sunday, January 21, 2001 12:31 PM


> any ideas howto workaround this?
> and any plans on adding largefile support to 2.0?

If it's supported I'd like to see it (Win32 does).  However, we need to
make an executive decision.  Does apr (ignoring the httpd issue for the
moment, do we have programs faulting over arithmetic conversions, or
define apr_off_t as apr_int64_t?  There are faults to both methods.

Bill


Re: largefile support

Posted by rb...@covalent.net.
> > any ideas howto workaround this?
> 
> We could simply check the CFLAGS for -D_FILE_OFFSET_BITS=64 and if it is
> there, we just disable sendfile for Linux.

Actually, this is relatively easy to fix by actually trying to compile
sendfile.  I'll work up a potential patch, and send it to you.

Ryan
_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: largefile support

Posted by rb...@covalent.net.
On Sun, 21 Jan 2001, Doug MacEachern wrote:

> as some of you may know, perl 5.6.0+ enables largefile support by default.
> in order for mod_perl+apache to cooperate, the lfs flags must either be
> stripped when mod_perl is built or apache must be built with these flags,
> e.g. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> 
> however, this is not possible due to sys/sendfile.h (linux kernel 2.2.16):
> 
> #ifdef __USE_FILE_OFFSET64
> # error "<sendfile.h> cannot be used with _FILE_OFFSET_BITS=64"
> #endif

That is incredibly ugly.  :-(

> any ideas howto workaround this?

We could simply check the CFLAGS for -D_FILE_OFFSET_BITS=64 and if it is
there, we just disable sendfile for Linux.

> and any plans on adding largefile support to 2.0?

I would really hate to think that we are going to remove even the option
of sendfile on Linux by always compiling with largefile support.

What does largefile support really buy us in a webserver.  I can see
adding an option to APR to enable this with --enable-largefilesupport, but
I have a hard time seeing what this gets us in Apache itself.

Ryan
_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------