summaryrefslogtreecommitdiffstats
path: root/include/stdio.h
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2016-04-11 16:52:10 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2016-04-15 12:21:45 +0200
commit947fb5adf8af450507c978abf1c7ec9f051e5842 (patch)
treeaf790669292308b56baf188611ac430012037cba /include/stdio.h
parent48b205e32342fc8a2648b2bd3f1f6d9a7d74e6cb (diff)
downloadbarebox-947fb5adf8af450507c978abf1c7ec9f051e5842.tar.gz
barebox-947fb5adf8af450507c978abf1c7ec9f051e5842.tar.xz
string: Fix (v)asprintf prototypes
Our asprintf and vasprintf have different prototypes than the glibc functions. This causes trouble when we want to share barebox code with userspace code. Change the prototypes for (v)asprintf to match the glibc prototypes. Since the current (v)asprintf are convenient to use change the existing functions to b(v)asprintf. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'include/stdio.h')
-rw-r--r--include/stdio.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/stdio.h b/include/stdio.h
index d0817bd071..5334531849 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -15,8 +15,10 @@ int sprintf(char *buf, const char *fmt, ...) __attribute__ ((format(__printf__,
int snprintf(char *buf, size_t size, const char *fmt, ...) __attribute__ ((format(__printf__, 3, 4)));
int scnprintf(char *buf, size_t size, const char *fmt, ...) __attribute__ ((format(__printf__, 3, 4)));
int vsprintf(char *buf, const char *fmt, va_list args);
-char *asprintf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2)));
-char *vasprintf(const char *fmt, va_list ap);
+char *basprintf(const char *fmt, ...) __attribute__ ((format(__printf__, 1, 2)));
+int asprintf(char **strp, const char *fmt, ...) __attribute__ ((format(__printf__, 2, 3)));
+char *bvasprintf(const char *fmt, va_list ap);
+int vasprintf(char **strp, const char *fmt, va_list ap);
int vsnprintf(char *buf, size_t size, const char *fmt, va_list args);
int vscnprintf(char *buf, size_t size, const char *fmt, va_list args);