From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/10998 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: [alpine-devel] Non-standard C library Date: Tue, 31 Jan 2017 14:23:10 -0500 Message-ID: <20170131192310.GR1533@brightrain.aerifal.cx> References: <4EDA0683-3991-44D0-882C-C34FBD4C38B2@jirutka.cz> <5blaf1.okfi73.2tnq26-qmf@gmx.com> <5890704A.8090402@mail.com> <717ca2a3-d579-4ab6-ace2-1bc0dbbb111c@skogtun.org> <5890E097.1060601@adelielinux.org> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1485890615 31517 195.159.176.226 (31 Jan 2017 19:23:35 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2017 19:23:35 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-11013-gllmg-musl=m.gmane.org@lists.openwall.com Tue Jan 31 20:23:30 2017 Return-path: Envelope-to: gllmg-musl@m.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by blaine.gmane.org with smtp (Exim 4.84_2) (envelope-from ) id 1cYe1U-0007m9-O0 for gllmg-musl@m.gmane.org; Tue, 31 Jan 2017 20:23:24 +0100 Original-Received: (qmail 32022 invoked by uid 550); 31 Jan 2017 19:23:28 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Original-Received: (qmail 31995 invoked from network); 31 Jan 2017 19:23:26 -0000 Content-Disposition: inline In-Reply-To: <5890E097.1060601@adelielinux.org> Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:10998 Archived-At: On Tue, Jan 31, 2017 at 01:08:07PM -0600, A. Wilcox wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On 31/01/17 12:50, William Pitcock wrote: > > On Tue, Jan 31, 2017 at 12:22 PM, Harald Arnesen > > wrote: > >> musl defines "IPPORT_RESERVED" in "netdb.h", while both GNU libc > >> and BSD libc define it in "netinet/in.h". And I can't find an > >> e-mail address for a musl developer without subscribing to their > >> mailing list. > > > POSIX.1-2008 clearly says IPPORT_RESERVED shall be defined in : > http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/netdb.h.html > > ..... > > > > I checked on both a Debian and FreeBSD machine and indeed, they > > both have it in netinet/in.h. > > ..... > > however, POSIX.1-2008 also clearly says "may also make visible > all symbols from ". > > > > What shall we do? > > > Theoretically, the code they are compiling is wrong; POSIX only > guarantees the definition in . However, there is a bit of > leeway in the standard since may include all symbols from > ; if it's defined there, can pull that header > in providing the definition. > > I would say that the best thing to do in the interests of > compatibility would be to put the definition in *and* > fix whatever broken project that is (Snobol?) to include . > This is what FreeBSD and glibc both do; define it in > and include that header in . The name IPPORT_RESERVED is not reserved in the namespace for netinet/in.h, so it can't be added there unless it's conditional on nonstandard feature profile. That might be justifiable if lots of applications had the wrong expectation here, but being that this is the first time we've heard of the issue, it seems there are just a few (or only one) applications which are doing this wrong, and they should just be fixed. Rich