(_IO_old_fclose): Detect new streams and handle them appropriately.

This commit is contained in:
Ulrich Drepper 1999-07-28 04:35:44 +00:00
parent 1da9f3f5f5
commit 4b77b2f8bb

View File

@ -37,6 +37,12 @@ _IO_old_fclose (fp)
CHECK_FILE(fp, EOF);
/* We desperately try to help programs which are using streams in a
strange way and mix old and new functions. Detect new streams
here. */
if (fp->_vtable_offset == 0)
return _IO_new_fclose (fp);
_IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
_IO_flockfile (fp);
if (fp->_IO_file_flags & _IO_IS_FILEBUF)