apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject RE: [PATCH] Support for opening large files
Date Tue, 11 Feb 2003 06:11:06 GMT
--On Monday, February 10, 2003 5:51 PM -0800 "MATHIHALLI,MADHUSUDAN 
(HP-Cupertino,ex1)" <madhusudan_mathihalli@hp.com> wrote:

> I was not trying to resolve all the LARGEFILE problems here -
> rather, just the open() related issue.

You can't open the file unless the program has largefile support 
built-in.  Using O_LARGEFILE all by itself is not guaranteed to work 
(off_t will be 32-bit which isn't right).  You may have to set 
_FILE_OFFSET_BITS accordingly.  Your patch would only work on a very 
small number of platforms where it will assume 64-bit files by 
default (not even sure there is one that does this).

> the net. BUT, log files can definitely grow larger than 2G -
> accepted they'll end up with log rotation etc., to overcome the
> problem, but the problem still remains.

If you look at the archives, this case is what prompted me to do the 
largefile patch a long time ago.  =)

The problem was I was never able to get any consensus (mainly because 
no one cared) on what to do with Linux.  Linux doesn't allow for 
largefiles to be sendfile'd.  (I believe Solaris does.)  Even turning 
on largefile support (via defining _FILE_OFFSET_BITS) causes the 
compilation to fail (sys/sendfile.h has a #error in this case, IIRC). 
-- justin

Mime
View raw message