not, write to the Free Software Foundation, Inc., 675 Mass Ave,
Cambridge, MA 02139, USA. */
-#include <crtdll/stdio.h>
+#include <msvcrt/stdio.h>
/* Read a word (int) from STREAM. */
-int
-_getw(FILE *stream)
+int _getw(FILE *stream)
{
int w;
/* Is there a better way? */
- if (fread( &w, sizeof(w), 1, stream) != 1)
+ if (fread( &w, sizeof(w), 1, stream) != 1) {
+ // EOF is a legitimate integer value so users must
+ // check feof or ferror to verify an EOF return.
return(EOF);
+ }
return(w);
}