]> pd.if.org Git - pdclib/blobdiff - functions/stdio/freopen.c
FIXES PDCLIB-20 by preserving _PDCLIB_STATUS flag
[pdclib] / functions / stdio / freopen.c
index 9c49756d5e73dcdea7a4f89e53b5547deff06081..741731b9990b8b4b3dcfdbb46860812ac91afd16 100644 (file)
@@ -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 )
     {