[lkml]   [2012]   [Jul]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] posix_types.h: make __NFDBITS match glibc definition
On Tue, Jul 24, 2012 at 12:37:36PM -0700, Linus Torvalds wrote:
> On Tue, Jul 24, 2012 at 12:19 PM, Jeff Law <> wrote:
> >
> > All that's strictly necessary is that cast to (int). That avoids the
> > problem.
> .. and it causes other problems instead, namely the crap code generation for __.
> Apparently glibc fixed it totally differently, and the kernel actually
> doesn't care at all. We'd probably be best off just removing those
> #defines entirely. Especially since the kernel doesn't even *use*
> those things.
> The kernel _does_ have these odd #define's in <linux/time.h>:
> #define FD_SET(fd,fdsetp) __FD_SET(fd,fdsetp)
> #define FD_CLR(fd,fdsetp) __FD_CLR(fd,fdsetp)
> #define FD_ISSET(fd,fdsetp) __FD_ISSET(fd,fdsetp)
> #define FD_ZERO(fdsetp) __FD_ZERO(fdsetp)
> but apart from __NFDBITS and __FD_SETSIZE, the kernel doesn't even
> seem to define those __FD_xyx macros at all (although possibly they
> are hiding in some odd auto-generated headers, I didn't check). I
> think this is all silly left-overs that nobody really wants any more.
> glibc clearly doesn't.

I'd be happy to come up with a patch that drops them, but since they're
in a user visible header file I was concerned somebody might be using
them explicitly from posix_types.h. People do weird crap like not use
glibc all the time.


 \ /
  Last update: 2012-07-24 22:21    [W:0.119 / U:7.412 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site