home *** CD-ROM | disk | FTP | other *** search
/ RISCWORLD 7 / RISCWORLD_VOL7.iso / Software / Issue2 / SDL.ARC / !unixlib / source / clib / h / errno < prev    next >
Encoding:
Text File  |  2004-09-06  |  5.8 KB  |  149 lines

  1. /****************************************************************************
  2.  *
  3.  * $Source: /usr/local/cvsroot/gccsdk/unixlib/source/clib/errno.h,v $
  4.  * $Date: 2004/08/16 21:01:26 $
  5.  * $Revision: 1.12 $
  6.  * $State: Exp $
  7.  * $Author: joty $
  8.  *
  9.  ***************************************************************************/
  10.  
  11. /* ANSI Standard 4.1.3: Errors <errno.h> */
  12.  
  13. #ifndef __ERRNO_H
  14. #define __ERRNO_H
  15.  
  16. #define EPERM        1 /* Operation not permitted.  */
  17. #define ENOENT        2 /* No such file or directory.  */
  18. #define ESRCH        3 /* No such process.  */
  19. #define EINTR        4 /* Interrupted function call. */
  20. #define EIO        5 /* Input/output error.  */
  21. #define ENXIO        6 /* No such device or address (device not configured).  */
  22. #define E2BIG        7 /* Argument list too long.  */
  23. #define ENOEXEC        8 /* Invalid executable file format (exec format error). */
  24. #define EBADF        9 /* Bad file descriptor.  */
  25. #define ECHILD        10 /* There are no child processes.  */
  26. #define EAGAIN        11 /* Resource temporarily unavailable.  */
  27. #define ENOMEM        12 /* Cannot allocate memory.  */
  28.  
  29. /* Permission denied.
  30.    File permissions do not allow the attempted operation.  */
  31. #define EACCES        13
  32. #define EFAULT        14 /* Bad address. An invalid pointer was detected.  */
  33. #define ENOTBLK        15 /* Block device required.  */
  34.  
  35. /* Device busy. Caused by a system resource that can't be shared
  36.    is already in use.  */
  37. #define EBUSY        16
  38. #define EEXIST        17 /* File exists.  */
  39. #define EXDEV        18 /* Invalid cross-device link.  */
  40. #define ENODEV        19 /* Operation not supported by device.  */
  41. #define ENOTDIR     20 /* Not a directory.  */
  42. #define EISDIR        21 /* Is a directory.  */
  43. #define EINVAL        22 /* Invalid argument.  */
  44. #define ENFILE        23 /* Too many open files in system.  */
  45. #define EMFILE        24 /* Too many open files.  */
  46. #define ENOTTY        25 /* Inappropriate ioctl for device.  */
  47. #define ETXTBSY     26 /* Text file busy.  */
  48. #define EFBIG        27 /* File too large.  */
  49. #define ENOSPC        28 /* No space left on device.  */
  50. #define ESPIPE        29 /* Illegal seek.  */
  51. #define EROFS        30 /* Read-only filing system.  */
  52. #define EMLINK        31 /* Too many links.  */
  53. #define EPIPE        32 /* Broken pipe.  */
  54. #define EDOM        33 /* Domain error.  */
  55. #define ERANGE        34 /* Range error.  */
  56. #define EWOULDBLOCK    35 /* Operation would block.  */
  57. #define EINPROGRESS    36 /* Operation now in progress.  */
  58. #define EALREADY    37 /* Operation already in progress.  */
  59. #define ENOTSOCK    38 /* Socket operation on non-socket.  */
  60. #define EDESTADDRREQ    39 /* Destination address required.  */
  61. #define EMSGSIZE    40 /* Message too long.  */
  62. #define EPROTOTYPE    41 /* Protocol wrong type for socket.  */
  63. #define ENOPROTOOPT    42 /* Option not supported by protocol.  */
  64. #define EPROTONOSUPPORT    43 /* Protocol not supported */
  65. #define ESOCKTNOSUPPORT    44 /* Socket type not supported */
  66. #define EOPNOTSUPP    45 /* Operation not supported */
  67. #define EPFNOSUPPORT    46 /* Protocol family not supported.  */
  68. #define EAFNOSUPPORT    47 /* Address family not supported by protocol family. */
  69. #define EADDRINUSE    48 /* Address already in use */
  70. #define EADDRNOTAVAIL    49 /* Can't assign requested address.  */
  71. #define ENETDOWN    50 /* Network is down.  */
  72. #define ENETUNREACH    51 /* Network unreachable */
  73. #define ENETRESET      52 /* Network dropped connection on reset.  */
  74. #define ECONNABORTED    53 /* Software caused connection abort.  */
  75. #define ECONNRESET    54 /* Connection reset by peer */
  76. #define ENOBUFS        55 /* No buffer space available */
  77. #define EISCONN        56 /* Socket is already connected */
  78. #define ENOTCONN    57 /* Socket is not connected */
  79. #define ESHUTDOWN    58 /* Can't send after socket shutdown.  */
  80. #define ETOOMANYREFS    59 /* Too many references: can't splice.  */
  81. #define ETIMEDOUT    60 /* Connection timed out.  */
  82. #define ECONNREFUSED    61 /* Connection refused */
  83. #define EREFUSED    61 /* Acorn Internet name.  */
  84. #define ELOOP        62 /* Too many levels of symbolic links.  */
  85. #define ENAMETOOLONG    63 /* File name too long.  */
  86. #define EHOSTDOWN    64 /* Host is down.  */
  87. #define EHOSTUNREACH    65 /* Host unreachable.  */
  88. #define ENOTEMPTY    66 /* Directory not empty.  */
  89. #define EPROCLIM    67 /* Too many processes.  */
  90. #define EUSERS        68 /* Too many users.  */
  91. #define EDQUOT        69 /* Disc quota exceeded.  */
  92. #define ESTALE        70 /* Stale NFS file handle.  */
  93. #define EREMOTE        71 /* Too many levels of remote in path.  */
  94. #define ENOSTR        72 /* Not a stream device.  */
  95. #define ETIME        73 /* Timer expired.  */
  96. #define ENOSR        74 /* Out of stream resources.  */
  97. #define ENOMSG        75 /* No message of desired type.  */
  98. #define EBADMSG        76 /* Not a data message.  */
  99. #define EIDRM        77 /* Identifier removed.  */
  100. #define EDEADLK        78 /* Deadlock situation detected/avoided.  */
  101. #define ENOLCK        79 /* No record locks available.  */
  102. #define ELIBVER        82 /* Wrong version of shared library.  */
  103. #define ELIBACC        83 /* Permission denied (shared library).  */
  104. #define ELIBLIM        84 /* Shared libraries nested too deeply.  */
  105. #define ELIBNOENT    85 /* Shared library file not found.  */
  106. #define ELIBNOEXEC    86 /* Shared library exec format error.  */
  107. #define ENOSYS        87 /* Function not implemented.  */
  108.  
  109. #define EOPSYS        88 /* RISC OS operating system error.  */
  110. #define ESIG        89
  111. #define EILSEQ        90 /* Invalid multibyte sequence.  */
  112.  
  113. #define __SYS_NERR    90
  114.  
  115. #ifndef errno
  116. extern int errno;
  117. #define __errno errno
  118. #endif /* errno */
  119.  
  120. extern const char *sys_errlist[];
  121. extern int sys_nerr;
  122.  
  123. #ifdef __UNIXLIB_INTERNALS
  124. /* This macro should be used whenever errno is to be set. This permits
  125.    us to easily make setting the errno call a function if necessary if
  126.    threads ever appear.  We also give a return value so we can use
  127.    return __set_errno () which can allow function tail calling.  */
  128. #ifndef __set_errno
  129. #define __set_errno(val) (errno = (val), -1)
  130. #endif
  131.  
  132. extern struct
  133. {
  134.   void *pc;
  135.   int errnum;
  136.   char errmess[252];
  137.   int valid;
  138. } __ul_errbuf;
  139.  
  140. extern struct
  141. {
  142.   int fpsr;
  143.   double f[8];
  144. } __ul_fp_registers;
  145.  
  146. #endif /* __UNIXLIB_INTERNALS */
  147.  
  148. #endif
  149.