This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH 1/3] Avoid duplication of _CLOEXEC and _NONBLOCK values
Indeed, this solution seems more elegant.
I'll create new patches by Sunday.
On Fri, 13 Aug 2010 14:43:03 -0400
"Carlos O'Donell" <firstname.lastname@example.org> wrote:
> On Mon, Aug 9, 2010 at 2:21 PM, Guy Martin <email@example.com>
> > This patch define all the _CLOEXEC and _NONBLOCK derived values as
> > O_CLOEXEC and O_NONBLOCK respectively. This avoids a lot of header
> > duplication and a handfull of obsolete files can be removed.
> > 2010-08-26 ÂGuy Martin <firstname.lastname@example.org>
> > Â Â Â Â* sysdeps/unix/sysv/linux/bits/socket.h: Define SOCK_CLOEXEC
> > and SOCK_NONBLOCK as O_CLOEXEC and O_NONBLOCK respectively instead
> > of keeping a separate copy for each value.
> > Â Â Â Â* sysdeps/unix/sysv/linux/sys/epoll.h: Likewise for
> > EPOLL_CLOEXEC and EPOLL_NONBLOCK.
> > Â Â Â Â* sysdeps/unix/sysv/linux/sys/eventfd.h: Likewise for
> > EFD_CLOEXEC and EFD_NONBLOCK.
> > Â Â Â Â* sysdeps/unix/sysv/linux/sys/inotify.h: Likewise for
> > IN_CLOEXEC and IN_NONBLOCK.
> > Â Â Â Â* sysdeps/unix/sysv/linux/sys/signalfd.h: Likewise for
> > SFD_CLOEXEC and SFD_NONBLOCK.
> > Â Â Â Â* sysdeps/unix/sysv/linux/sys/timerfd.h: Likeswis for
> > TFD_CLOEXEC and TFD_NONBLOCK.
> Ulrich has brought up the same comment that Mike brought up, which is
> namespace pollution.
> Could you define a new header file called "kernel-constants.h" and
> include that instead?
> Each target must have a copy of kernel-constants.h, but that's all
> that needs updating in order to satisfy the uses in the generic
> This would remove the namespace pollution. Could you try out a
> solution like that?