aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSteven Tamm2002-12-10 16:48:04 +0000
committerSteven Tamm2002-12-10 16:48:04 +0000
commit2eb46b2df249746874003e9d2a0454308feb5372 (patch)
treeac022d179872294ba6691ba2bad3483508926067 /src
parent4711065ae92dc56a20d83fd7607151ece6a587a6 (diff)
downloademacs-2eb46b2df249746874003e9d2a0454308feb5372.tar.gz
emacs-2eb46b2df249746874003e9d2a0454308feb5372.zip
Fixed OSX sys_read to not call select if IO is non-blocking
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog5
-rw-r--r--src/mac.c4
2 files changed, 8 insertions, 1 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 650df8494e7..b8318c41949 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,8 @@
12002-12-10 Steven Tamm <steventamm@mac.com>
2
3 * mac.c (sys_read): Fixed sys_read to not call select if IO is
4 non-blocking
5
12002-12-10 Juanma Barranquero <lektu@terra.es> 62002-12-10 Juanma Barranquero <lektu@terra.es>
2 7
3 * editfns.c (Fformat): Use alloca, not _alloca. 8 * editfns.c (Fformat): Use alloca, not _alloca.
diff --git a/src/mac.c b/src/mac.c
index 439f900db5b..bf1915cbacd 100644
--- a/src/mac.c
+++ b/src/mac.c
@@ -32,6 +32,7 @@ Boston, MA 02111-1307, USA. */
32#include <pwd.h> 32#include <pwd.h>
33#include <sys/param.h> 33#include <sys/param.h>
34#include <stdlib.h> 34#include <stdlib.h>
35#include <fcntl.h>
35#if __MWERKS__ 36#if __MWERKS__
36#include <unistd.h> 37#include <unistd.h>
37#endif 38#endif
@@ -2811,7 +2812,8 @@ int sys_read (fds, buf, nbyte)
2811 int r; 2812 int r;
2812 2813
2813 /* Use select to block on IO while still checking for quit_char */ 2814 /* Use select to block on IO while still checking for quit_char */
2814 if (!inhibit_window_system && !noninteractive) 2815 if (!inhibit_window_system && !noninteractive &&
2816 ! (fcntl(fds, F_GETFL, 0) & O_NONBLOCK))
2815 { 2817 {
2816 FD_ZERO (&rfds); 2818 FD_ZERO (&rfds);
2817 FD_SET (fds, &rfds); 2819 FD_SET (fds, &rfds);