This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 1/3] Avoid duplication of _CLOEXEC and _NONBLOCK values
On Fri, Aug 13, 2010 at 2:44 PM, Ulrich Drepper <drepper@redhat.com> wrote:
> On 08/13/2010 11:20 AM, Carlos O'Donell wrote:
>> Is your only disagreement that the patch pollutes the namespace?
>
> You didn't read what I wrote. ?The namespace pollution is just one issue
> and handling this would require making the headers for the supported
> platforms worse (which by itself is a showstopper). ?There is also the
> inherit unsafety of the assumptions this is encasing. ?There is no
> guarantee that these values always match.
Using the values from fcntl.h is not the only solution. One could
centralize the constants in a new header file, defined for all targets
e.g. kernel-features.h. The generic set of headers would use the
constants from this header file.
Such a configuration avoids namespace pollution, has minimal runtime
cost (one additional header parsed by cpp), and decreases the
maintenance cost of updating all of these headers.
> If you want to avoid costs then start at the root. ?Get those ignorant
> kernel arch maintainers to use the same values as the mainstream
> architectures.
I agree with you completely, but in the meantime it would be
beneficial to reduce the glibc maintenance cost *now* while we
continue to educate kernel arch maintainers.
I'm taking this conversation to libc-help where I will work with Guy
to put together another iteration of this patch.
Cheers,
Carlos.