1
0
mirror of https://sourceware.org/git/glibc.git synced 2026-01-06 11:51:29 +03:00
* libio/iofclose.c (_IO_new_fclose): Detect new streams and handle
	them appropriately.
	* libio/oldiofclose.c (_IO_old_fclose): Likewise.
This commit is contained in:
Ulrich Drepper
1999-07-26 02:38:26 +00:00
parent 63f7cb448b
commit c7f7281eca
5 changed files with 52 additions and 1 deletions

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)