From: Owen Shepherd Date: Thu, 27 Dec 2012 00:05:11 +0000 (+0000) Subject: FIXES PDCLIB-20 by preserving _PDCLIB_STATUS flag X-Git-Url: https://pd.if.org/git/?p=pdclib;a=commitdiff_plain;h=d69469f15e30e4ee7cd8f11edd7ad87196a92d44 FIXES PDCLIB-20 by preserving _PDCLIB_STATUS flag --- 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 ) {