summaryrefslogtreecommitdiff
blob: 60b2818e5181f6b58523809e8a0aea09f9e1f00f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
diff -r e16eb4429221 -r 125a138e07ed c/unix.h
--- a/c/unix.h	Sun Mar 16 22:30:45 2014 -0700
+++ b/c/unix.h	Mon Mar 17 11:22:54 2014 +0100
@@ -25,7 +25,7 @@
     if (STATUS != NULL)						\
       break;							\
     else if (errno != EINTR)					\
-      s48_os_error(NULL, errno, 0); }				\
+      s48_os_error_2(call, NULL, errno, 0); }			\
  } while (0)
 
 #define RETRY_OR_RAISE_NEG(STATUS, CALL)			\
@@ -35,7 +35,7 @@
     if (STATUS >= 0)						\
       break;							\
     else if (errno != EINTR)					\
-      s48_os_error(NULL, errno, 0); }				\
+      s48_os_error_2(call, NULL, errno, 0); }			\
  } while (0)
 

diff -r e16eb4429221 -r 125a138e07ed c/unix/fd-io.c
--- a/c/unix/fd-io.c	Sun Mar 16 22:30:45 2014 -0700
+++ b/c/unix/fd-io.c	Mon Mar 17 11:22:54 2014 +0100
@@ -323,21 +323,6 @@
  * one.
  */
 
-s48_value
-s48_add_channel(s48_value mode, s48_value id, long fd)
-{
-  if (mode == S48_CHANNEL_STATUS_OUTPUT
-      && fd != 1
-      && fd != 2) {
-    int flags;
-    RETRY_OR_RAISE_NEG(flags, fcntl(fd, F_GETFL));
-    if ((flags & O_NONBLOCK) == 0)
-      fprintf(stderr,
-        "Warning: output channel file descriptor %d is not non-blocking\n",
-	      (int) fd); }
-  return s48_really_add_channel(mode, id, fd);
-}
-
 s48_ref_t
 s48_add_channel_2(s48_call_t call, s48_ref_t mode, s48_ref_t id, long fd)
 {
diff -r e16eb4429221 -r 125a138e07ed c/win32/fd-io.c
--- a/c/win32/fd-io.c	Sun Mar 16 22:30:45 2014 -0700
+++ b/c/win32/fd-io.c	Mon Mar 17 11:22:54 2014 +0100
@@ -1211,13 +1211,6 @@
  * one.
  */
 
-s48_value
-s48_add_channel(s48_value mode, s48_value id, long fd)
-{
-  /* back to the VM */
-  return s48_really_add_channel(mode, id, fd);
-}
-
 s48_ref_t
 s48_add_channel_2(s48_call_t call, s48_ref_t mode, s48_ref_t id, long fd)
 {
diff -r 98197bf570a4 -r e16eb4429221 c/main.c
--- a/c/main.c	Sun Mar 02 16:50:12 2014 +0100
+++ b/c/main.c	Sun Mar 16 22:30:45 2014 -0700
@@ -5,6 +5,7 @@
  */
 
 extern long s48_initialize(int *argc, char ***argv);
+extern long s48_call_startup_procedure(char **, long);
 
 int
 main(int argc, char **argv)
diff -r 98197bf570a4 -r e16eb4429221 c/posix/proc.c
--- a/c/posix/proc.c	Sun Mar 02 16:50:12 2014 +0100
+++ b/c/posix/proc.c	Sun Mar 16 22:30:45 2014 -0700
@@ -9,6 +9,7 @@
  * Scheme 48/POSIX process environment interface
  */
 
+#define _GNU_SOURCE
 #include <stdio.h>
 #include <errno.h>
 #include <string.h>
diff -r 98197bf570a4 -r e16eb4429221 c/unix/socket.c
--- a/c/unix/socket.c	Sun Mar 02 16:50:12 2014 +0100
+++ b/c/unix/socket.c	Sun Mar 16 22:30:45 2014 -0700
@@ -11,6 +11,7 @@
 
 #include <sys/types.h>
 #include <sys/socket.h>
+#include <unistd.h>
 #include <errno.h>
 #include <fcntl.h>
 #include <stdlib.h>