]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Mon, 25 Aug 2003 22:02:03 +0000 (22:02 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 25 Aug 2003 22:02:03 +0000 (22:02 +0000)
2003-08-25  Ulrich Drepper  <drepper@redhat.com>

* libio/oldfileops.c (_IO_old_file_init): Initialize _mode field
if the object size is large enough.

ChangeLog
libio/oldfileops.c

index 0dd9c477c104e40466c3143b4befde0c961bf79c..b3a1f5c0a90296def93680bcd2056031743a1465 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2003-08-25  Ulrich Drepper  <drepper@redhat.com>
+
+       * libio/oldfileops.c (_IO_old_file_init): Initialize _mode field
+       if the object size is large enough.
+
 2003-08-25  Jakub Jelinek  <jakub@redhat.com>
 
        * elf/ldconfig.c (search_dir): Treat symlink as regular file
index 2efbadb44e8da8c1098446c09100ec2ec7617d1b..81e41503b2c4931164d56af72d984a8c8cd3b1fa 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993,95,97,98,99,2000,2002 Free Software Foundation, Inc.
+/* Copyright (C) 1993,95,97,98,99,2000,2002,2003 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Written by Per Bothner <bothner@cygnus.com>.
 
@@ -128,6 +128,15 @@ _IO_old_file_init (fp)
   fp->file._vtable_offset = ((int) sizeof (struct _IO_FILE)
                             - (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))
+    /* The object is dynamically allocated and large enough.  Initialize
+       the _mode element as well.  */
+    fp->_mode = -1;
+#endif
 }
 
 int
This page took 0.054573 seconds and 5 git commands to generate.