mailing list of musl libc
 help / color / mirror / code / Atom feed
From: Strake <strake888@gmail.com>
To: musl@lists.openwall.com
Subject: [PATCH] include/stdio.h: declare *asprintf with _BSD_SOURCE
Date: Fri, 28 Dec 2012 09:23:17 -0500	[thread overview]
Message-ID: <CAL3m8eACowEVSFOne=EPYN_+J5KECvsLHxKhJsa0hzDEF3JyiA@mail.gmail.com> (raw)

*asprintf is indeed declared in BSD stdio.h, so do the same in musl.

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
 char *fgets_unlocked(char *, int, FILE *);
 int fputs_unlocked(const char *, FILE *);
 #endif


             reply	other threads:[~2012-12-28 14:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-28 14:23 Strake [this message]
2012-12-28 20:40 ` Rich Felker
2012-12-28 23:32   ` Strake

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='CAL3m8eACowEVSFOne=EPYN_+J5KECvsLHxKhJsa0hzDEF3JyiA@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).