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