This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 11/13] Installed-header hygiene (BZ#20366): struct osockaddr.
- From: Carlos O'Donell <carlos at redhat dot com>
- To: Zack Weinberg <zackw at panix dot com>, libc-alpha at sourceware dot org
- Cc: joseph at codesourcery dot com
- Date: Wed, 21 Sep 2016 15:27:33 -0400
- Subject: Re: [PATCH 11/13] Installed-header hygiene (BZ#20366): struct osockaddr.
- Authentication-results: sourceware.org; auth=none
- References: <20160830011645.25769-1-zackw@panix.com> <20160830011645.25769-2-zackw@panix.com> <20160830011645.25769-3-zackw@panix.com> <20160830011645.25769-4-zackw@panix.com> <20160830011645.25769-5-zackw@panix.com> <20160830011645.25769-6-zackw@panix.com> <20160830011645.25769-7-zackw@panix.com> <20160830011645.25769-8-zackw@panix.com> <20160830011645.25769-9-zackw@panix.com> <20160830011645.25769-10-zackw@panix.com> <20160830011645.25769-11-zackw@panix.com> <20160830011645.25769-12-zackw@panix.com>
On 08/29/2016 09:16 PM, Zack Weinberg wrote:
> sys/socket.h defines struct osockaddr only under __USE_MISC, whereas
> protocols/talkd.h requires it unconditionally. This is another place
> where the bits/types/foo.h approach comes in handy.
>
> I would also be amenable to removing struct osockaddr from sys/socket.h,
> defining it only in protocols/talkd.h, on the theory that nothing else
> should be using it anymore. (Frankly, I doubt anyone would miss
> protocols/talkd.h at this point, but we _have_ historically preferred
> not to delete anything.)
Without a strong reason for deleting it we should keep it :-)
> * socket/bits/types/struct_osockaddr.h: New header.
> * include/bits/types/struct_osockaddr.h: New wrapper.
> * socket/Makefile: Install the new header.
> * socket/sys/socket.h
> * inet/protocols/talkd.h: Refer to bits/types/struct_osockaddr.h
> for the definition of struct osockaddr.
LGTM.
--
Cheers,
Carlos.