lkml.org 
[lkml]   [2000]   [Jul]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: RLIM_INFINITY inconsistency between archs
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/

\
 
 \ /
  Last update: 2005-03-22 13:57    [W:0.207 / U:0.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site