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/vfprintf.c')
-rw-r--r--newlib/libc/stdio/vfprintf.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c
index 302b5aab9..27cc6d911 100644
--- a/newlib/libc/stdio/vfprintf.c
+++ b/newlib/libc/stdio/vfprintf.c
@@ -298,8 +298,12 @@ _DEFUN (VFPRINTF, (fp, fmt0, ap),
_CONST char *fmt0 _AND
va_list ap)
{
+ int result;
+ _flockfile(fp);
CHECK_INIT (fp);
- return _VFPRINTF_R (fp->_data, fp, fmt0, ap);
+ result = _VFPRINTF_R (fp->_data, fp, fmt0, ap);
+ _funlockfile(fp);
+ return result;
}
int