diff options
Diffstat (limited to 'newlib/libc/stdio/vsprintf.c')
-rw-r--r-- | newlib/libc/stdio/vsprintf.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/newlib/libc/stdio/vsprintf.c b/newlib/libc/stdio/vsprintf.c index 3b92f2676..5efd43a82 100644 --- a/newlib/libc/stdio/vsprintf.c +++ b/newlib/libc/stdio/vsprintf.c @@ -31,6 +31,8 @@ static char sccsid[] = "%W% (Berkeley) %G%"; #include <varargs.h> #endif +#ifndef _REENT_ONLY + int _DEFUN (vsprintf, (str, fmt, ap), char *str _AND @@ -43,13 +45,14 @@ _DEFUN (vsprintf, (str, fmt, ap), f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *) str; f._bf._size = f._w = INT_MAX; - f._data = _REENT; f._file = -1; /* No file. */ - ret = vfprintf (&f, fmt, ap); + ret = _vfprintf_r (_REENT, &f, fmt, ap); *f._p = 0; return ret; } +#endif /* !_REENT_ONLY */ + int _DEFUN (_vsprintf_r, (ptr, str, fmt, ap), struct _reent *ptr _AND @@ -63,7 +66,6 @@ _DEFUN (_vsprintf_r, (ptr, str, fmt, ap), f._flags = __SWR | __SSTR; f._bf._base = f._p = (unsigned char *) str; f._bf._size = f._w = INT_MAX; - f._data = ptr; f._file = -1; /* No file. */ ret = _vfprintf_r (ptr, &f, fmt, ap); *f._p = 0; |