#include <stdio.h>
#include <sys/types.h>
+#include <stdlib.h>
+#include <string.h>
-
-#ifdef STDC_HEADERS
-# include <stdlib.h>
-#else
-void free ();
-#endif
-#if defined STDC_HEADERS || defined HAVE_STRING_H
-# include <string.h>
-#else
-# include <strings.h>
-#endif
#include "xalloc.h"
#ifndef strstr
if (ferror (fp))
{
+ /* The last fread() call must have failed. */
int saved_errno = errno;
fclose (fp);
errno = saved_errno;