(*$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 isatty(fildes: INTEGER) : 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.
