From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2745 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: guard bug for strerror_r Date: Fri, 8 Feb 2013 17:55:43 +0100 Message-ID: <20130208165542.GW6181@port70.net> References: <1360342098.2983.360.camel@eris.loria.fr> 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 1360342557 13128 80.91.229.3 (8 Feb 2013 16:55:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 8 Feb 2013 16:55:57 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2746-gllmg-musl=m.gmane.org@lists.openwall.com Fri Feb 08 17:56:17 2013 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 1U3rFF-0004oJ-I4 for gllmg-musl@plane.gmane.org; Fri, 08 Feb 2013 17:56:13 +0100 Original-Received: (qmail 20238 invoked by uid 550); 8 Feb 2013 16:55:54 -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 20230 invoked from network); 8 Feb 2013 16:55:54 -0000 Content-Disposition: inline In-Reply-To: <1360342098.2983.360.camel@eris.loria.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2745 Archived-At: * Jens Gustedt [2013-02-08 17:48:18 +0100]: > The linux man page says > > The XSI-compliant version of strerror_r() is provided if: > (_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && ! _GNU_SOURCE > Otherwise, the GNU-specific version is provided. > > but the musl code has > > #if defined(_POSIX_SOURCE) || defined(_POSIX_C_SOURCE) \ > || defined(_XOPEN_SOURCE) || defined(_GNU_SOURCE) \ > || defined(_BSD_SOURCE) > ... > int strerror_r (int, char *, size_t); > ... > #endif > > So if __GNU_SOURCE is set, glibc chooses their own interface and > musl choose the POSIX interface. > > Why is musl touching __GNU_SOURCE at all? > musl provides the posix api when requested musl provides many gnu specific apis when _GNU_SOURCE is set but when posix and gnu collides it's always the posix api, musl never provides broken gnu apis at least this was the policy so far