/* Close a stream, with nicer error checking than fclose's.
- Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2007, 2008 Free
- Software Foundation, Inc.
+ Copyright (C) 1998-2002, 2004, 2006-2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
if (prev_fail || (fclose_fail && (some_pending || errno != EBADF)))
{
if (! fclose_fail)
- errno = 0;
+ errno = 0;
return EOF;
}