+2004-11-17 Christopher Faylor <cgf@timesys.com>
+
+ * libc/stdio/refill.c (__srefill): Try again after EOF on Cygwin. Clear
+ EOF flag if successful.
+
2004-10-28 Christopher Faylor <cgf@timesys.com>
* libc/include/sys/signal.h: Move <signal.h> include to bottom of file
fp->_r = 0; /* largely a convenience for callers */
+#ifndef __CYGWIN__
/* SysV does not make this test; take it out for compatibility */
if (fp->_flags & __SEOF)
return EOF;
+#endif
/* if not already reading, have to be reading and writing */
if ((fp->_flags & __SRD) == 0)
fp->_p = fp->_bf._base;
fp->_r = (*fp->_read) (fp->_cookie, (char *) fp->_p, fp->_bf._size);
fp->_flags &= ~__SMOD; /* buffer contents are again pristine */
+#ifndef __CYGWIN__
if (fp->_r <= 0)
+#else
+ if (fp->_r > 0)
+ fp->_flags &= ~__SEOF;
+ else
+#endif
{
if (fp->_r == 0)
fp->_flags |= __SEOF;