Re: fadvise syscall?

Jan Hudec (bulb@ucw.cz)
Sun, 17 Mar 2002 15:56:40 +0100


> 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>
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/