Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/stdio/vprintf.c')
-rw-r--r--newlib/libc/stdio/vprintf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/stdio/vprintf.c b/newlib/libc/stdio/vprintf.c
index f913bc097..e82306eaa 100644
--- a/newlib/libc/stdio/vprintf.c
+++ b/newlib/libc/stdio/vprintf.c
@@ -26,12 +26,15 @@
#include <varargs.h>
#endif
+#include "local.h"
+
int
_DEFUN (vprintf, (fmt, ap),
_CONST char *fmt _AND
va_list ap)
{
- return vfprintf (stdout, fmt, ap);
+ _REENT_SMALL_CHECK_INIT(_stdout_r (_REENT));
+ return vfprintf (_stdout_r (_REENT), fmt, ap);
}
int
@@ -40,5 +43,6 @@ _DEFUN (_vprintf_r, (ptr, fmt, ap),
_CONST char *fmt _AND
va_list ap)
{
+ _REENT_SMALL_CHECK_INIT(_stdout_r (ptr));
return _vfprintf_r (ptr, _stdout_r (ptr), fmt, ap);
}