2003-02-05 Jonathan Larmour <jifl@eCosCentric.com>

* libc/stdio/vsprintf.c (vsprintf, _vsprintf_r): Set _file fd to
    -1 to be sure it cannot later match a valid file fd causing
    isatty() to return 1.
    * libc/stdio/asprintf.c (asprintf, _asprintf_r): Ditto.
    * libc/stdio/sprintf.c (sprintf, _sprintf_r): Ditto.
    * libc/stdio/vasprintf.c (vasprintf, _vasprintf_r): Ditto.
This commit is contained in:
Jeff Johnston
2003-02-05 16:52:34 +00:00
parent b7f52fe81a
commit 5017a3dafa
5 changed files with 17 additions and 0 deletions

View File

@ -47,6 +47,7 @@ _asprintf_r (ptr, strp, fmt, va_alist)
f._bf._base = f._p = NULL;
f._bf._size = f._w = 0;
f._data = ptr;
f._file = -1; /* No file. */
#ifdef _HAVE_STDC
va_start (ap, fmt);
#else
@ -80,6 +81,7 @@ asprintf (strp, fmt, va_alist)
f._bf._base = f._p = NULL;
f._bf._size = f._w = 0;
f._data = _REENT;
f._file = -1; /* No file. */
#ifdef _HAVE_STDC
va_start (ap, fmt);
#else