From d69469f15e30e4ee7cd8f11edd7ad87196a92d44 Mon Sep 17 00:00:00 2001 From: Owen Shepherd Date: Thu, 27 Dec 2012 00:05:11 +0000 Subject: [PATCH] FIXES PDCLIB-20 by preserving _PDCLIB_STATUS flag --- functions/stdio/freopen.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/functions/stdio/freopen.c b/functions/stdio/freopen.c index 9c49756..741731b 100644 --- a/functions/stdio/freopen.c +++ b/functions/stdio/freopen.c @@ -21,7 +21,10 @@ struct _PDCLIB_file_t * freopen( { flockfile( stream ); - unsigned int status = stream->status & ( _IONBF | _IOLBF | _IOFBF | _PDCLIB_FREEBUFFER | _PDCLIB_DELONCLOSE ); + unsigned int status = stream->status & + ( _IONBF | _IOLBF | _IOFBF | _PDCLIB_FREEBUFFER + | _PDCLIB_DELONCLOSE | _PDCLIB_STATIC ); + /* TODO: This function can change wide orientation of a stream */ if ( stream->status & _PDCLIB_FWRITE ) { -- 2.40.0