From: Josh Boyer <jwboyer@redhat.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Jeff Law <law@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] posix_types.h: make __NFDBITS match glibc definition
Date: Tue, 24 Jul 2012 15:41:24 -0400 [thread overview]
Message-ID: <20120724194124.GF10534@zod.bos.redhat.com> (raw)
In-Reply-To: <CA+55aFwSHae5rgFP_b_+r9Agz9JfM9QdoNbZTq7u+5G-xrr8RQ@mail.gmail.com>
On Tue, Jul 24, 2012 at 12:37:36PM -0700, Linus Torvalds wrote:
> On Tue, Jul 24, 2012 at 12:19 PM, Jeff Law <law@redhat.com> 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 NFDBITS __NFDBITS
>
> #define FD_SETSIZE __FD_SETSIZE
> #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.
josh
next prev parent reply other threads:[~2012-07-24 19:41 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-24 18:12 Josh Boyer
2012-07-24 18:20 ` Linus Torvalds
2012-07-24 18:24 ` Josh Boyer
2012-07-24 18:32 ` [PATCH v2] posix_types.h: make __NFDBITS compatible with " Josh Boyer
2012-07-24 18:46 ` Linus Torvalds
2012-07-24 19:03 ` Josh Boyer
2012-07-24 19:09 ` Linus Torvalds
2012-07-24 19:15 ` Jeff Law
2012-07-24 19:24 ` Linus Torvalds
2012-07-24 19:26 ` Jeff Law
2012-07-24 19:43 ` Josh Boyer
2012-07-24 19:55 ` Linus Torvalds
2012-07-24 20:10 ` Josh Boyer
2012-07-24 20:13 ` Linus Torvalds
2012-07-24 20:02 ` Andreas Schwab
2012-07-24 19:43 ` Linus Torvalds
2012-07-24 20:01 ` Jeff Law
2012-07-24 19:19 ` [PATCH] posix_types.h: make __NFDBITS match " Jeff Law
2012-07-24 19:37 ` Linus Torvalds
2012-07-24 19:39 ` Linus Torvalds
2012-07-24 19:41 ` Josh Boyer [this message]
2012-07-24 19:59 ` Linus Torvalds
2012-07-24 20:11 ` Linus Torvalds
2012-07-24 20:52 ` Andreas Schwab
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120724194124.GF10534@zod.bos.redhat.com \
--to=jwboyer@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=law@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®