From: Strake <strake888@gmail.com>
To: musl@lists.openwall.com
Subject: Re: [PATCH] include/stdio.h: declare *asprintf with _BSD_SOURCE
Date: Fri, 28 Dec 2012 18:32:00 -0500 [thread overview]
Message-ID: <CAL3m8eCM+r_=t+V_137JqphV3HVWz3Lj=6hqZw6jOZVe6dTZzg@mail.gmail.com> (raw)
In-Reply-To: <20121228204021.GE20323@brightrain.aerifal.cx>
On 28/12/2012, Rich Felker <dalias@aerifal.cx> 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 <strake888@gmail.com>
>> 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
prev parent reply other threads:[~2012-12-28 23:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-28 14:23 Strake
2012-12-28 20:40 ` Rich Felker
2012-12-28 23:32 ` Strake [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAL3m8eCM+r_=t+V_137JqphV3HVWz3Lj=6hqZw6jOZVe6dTZzg@mail.gmail.com' \
--to=strake888@gmail.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).