Re: _FILE_OFFSET_BITS=64 considered harmful
| From: | Wez Furlong | Date: | Fri, 22 Oct 2004 08:53:14 +0000 |
| Subject: | Re: _FILE_OFFSET_BITS=64 considered harmful | ||
| References: | 1 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13442@lists.php.net to get a copy of this message | ||
What I planned to do with the streams API for 5.1 was define
php_stream_off_t to be a 64-bit type (regardless of LFS support),
adjust the API where it is needed, and handle the LFS stuff centrally,
using the transitional LFS functions you mentioned if they are
present.
I confess that I haven't delved in to LFS on *nix very deeply at this
point, so if you have any tips, I'd welcome your opinion.
--Wez.
On Fri, 22 Oct 2004 07:22:49 +0100, Joe Orton <jorton@redhat.com> wrote:
> The safe way of doing this which we use in APR 1.0 is to define a
> wrapper type (e.g php_off_t) which is typedef'd to off64_t when
> -D_LARGEFILE64_SOURCE is supported, and off_t otherwise, to open files
> using O_LARGEFILE, and to use the "transitional LFS" functions like
> lseek64 etc in place of lseek etc when php_off_t is off64_t.