X-Git-Url: https://pd.if.org/git/?p=pdclib;a=blobdiff_plain;f=functions%2Fstdio%2Ffreopen.c;h=741731b9990b8b4b3dcfdbb46860812ac91afd16;hp=9c49756d5e73dcdea7a4f89e53b5547deff06081;hb=d69469f15e30e4ee7cd8f11edd7ad87196a92d44;hpb=d1aaf8b626ae8f729bc81dd7f15a16d8ccc0b227 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 ) {