From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/1778 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: Best bikeshed ever (feature test macros) Date: Mon, 27 Aug 2012 11:08:30 -0700 Message-ID: <20120827110830.43d1a74a@newbook> References: <20120824214138.GA17792@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1346090929 16788 80.91.229.3 (27 Aug 2012 18:08:49 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 27 Aug 2012 18:08:49 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-1779-gllmg-musl=m.gmane.org@lists.openwall.com Mon Aug 27 20:08:48 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 1T63jz-0006ql-E4 for gllmg-musl@plane.gmane.org; Mon, 27 Aug 2012 20:08:47 +0200 Original-Received: (qmail 3327 invoked by uid 550); 27 Aug 2012 18:08:45 -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 3319 invoked from network); 27 Aug 2012 18:08:44 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=by9xRf+8ZHKh/OP61CzeGgZ8hnWjPvS+fGXSP7pvTwtWLQlkaDFQ+fVpyHaHyLQDdK3WTHVrvwQEtHjKTNdTTBdZDbIwyTw6Bul3mseEnZINYam2y/WeK95bj6S56ASuI556zYnwy8TDKQwiZotnGdI8Hi4O41p2axSmKjhNvNY=; h=Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20120824214138.GA17792@brightrain.aerifal.cx> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:1778 Archived-At: On Fri, 24 Aug 2012 17:41:38 -0400 Rich Felker wrote: > Hi all, > > Feature test macros (the fun -D_POSIX_C_SOURCE=200809L, -D_GNU_SOURCE, > etc. things everybody gets wrong) have been one of the more > controversial aspects of musl, particularly the fact that musl > presents by default a straight ISO C conforming environment with no > POSIX, traditional Unix, etc. stuff offending the pristine C > namespace, and requires the use of one or more feature test macros to > get basically _ANY_ typical unixy software to build. I have built a few programs without extra CFLAGS. (two of them being nebula & cmix) > > 1. Leaving everything as it is. > > > 2. Making the kitchen sink (_GNU_SOURCE) available by default. This can be done the same way as 3, but it does mean a lot of extra verbiage in the headers. Name collisions are something I've run into, though they're fairly trivial to fix in my experience. All told, I'd say it's practical but maybe not desirable. And if you *are* going to make everything available, also make the strl* functions and fgetln available, so software doesn't pull in its own version due to broken tests (haven't noticed this happening, but...). > 3. Making only some limited subset (e.g. POSIX base) available by > default. I'd prefer some variant of 3. And the _XOPEN_SOURCE=600 || _BSD_SOURCE suggestion does sound fairly reasonable except for some headers, like Isaac Dunham