diff options
Diffstat (limited to 'newlib/libc/stdio/vasprintf.c')
-rw-r--r-- | newlib/libc/stdio/vasprintf.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/newlib/libc/stdio/vasprintf.c b/newlib/libc/stdio/vasprintf.c index fbfedee00..539e23114 100644 --- a/newlib/libc/stdio/vasprintf.c +++ b/newlib/libc/stdio/vasprintf.c @@ -33,6 +33,8 @@ static char sccsid[] = "%W% (Berkeley) %G%"; #include <varargs.h> #endif +#ifndef _REENT_ONLY + int _DEFUN (vasprintf, (strp, fmt, ap), char **strp _AND @@ -45,14 +47,15 @@ _DEFUN (vasprintf, (strp, fmt, ap), f._flags = __SWR | __SSTR | __SMBF; f._bf._base = f._p = NULL; f._bf._size = f._w = 0; - f._data = _REENT; f._file = -1; /* No file. */ - ret = vfprintf (&f, fmt, ap); + ret = _vfprintf_r (_REENT, &f, fmt, ap); *f._p = 0; *strp = f._bf._base; return ret; } +#endif /* !_REENT_ONLY */ + int _DEFUN (_vasprintf_r, (ptr, strp, fmt, ap), struct _reent *ptr _AND @@ -66,7 +69,6 @@ _DEFUN (_vasprintf_r, (ptr, strp, fmt, ap), f._flags = __SWR | __SSTR | __SMBF ; f._bf._base = f._p = NULL; f._bf._size = f._w = 0; - f._data = ptr; f._file = -1; /* No file. */ ret = _vfprintf_r (ptr, &f, fmt, ap); *f._p = 0; |