libc_errno.h 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /*
  2. * Copyright (c) 2006-2018, RT-Thread Development Team
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. /*
  7. * File : libc_errno.h
  8. *
  9. * Change Logs:
  10. * Date Author Notes
  11. * 2016-11-12 Bernard The first version
  12. */
  13. #ifndef LIBC_ERRNO_H__
  14. #define LIBC_ERRNO_H__
  15. #include <rtconfig.h>
  16. #if defined(RT_USING_NEWLIB) || defined(_WIN32)
  17. /* use errno.h file in newlib */
  18. #include <errno.h>
  19. #else
  20. /* define errno self. */
  21. #define EPERM 1
  22. #define ENOENT 2
  23. #define ESRCH 3
  24. #define EINTR 4
  25. #define EIO 5
  26. #define ENXIO 6
  27. #define E2BIG 7
  28. #define ENOEXEC 8
  29. #define EBADF 9
  30. #define ECHILD 10
  31. #define EAGAIN 11
  32. #define ENOMEM 12
  33. #define EACCES 13
  34. #define EFAULT 14
  35. #define ENOTBLK 15
  36. #define EBUSY 16
  37. #define EEXIST 17
  38. #define EXDEV 18
  39. #define ENODEV 19
  40. #define ENOTDIR 20
  41. #define EISDIR 21
  42. #define EINVAL 22
  43. #define ENFILE 23
  44. #define EMFILE 24
  45. #define ENOTTY 25
  46. #define ETXTBSY 26
  47. #define EFBIG 27
  48. #define ENOSPC 28
  49. #define ESPIPE 29
  50. #define EROFS 30
  51. #define EMLINK 31
  52. #define EPIPE 32
  53. #define EDOM 33
  54. #define ERANGE 34
  55. #define EDEADLK 35
  56. #define ENAMETOOLONG 36
  57. #define ENOLCK 37
  58. #define ENOSYS 38
  59. #define ENOTEMPTY 39
  60. #define ELOOP 40
  61. #define EWOULDBLOCK EAGAIN
  62. #define ENOMSG 42
  63. #define EIDRM 43
  64. #define ECHRNG 44
  65. #define EL2NSYNC 45
  66. #define EL3HLT 46
  67. #define EL3RST 47
  68. #define ELNRNG 48
  69. #define EUNATCH 49
  70. #define ENOCSI 50
  71. #define EL2HLT 51
  72. #define EBADE 52
  73. #define EBADR 53
  74. #define EXFULL 54
  75. #define ENOANO 55
  76. #define EBADRQC 56
  77. #define EBADSLT 57
  78. #define EDEADLOCK EDEADLK
  79. #define EBFONT 59
  80. #define ENOSTR 60
  81. #define ENODATA 61
  82. #define ETIME 62
  83. #define ENOSR 63
  84. #define ENONET 64
  85. #define ENOPKG 65
  86. #define EREMOTE 66
  87. #define ENOLINK 67
  88. #define EADV 68
  89. #define ESRMNT 69
  90. #define ECOMM 70
  91. #define EPROTO 71
  92. #define EMULTIHOP 72
  93. #define EDOTDOT 73
  94. #define EBADMSG 74
  95. #define EOVERFLOW 75
  96. #define ENOTUNIQ 76
  97. #define EBADFD 77
  98. #define EREMCHG 78
  99. #define ELIBACC 79
  100. #define ELIBBAD 80
  101. #define ELIBSCN 81
  102. #define ELIBMAX 82
  103. #define ELIBEXEC 83
  104. #define EILSEQ 84
  105. #define ERESTART 85
  106. #define ESTRPIPE 86
  107. #define EUSERS 87
  108. #define ENOTSOCK 88
  109. #define EDESTADDRREQ 89
  110. #define EMSGSIZE 90
  111. #define EPROTOTYPE 91
  112. #define ENOPROTOOPT 92
  113. #define EPROTONOSUPPORT 93
  114. #define ESOCKTNOSUPPORT 94
  115. #define EOPNOTSUPP 95
  116. #define ENOTSUP EOPNOTSUPP
  117. #define EPFNOSUPPORT 96
  118. #define EAFNOSUPPORT 97
  119. #define EADDRINUSE 98
  120. #define EADDRNOTAVAIL 99
  121. #define ENETDOWN 100
  122. #define ENETUNREACH 101
  123. #define ENETRESET 102
  124. #define ECONNABORTED 103
  125. #define ECONNRESET 104
  126. #define ENOBUFS 105
  127. #define EISCONN 106
  128. #define ENOTCONN 107
  129. #define ESHUTDOWN 108
  130. #define ETOOMANYREFS 109
  131. #define ETIMEDOUT 110
  132. #define ECONNREFUSED 111
  133. #define EHOSTDOWN 112
  134. #define EHOSTUNREACH 113
  135. #define EALREADY 114
  136. #define EINPROGRESS 115
  137. #define ESTALE 116
  138. #define EUCLEAN 117
  139. #define ENOTNAM 118
  140. #define ENAVAIL 119
  141. #define EISNAM 120
  142. #define EREMOTEIO 121
  143. #define EDQUOT 122
  144. #define ENOMEDIUM 123
  145. #define EMEDIUMTYPE 124
  146. #define ECANCELED 125
  147. #define ENOKEY 126
  148. #define EKEYEXPIRED 127
  149. #define EKEYREVOKED 128
  150. #define EKEYREJECTED 129
  151. #define EOWNERDEAD 130
  152. #define ENOTRECOVERABLE 131
  153. #define ERFKILL 132
  154. #define EHWPOISON 133
  155. #endif
  156. #endif