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
|
Support for SOCKS wrappers in Unix.i3.
Also add some missing system call declarations.
Index: m3/m3core/src/unix/freebsd-2/Unix.i3
--- Unix.i3.orig Sat Jan 7 14:41:42 1995
+++ Unix.i3 Thu Jul 10 18:32:36 1997
@@ -84,9 +84,10 @@
<*EXTERNAL*> PROCEDURE fchmod (fd, mode: mode_t): int;
(* ok *)
-(*** chown, fchown - change owner and group of a file ***)
+(*** chown, fchown, lchown - change owner and group of a file ***)
<*EXTERNAL*> PROCEDURE chown (path: char_star; owner: uid_t; group: gid_t): int;
<*EXTERNAL*> PROCEDURE fchown (fd: int; owner: uid_t; group: gid_t): int;
+<*EXTERNAL*> PROCEDURE lchown (path: char_star; owner: uid_t; group: gid_t): int;
(* ok *)
(*** chroot - change root directory ***)
@@ -94,7 +95,7 @@
(* ok *)
(*** close - delete a descriptor ***)
-<*EXTERNAL*> PROCEDURE close (d: int): int;
+<*EXTERNAL "m3_close"*> PROCEDURE close (d: int): int;
(* ok *)
(*** creat - create a new file ***)
@@ -102,8 +103,8 @@
(* ok, but obsolete *)
(*** dup, dup2 - duplicate an open file descriptor ***)
-<*EXTERNAL*> PROCEDURE dup (oldd: int): int;
-<*EXTERNAL*> PROCEDURE dup2 (oldd, newd: int): int;
+<*EXTERNAL "m3_dup"*> PROCEDURE dup (oldd: int): int;
+<*EXTERNAL "m3_dup2"*> PROCEDURE dup2 (oldd, newd: int): int;
(* ok *)
(*** execve - execute a file ***)
@@ -773,6 +774,9 @@
PROCEDURE lseek (d: int; offset: off_t; whence: int): off_t;
(* ok *)
+(*** mkfifo - make a FIFO (named pipe) ***)
+<*EXTERNAL*> PROCEDURE mkfifo (path: char_star; mode: mode_t): int;
+
(*** mkdir - make a directory file ***)
<*EXTERNAL*> PROCEDURE mkdir (path: char_star; mode: mode_t): int;
(* ok *)
@@ -892,7 +896,7 @@
TYPE
FDSet = SET OF [0 .. MAX_FDSET - 1];
-<*EXTERNAL*> PROCEDURE select (nfds: int;
+<*EXTERNAL "m3_select"*> PROCEDURE select (nfds: int;
readfds, writefds, exceptfds: UNTRACED REF FDSet;
timeout: UNTRACED REF struct_timeval): int;
(* ok *)
|