errno.in.h 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234
  1. /* A POSIX-like <errno.h>.
  2. Copyright (C) 2008-2012 Free Software Foundation, Inc.
  3. This program is free software; you can redistribute it and/or modify
  4. it under the terms of the GNU Lesser General Public License as published by
  5. the Free Software Foundation; either version 2, or (at your option)
  6. any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU Lesser General Public License for more details.
  11. You should have received a copy of the GNU Lesser General Public License
  12. along with this program; if not, write to the Free Software Foundation,
  13. Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
  14. #ifndef _@GUARD_PREFIX@_ERRNO_H
  15. #if __GNUC__ >= 3
  16. @PRAGMA_SYSTEM_HEADER@
  17. #endif
  18. @PRAGMA_COLUMNS@
  19. /* The include_next requires a split double-inclusion guard. */
  20. #@INCLUDE_NEXT@ @NEXT_ERRNO_H@
  21. #ifndef _@GUARD_PREFIX@_ERRNO_H
  22. #define _@GUARD_PREFIX@_ERRNO_H
  23. /* On native Windows platforms, many macros are not defined. */
  24. # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
  25. /* These are the same values as defined by MSVC 10, for interoperability. */
  26. # ifndef ENOMSG
  27. # define ENOMSG 122
  28. # define GNULIB_defined_ENOMSG 1
  29. # endif
  30. # ifndef EIDRM
  31. # define EIDRM 111
  32. # define GNULIB_defined_EIDRM 1
  33. # endif
  34. # ifndef ENOLINK
  35. # define ENOLINK 121
  36. # define GNULIB_defined_ENOLINK 1
  37. # endif
  38. # ifndef EPROTO
  39. # define EPROTO 134
  40. # define GNULIB_defined_EPROTO 1
  41. # endif
  42. # ifndef EBADMSG
  43. # define EBADMSG 104
  44. # define GNULIB_defined_EBADMSG 1
  45. # endif
  46. # ifndef EOVERFLOW
  47. # define EOVERFLOW 132
  48. # define GNULIB_defined_EOVERFLOW 1
  49. # endif
  50. # ifndef ENOTSUP
  51. # define ENOTSUP 129
  52. # define GNULIB_defined_ENOTSUP 1
  53. # endif
  54. # ifndef ENETRESET
  55. # define ENETRESET 117
  56. # define GNULIB_defined_ENETRESET 1
  57. # endif
  58. # ifndef ECONNABORTED
  59. # define ECONNABORTED 106
  60. # define GNULIB_defined_ECONNABORTED 1
  61. # endif
  62. # ifndef ECANCELED
  63. # define ECANCELED 105
  64. # define GNULIB_defined_ECANCELED 1
  65. # endif
  66. # ifndef EINPROGRESS
  67. # define EINPROGRESS 112
  68. # define EALREADY 103
  69. # define ENOTSOCK 128
  70. # define EDESTADDRREQ 109
  71. # define EMSGSIZE 115
  72. # define EPROTOTYPE 136
  73. # define ENOPROTOOPT 123
  74. # define EPROTONOSUPPORT 135
  75. # define EOPNOTSUPP 130
  76. # define EAFNOSUPPORT 102
  77. # define EADDRINUSE 100
  78. # define EADDRNOTAVAIL 101
  79. # define ENETDOWN 116
  80. # define ENETUNREACH 118
  81. # define ECONNRESET 108
  82. # define ENOBUFS 119
  83. # define EISCONN 113
  84. # define ENOTCONN 126
  85. # define ETIMEDOUT 138
  86. # define ECONNREFUSED 107
  87. # define ELOOP 114
  88. # define EHOSTUNREACH 110
  89. # define EWOULDBLOCK 140
  90. # define ETXTBSY 139
  91. # define ENODATA 120 /* not required by POSIX */
  92. # define ENOSR 124 /* not required by POSIX */
  93. # define ENOSTR 125 /* not required by POSIX */
  94. # define ENOTRECOVERABLE 127 /* not required by POSIX */
  95. # define EOWNERDEAD 133 /* not required by POSIX */
  96. # define ETIME 137 /* not required by POSIX */
  97. # define EOTHER 131 /* not required by POSIX */
  98. # define GNULIB_defined_ESOCK 1
  99. # endif
  100. /* These are intentionally the same values as the WSA* error numbers, defined
  101. in <winsock2.h>. */
  102. # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */
  103. # define EPFNOSUPPORT 10046 /* not required by POSIX */
  104. # define ESHUTDOWN 10058 /* not required by POSIX */
  105. # define ETOOMANYREFS 10059 /* not required by POSIX */
  106. # define EHOSTDOWN 10064 /* not required by POSIX */
  107. # define EPROCLIM 10067 /* not required by POSIX */
  108. # define EUSERS 10068 /* not required by POSIX */
  109. # define EDQUOT 10069
  110. # define ESTALE 10070
  111. # define EREMOTE 10071 /* not required by POSIX */
  112. # define GNULIB_defined_EWINSOCK 1
  113. # endif
  114. /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
  115. EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */
  116. # if @EMULTIHOP_HIDDEN@
  117. # define EMULTIHOP @EMULTIHOP_VALUE@
  118. # define GNULIB_defined_EMULTIHOP 1
  119. # endif
  120. # if @ENOLINK_HIDDEN@
  121. # define ENOLINK @ENOLINK_VALUE@
  122. # define GNULIB_defined_ENOLINK 1
  123. # endif
  124. # if @EOVERFLOW_HIDDEN@
  125. # define EOVERFLOW @EOVERFLOW_VALUE@
  126. # define GNULIB_defined_EOVERFLOW 1
  127. # endif
  128. /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
  129. EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
  130. Likewise, on NonStop Kernel, EDQUOT is not defined.
  131. Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
  132. HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
  133. Note: When one of these systems defines some of these macros some day,
  134. binaries will have to be recompiled so that they recognizes the new
  135. errno values from the system. */
  136. # ifndef ENOMSG
  137. # define ENOMSG 2000
  138. # define GNULIB_defined_ENOMSG 1
  139. # endif
  140. # ifndef EIDRM
  141. # define EIDRM 2001
  142. # define GNULIB_defined_EIDRM 1
  143. # endif
  144. # ifndef ENOLINK
  145. # define ENOLINK 2002
  146. # define GNULIB_defined_ENOLINK 1
  147. # endif
  148. # ifndef EPROTO
  149. # define EPROTO 2003
  150. # define GNULIB_defined_EPROTO 1
  151. # endif
  152. # ifndef EMULTIHOP
  153. # define EMULTIHOP 2004
  154. # define GNULIB_defined_EMULTIHOP 1
  155. # endif
  156. # ifndef EBADMSG
  157. # define EBADMSG 2005
  158. # define GNULIB_defined_EBADMSG 1
  159. # endif
  160. # ifndef EOVERFLOW
  161. # define EOVERFLOW 2006
  162. # define GNULIB_defined_EOVERFLOW 1
  163. # endif
  164. # ifndef ENOTSUP
  165. # define ENOTSUP 2007
  166. # define GNULIB_defined_ENOTSUP 1
  167. # endif
  168. # ifndef ENETRESET
  169. # define ENETRESET 2011
  170. # define GNULIB_defined_ENETRESET 1
  171. # endif
  172. # ifndef ECONNABORTED
  173. # define ECONNABORTED 2012
  174. # define GNULIB_defined_ECONNABORTED 1
  175. # endif
  176. # ifndef ESTALE
  177. # define ESTALE 2009
  178. # define GNULIB_defined_ESTALE 1
  179. # endif
  180. # ifndef EDQUOT
  181. # define EDQUOT 2010
  182. # define GNULIB_defined_EDQUOT 1
  183. # endif
  184. # ifndef ECANCELED
  185. # define ECANCELED 2008
  186. # define GNULIB_defined_ECANCELED 1
  187. # endif
  188. #endif /* _@GUARD_PREFIX@_ERRNO_H */
  189. #endif /* _@GUARD_PREFIX@_ERRNO_H */