From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2508 Path: news.gmane.org!not-for-mail From: Strake Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] include/stdio.h: declare *asprintf with _BSD_SOURCE Date: Fri, 28 Dec 2012 18:32:00 -0500 Message-ID: References: <20121228204021.GE20323@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1356737532 26519 80.91.229.3 (28 Dec 2012 23:32:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 28 Dec 2012 23:32:12 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2509-gllmg-musl=m.gmane.org@lists.openwall.com Sat Dec 29 00:32:28 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 1TojPf-0001h2-NU for gllmg-musl@plane.gmane.org; Sat, 29 Dec 2012 00:32:27 +0100 Original-Received: (qmail 3724 invoked by uid 550); 28 Dec 2012 23:32:12 -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 3716 invoked from network); 28 Dec 2012 23:32:12 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=S0n5aEgLHAokSqodBBpiyI4Rr+sQXx9cvHpm3KGF8aE=; b=xKQbsi1izc7JBB0+0fyDMHx4o0XpJPFaZHLbfna0xB7JI0+i4vsi2VxJQtCfj9WpB7 0V7VI2l1qWeJFHEW+5tTUDvOmoy6OO948QefIP2MFlirtxy5CA2CfvoT2YaWcZoLacTs fO2wxG9hqign1PYgZV+p9YTDOhmPt28JzXeqd4fNnQ9/SDaa0F5dzzkE5QbT2oN2sEqM HM2GSBiwBG1ZIvMjtUzi11nCtaw3Sl5utQz+rFgPArTQDufwKqGv0TLCToPHKxzpfg/n nuYp9kTd1a3BEsWg4GNMLmmNvDdguzwD3JAHFFQO48YR3h/HhP3GJmULFsinaxEvEs2d 7Fbg== In-Reply-To: <20121228204021.GE20323@brightrain.aerifal.cx> Xref: news.gmane.org gmane.linux.lib.musl.general:2508 Archived-At: On 28/12/2012, Rich Felker wrote: > On Fri, Dec 28, 2012 at 09:23:17AM -0500, Strake wrote: >> *asprintf is indeed declared in BSD stdio.h, so do the same in musl. > > This change should be fine. > >> commit 389e354a13ee040a9a413e61639be6d68ff1bc03 >> Author: strake >> Date: Fri Dec 28 09:20:13 2012 -0500 >> >> include/stdio.h: declare *asprintf with _BSD_SOURCE >> >> diff --git a/include/stdio.h b/include/stdio.h >> index 6e8e645..79b2c0f 100644 >> --- a/include/stdio.h >> +++ b/include/stdio.h >> @@ -177,9 +177,12 @@ int putw(int, FILE *); >> char *fgetln(FILE *, size_t *); >> #endif >> >> -#ifdef _GNU_SOURCE >> +#if defined _GNU_SOURCE || defined _BSD_SOURCE >> int asprintf(char **, const char *, ...); >> int vasprintf(char **, const char *, va_list); >> +#endif >> + >> +#ifdef _GNU_SOURCE > > There's already an #if block just above that's GNU-or-BSD. I'm just > moving these two declarations into it rather than making a new one. > > Rich > Thanks. Cheers, Strake