+2002-12-10 Steven Tamm <steventamm@mac.com>
+
+ * mac.c (sys_read): Fixed sys_read to not call select if IO is
+ non-blocking
+
2002-12-10 Juanma Barranquero <lektu@terra.es>
* editfns.c (Fformat): Use alloca, not _alloca.
#include <pwd.h>
#include <sys/param.h>
#include <stdlib.h>
+#include <fcntl.h>
#if __MWERKS__
#include <unistd.h>
#endif
int r;
/* Use select to block on IO while still checking for quit_char */
- if (!inhibit_window_system && !noninteractive)
+ if (!inhibit_window_system && !noninteractive &&
+ ! (fcntl(fds, F_GETFL, 0) & O_NONBLOCK))
{
FD_ZERO (&rfds);
FD_SET (fds, &rfds);