From 7881a70fad739dffb32ca51c10f9501d37172452 Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 25 Apr 2013 15:29:19 +0000 Subject: 2013-04-25 Sebastian Huber * libc/stdio/local.h (_STDIO_CLOSE_PER_REENT_STD_STREAMS): New define. * libc/stdio/findfp.c (_STDIO_CLOSE_PER_REENT_STD_STREAMS): Use define. --- newlib/libc/stdio/findfp.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'newlib/libc/stdio/findfp.c') 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); /* -- cgit v1.2.3