1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00
2007-07-07  Ulrich Drepper  <drepper@redhat.com>
	[BZ #4745]
	* libio/strops.c (_IO_str_underflow): Clear errno before returning
	EOF.
	* stdio-common/Makefile (tests): Add bug18.
	* stdio-common/bug18.c: New file.
This commit is contained in:
Ulrich Drepper
2007-07-07 18:29:30 +00:00
parent 765c6b0c46
commit c2c7bd3f86
4 changed files with 58 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1993, 1997-2003, 2004, 2006 Free Software Foundation, Inc.
/* Copyright (C) 1993, 1997-2004, 2006, 2007 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
@ -166,7 +166,12 @@ _IO_str_underflow (fp)
if (fp->_IO_read_ptr < fp->_IO_read_end)
return *((unsigned char *) fp->_IO_read_ptr);
else
return EOF;
{
/* We have to reset errno since callers check for errno being
EINTR and there has been no such problem here. */
__set_errno (0);
return EOF;
}
}
INTDEF(_IO_str_underflow)