Update.
authorUlrich Drepper <drepper@redhat.com>
Wed, 6 Sep 2000 03:40:54 +0000 (03:40 +0000)
committerUlrich Drepper <drepper@redhat.com>
Wed, 6 Sep 2000 03:40:54 +0000 (03:40 +0000)
2000-09-05  Ulrich Drepper  <drepper@redhat.com>

* libio/libio.h (_IO_fwide_maybe_incompatible): For glibc 2.0
compatibility check for old stream and call _IO_wide in doubt.
(_IO_fwide): Use _IO_fwide_maybe_incompatible macro.
* libio/iofwide.c (_IO_fwide): If compatibility with glibc 2.0 is
needed tst for such an old structure and don't do anything.
* libio/freopen.c: Remove declaration of _IO_stdin_used.

* soft-fp/Makefile (distribute): Add op-8.h and testit.c.
* soft-fp/Makefile (distribute): Add the math functions, too.
* soft-fp/Makefile (distribute): Add ChangeLog, Banner, and configure.
* soft-fp/soft-fp.h (_FP_ROUND_ZERO): Cast 0 to void before using it
as a statement.
* soft-fp/sysdeps/powerpc/Makefile (routines): New file.
* soft-fp/sysdeps/powerpc/q_*: New files.

ChangeLog
libio/freopen.c
libio/libio.h

index dffff54..ff20a0c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2000-09-05  Ulrich Drepper  <drepper@redhat.com>
+
+       * libio/libio.h (_IO_fwide_maybe_incompatible): For glibc 2.0
+       compatibility check for old stream and call _IO_wide in doubt.
+       (_IO_fwide): Use _IO_fwide_maybe_incompatible macro.
+       * libio/iofwide.c (_IO_fwide): If compatibility with glibc 2.0 is
+       needed tst for such an old structure and don't do anything.
+       * libio/freopen.c: Remove declaration of _IO_stdin_used.
+
 2000-09-06  Andreas Jaeger  <aj@suse.de>
 
        * sysdeps/powerpc/Makefile [$(subdir) = elf]: Modify
 
 2000-06-13  Ulrich Drepper  <drepper@redhat.com>
 
-        * soft-fp/Makefile (distribute): Add op-8.h and testit.c.
+       * soft-fp/Makefile (distribute): Add op-8.h and testit.c.
 
-        * soft-fp/Makefile (distribute): Add the math functions, too.
+       * soft-fp/Makefile (distribute): Add the math functions, too.
 
-        * soft-fp/Makefile (distribute): Add ChangeLog, Banner, and configure.
+       * soft-fp/Makefile (distribute): Add ChangeLog, Banner, and configure.
 
 2000-03-03  Geoff Keating  <geoffk@cygnus.com>
 
-        * soft-fp/soft-fp.h (_FP_ROUND_ZERO): Cast 0 to void before using it
-        as a statement.
+       * soft-fp/soft-fp.h (_FP_ROUND_ZERO): Cast 0 to void before using it
+       as a statement.
 
-        * soft-fp/sysdeps/powerpc/Makefile (routines): New file.
-        * soft-fp/sysdeps/powerpc/q_*: New files.
+       * soft-fp/sysdeps/powerpc/Makefile (routines): New file.
+       * soft-fp/sysdeps/powerpc/q_*: New files.
 
 2000-09-05  Ulrich Drepper  <drepper@redhat.com>
 
index 3f1e8f4..38df848 100644 (file)
 #include "libioP.h"
 #include "stdio.h"
 
-#ifdef SHARED
-extern void *_IO_stdin_used;
-weak_extern (_IO_stdin_used);
-#endif
-
 #include <shlib-compat.h>
 
 FILE*
index 12826ff..edf5240 100644 (file)
@@ -472,11 +472,25 @@ extern _IO_wint_t _IO_getwc (_IO_FILE *__fp) __THROW;
 extern _IO_wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp) __THROW;
 extern int _IO_fwide (_IO_FILE *__fp, int __mode) __THROW;
 # if __GNUC__ >= 2
+/* While compiling glibc we have to handle compatibility with very old
+   versions.  */
+#  if defined _LIBC && defined SHARED
+#   include <shlib-compat.h>
+#   if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
+#    define _IO_fwide_maybe_incompatible \
+  (__builtin_expect (&_IO_stdin_used == NULL, 0))
+extern const int _IO_stdin_used;
+weak_extern (_IO_stdin_used);
+#   endif
+#  endif
+#  ifndef _IO_fwide_maybe_incompatible
+#   define _IO_fwide_maybe_incompatible (0)
+#  endif
 /* A special optimized version of the function above.  It optimizes the
    case of initializing an unoriented byte stream.  */
 #  define _IO_fwide(__fp, __mode) \
   ({ int __result = (__mode);                                                \
-     if (__result < 0)                                                       \
+     if (__result < 0 && ! _IO_fwide_maybe_incompatible)                     \
        {                                                                     \
         if ((__fp)->_mode == 0)                                              \
           /* We know that all we have to do is to set the flag.  */          \