errno.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. /**
  2. * This file has no copyright assigned and is placed in the Public Domain.
  3. * This file is part of the mingw-w64 runtime package.
  4. * No warranty is given; refer to the file DISCLAIMER.PD within this package.
  5. */
  6. #ifndef _INC_ERRNO
  7. #define _INC_ERRNO
  8. #include <crtdefs.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. #ifndef _CRT_ERRNO_DEFINED
  13. #define _CRT_ERRNO_DEFINED
  14. _CRTIMP extern int *__cdecl _errno(void);
  15. #define errno (*_errno())
  16. errno_t __cdecl _set_errno(int _Value);
  17. errno_t __cdecl _get_errno(int *_Value);
  18. #endif /* _CRT_ERRNO_DEFINED */
  19. #define EPERM 1
  20. #define ENOENT 2
  21. #define ENOFILE ENOENT
  22. #define ESRCH 3
  23. #define EINTR 4
  24. #define EIO 5
  25. #define ENXIO 6
  26. #define E2BIG 7
  27. #define ENOEXEC 8
  28. #define EBADF 9
  29. #define ECHILD 10
  30. #define EAGAIN 11
  31. #define ENOMEM 12
  32. #define EACCES 13
  33. #define EFAULT 14
  34. #define EBUSY 16
  35. #define EEXIST 17
  36. #define EXDEV 18
  37. #define ENODEV 19
  38. #define ENOTDIR 20
  39. #define EISDIR 21
  40. #define ENFILE 23
  41. #define EMFILE 24
  42. #define ENOTTY 25
  43. #define EFBIG 27
  44. #define ENOSPC 28
  45. #define ESPIPE 29
  46. #define EROFS 30
  47. #define EMLINK 31
  48. #define EPIPE 32
  49. #define EDOM 33
  50. #define EDEADLK 36
  51. #define ENAMETOOLONG 38
  52. #define ENOLCK 39
  53. #define ENOSYS 40
  54. #define ENOTEMPTY 41
  55. #ifndef RC_INVOKED
  56. #if !defined(_SECURECRT_ERRCODE_VALUES_DEFINED)
  57. #define _SECURECRT_ERRCODE_VALUES_DEFINED
  58. #define EINVAL 22
  59. #define ERANGE 34
  60. #define EILSEQ 42
  61. #define STRUNCATE 80
  62. #endif
  63. #endif
  64. #define EDEADLOCK EDEADLK
  65. /* Posix thread extensions. */
  66. #ifndef ENOTSUP
  67. #define ENOTSUP 129
  68. #endif
  69. /* Extension defined as by report VC 10+ defines error-numbers. */
  70. #ifndef EAFNOSUPPORT
  71. #define EAFNOSUPPORT 102
  72. #endif
  73. #ifndef EADDRINUSE
  74. #define EADDRINUSE 100
  75. #endif
  76. #ifndef EADDRNOTAVAIL
  77. #define EADDRNOTAVAIL 101
  78. #endif
  79. #ifndef EISCONN
  80. #define EISCONN 113
  81. #endif
  82. #ifndef ENOBUFS
  83. #define ENOBUFS 119
  84. #endif
  85. #ifndef ECONNABORTED
  86. #define ECONNABORTED 106
  87. #endif
  88. #ifndef EALREADY
  89. #define EALREADY 103
  90. #endif
  91. #ifndef ECONNREFUSED
  92. #define ECONNREFUSED 107
  93. #endif
  94. #ifndef ECONNRESET
  95. #define ECONNRESET 108
  96. #endif
  97. #ifndef EDESTADDRREQ
  98. #define EDESTADDRREQ 109
  99. #endif
  100. #ifndef EHOSTUNREACH
  101. #define EHOSTUNREACH 110
  102. #endif
  103. #ifndef EMSGSIZE
  104. #define EMSGSIZE 115
  105. #endif
  106. #ifndef ENETDOWN
  107. #define ENETDOWN 116
  108. #endif
  109. #ifndef ENETRESET
  110. #define ENETRESET 117
  111. #endif
  112. #ifndef ENETUNREACH
  113. #define ENETUNREACH 118
  114. #endif
  115. #ifndef ENOPROTOOPT
  116. #define ENOPROTOOPT 123
  117. #endif
  118. #ifndef ENOTSOCK
  119. #define ENOTSOCK 128
  120. #endif
  121. #ifndef ENOTCONN
  122. #define ENOTCONN 126
  123. #endif
  124. #ifndef ECANCELED
  125. #define ECANCELED 105
  126. #endif
  127. #ifndef EINPROGRESS
  128. #define EINPROGRESS 112
  129. #endif
  130. #ifndef EOPNOTSUPP
  131. #define EOPNOTSUPP 130
  132. #endif
  133. #ifndef EWOULDBLOCK
  134. #define EWOULDBLOCK 140
  135. #endif
  136. #ifndef EOWNERDEAD
  137. #define EOWNERDEAD 133
  138. #endif
  139. #ifndef EPROTO
  140. #define EPROTO 134
  141. #endif
  142. #ifndef EPROTONOSUPPORT
  143. #define EPROTONOSUPPORT 135
  144. #endif
  145. #ifndef EBADMSG
  146. #define EBADMSG 104
  147. #endif
  148. #ifndef EIDRM
  149. #define EIDRM 111
  150. #endif
  151. #ifndef ENODATA
  152. #define ENODATA 120
  153. #endif
  154. #ifndef ENOLINK
  155. #define ENOLINK 121
  156. #endif
  157. #ifndef ENOMSG
  158. #define ENOMSG 122
  159. #endif
  160. #ifndef ENOSR
  161. #define ENOSR 124
  162. #endif
  163. #ifndef ENOSTR
  164. #define ENOSTR 125
  165. #endif
  166. #ifndef ENOTRECOVERABLE
  167. #define ENOTRECOVERABLE 127
  168. #endif
  169. #ifndef ETIME
  170. #define ETIME 137
  171. #endif
  172. #ifndef ETXTBSY
  173. #define ETXTBSY 139
  174. #endif
  175. /* Defined as WSAETIMEDOUT. */
  176. #ifndef ETIMEDOUT
  177. #define ETIMEDOUT 138
  178. #endif
  179. #ifndef ELOOP
  180. #define ELOOP 114
  181. #endif
  182. #ifndef EPROTOTYPE
  183. #define EPROTOTYPE 136
  184. #endif
  185. #ifndef EOVERFLOW
  186. #define EOVERFLOW 132
  187. #endif
  188. #ifdef __cplusplus
  189. }
  190. #endif
  191. #endif