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/fputc.c')
-rw-r--r--newlib/libc/stdio/fputc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/newlib/libc/stdio/fputc.c b/newlib/libc/stdio/fputc.c
index 966a0dbf7..b945095e5 100644
--- a/newlib/libc/stdio/fputc.c
+++ b/newlib/libc/stdio/fputc.c
@@ -47,5 +47,9 @@ _DEFUN (fputc, (ch, file),
int ch _AND
FILE * file)
{
- return putc (ch, file);
+ int result;
+ _flockfile(file);
+ result = putc (ch, file);
+ _funlockfile(file);
+ return result;
}