Ugh. Both of your suggestions look ugly. Using the O_* flags, you just need
to have a compatibility header file which contains:
#ifndef HAVE_O_SEQUENTIAL
# define O_SEQUENTIAL 0
#endif
Then in the code you just use O_SEQUENTIAL and if the system doesn't know
about it it is optimised away at compile time.
Note how nicely this fits in with autoconf/automake where the ./configure
script can test for O_SEQUENTIAL and if it is not there automatically
define it to 0. That then means your code is completely free from these
ugly #ifdefs.
Thanks for making your point as that is ANOTHER argument for using open(2)
instead of fadvise() [1]. (-;
Cheers,
Anton
[1] Yeah, I know, one could also define fadvise() to nothing in the compat
header file...
-- "I've not lost my mind. It's backed up on tape somewhere." - Unknown-- Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @) Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/ ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/- 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/