1 /* A POSIX-like <errno.h>.
3 Copyright (C) 2008-2012 Free Software Foundation, Inc.
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 3, or (at your option)
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, see <http://www.gnu.org/licenses/>. */
18 #ifndef _@GUARD_PREFIX@_ERRNO_H
21 @PRAGMA_SYSTEM_HEADER@
25 /* The include_next requires a split double-inclusion guard. */
26 #@INCLUDE_NEXT@ @NEXT_ERRNO_H@
28 #ifndef _@GUARD_PREFIX@_ERRNO_H
29 #define _@GUARD_PREFIX@_ERRNO_H
32 /* On native Windows platforms, many macros are not defined. */
33 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
35 /* These are the same values as defined by MSVC 10, for interoperability. */
39 # define GNULIB_defined_ENOMSG 1
44 # define GNULIB_defined_EIDRM 1
49 # define GNULIB_defined_ENOLINK 1
54 # define GNULIB_defined_EPROTO 1
59 # define GNULIB_defined_EBADMSG 1
63 # define EOVERFLOW 132
64 # define GNULIB_defined_EOVERFLOW 1
69 # define GNULIB_defined_ENOTSUP 1
73 # define ENETRESET 117
74 # define GNULIB_defined_ENETRESET 1
78 # define ECONNABORTED 106
79 # define GNULIB_defined_ECONNABORTED 1
83 # define ECANCELED 105
84 # define GNULIB_defined_ECANCELED 1
88 # define EINPROGRESS 112
91 # define EDESTADDRREQ 109
93 # define EPROTOTYPE 136
94 # define ENOPROTOOPT 123
95 # define EPROTONOSUPPORT 135
96 # define EOPNOTSUPP 130
97 # define EAFNOSUPPORT 102
98 # define EADDRINUSE 100
99 # define EADDRNOTAVAIL 101
100 # define ENETDOWN 116
101 # define ENETUNREACH 118
102 # define ECONNRESET 108
105 # define ENOTCONN 126
106 # define ETIMEDOUT 138
107 # define ECONNREFUSED 107
109 # define EHOSTUNREACH 110
110 # define EWOULDBLOCK 140
112 # define ENODATA 120 /* not required by POSIX */
113 # define ENOSR 124 /* not required by POSIX */
114 # define ENOSTR 125 /* not required by POSIX */
115 # define ENOTRECOVERABLE 127 /* not required by POSIX */
116 # define EOWNERDEAD 133 /* not required by POSIX */
117 # define ETIME 137 /* not required by POSIX */
118 # define EOTHER 131 /* not required by POSIX */
119 # define GNULIB_defined_ESOCK 1
122 /* These are intentionally the same values as the WSA* error numbers, defined
124 # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */
125 # define EPFNOSUPPORT 10046 /* not required by POSIX */
126 # define ESHUTDOWN 10058 /* not required by POSIX */
127 # define ETOOMANYREFS 10059 /* not required by POSIX */
128 # define EHOSTDOWN 10064 /* not required by POSIX */
129 # define EPROCLIM 10067 /* not required by POSIX */
130 # define EUSERS 10068 /* not required by POSIX */
131 # define EDQUOT 10069
132 # define ESTALE 10070
133 # define EREMOTE 10071 /* not required by POSIX */
134 # define GNULIB_defined_EWINSOCK 1
139 /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
140 EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */
141 # if @EMULTIHOP_HIDDEN@
142 # define EMULTIHOP @EMULTIHOP_VALUE@
143 # define GNULIB_defined_EMULTIHOP 1
145 # if @ENOLINK_HIDDEN@
146 # define ENOLINK @ENOLINK_VALUE@
147 # define GNULIB_defined_ENOLINK 1
149 # if @EOVERFLOW_HIDDEN@
150 # define EOVERFLOW @EOVERFLOW_VALUE@
151 # define GNULIB_defined_EOVERFLOW 1
155 /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
156 EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
157 Likewise, on NonStop Kernel, EDQUOT is not defined.
158 Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
159 HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
161 Note: When one of these systems defines some of these macros some day,
162 binaries will have to be recompiled so that they recognizes the new
163 errno values from the system. */
167 # define GNULIB_defined_ENOMSG 1
172 # define GNULIB_defined_EIDRM 1
176 # define ENOLINK 2002
177 # define GNULIB_defined_ENOLINK 1
182 # define GNULIB_defined_EPROTO 1
186 # define EMULTIHOP 2004
187 # define GNULIB_defined_EMULTIHOP 1
191 # define EBADMSG 2005
192 # define GNULIB_defined_EBADMSG 1
196 # define EOVERFLOW 2006
197 # define GNULIB_defined_EOVERFLOW 1
201 # define ENOTSUP 2007
202 # define GNULIB_defined_ENOTSUP 1
206 # define ENETRESET 2011
207 # define GNULIB_defined_ENETRESET 1
210 # ifndef ECONNABORTED
211 # define ECONNABORTED 2012
212 # define GNULIB_defined_ECONNABORTED 1
217 # define GNULIB_defined_ESTALE 1
222 # define GNULIB_defined_EDQUOT 1
226 # define ECANCELED 2008
227 # define GNULIB_defined_ECANCELED 1
231 #endif /* _@GUARD_PREFIX@_ERRNO_H */
232 #endif /* _@GUARD_PREFIX@_ERRNO_H */