summaryrefslogtreecommitdiffstats
path: root/newlib/libc/stdio/findfp.c
diff options
context:
space:
mode:
authorJoel Sherrill <joel.sherrill@oarcorp.com>2013-04-25 15:29:19 +0000
committerJoel Sherrill <joel.sherrill@oarcorp.com>2013-04-25 15:29:19 +0000
commit7881a70fad739dffb32ca51c10f9501d37172452 (patch)
tree2a9cf4b4ddf732dcd7118722966b8fa48dcb083c /newlib/libc/stdio/findfp.c
parent453c3a5fe8eb1b65f3d7bdc6c8c31f2e79cab640 (diff)
downloadcygnal-7881a70fad739dffb32ca51c10f9501d37172452.tar.gz
cygnal-7881a70fad739dffb32ca51c10f9501d37172452.tar.bz2
cygnal-7881a70fad739dffb32ca51c10f9501d37172452.zip
2013-04-25 Sebastian Huber <sebastian.huber@embedded-brains.de>
* libc/stdio/local.h (_STDIO_CLOSE_PER_REENT_STD_STREAMS): New define. * libc/stdio/findfp.c (_STDIO_CLOSE_PER_REENT_STD_STREAMS): Use define.
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 7ab3bdba5..e40500a07 100644
--- a/newlib/libc/stdio/findfp.c
+++ b/newlib/libc/stdio/findfp.c
@@ -62,7 +62,11 @@ _DEFUN(std, (ptr, flags, file, data),
ptr->_flags |= __SL64;
#endif /* __LARGE64_FILES */
ptr->_seek = __sseek;
+#ifdef _STDIO_CLOSE_PER_REENT_STD_STREAMS
ptr->_close = __sclose;
+#else /* _STDIO_CLOSE_STD_STREAMS */
+ ptr->_close = NULL;
+#endif /* _STDIO_CLOSE_STD_STREAMS */
#if !defined(__SINGLE_THREAD__) && !defined(_REENT_SMALL)
__lock_init_recursive (ptr->_lock);
/*