home *** CD-ROM | disk | FTP | other *** search
/ Otherware / Otherware_1_SB_Development.iso / amiga / os / bsdss4.tz / bsdss4 / bsdss / server / sys / errno.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-22  |  7.6 KB  |  188 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1992 Carnegie Mellon University
  4.  * All Rights Reserved.
  5.  * 
  6.  * Permission to use, copy, modify and distribute this software and its
  7.  * documentation is hereby granted, provided that both the copyright
  8.  * notice and this permission notice appear in all copies of the
  9.  * software, derivative works or modified versions, and any portions
  10.  * thereof, and that both notices appear in supporting documentation.
  11.  * 
  12.  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
  13.  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
  14.  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
  15.  * 
  16.  * Carnegie Mellon requests users of this software to return to
  17.  * 
  18.  *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU
  19.  *  School of Computer Science
  20.  *  Carnegie Mellon University
  21.  *  Pittsburgh PA 15213-3890
  22.  * 
  23.  * any improvements or extensions that they make and grant Carnegie Mellon 
  24.  * the rights to redistribute these changes.
  25.  */
  26. /*
  27.  * HISTORY
  28.  * $Log:    errno.h,v $
  29.  * Revision 2.1  92/04/21  17:16:24  rwd
  30.  * BSDSS
  31.  * 
  32.  *
  33.  */
  34.  
  35. /*
  36.  * Copyright (c) 1982, 1986, 1989 Regents of the University of California.
  37.  * All rights reserved.
  38.  *
  39.  * Redistribution and use in source and binary forms, with or without
  40.  * modification, are permitted provided that the following conditions
  41.  * are met:
  42.  * 1. Redistributions of source code must retain the above copyright
  43.  *    notice, this list of conditions and the following disclaimer.
  44.  * 2. Redistributions in binary form must reproduce the above copyright
  45.  *    notice, this list of conditions and the following disclaimer in the
  46.  *    documentation and/or other materials provided with the distribution.
  47.  * 3. All advertising materials mentioning features or use of this software
  48.  *    must display the following acknowledgement:
  49.  *    This product includes software developed by the University of
  50.  *    California, Berkeley and its contributors.
  51.  * 4. Neither the name of the University nor the names of its contributors
  52.  *    may be used to endorse or promote products derived from this software
  53.  *    without specific prior written permission.
  54.  *
  55.  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  56.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  57.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  58.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  59.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  60.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  61.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  62.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  63.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  64.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  65.  * SUCH DAMAGE.
  66.  *
  67.  *    @(#)errno.h    7.13 (Berkeley) 2/19/91
  68.  */
  69.  
  70. #ifndef KERNEL
  71. extern int errno;            /* global error number */
  72. #endif
  73.  
  74. #define    EPERM        1        /* Operation not permitted */
  75. #define    ENOENT        2        /* No such file or directory */
  76. #define    ESRCH        3        /* No such process */
  77. #define    EINTR        4        /* Interrupted system call */
  78. #define    EIO        5        /* Input/output error */
  79. #define    ENXIO        6        /* Device not configured */
  80. #define    E2BIG        7        /* Argument list too long */
  81. #define    ENOEXEC        8        /* Exec format error */
  82. #define    EBADF        9        /* Bad file descriptor */
  83. #define    ECHILD        10        /* No child processes */
  84. #define    EDEADLK        11        /* Resource deadlock avoided */
  85.                     /* 11 was EAGAIN */
  86. #define    ENOMEM        12        /* Cannot allocate memory */
  87. #define    EACCES        13        /* Permission denied */
  88. #define    EFAULT        14        /* Bad address */
  89. #ifndef _POSIX_SOURCE
  90. #define    ENOTBLK        15        /* Block device required */
  91. #define    EBUSY        16        /* Device busy */
  92. #endif
  93. #define    EEXIST        17        /* File exists */
  94. #define    EXDEV        18        /* Cross-device link */
  95. #define    ENODEV        19        /* Operation not supported by device */
  96. #define    ENOTDIR        20        /* Not a directory */
  97. #define    EISDIR        21        /* Is a directory */
  98. #define    EINVAL        22        /* Invalid argument */
  99. #define    ENFILE        23        /* Too many open files in system */
  100. #define    EMFILE        24        /* Too many open files */
  101. #define    ENOTTY        25        /* Inappropriate ioctl for device */
  102. #ifndef _POSIX_SOURCE
  103. #define    ETXTBSY        26        /* Text file busy */
  104. #endif
  105. #define    EFBIG        27        /* File too large */
  106. #define    ENOSPC        28        /* No space left on device */
  107. #define    ESPIPE        29        /* Illegal seek */
  108. #define    EROFS        30        /* Read-only file system */
  109. #define    EMLINK        31        /* Too many links */
  110. #define    EPIPE        32        /* Broken pipe */
  111.  
  112. /* math software */
  113. #define    EDOM        33        /* Numerical argument out of domain */
  114. #define    ERANGE        34        /* Result too large */
  115.  
  116. /* non-blocking and interrupt i/o */
  117. #define    EAGAIN        35        /* Resource temporarily unavailable */
  118. #ifndef _POSIX_SOURCE
  119. #define    EWOULDBLOCK    EAGAIN        /* Operation would block */
  120. #define    EINPROGRESS    36        /* Operation now in progress */
  121. #define    EALREADY    37        /* Operation already in progress */
  122.  
  123. /* ipc/network software -- argument errors */
  124. #define    ENOTSOCK    38        /* Socket operation on non-socket */
  125. #define    EDESTADDRREQ    39        /* Destination address required */
  126. #define    EMSGSIZE    40        /* Message too long */
  127. #define    EPROTOTYPE    41        /* Protocol wrong type for socket */
  128. #define    ENOPROTOOPT    42        /* Protocol not available */
  129. #define    EPROTONOSUPPORT    43        /* Protocol not supported */
  130. #define    ESOCKTNOSUPPORT    44        /* Socket type not supported */
  131. #define    EOPNOTSUPP    45        /* Operation not supported on socket */
  132. #define    EPFNOSUPPORT    46        /* Protocol family not supported */
  133. #define    EAFNOSUPPORT    47        /* Address family not supported by protocol family */
  134. #define    EADDRINUSE    48        /* Address already in use */
  135. #define    EADDRNOTAVAIL    49        /* Can't assign requested address */
  136.  
  137. /* ipc/network software -- operational errors */
  138. #define    ENETDOWN    50        /* Network is down */
  139. #define    ENETUNREACH    51        /* Network is unreachable */
  140. #define    ENETRESET    52        /* Network dropped connection on reset */
  141. #define    ECONNABORTED    53        /* Software caused connection abort */
  142. #define    ECONNRESET    54        /* Connection reset by peer */
  143. #define    ENOBUFS        55        /* No buffer space available */
  144. #define    EISCONN        56        /* Socket is already connected */
  145. #define    ENOTCONN    57        /* Socket is not connected */
  146. #define    ESHUTDOWN    58        /* Can't send after socket shutdown */
  147. #define    ETOOMANYREFS    59        /* Too many references: can't splice */
  148. #define    ETIMEDOUT    60        /* Connection timed out */
  149. #define    ECONNREFUSED    61        /* Connection refused */
  150.  
  151. #define    ELOOP        62        /* Too many levels of symbolic links */
  152. #endif /* _POSIX_SOURCE */
  153. #define    ENAMETOOLONG    63        /* File name too long */
  154.  
  155. /* should be rearranged */
  156. #ifndef _POSIX_SOURCE
  157. #define    EHOSTDOWN    64        /* Host is down */
  158. #define    EHOSTUNREACH    65        /* No route to host */
  159. #endif /* _POSIX_SOURCE */
  160. #define    ENOTEMPTY    66        /* Directory not empty */
  161.  
  162. /* quotas & mush */
  163. #ifndef _POSIX_SOURCE
  164. #define    EPROCLIM    67        /* Too many processes */
  165. #define    EUSERS        68        /* Too many users */
  166. #define    EDQUOT        69        /* Disc quota exceeded */
  167.  
  168. /* Network File System */
  169. #define    ESTALE        70        /* Stale NFS file handle */
  170. #define    EREMOTE        71        /* Too many levels of remote in path */
  171. #define    EBADRPC        72        /* RPC struct is bad */
  172. #define    ERPCMISMATCH    73        /* RPC version wrong */
  173. #define    EPROGUNAVAIL    74        /* RPC prog. not avail */
  174. #define    EPROGMISMATCH    75        /* Program version wrong */
  175. #define    EPROCUNAVAIL    76        /* Bad procedure for program */
  176. #endif /* _POSIX_SOURCE */
  177.  
  178. #define    ENOLCK        77        /* No locks available */
  179. #define    ENOSYS        78        /* Function not implemented */
  180.  
  181. #define    EFTYPE        79        /* Inappropriate file type or format */
  182.  
  183. #ifdef KERNEL
  184. /* pseudo-errors returned inside kernel to modify return to process */
  185. #define    ERESTART    -1        /* restart syscall */
  186. #define    EJUSTRETURN    -2        /* don't modify regs, just return */
  187. #endif
  188.