From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1796 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: Best bikeshed ever (feature test macros) Date: Wed, 29 Aug 2012 14:08:15 -0400 Message-ID: <20120829180815.GZ27715@brightrain.aerifal.cx> References: <20120824214138.GA17792@brightrain.aerifal.cx> <20120829073442.66c72367@gmail.com> <20120829134939.GS27715@brightrain.aerifal.cx> <503E20B9.7060705@purdue.edu> <20120829105926.4deebc51@newbook> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1346263581 22923 80.91.229.3 (29 Aug 2012 18:06:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 29 Aug 2012 18:06:21 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1797-gllmg-musl=m.gmane.org@lists.openwall.com Wed Aug 29 20:06:22 2012 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1T6mej-0006KC-8l for gllmg-musl@plane.gmane.org; Wed, 29 Aug 2012 20:06:21 +0200 Original-Received: (qmail 7888 invoked by uid 550); 29 Aug 2012 18:06:18 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 7880 invoked from network); 29 Aug 2012 18:06:18 -0000 Content-Disposition: inline In-Reply-To: <20120829105926.4deebc51@newbook> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:1796 Archived-At: On Wed, Aug 29, 2012 at 10:59:26AM -0700, Isaac Dunham wrote: > > >>> 1. Leaving everything as it is. > > >>> 2. Making the kitchen sink (_GNU_SOURCE) available by default. > > >>> 3. Making only some limited subset (e.g. POSIX base) available by > > >>> default. > > >> The bikeshed should definitely not be colored black. > > >> > > >> I'd lean towards 3, 1 is fine too. but please not 2, musl's > > >> correctness is one of it's unique features... > > Agreed..._GNU_SOURCE is the kitchen sink _and_ the garbage can as well. And glibc's version of "no feature test macros" is 90% of the garbage can and 10% of the kitchen sink... > > _XOPEN_SOURCE=700 has the advantage that it does include lots of > > things, and is a standard, so it's not an arbitrary moving target. > > It's probably not sufficient, but I'm not wholly convinced of that. > > I said _XOPEN_SOURCE=600, with musl's behavior (equivalent to > _XOPEN_SOURCE=700 + obsolete extensions). There are a few extensions > that occasionally pop up. Yes. If we do change things I think I'd rather have it work as _XOPEN_SOURCE=700 + some-other-feature than _XOPEN_SOURCE=600, since the latter is very confusing to someone readong the headers who might think defining _XOPEN_SOUCE to 600 by default omits the SUSv4 functionality. > > _BSD_SOURCE (which on musl apparently implies _XOPEN_SOURCE, which > > makes sense since it's not like they're not trying) is better, the > > only reason I don't like it is that it's not a standard, so there's > > no clear demarcation of what it could imply, and arbitrary new things > > from the BSDs could be added at any point. > When I prepared the patch, I followed _NETBSD_SOURCE on current-ish > NetBSD. > It does (did?) not _necessarily_ imply _XOPEN_SOURCE, but there are few > places where NetBSD does not make X/Open 700 functionality available. I'm not sure what the current state is, but my preference (in the absence of other considerations) would be for it to include everything from XSI that's actually desirable, possibly omitting legacy, useless, and nonsensical stuff. Rich