summaryrefslogtreecommitdiffstats
path: root/libc/stdio/vasprintf.c
diff options
context:
space:
mode:
author"Steven J. Hill" <sjhill@realitydiluted.com>2005-12-10 15:10:57 +0000
committer"Steven J. Hill" <sjhill@realitydiluted.com>2005-12-10 15:10:57 +0000
commit7fe677c6d31a6fd854eaf64609d72b8613ca36ea (patch)
tree4c65df7c08e0730d0686b169545be93177080810 /libc/stdio/vasprintf.c
parenteb853014235c86b33318f16e205ff2f818e5a67c (diff)
downloaduClibc-alpine-7fe677c6d31a6fd854eaf64609d72b8613ca36ea.tar.bz2
uClibc-alpine-7fe677c6d31a6fd854eaf64609d72b8613ca36ea.tar.xz
Merge from trunk.
Diffstat (limited to 'libc/stdio/vasprintf.c')
-rw-r--r--libc/stdio/vasprintf.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/libc/stdio/vasprintf.c b/libc/stdio/vasprintf.c
index 512317c51..ca110cbd1 100644
--- a/libc/stdio/vasprintf.c
+++ b/libc/stdio/vasprintf.c
@@ -20,7 +20,7 @@
#warning Skipping vasprintf since no vsnprintf!
#else
-int vasprintf(char **__restrict buf, const char * __restrict format,
+int attribute_hidden __vasprintf(char **__restrict buf, const char * __restrict format,
va_list arg)
{
#ifdef __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__
@@ -32,7 +32,7 @@ int vasprintf(char **__restrict buf, const char * __restrict format,
*buf = NULL;
if ((f = open_memstream(buf, &size)) != NULL) {
- rv = vfprintf(f, format, arg);
+ rv = __vfprintf(f, format, arg);
fclose(f);
if (rv < 0) {
free(*buf);
@@ -54,14 +54,14 @@ int vasprintf(char **__restrict buf, const char * __restrict format,
int rv;
va_copy(arg2, arg);
- rv = vsnprintf(NULL, 0, format, arg2);
+ rv = __vsnprintf(NULL, 0, format, arg2);
va_end(arg2);
*buf = NULL;
if (rv >= 0) {
if ((*buf = malloc(++rv)) != NULL) {
- if ((rv = vsnprintf(*buf, rv, format, arg)) < 0) {
+ if ((rv = __vsnprintf(*buf, rv, format, arg)) < 0) {
free(*buf);
*buf = NULL;
}
@@ -74,5 +74,6 @@ int vasprintf(char **__restrict buf, const char * __restrict format,
#endif /* __UCLIBC_HAS_GLIBC_CUSTOM_STREAMS__ */
}
+strong_alias(__vasprintf,vasprintf)
#endif