errno.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. /*
  2. * sys/errno.h - error numbers
  3. */
  4. /* $Id$ */
  5. #if !defined(_SYS_ERRNO_H)
  6. #define _SYS_ERRNO_H
  7. #define EPERM 1 /* Not owner */
  8. #define ENOENT 2 /* No such file or directory */
  9. #define ESRCH 3 /* No such process */
  10. #define EINTR 4 /* Interrupted system call */
  11. #define EIO 5 /* I/O error */
  12. #define ENXIO 6 /* No such device or address */
  13. #define E2BIG 7 /* Arg list too long */
  14. #define ENOEXEC 8 /* Exec format error */
  15. #define EBADF 9 /* Bad file number */
  16. #define ECHILD 10 /* No children */
  17. #define EAGAIN 11 /* No more processes */
  18. #define ENOMEM 12 /* Not enough core */
  19. #define EACCES 13 /* Permission denied */
  20. #define EFAULT 14 /* Bad address */
  21. #define ENOTBLK 15 /* Block device required */
  22. #define EBUSY 16 /* Mount device busy */
  23. #define EEXIST 17 /* File exists */
  24. #define EXDEV 18 /* Cross-device link */
  25. #define ENODEV 19 /* No such device */
  26. #define ENOTDIR 20 /* Not a directory*/
  27. #define EISDIR 21 /* Is a directory */
  28. #define EINVAL 22 /* Invalid argument */
  29. #define ENFILE 23 /* File table overflow */
  30. #define EMFILE 24 /* Too many open files */
  31. #define ENOTTY 25 /* Not a typewriter */
  32. #define ETXTBSY 26 /* Text file busy */
  33. #define EFBIG 27 /* File too large */
  34. #define ENOSPC 28 /* No space left on device */
  35. #define ESPIPE 29 /* Illegal seek */
  36. #define EROFS 30 /* Read-only file system */
  37. #define EMLINK 31 /* Too many links */
  38. #define EPIPE 32 /* Broken pipe */
  39. #if defined(__USG)
  40. /* Only ENOMSG, EIDRM and EDEADLK are documented */
  41. #define ENOMSG 35 /* No message of desired type */
  42. #define EIDRM 36 /* Identifier Removed */
  43. #define ECHRNG 37 /* Channel number out of range */
  44. #define EL2NSYNC 38 /* Level 2 not synchronized */
  45. #define EL3HLT 39 /* Level 3 halted */
  46. #define EL3RST 40 /* Level 3 reset */
  47. #define ELNRNG 41 /* Link number out of range */
  48. #define EUNATCH 42 /* Protocol driver not attached */
  49. #define ENOCSI 43 /* No CSI structure available */
  50. #define EL2HLT 44 /* Level 2 halted */
  51. #define EDEADLK 45 /* DeadLock */
  52. #endif /* __USG */
  53. #if defined(__BSD4_2)
  54. /* non-blocking and interrupt i/o */
  55. #define EWOULDBLOCK 35 /* Operation would block */
  56. #define EINPROGRESS 36 /* Operation now in progress */
  57. #define EALREADY 37 /* Operation already in progress */
  58. /* ipc/network software */
  59. /* argument errors */
  60. #define ENOTSOCK 38 /* Socket operation on non-socket */
  61. #define EDESTADDRREQ 39 /* Destination address required */
  62. #define EMSGSIZE 40 /* Message too long */
  63. #define EPROTOTYPE 41 /* Protocol wrong type for socket */
  64. #define ENOPROTOOPT 42 /* Protocol not available */
  65. #define EPROTONOSUPPORT 43 /* Protocol not supported */
  66. #define ESOCKTNOSUPPORT 44 /* Socket type not supported */
  67. #define EOPNOTSUPP 45 /* Operation not supported on socket */
  68. #define EPFNOSUPPORT 46 /* Protocol family not supported */
  69. #define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
  70. #define EADDRINUSE 48 /* Address already in use */
  71. #define EADDRNOTAVAIL 49 /* Can't assign requested address */
  72. /* operational errors */
  73. #define ENETDOWN 50 /* Network is down */
  74. #define ENETUNREACH 51 /* Network is unreachable */
  75. #define ENETRESET 52 /* Network dropped connection on reset */
  76. #define ECONNABORTED 53 /* Software caused connection abort */
  77. #define ECONNRESET 54 /* Connection reset by peer */
  78. #define ENOBUFS 55 /* No buffer space available */
  79. #define EISCONN 56 /* Socket is already connected */
  80. #define ENOTCONN 57 /* Socket is not connected */
  81. #define ESHUTDOWN 58 /* Can't send after socket shutdown */
  82. /* ETOOMANYREFS is not documented */
  83. #define ETOOMANYREFS 59 /* Too many references: can't splice */
  84. #define ETIMEDOUT 60 /* Connection timed out */
  85. #define ECONNREFUSED 61 /* Connection refused */
  86. /* */
  87. #define ELOOP 62 /* Too many levels of symbolic links */
  88. #define ENAMETOOLONG 63 /* File name too long */
  89. /* In BSD4.2, ENOTEMPTY is defined as 64. */
  90. /* Just use BSD4.3 & Sun UNIX 4.2 definitions */
  91. #define EHOSTDOWN 64 /* Host is down */
  92. #define EHOSTUNREACH 65 /* No route to host */
  93. #define ENOTEMPTY 66 /* Directory not empty */
  94. /* quotas & mush */
  95. /* EPROCLIM and EUSERS are not documented */
  96. #define EPROCLIM 67 /* Too many processes */
  97. #define EUSERS 68 /* Too many users */
  98. #define EDQUOT 69 /* Disc quota exceeded */
  99. /* Network File System */
  100. #define ESTALE 70 /* Stale NFS file handle */
  101. #define EREMOTE 71 /* Too many levels of remote in path */
  102. /* streams */
  103. /* only ENOMSG is documented */
  104. #define ENOSTR 72 /* Device is not a stream */
  105. #define ETIME 73 /* Timer expired */
  106. #define ENOSR 74 /* Out of streams resources */
  107. #define ENOMSG 75 /* No message of desired type */
  108. #define EBADMSG 76 /* Trying to read unreadable message */
  109. #define EIDRM 77 /* Identifier removed */
  110. /* SystemV Record Locking */
  111. #define EDEADLK 78 /* Deadlock condition. */
  112. #define ENOLCK 79 /* No record locks available. */
  113. #endif /* __BSD4_2 */
  114. #if defined(_POSIX_SOURCE)
  115. #if defined(_MINIX)
  116. #define EDEADLK 35 /* resource deadlock avoided */
  117. #define ENAMETOOLONG 36 /* file name too long */
  118. #define ENOLCK 37 /* no locks available */
  119. #define ENOSYS 38 /* function not implemented */
  120. #define ENOTEMPTY 39 /* directory not empty */
  121. #define ELOCKED 101 /* can't send message */
  122. #define EBADCALL 102 /* error on send/recieve */
  123. #define ELONGSTRING 103 /* string too long */
  124. #endif
  125. /* Room for other POSIX implementations */
  126. #endif
  127. #endif /* _SYS_ERRNO_H */