From 0566febf9da32f7cd1b4b21058241afe4cf22e57 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 10 Aug 1990 02:13:44 +0000 Subject: [PATCH] Move non-blocking I/O definitions to "ux.h". --- v7/src/microcode/ux.h | 18 +++++++++++++----- v7/src/microcode/uxio.c | 24 +----------------------- 2 files changed, 14 insertions(+), 28 deletions(-) diff --git a/v7/src/microcode/ux.h b/v7/src/microcode/ux.h index 4f990b017..e2f5c652b 100644 --- a/v7/src/microcode/ux.h +++ b/v7/src/microcode/ux.h @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/ux.h,v 1.7 1990/07/30 23:16:25 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/ux.h,v 1.8 1990/08/10 02:13:28 cph Exp $ Copyright (c) 1988, 1989, 1990 Massachusetts Institute of Technology @@ -91,6 +91,9 @@ extern void EXFUN (error_system_call, (int code, CONST char * name)); #define HAVE_WAITPID #define VOID_SIGNAL_HANDLERS +#define ERRNO_NONBLOCK EAGAIN +#define FCNTL_NONBLOCK O_NONBLOCK + #else /* not _POSIX */ #ifdef _BSD @@ -106,12 +109,11 @@ extern void EXFUN (error_system_call, (int code, CONST char * name)); #define HAVE_DIR #define HAVE_DUP2 #define HAVE_FCNTL -#define HAVE_FNDELAY #define HAVE_GETWD #define HAVE_MKDIR #define HAVE_RENAME #define HAVE_RMDIR -#define HAVE_SELECT /* does POSIX allow this */ +#define HAVE_SELECT #define HAVE_TIMES #define HAVE_WAIT3 /* MORE/BSD has this -- do all 4.3 implementations? */ @@ -122,6 +124,9 @@ extern void EXFUN (error_system_call, (int code, CONST char * name)); #define VOID_SIGNAL_HANDLERS #endif +#define ERRNO_NONBLOCK EWOULDBLOCK +#define FCNTL_NONBLOCK FNDELAY + #else /* not _BSD */ #ifdef _SYSV @@ -131,11 +136,14 @@ extern void EXFUN (error_system_call, (int code, CONST char * name)); #define HAVE_APPEND #define HAVE_FCNTL -#define HAVE_ONDELAY #define HAVE_GETCWD #define HAVE_TERMIO #define HAVE_TIMES +#define AMBIGUOUS_NONBLOCK +#define ERRNO_NONBLOCK EAGAIN +#define FCNTL_NONBLOCK O_NDELAY + #ifdef _SYSV3 #include @@ -157,7 +165,7 @@ extern void EXFUN (error_system_call, (int code, CONST char * name)); #define HAVE_MKDIR #define HAVE_RENAME #define HAVE_RMDIR -#define HAVE_SELECT /* does POSIX allow this */ +#define HAVE_SELECT #define HAVE_WAIT3 #if (_HPUX_VERSION < 65) diff --git a/v7/src/microcode/uxio.c b/v7/src/microcode/uxio.c index b07d9eaa2..4186437c0 100644 --- a/v7/src/microcode/uxio.c +++ b/v7/src/microcode/uxio.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxio.c,v 1.3 1990/07/28 18:56:56 jinx Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/uxio.c,v 1.4 1990/08/10 02:13:44 cph Exp $ Copyright (c) 1990 Massachusetts Institute of Technology @@ -117,28 +117,6 @@ DEFUN (OS_channel_type, (channel), Tchannel channel) return (CHANNEL_TYPE (channel)); } -#ifdef _POSIX - -#define ERRNO_NONBLOCK EAGAIN -#define FCNTL_NONBLOCK O_NONBLOCK - -#else /* not _POSIX */ -#ifdef HAVE_ONDELAY - -#define AMBIGUOUS_NONBLOCK -#define ERRNO_NONBLOCK EAGAIN -#define FCNTL_NONBLOCK O_NDELAY - -#else /* not HAVE_ONDELAY */ -#ifdef HAVE_FNDELAY - -#define ERRNO_NONBLOCK EWOULDBLOCK -#define FCNTL_NONBLOCK FNDELAY - -#endif /* HAVE_FNDELAY */ -#endif /* HAVE_ONDELAY */ -#endif /* not _POSIX */ - long DEFUN (OS_channel_read, (channel, buffer, nbytes), Tchannel channel AND -- 2.25.1