From c7f7281eca160b12767b9e3c25b443bce13512a2 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 26 Jul 1999 02:38:26 +0000 Subject: Update. * libio/iofclose.c (_IO_new_fclose): Detect new streams and handle them appropriately. * libio/oldiofclose.c (_IO_old_fclose): Likewise. --- libio/oldiofclose.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libio/oldiofclose.c') 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) -- cgit v1.2.3