From 2fe98a4ae7dadec3aa4dfed4fe041aacfa641de9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Tue, 26 Aug 2003 08:08:21 +0000 Subject: Update. 2003-08-26 Jakub Jelinek * elf/ldconfig.c (search_dir): When checking for GNU-style .so link file use the real file name, not the resolved name we got by following the symlinks. --- libio/oldfileops.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'libio') diff --git a/libio/oldfileops.c b/libio/oldfileops.c index 81e41503b2..e1cc1bda41 100644 --- a/libio/oldfileops.c +++ b/libio/oldfileops.c @@ -129,13 +129,14 @@ _IO_old_file_init (fp) - (int) sizeof (struct _IO_FILE_complete)); fp->file._fileno = -1; -#if defined SHARED && defined _LIBC \ - && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1) - if (__builtin_expect (&_IO_stdin_used != NULL, 0) - || (fp != _IO_stdin && fp != _IO_stdout && fp != _IO_stderr)) +#if defined SHARED && defined _LIBC + if (__builtin_expect (&_IO_stdin_used != NULL, 1) + || (fp != (struct _IO_FILE_plus *) _IO_stdin + && fp != (struct _IO_FILE_plus *) _IO_stdout + && fp != (struct _IO_FILE_plus *) _IO_stderr)) /* The object is dynamically allocated and large enough. Initialize the _mode element as well. */ - fp->_mode = -1; + ((struct _IO_FILE_complete *) fp)->_mode = -1; #endif } -- cgit v1.2.3