Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | RSS feed

  1. #ifndef _ERRNO_H_
  2. #define _ERRNO_H_
  3.  
  4. #include <stddef.h>
  5.  
  6. #ifdef __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. extern int _GLOBAL_VAR(errno);
  11.  
  12. #define EPERM 1 /* Operation not permitted */
  13. #define ENOENT 2 /* No such file or directory */
  14. #define ESRCH 3 /* No such process */
  15. #define EINTR 4 /* Interrupted system call */
  16. #define EIO 5 /* Input/output error */
  17. #define ENXIO 6 /* Device not configured */
  18. #define E2BIG 7 /* Argument list too long */
  19. #define ENOEXEC 8 /* Exec format error */
  20. #define EBADF 9 /* Bad file descriptor */
  21. #define ECHILD 10 /* No child processes */
  22. #define EDEADLK 11 /* Resource deadlock avoided */
  23. /* 11 was EAGAIN */
  24. #define ENOMEM 12 /* Cannot allocate memory */
  25. #define EACCES 13 /* Permission denied */
  26. #define EFAULT 14 /* Bad address */
  27. #define ENOTBLK 15 /* Block device required */
  28. #define EBUSY 16 /* Device / Resource busy */
  29. #define EEXIST 17 /* File exists */
  30. #define EXDEV 18 /* Cross-device link */
  31. #define ENODEV 19 /* Operation not supported by device */
  32. #define ENOTDIR 20 /* Not a directory */
  33. #define EISDIR 21 /* Is a directory */
  34. #define EINVAL 22 /* Invalid argument */
  35. #define ENFILE 23 /* Too many open files in system */
  36. #define EMFILE 24 /* Too many open files */
  37. #define ENOTTY 25 /* Inappropriate ioctl for device */
  38. #define ETXTBSY 26 /* Text file busy */
  39. #define EFBIG 27 /* File too large */
  40. #define ENOSPC 28 /* No space left on device */
  41. #define ESPIPE 29 /* Illegal seek */
  42. #define EROFS 30 /* Read-only file system */
  43. #define EMLINK 31 /* Too many links */
  44. #define EPIPE 32 /* Broken pipe */
  45.  
  46. /* math software */
  47. #define EDOM 33 /* Numerical argument out of domain */
  48. #define ERANGE 34 /* Result too large */
  49.  
  50. /* non-blocking and interrupt i/o */
  51. #define EAGAIN 35 /* Resource temporarily unavailable */
  52. #define EWOULDBLOCK EAGAIN /* Operation would block */
  53. #define EINPROGRESS 36 /* Operation now in progress */
  54. #define EALREADY 37 /* Operation already in progress */
  55.  
  56. /* ipc/network software -- argument errors */
  57. #define ENOTSOCK 38 /* Socket operation on non-socket */
  58. #define EDESTADDRREQ 39 /* Destination address required */
  59. #define EMSGSIZE 40 /* Message too long */
  60. #define EPROTOTYPE 41 /* Protocol wrong type for socket */
  61. #define ENOPROTOOPT 42 /* Protocol not available */
  62. #define EPROTONOSUPPORT 43 /* Protocol not supported */
  63. #define ESOCKTNOSUPPORT 44 /* Socket type not supported */
  64. #define ENOTSUP 45 /* Operation not supported */
  65. #define EOPNOTSUPP ENOTSUP /* Operation not supported on socket */
  66. #define EPFNOSUPPORT 46 /* Protocol family not supported */
  67. #define EAFNOSUPPORT 47 /* Address family not supported by protocol family */
  68. #define EADDRINUSE 48 /* Address already in use */
  69. #define EADDRNOTAVAIL 49 /* Can't assign requested address */
  70.  
  71. /* ipc/network software -- operational errors */
  72. #define ENETDOWN 50 /* Network is down */
  73. #define ENETUNREACH 51 /* Network is unreachable */
  74. #define ENETRESET 52 /* Network dropped connection on reset */
  75. #define ECONNABORTED 53 /* Software caused connection abort */
  76. #define ECONNRESET 54 /* Connection reset by peer */
  77. #define ENOBUFS 55 /* No buffer space available */
  78. #define EISCONN 56 /* Socket is already connected */
  79. #define ENOTCONN 57 /* Socket is not connected */
  80. #define ESHUTDOWN 58 /* Can't send after socket shutdown */
  81. #define ETOOMANYREFS 59 /* Too many references: can't splice */
  82. #define ETIMEDOUT 60 /* Operation timed out */
  83. #define ECONNREFUSED 61 /* Connection refused */
  84. #define ELOOP 62 /* Too many levels of symbolic links */
  85. #define ENAMETOOLONG 63 /* File name too long */
  86.  
  87. /* should be rearranged */
  88. #define EHOSTDOWN 64 /* Host is down */
  89. #define EHOSTUNREACH 65 /* No route to host */
  90. #define ENOTEMPTY 66 /* Directory not empty */
  91.  
  92. /* quotas & mush */
  93. #define EPROCLIM 67 /* Too many processes */
  94. #define EUSERS 68 /* Too many users */
  95. #define EDQUOT 69 /* Disc quota exceeded */
  96.  
  97. /* Network File System */
  98. #define ESTALE 70 /* Stale NFS file handle */
  99. #define EREMOTE 71 /* Too many levels of remote in path */
  100. #define EBADRPC 72 /* RPC struct is bad */
  101. #define ERPCMISMATCH 73 /* RPC version wrong */
  102. #define EPROGUNAVAIL 74 /* RPC prog. not avail */
  103. #define EPROGMISMATCH 75 /* Program version wrong */
  104. #define EPROCUNAVAIL 76 /* Bad procedure for program */
  105. #define ENOLCK 77 /* No locks available */
  106. #define ENOSYS 78 /* Function not implemented */
  107. #define EFTYPE 79 /* Inappropriate file type or format */
  108. #define EAUTH 80 /* Authentication error */
  109. #define ENEEDAUTH 81 /* Need authenticator */
  110.  
  111. /* Intelligent device errors */
  112. #define EPWROFF 82 /* Device power is off */
  113. #define EDEVERR 83 /* Device error, e.g. paper out */
  114. #define EOVERFLOW 84 /* Value too large to be stored in data type */
  115.  
  116. /* Program loading errors */
  117. #define EBADEXEC 85 /* Bad executable */
  118. #define EBADARCH 86 /* Bad CPU type in executable */
  119. #define ESHLIBVERS 87 /* Shared library version mismatch */
  120. #define EBADMACHO 88 /* Malformed Macho file */
  121. #define ECANCELED 89 /* Operation canceled */
  122. #define EIDRM 90 /* Identifier removed */
  123. #define ENOMSG 91 /* No message of desired type */
  124. #define EILSEQ 92 /* Illegal byte sequence */
  125. #define ENOATTR 93 /* Attribute not found */
  126. #define EBADMSG 94 /* Bad message */
  127. #define EMULTIHOP 95 /* Reserved */
  128. #define ENODATA 96 /* No message available on STREAM */
  129. #define ENOLINK 97 /* Reserved */
  130. #define ENOSR 98 /* No STREAM resources */
  131. #define ENOSTR 99 /* Not a STREAM */
  132. #define EPROTO 100 /* Protocol error */
  133. #define ETIME 101 /* STREAM ioctl timeout */
  134. #define ENOPOLICY 103 /* No such policy registered */
  135. #define ENOTRECOVERABLE 104 /* State not recoverable */
  136. #define EOWNERDEAD 105 /* Previous owner died */
  137. #define EQFULL 106 /* Interface output queue is full */
  138. #define ELAST 106 /* Must be equal largest errno */
  139.  
  140. #ifdef __cplusplus
  141. }
  142. #endif
  143.  
  144. #endif // _ERRNO_H_