summaryrefslogtreecommitdiff
path: root/libio/iofgetws.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-09 00:11:12 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-09 00:11:12 +0000
commit5e473a71467d30b51faadb7b5ae4305abc0a16d7 (patch)
tree2988eff040e9881835c7f813ff51d180d4ca9555 /libio/iofgetws.c
parentca130fe4651a2ca547b05187bdc2804defc8a66b (diff)
update.
* libio/wfileops.c (_IO_wfile_underflow): Remove incorrect test for possible conversion using __codecvt_do_in. * libio/Makefile (tests): Add tst-fgetws. * libio/tst-fgetws.c: New file. * libio/iofgetws.c: Use _IO_ferror_unlocked macros instead of coding the test here.
Diffstat (limited to 'libio/iofgetws.c')
-rw-r--r--libio/iofgetws.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/libio/iofgetws.c b/libio/iofgetws.c
index b7e8352d72..741bb49e6f 100644
--- a/libio/iofgetws.c
+++ b/libio/iofgetws.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993, 95, 96, 97, 98, 99 Free Software Foundation, Inc.
+/* Copyright (C) 1993, 95, 96, 97, 98, 99, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -50,8 +50,7 @@ fgetws (buf, n, fp)
count = _IO_getwline (fp, buf, n - 1, L'\n', 1);
/* If we read in some bytes and errno is EAGAIN, that error will
be reported for next read. */
- if (count == 0 || ((fp->_IO_file_flags & _IO_ERR_SEEN)
- && errno != EAGAIN))
+ if (count == 0 || (_IO_ferror_unlocked (fp) && errno != EAGAIN))
result = NULL;
else
{