From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/12612 Path: news.gmane.org!.POSTED!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: Re: #define __MUSL__ in features.h Date: Thu, 15 Mar 2018 14:39:39 -0400 Message-ID: <20180315183939.GI1436@brightrain.aerifal.cx> References: Reply-To: musl@lists.openwall.com NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1521139073 20917 195.159.176.226 (15 Mar 2018 18:37:53 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 15 Mar 2018 18:37:53 +0000 (UTC) User-Agent: Mutt/1.5.21 (2010-09-15) To: musl@lists.openwall.com Original-X-From: musl-return-12626-gllmg-musl=m.gmane.org@lists.openwall.com Thu Mar 15 19:37:49 2018 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 1ewXl6-0005N0-Nf for gllmg-musl@m.gmane.org; Thu, 15 Mar 2018 19:37:48 +0100 Original-Received: (qmail 30269 invoked by uid 550); 15 Mar 2018 18:39:51 -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 30247 invoked from network); 15 Mar 2018 18:39:51 -0000 Content-Disposition: inline In-Reply-To: Original-Sender: Rich Felker Xref: news.gmane.org gmane.linux.lib.musl.general:12612 Archived-At: On Thu, Mar 15, 2018 at 12:55:29PM -0300, dgutson . wrote: > > On Fri, Mar 29, 2013 at 09:44:05PM +0100, Daniel Cegiełka wrote: > > > Is it possible to add to the features.h __MUSL__ definition? > > > > > > glibc can be identified by __GLIBC__, uclibc through __UCLIBC__ etc. > > > > Is this question in the FAQ yet? If not, it really should be. The > > answer is no, it won't be added, because it's a bug to assume a > > certain implementation has particular properties rather than testing. > > That is a beautiful theory in an ideal world, but in the real world, > > implementations have bugs, and sometimes we need to workaround these bugs. If there's an actual bug you need to work around, detect it. Hard-coding "musl is buggy" is not beneficial to us; rather it leads to broken hacks lingering long after the bug is fixed. > (e.g. the FD* issue reported by Martin Galvan). That's not a bug. It's compiler warnings being wrongly produced for a system header, probably because someone added -I/usr/include or similar (normally GCC suppresses these). The musl policy regarding not having a macro like __MUSL__ is doing exactly what it's intended to do: encouraging developers and package maintainers to come to us (or investigate on their own) and fix the underlying portability problems (and sometimes musl bugs) rather than writing hacks to a specific version of musl that will be wrong a few versions later. Rich