#include <sys/stat.h>
#include <sys/file.h>
#include <ctype.h>
+#include <errno.h>
#include "lisp.h"
#ifndef standalone
#include <math.h>
#endif /* LISP_FLOAT_TYPE */
+extern int errno;
+
Lisp_Object Qread_char, Qget_file_char, Qstandard_input, Qcurrent_load_list;
Lisp_Object Qvariable_documentation, Vvalues, Vstandard_input, Vafter_load_alist;
Lisp_Object Qascii_character, Qload;
return c;
}
if (EQ (readcharfun, Qget_file_char))
- return getc (instream);
+ {
+ c = getc (instream);
+#ifdef EINTR
+ /* Interrupted reads have been observed while reading over the network */
+ while (c == EOF && ferror (instream) && errno == EINTR)
+ {
+ clearerr (instream);
+ c = getc (instream);
+ }
+#endif
+ return c;
+ }
if (XTYPE (readcharfun) == Lisp_String)
{