aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-08-25 19:20:28 +0000
committerUlrich Drepper <drepper@redhat.com>2003-08-25 19:20:28 +0000
commit02b3c9059ae5ab0186df148221153e47e6b0f3a1 (patch)
tree9c0465c21bc56c9f3e36b17fb66c156e84fcbd3f
parentecc791d354229f19b85f7fdb3da0045508e2b743 (diff)
downloadglibc-02b3c9059ae5ab0186df148221153e47e6b0f3a1.zip
glibc-02b3c9059ae5ab0186df148221153e47e6b0f3a1.tar.gz
glibc-02b3c9059ae5ab0186df148221153e47e6b0f3a1.tar.bz2
(_IO_seekoff_unlocked): Add glibc 2.0 compatibility in wide stream test.
-rw-r--r--libio/ioseekoff.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libio/ioseekoff.c b/libio/ioseekoff.c
index 9229166..9383d71 100644
--- a/libio/ioseekoff.c
+++ b/libio/ioseekoff.c
@@ -53,7 +53,12 @@ _IO_seekoff_unlocked (fp, offset, dir, mode)
callback may not know to do the right thing about it.
This may be over-kill, but it'll do for now. TODO */
if (mode != 0 && ((_IO_fwide (fp, 0) < 0 && _IO_have_backup (fp))
- || (_IO_fwide (fp, 0) > 0 && _IO_have_wbackup (fp))))
+ || (
+#if defined _LIBC && SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
+ __builtin_expect (&_IO_stdin_used != NULL, 1) &&
+#endif
+ _IO_fwide (fp, 0) > 0 && _IO_have_wbackup (fp))
+ ))
{
if (dir == _IO_seek_cur && _IO_in_backup (fp))
{