Implement primitive to detect availability of `select' system call.
authorChris Hanson <org/chris-hanson/cph>
Tue, 6 Apr 1993 22:23:35 +0000 (22:23 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 6 Apr 1993 22:23:35 +0000 (22:23 +0000)
v7/src/microcode/dosio.c
v7/src/microcode/osio.h
v7/src/microcode/prosio.c
v7/src/microcode/pruxio.c
v7/src/microcode/uxio.c
v7/src/microcode/uxselect.h
v7/src/microcode/version.h
v7/src/microcode/x11base.c
v8/src/microcode/version.h

index 1dc753c02a55f5370677900d0ca585f1602e4735..e873576e7bba20542010f8860c9f19370da2aab3 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Id: dosio.c,v 1.3 1992/11/23 04:17:43 gjr Exp $
+$Id: dosio.c,v 1.4 1993/04/06 22:19:01 cph Exp $
 
-Copyright (c) 1992 Massachusetts Institute of Technology
+Copyright (c) 1992-93 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -491,8 +491,9 @@ DEFUN (OS_channel_unregister, (channel), Tchannel channel)
     }
 }
 
-
 /* No SELECT in DOS */
+CONST int OS_have_select_p = 0;
+
 long
 DEFUN (OS_channel_select_then_read, (channel, buffer, nbytes),
        Tchannel channel AND
index 2ec48f8b3ac993d60a9c328b57b5aef9a0e6b0e9..21da239221552a0d8e90ccd89d46a69ce5702de5 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/osio.h,v 1.7 1991/03/11 23:42:31 cph Exp $
+$Id: osio.h,v 1.8 1993/04/06 22:18:26 cph Exp $
 
-Copyright (c) 1990-91 Massachusetts Institute of Technology
+Copyright (c) 1990-93 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -31,7 +31,7 @@ there shall be no use of the name of the Massachusetts Institute of
 Technology nor of any adaptation thereof in any advertising,
 promotional, or sales literature without prior written consent from
 MIT in each case. */
-
+\f
 #ifndef SCM_OSIO_H
 #define SCM_OSIO_H
 
@@ -77,6 +77,7 @@ extern int EXFUN (OS_channel_nonblocking_p, (Tchannel channel));
 extern void EXFUN (OS_channel_nonblocking, (Tchannel channel));
 extern void EXFUN (OS_channel_blocking, (Tchannel channel));
 
+extern CONST int OS_have_select_p;
 extern unsigned int OS_channels_registered;
 extern int EXFUN (OS_channels_registered_p, (void));
 extern void EXFUN (OS_channel_register, (Tchannel channel));
index 5547a905af245e1c0ebc7854e227dd2493587ad5..84efe6b4186144e950d0e43674259c03a6fa1e0f 100644 (file)
@@ -1,8 +1,8 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/prosio.c,v 1.7 1992/02/04 04:36:56 cph Exp $
+$Id: prosio.c,v 1.8 1993/04/06 22:18:09 cph Exp $
 
-Copyright (c) 1987-92 Massachusetts Institute of Technology
+Copyright (c) 1987-93 Massachusetts Institute of Technology
 
 This material was developed by the Scheme project at the Massachusetts
 Institute of Technology, Department of Electrical Engineering and
@@ -207,6 +207,12 @@ DEFINE_PRIMITIVE ("MAKE-PIPE", Prim_make_pipe, 0, 0,
   }
 }
 
+DEFINE_PRIMITIVE ("HAVE-SELECT?", Prim_have_select_p, 0, 0, 0)
+{
+  PRIMITIVE_HEADER (0);
+  PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (OS_have_select_p));
+}
+
 DEFINE_PRIMITIVE ("CHANNEL-REGISTERED?", Prim_channel_registered_p, 1, 1,
   "Return #F iff CHANNEL is registered for selection.")
 {
index f9f1b02f2e11123006cb8d21580351e13fa446ef..fda974b80711b5d43a0e5b217b995fa6d01eeb07 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: pruxio.c,v 1.2 1993/04/06 21:34:02 cph Exp $
+$Id: pruxio.c,v 1.3 1993/04/06 22:18:19 cph Exp $
 
 Copyright (c) 1993 Massachusetts Institute of Technology
 
@@ -45,12 +45,6 @@ extern Tchannel EXFUN (arg_channel, (int arg_number));
 extern int EXFUN (UX_channel_descriptor, (Tchannel channel));
 #endif
 \f
-DEFINE_PRIMITIVE ("HAVE-SELECT?", Prim_have_select_p, 0, 0, 0)
-{
-  PRIMITIVE_HEADER (0);
-  PRIMITIVE_RETURN (BOOLEAN_TO_OBJECT (UX_have_select_p));
-}
-
 DEFINE_PRIMITIVE ("SELECT-REGISTRY-SIZE", Prim_selreg_size, 0, 0, 0)
 {
   PRIMITIVE_HEADER (0);
index 571117140077c7743e72c5542d24e67f76687287..f4ef01f4fee343e9a55bc7f3755aba2a95f3e4e5 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: uxio.c,v 1.24 1993/03/15 18:36:18 cph Exp $
+$Id: uxio.c,v 1.25 1993/04/06 22:18:45 cph Exp $
 
 Copyright (c) 1990-93 Massachusetts Institute of Technology
 
@@ -373,7 +373,7 @@ DEFUN (OS_channel_blocking, (channel), Tchannel channel)
 #endif
 
 #ifdef HAVE_SELECT
-CONST int UX_have_select_p = 1;
+CONST int OS_have_select_p = 1;
 extern int EXFUN (UX_process_any_status_change, (void));
 #ifndef SELECT_DECLARED
 extern int EXFUN (UX_select,
@@ -381,7 +381,7 @@ extern int EXFUN (UX_select,
                   struct timeval *));
 #endif /* not SELECT_DECLARED */
 #else /* not HAVE_SELECT */
-CONST int UX_have_select_p = 0;
+CONST int OS_have_select_p = 0;
 #endif /* not HAVE_SELECT */
 
 unsigned int
index 679e55bc6b497e184250c4766621715bdca59d5b..1f589e43f7d500cde0eb7e72257944064190f84e 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: uxselect.h,v 1.3 1993/03/10 17:55:54 cph Exp $
+$Id: uxselect.h,v 1.4 1993/04/06 22:18:54 cph Exp $
 
 Copyright (c) 1991-93 Massachusetts Institute of Technology
 
@@ -44,7 +44,6 @@ enum select_input
   select_input_interrupt
 };
 
-extern CONST int UX_have_select_p;
 extern enum select_input EXFUN (UX_select_input, (int fd, int blockp));
 extern unsigned int EXFUN (UX_select_registry_size, (void));
 extern unsigned int EXFUN (UX_select_registry_lub, (void));
index a1c595abdb4a37590b5ff8b46927e41182369278..007673e6492dccc5894249d96f348db70e41599d 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: version.h,v 11.129 1993/03/10 17:56:45 cph Exp $
+$Id: version.h,v 11.130 1993/04/06 22:23:35 cph Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     129
+#define SUBVERSION     130
 #endif
index 7282c4dde34fa855403f980ad94b3591f937a712..8e6ad848b940d9fd1e21c4cb1c529e982ebda043 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: x11base.c,v 1.47 1993/03/10 17:56:24 cph Exp $
+$Id: x11base.c,v 1.48 1993/04/06 22:18:36 cph Exp $
 
 Copyright (c) 1989-93 Massachusetts Institute of Technology
 
@@ -38,6 +38,7 @@ MIT in each case. */
 #include "prims.h"
 #include "ux.h"
 #include "uxselect.h"
+#include "osio.h"
 #include "x11.h"
 
 #ifndef X_DEFAULT_FONT
@@ -1134,7 +1135,7 @@ DEFUN (xd_process_events, (xd, non_block_p, use_select_p),
 {
   Display * display = (XD_DISPLAY (xd));
   unsigned int events_queued;
-  if (!UX_have_select_p)
+  if (!OS_have_select_p)
     use_select_p = 0;
   if (XD_CACHED_EVENT_P (xd))
     {
index a1c595abdb4a37590b5ff8b46927e41182369278..007673e6492dccc5894249d96f348db70e41599d 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Id: version.h,v 11.129 1993/03/10 17:56:45 cph Exp $
+$Id: version.h,v 11.130 1993/04/06 22:23:35 cph Exp $
 
 Copyright (c) 1988-1993 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     129
+#define SUBVERSION     130
 #endif