(* Copyright (c) xTech 1992,95,97.  All Rights Reserved *)

(* $RCSfile: errno.def,v $ $Revision: 1.1.1.1 $ $Date: 1997/10/20 19:32:35 $ *)

<*+ CSTDLIB  *>
<*+ NOHEADER*>
<*+ M2EXTENSIONS *>

DEFINITION MODULE [2] errno;

VAR
  errno: INTEGER;

<* IF __GEN_C__ THEN *>
  E2BIG       -: INTEGER; (* Arg list too long             *)
  EACCES      -: INTEGER; (* Permission denied             *)
  EAGAIN      -: INTEGER; (* Try again                     *)
  EBADF       -: INTEGER; (* Bad file number               *)
  EBUSY       -: INTEGER; (* Device or resource busy       *)
  ECHILD      -: INTEGER; (* No child processes            *)
  EDEADLK     -: INTEGER; (* Resource deadlock would occur *)
  EDOM        -: INTEGER; (* Math argument                 *)
  EEXIST      -: INTEGER; (* File already exists           *)
  EFAULT      -: INTEGER; (* Unknown error                 *)
  EFBIG       -: INTEGER; (* File too large                *)
  EINTR       -: INTEGER; (* Interrupted system call       *)
  EINVAL      -: INTEGER; (* Invalid argument              *)
  EIO         -: INTEGER; (* I/O error                     *)
  EISDIR      -: INTEGER; (* File is a directory           *)
  EMFILE      -: INTEGER; (* Too many open files           *)
  EMLINK      -: INTEGER; (* Too many links                *)
  ENAMETOOLONG-: INTEGER; (* File name too long            *)
  ENFILE      -: INTEGER; (* File table overflow           *)
  ENODEV      -: INTEGER; (* No such device                *)
  ENOENT      -: INTEGER; (* No such file or directory     *)
  ENOEXEC     -: INTEGER; (* Exec format error             *)
  ENOLCK      -: INTEGER; (* No record locks available     *)
  ENOMEM      -: INTEGER; (* Not enough memory             *)
  ENOSPC      -: INTEGER; (* No space left on device       *)
  ENOSYS      -: INTEGER; (* Function not implemented      *)
  ENOTDIR     -: INTEGER; (* Not a directory               *)
  ENOTEMPTY   -: INTEGER; (* Directory not empty           *)
  ENOTTY      -: INTEGER; (* Not a typewriter              *)
  ENXIO       -: INTEGER; (* No such device or address     *)
  EPERM       -: INTEGER; (* Operation not permitted       *)
  EPIPE       -: INTEGER; (* Broken pipe                   *)
  ERANGE      -: INTEGER; (* Result too large              *)
  EROFS       -: INTEGER; (* Read-only file system         *)
  ESPIPE      -: INTEGER; (* Illegal seek                  *)
  ESRCH       -: INTEGER; (* No such process               *)
  EXDEV       -: INTEGER; (* Cross-device link             *)
<* ELSE *>
(* Constants values was got from LiNUX *)
CONST
  E2BIG=7;		(* Arg list too long *)
  EACCES=13;		(* Permission denied *)
  EAGAIN=11;		(* Try again *)
  EBADF=9;		(* Bad file number *)
  EBUSY=16;		(* Device or resource busy *)
  ECHILD=10;		(* No child processes *)
  EDEADLK=35;		(* Resource deadlock would occur *)
  EDOM=33;		(* Math argument out of domain of func *)
  EEXIST=17;		(* File exists *)
  EFAULT=14;		(* Bad address *)
  EFBIG=27;		(* File too large *)
  EINTR=4;		(* Interrupted system call *)
  EINVAL=22;		(* Invalid argument *)
  EIO=5;		(* I/O error *)
  EISDIR=21;		(* Is a directory *)
  EMFILE=24;		(* Too many open files *)
  EMLINK=31;		(* Too many links *)
  ENAMETOOLONG=36;	(* File name too long *)
  ENFILE=23;		(* File table overflow *)
  ENODEV=19;		(* No such device *)
  ENOENT=2;		(* No such file or directory *)
  ENOEXEC=8;		(* Exec format error *)
  ENOLCK=37;		(* No record locks available *)
  ENOMEM=12;		(* Out of memory *)
  ENOSPC=28;		(* No space left on device *)
  ENOSYS=38;		(* Function not implemented *)
  ENOTDIR=20;		(* Not a directory *)
  ENOTEMPTY=39;		(* Directory not empty *)
  ENOTTY=25;		(* Not a typewriter *)
  ENXIO=6;		(* No such device or address *)
  EPERM=1;		(* Operation not permitted *)
  EPIPE=32;		(* Broken pipe *)
  ERANGE=34;		(* Math result not representable *)
  EROFS=30;		(* Read-only file system *)
  ESPIPE=29;		(* Illegal seek *)
  ESRCH=3;		(* No such process *)
  EXDEV=18;		(* Cross-device link *)
<* END *>

END errno.
