Re: _FILE_OFFSET_BITS=64 considered harmful
| From: | Joe Orton | Date: | Fri, 22 Oct 2004 09:45:08 +0000 |
| Subject: | Re: _FILE_OFFSET_BITS=64 considered harmful | ||
| References: | 1 2 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-13448@lists.php.net to get a copy of this message | ||
On Fri, Oct 22, 2004 at 09:53:14AM +0100, Wez Furlong wrote:
> 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.
The difference in that approach is that you introduce a bunch of new
error cases on platforms *without* LFS support, where you'd have to
check for passing an out-of-range 64-bit php_stream_off_t value to a
function taking a 32-bit off_t. I think using php_stream_off_t = off_t
or off64_t as appropriate is simpler for that reason.
But both approaches are feasible, the important thing is to avoid using
-D_FILE_OFFSET_BITS=64, which just breaks so much.
Regards,
joe