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/putc.c')
-rw-r--r--newlib/libc/stdio/putc.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/newlib/libc/stdio/putc.c b/newlib/libc/stdio/putc.c
index 27a7a4280..7e53868ab 100644
--- a/newlib/libc/stdio/putc.c
+++ b/newlib/libc/stdio/putc.c
@@ -78,7 +78,10 @@ putc (c, fp)
int c;
register FILE *fp;
{
+ int result;
+ _flockfile(fp);
/* CHECK_INIT is (eventually) called by __swbuf. */
-
- return __sputc (c, fp);
+ result = __sputc (c, fp);
+ _funlockfile(fp);
+ return result;
}