mirror of
https://sourceware.org/git/glibc.git
synced 2026-01-06 11:51:29 +03:00
Update.
* 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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user