This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Ping^2 Re: Fix bits/socket.h IOC* namespace issues (bug 21267)
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: <libc-alpha at sourceware dot org>
- Date: Tue, 18 Apr 2017 21:28:57 +0000
- Subject: Re: Ping^2 Re: Fix bits/socket.h IOC* namespace issues (bug 21267)
- Authentication-results: sourceware.org; auth=none
- References: <alpine.DEB.2.20.1703180031310.9823@digraph.polyomino.org.uk> <alpine.DEB.2.20.1703231758480.21959@digraph.polyomino.org.uk> <alpine.DEB.2.20.1704051556140.13912@digraph.polyomino.org.uk> <6da82597-7a9f-7990-931d-510ca2847103@linaro.org>
On Thu, 6 Apr 2017, Adhemerval Zanella wrote:
> On 05/04/2017 12:56, Joseph Myers wrote:
> > Ping^2. This patch
> > <https://sourceware.org/ml/libc-alpha/2017-03/msg00400.html> is still
> > pending review.
> >
>
> The patch itself looks good. However, I think the __SYS_SOCKET_H_undef*
> macro usage is convoluted and complex, couldn't we just copy the kernel
> definition from asm/socket.h and avoid include it on bits/socket.h?
In principle that might make sense. The issues that would need addressing
are:
* Different definitions for different architecture may well require a
separate header, much like bits/socket_type.h.
* Presumably people need to be able to include the glibc headers together
with the uapi headers, but the kernel headers define these macros
unconditionally, meaning that any difference in the text of the definition
(even keeping the same numerical value) would result in a conflict, and
care would be needed to avoid such conflicts along the lines described at
<https://sourceware.org/glibc/wiki/Synchronizing_Headers>.
--
Joseph S. Myers
joseph@codesourcery.com