ack/lang/m2/libm2/StripUnix.def
1994-06-24 14:02:31 +00:00

34 lines
1 KiB
Modula-2

(*$Foreign language module *)
DEFINITION MODULE StripUnix;
(*
Module: interface to some Unix systemcalls
Author: Ceriel J.H. Jacobs
Version: $Id$
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.