Re: RLIM_INFINITY inconsistency between archs

From: Jamie Lokier (lk@tantalophile.demon.co.uk)
Date: Thu Jul 27 2000 - 08:10:45 EST


Linus Torvalds wrote:
> In short, the _only_ people who should update their /usr/include/linux
> tree are the people who actually make library releases and compile their
> own glibc, because if they want to take advantaged of new kernel
> features they need those new definitions.

I've written quite a few programs that use new kernel features that
aren't in Glibc. A recent one includes <linux/ppdev.h>. That's easy,
an iocl. Another use O_NOFOLLOW, which wasn't defined in Glibc for a
while.

I know you want every application to copy the ioctl & structure
definitions it uses -- and this does work. But it's just _so_ ugly when
you want to pass a small program to someone else and must include the
set of header files it uses too.

O_NOFOLLOW's definition varies with each architecture. So following
your suggestion, I'd have to distribute that program with the
appropriate <asm-$arch/fcntl.h> for every value of $arch. And even that
doesn't let the program compile on new architectures later down the
line.

I decided to tackle this by having autoconf read the value from
<asm/fcntl.h> and define a macro with that value. (Because you can't
include include <asm/fcntl.h> and <fcntl.h> at the same time). That
turns out to more complicated than you'd think: <asm/fcntl.h> requires
<linux/types.h>, which is incompatible with <stdio.h>. But it still
works better, in the tradition of autoconf, than having a copy of the
constant for every known architecture and not being able to use the
feature on other architectures.

-- Jamie

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:23 EST