diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2015-12-08 21:23:22 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2015-12-08 21:23:22 +0100 |
commit | 91a8eacec6575a3a2c6aa4c4cf26961870f6074a (patch) | |
tree | f5eddf39c5d7e22f148092859eeef55f141ae332 /newlib/libc/stdio/findfp.c | |
parent | 414e7948118bb3b7071e7c8cbddcf371e0d48e38 (diff) | |
download | cygnal-91a8eacec6575a3a2c6aa4c4cf26961870f6074a.tar.gz cygnal-91a8eacec6575a3a2c6aa4c4cf26961870f6074a.tar.bz2 cygnal-91a8eacec6575a3a2c6aa4c4cf26961870f6074a.zip |
Add missing checks for __SNLK flag
* libc/stdio/fclose.c (_fclose_r): Make _flockfile/_funlockfile calls
dependent on __SNLK flag.
* libc/stdio/findfp.c (__fp_lock): Ditto.
(__fp_unlock): Ditto.
* libc/stdio/freopen.c (_freopen_r): Ditto.
* libc/stdio64/freopen64.c (_freopen64_r): Ditto.
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'newlib/libc/stdio/findfp.c')
-rw-r--r-- | newlib/libc/stdio/findfp.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c index 27408f548..975a855c2 100644 --- a/newlib/libc/stdio/findfp.c +++ b/newlib/libc/stdio/findfp.c @@ -293,7 +293,8 @@ static int _DEFUN(__fp_lock, (ptr), FILE * ptr) { - _flockfile (ptr); + if (!(ptr->_flags2 & __SNLK)) + _flockfile (ptr); return 0; } @@ -303,7 +304,8 @@ static int _DEFUN(__fp_unlock, (ptr), FILE * ptr) { - _funlockfile (ptr); + if (!(ptr->_flags2 & __SNLK)) + _funlockfile (ptr); return 0; } |