about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-08-26 08:08:21 +0000
committerUlrich Drepper <drepper@redhat.com>2003-08-26 08:08:21 +0000
commit2fe98a4ae7dadec3aa4dfed4fe041aacfa641de9 (patch)
tree52428ada97e14d545f2fa61119ed4d4e59e354a6
parent41c26b683e8f7d2eaec65d96cb9c7eba663dcd81 (diff)
downloadglibc-2fe98a4ae7dadec3aa4dfed4fe041aacfa641de9.tar.gz
glibc-2fe98a4ae7dadec3aa4dfed4fe041aacfa641de9.tar.xz
glibc-2fe98a4ae7dadec3aa4dfed4fe041aacfa641de9.zip
Update.
2003-08-26  Jakub Jelinek  <jakub@redhat.com>

	* 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.
-rw-r--r--ChangeLog6
-rw-r--r--elf/ldconfig.c2
-rw-r--r--libio/oldfileops.c11
3 files changed, 13 insertions, 6 deletions
diff --git a/ChangeLog b/ChangeLog
index b3a1f5c0a9..a7eed0ea9a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2003-08-26  Jakub Jelinek  <jakub@redhat.com>
+
+	* 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.
+
 2003-08-25  Ulrich Drepper  <drepper@redhat.com>
 
 	* libio/oldfileops.c (_IO_old_file_init): Initialize _mode field
diff --git a/elf/ldconfig.c b/elf/ldconfig.c
index 64c4f64727..3c348c9e7c 100644
--- a/elf/ldconfig.c
+++ b/elf/ldconfig.c
@@ -793,7 +793,7 @@ search_dir (const struct dir_entry *entry)
 	{
 	  /* If the path the link points to isn't its soname and it is not
 	     .so symlink for ld(1) only, we treat it as a normal file.  */
-	  char *real_base_name = basename (real_name);
+	  const char *real_base_name = basename (real_file_name);
 
 	  if (strcmp (real_base_name, soname) != 0)
 	    {
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
 }