diff options
author | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-04-25 15:29:19 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@oarcorp.com> | 2013-04-25 15:29:19 +0000 |
commit | 7881a70fad739dffb32ca51c10f9501d37172452 (patch) | |
tree | 2a9cf4b4ddf732dcd7118722966b8fa48dcb083c /newlib/libc/stdio/local.h | |
parent | 453c3a5fe8eb1b65f3d7bdc6c8c31f2e79cab640 (diff) | |
download | cygnal-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/local.h')
-rw-r--r-- | newlib/libc/stdio/local.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h index cbfeac77d..ec5efab49 100644 --- a/newlib/libc/stdio/local.h +++ b/newlib/libc/stdio/local.h @@ -32,6 +32,16 @@ # include <io.h> #endif +/* The following define determines if the per-reent stdin, stdout and stderr + streams are closed during _reclaim_reent(). The stdin, stdout and stderr + streams are initialized to use file descriptors 0, 1 and 2 respectively. In + case _STDIO_CLOSE_PER_REENT_STD_STREAMS is defined these file descriptors + will be closed via close() provided the owner of the reent structure + triggerd the on demand reent initilization, see CHECK_INIT(). */ +#ifndef __rtems__ +#define _STDIO_CLOSE_PER_REENT_STD_STREAMS +#endif + /* The following macros are supposed to replace calls to _flockfile/_funlockfile and __sfp_lock_acquire/__sfp_lock_release. In case of multi-threaded environments using pthreads, it's not sufficient to lock the stdio functions |