Added a stripped version of the Unix module

This commit is contained in:
ceriel
1988-05-03 08:33:33 +00:00
parent 8b655cb67e
commit 7dcfb2b4ad
4 changed files with 49 additions and 15 deletions

View File

@@ -0,0 +1,33 @@
(*$Foreign language module *)
DEFINITION MODULE StripUnix;
(*
Module: interface to some Unix systemcalls
Author: Ceriel J.H. Jacobs
Version: $Header$
This is a stripped down version of Unix.def, needed to compile some of
the modules on small machines
*)
FROM SYSTEM IMPORT ADDRESS;
CONST
ILLBREAK = ADDRESS(NIL-1);
VAR errno: INTEGER;
PROCEDURE sbrk(incr: INTEGER) : ADDRESS;
PROCEDURE close(fildes: INTEGER) : INTEGER;
PROCEDURE creat(path: ADDRESS;
mode: INTEGER) : INTEGER;
(* Sys5 *) PROCEDURE fcntl(fildes, request, arg: INTEGER) : INTEGER;
PROCEDURE getpid() : INTEGER;
PROCEDURE ioctl(fildes, request: INTEGER; arg: ADDRESS) : INTEGER;
PROCEDURE lseek(fildes: INTEGER; offset: LONGINT; whence: INTEGER) : LONGINT;
PROCEDURE open(path: ADDRESS; oflag: INTEGER) : INTEGER;
PROCEDURE read(fildes: INTEGER;
buf: ADDRESS;
nbyte: CARDINAL) : INTEGER;
PROCEDURE time(tloc: ADDRESS) : LONGINT;
PROCEDURE write(fildes: INTEGER;
buf: ADDRESS;
nbyte: CARDINAL) : INTEGER;
END StripUnix.