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:
authorJeff Johnston <jjohnstn@redhat.com>2004-01-15 22:12:17 +0300
committerJeff Johnston <jjohnstn@redhat.com>2004-01-15 22:12:17 +0300
commit6a150987938abfef78f72d0bf4ed6b427b25e040 (patch)
tree949b48479d75f080146cb875ce6231395e6df4db /newlib/libc/stdio/findfp.c
parentd4c437af3e23285bc9aa0ef19b1dcf02aee87a93 (diff)
2004-01-15 Thomas Pfaff <tpfaff@gmx.net>
* libc/stdio/fclose.c: Include sys/lock.h. (fclose): Destroy lock when file is closed. * libc/stdio/findfp.c (__sfp): Initialize file pointers _lock member. * libc/stdio/freopen.c: Include sys/lock.h. (_freopen_r): Destroy lock when file is closed. * libc/stdio/vfprintf.c (__sbprintf): Initialize file pointers _lock member.
Diffstat (limited to 'newlib/libc/stdio/findfp.c')
-rw-r--r--newlib/libc/stdio/findfp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c
index 2a907bb6d..efbb62561 100644
--- a/newlib/libc/stdio/findfp.c
+++ b/newlib/libc/stdio/findfp.c
@@ -114,6 +114,10 @@ found:
fp->_ub._size = 0;
fp->_lb._base = NULL; /* no line buffer */
fp->_lb._size = 0;
+#ifndef __SINGLE_THREAD__
+ memset (&fp->_lock, 0, sizeof(fp->_lock));
+#endif
+
return fp;
}