diff options
Diffstat (limited to 'newlib/libc/stdio/vasprintf.c')
-rw-r--r-- | newlib/libc/stdio/vasprintf.c | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/newlib/libc/stdio/vasprintf.c b/newlib/libc/stdio/vasprintf.c index 2c8065c..90539d1 100644 --- a/newlib/libc/stdio/vasprintf.c +++ b/newlib/libc/stdio/vasprintf.c @@ -24,34 +24,17 @@ static char sccsid[] = "%W% (Berkeley) %G%"; #include <_ansi.h> #include <stdio.h> #include <limits.h> -#ifdef _HAVE_STDC #include <stdarg.h> -#else -#include <varargs.h> -#endif #ifndef _REENT_ONLY int _DEFUN(vasprintf, (strp, fmt, ap), char **strp _AND - _CONST char *fmt _AND + const char *fmt _AND va_list ap) { - int ret; - FILE f; - - f._flags = __SWR | __SSTR | __SMBF; - f._bf._base = f._p = NULL; - f._bf._size = f._w = 0; - f._file = -1; /* No file. */ - ret = _vfprintf_r (_REENT, &f, fmt, ap); - if (ret >= 0) - { - *f._p = 0; - *strp = f._bf._base; - } - return ret; + return _vasprintf_r (_REENT, strp, fmt, ap); } #endif /* !_REENT_ONLY */ @@ -60,7 +43,7 @@ int _DEFUN(_vasprintf_r, (ptr, strp, fmt, ap), struct _reent *ptr _AND char **strp _AND - _CONST char *fmt _AND + const char *fmt _AND va_list ap) { int ret; |