From 5e473a71467d30b51faadb7b5ae4305abc0a16d7 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 9 Aug 2001 00:11:12 +0000 Subject: 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. --- libio/iofgetws.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'libio/iofgetws.c') 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 { -- cgit v1.2.3