From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/6147 Path: news.gmane.org!not-for-mail From: =?windows-1252?Q?J=F6rg_Krause?= Newsgroups: gmane.linux.lib.musl.general Subject: Re: why is there no __MUSL__ macro? Date: Thu, 11 Sep 2014 15:33:16 +0200 Message-ID: <5411A49C.20808@posteo.de> References: <541180B9.5070604@posteo.de> <541182D3.5010104@skarnet.org> <20140911111721.GG21835@port70.net> <54118F73.2020807@posteo.de> <20140911123800.GI21835@port70.net> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1410442398 29958 80.91.229.3 (11 Sep 2014 13:33:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 11 Sep 2014 13:33:18 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-6160-gllmg-musl=m.gmane.org@lists.openwall.com Thu Sep 11 15:33:10 2014 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 1XS4Uo-00029r-E0 for gllmg-musl@plane.gmane.org; Thu, 11 Sep 2014 15:33:10 +0200 Original-Received: (qmail 16325 invoked by uid 550); 11 Sep 2014 13:33:09 -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 16317 invoked from network); 11 Sep 2014 13:33:09 -0000 X-Virus-Scanned: amavisd-new at posteo.de User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.1 In-Reply-To: <20140911123800.GI21835@port70.net> Xref: news.gmane.org gmane.linux.lib.musl.general:6147 Archived-At: On 09/11/2014 02:38 PM, Szabolcs Nagy wrote: > * J?rg Krause [2014-09-11 14:02:59 +0200]: >> On 09/11/2014 01:17 PM, Szabolcs Nagy wrote: >>> then _testing_ for conformance issues is the second try >>> if the default fails >> What do you mean with testing for concormance? > eg glibc scanf uses "%a" for its own extension by default > and c99 behaviour is only provided with appropriate cflags > > if your project depends on %a scanf then you may need to > test for this conformance issue (instead of ifdef __GLIBC__ > because they may change the behaviour later or the cflag > might not work on an older version etc) I see. But I can avoid the GNU specific bevahiour by undefining _GNU_SOURCE if I want POSIX-conformance. In this case I do not need to test, but can rely on the libc of being conformal. Do I have this right? eg, in FFmpeg/libavutils uses strerror_r which is implemented as a XSI-compliant and a GNU-specific version. If I want to be sure to get the XSI-compliant version, I unset _GNU_SOURCE and set _XOPEN_SOURCE=600. So I do not need any further testing here, right?