Re: [PATCH 21/21] posix_types: Remove fd_set macros

From: H. Peter Anvin
Date: Tue Feb 14 2012 - 15:14:59 EST


On 02/14/2012 11:44 AM, H. Peter Anvin wrote:
>
> We can do that, but we'd almost certainly have to #include
> <linux/select.h> in <linux/time.h>. The following macros are defined in
> <linux/time.h> and *exported to userspace*:
>
> #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)
>

Note: yes, those macros are completely useless, obviously, since all
they do is take what is already defined in userspace and reflect it back
out. Still, removing them is a userspace-visible change and really
should be its own change with nothing else.

-hpa

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