mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-18 22:50:07 +00:00
(_IO_old_fclose): Detect new streams and handle them appropriately.
This commit is contained in:
parent
1da9f3f5f5
commit
4b77b2f8bb
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user