Joe Orton
Mon, 08 Mar 2010 13:26:51 -0800
On Mon, Mar 08, 2010 at 03:53:42PM -0500, Jeff Trawick wrote:
> On Mon, Mar 8, 2010 at 9:59 AM, Graham Leggett <minf...@sharp.fm> wrote:
...
> > #if APR_HAS_LARGE_FILES && defined(_LARGEFILE64_SOURCE)
> > oflags |= O_LARGEFILE;
> > #elif defined(O_LARGEFILE)
> > if (flag & APR_FOPEN_LARGEFILE) {
> > oflags |= O_LARGEFILE;
> > }
> > #endif
>
> This might be more interesting., though perhaps when the
> configure-time logic to turn on large file support is out of sync with
> this code? I'm not sure...
APR_FOPEN_LARGEFILE is intended to be (and is documented as) "advisory" rather than mandatory. Exposing a NONBLOCK flag without attaching *any* semantics to it w.r.t. subsequent read/write calls seems completely wrong. If you want platform-specific behaviour and don't care how badly it interacts with other apr_file_* interfaces then use native open() and apr_os_file_put() to get the APR wrapper. Regards, Joe