diff options
author | Ulrich Drepper <drepper@redhat.com> | 1999-07-28 04:35:44 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1999-07-28 04:35:44 +0000 |
commit | 4b77b2f8bb0f066509fb4101d1b246dd1feb252b (patch) | |
tree | ecc9981b3667ae78b3ec4c13ba91e81f5f94d744 /libio | |
parent | 1da9f3f5f523de225ba0d105de6e63a5c7205088 (diff) |
(_IO_old_fclose): Detect new streams and handle them appropriately.
Diffstat (limited to 'libio')
-rw-r--r-- | libio/oldiofclose.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libio/oldiofclose.c b/libio/oldiofclose.c index 51781366d6..8ddad32b04 100644 --- a/libio/oldiofclose.c +++ b/libio/oldiofclose.c @@ -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) |