Re: fadvise syscall?

Jan Hudec
2002-03-17T14:56:56Z

> It is easier for application writers to code:
>
> [...]
> #ifdef HAVE_FADVISE
> (void)fadvise(fd, FADV_STREAMING);
> #endif
> [...]
>
> Than to have a forest of #ifdefs to determine which O_* flags are
> supported. After all, we still want our programs to run under Solaris. :-)

#ifndef O_STREAMING
#define O_STREAMING 0
#endif
(and then just use the flag in open)

is still better - it can be done in a header somewhere, once for all opens.

--------------------------------------------------------------------------------
- Jan Hudec `Bulb' <bulb@ucw.cz>