Re: [patch] fat/msdos/vfat crud removal

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Tue Jun 11 2002 - 11:49:51 EST


Eric W. Biederman wrote:
> Actually by now most applications have been fixed and do not use
> them. The policy has been in place for several years now.

I like this policy and understand how to use it, except...

Once upon a time I wrote a program which used O_NOFOLLOW, before Glibc
had support for that flag.

It had to read the kernel headers, as this macro is an
architecture-dependent flag, and I did not want to write a program that
was so non-portable it would only compile on some architectures.

Even if I'd copied all the definitions for all architectures out of the
kernel, that wouldn't do: the program wouldn't compile on architectures
added later, or ones that aren't part of the standard distribution.

So to keep the program relatively portable, it searched for definitions
of O_NOFOLLOW in the kernel headers. (It was a Glibc/kernel conflict
nightmare).

Please can you suggest how I should write this sort of code, the next
time it occurs?

thanks,
-- Jamie
-
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/



This archive was generated by hypermail 2b29 : Sat Jun 15 2002 - 22:00:23 EST