1 /* A POSIX-like <errno.h>.
3 Copyright (C) 2008-2011 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, write to the Free Software Foundation,
17 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
19 #ifndef _@GUARD_PREFIX@_ERRNO_H
22 @PRAGMA_SYSTEM_HEADER@
26 /* The include_next requires a split double-inclusion guard. */
27 #@INCLUDE_NEXT@ @NEXT_ERRNO_H@
29 #ifndef _@GUARD_PREFIX@_ERRNO_H
30 #define _@GUARD_PREFIX@_ERRNO_H
33 /* On native Windows platforms, many macros are not defined. */
34 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
36 /* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */
37 # define EWOULDBLOCK EAGAIN
39 /* Values >= 100 seem safe to use. */
41 # define GNULIB_defined_ETXTBSY 1
43 /* These are intentionally the same values as the WSA* error numbers, defined
45 # define EINPROGRESS 10036
46 # define EALREADY 10037
47 # define ENOTSOCK 10038
48 # define EDESTADDRREQ 10039
49 # define EMSGSIZE 10040
50 # define EPROTOTYPE 10041
51 # define ENOPROTOOPT 10042
52 # define EPROTONOSUPPORT 10043
53 # define ESOCKTNOSUPPORT 10044 /* not required by POSIX */
54 # define EOPNOTSUPP 10045
55 # define EPFNOSUPPORT 10046 /* not required by POSIX */
56 # define EAFNOSUPPORT 10047
57 # define EADDRINUSE 10048
58 # define EADDRNOTAVAIL 10049
59 # define ENETDOWN 10050
60 # define ENETUNREACH 10051
61 # define ENETRESET 10052
62 # define ECONNABORTED 10053
63 # define ECONNRESET 10054
64 # define ENOBUFS 10055
65 # define EISCONN 10056
66 # define ENOTCONN 10057
67 # define ESHUTDOWN 10058 /* not required by POSIX */
68 # define ETOOMANYREFS 10059 /* not required by POSIX */
69 # define ETIMEDOUT 10060
70 # define ECONNREFUSED 10061
72 # define EHOSTDOWN 10064 /* not required by POSIX */
73 # define EHOSTUNREACH 10065
74 # define EPROCLIM 10067 /* not required by POSIX */
75 # define EUSERS 10068 /* not required by POSIX */
78 # define EREMOTE 10071 /* not required by POSIX */
79 # define GNULIB_defined_ESOCK 1
84 /* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
85 EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */
86 # if @EMULTIHOP_HIDDEN@
87 # define EMULTIHOP @EMULTIHOP_VALUE@
88 # define GNULIB_defined_EMULTIHOP 1
91 # define ENOLINK @ENOLINK_VALUE@
92 # define GNULIB_defined_ENOLINK 1
94 # if @EOVERFLOW_HIDDEN@
95 # define EOVERFLOW @EOVERFLOW_VALUE@
96 # define GNULIB_defined_EOVERFLOW 1
100 /* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
101 EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
102 Likewise, on NonStop Kernel, EDQUOT is not defined.
103 Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
104 HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
106 Note: When one of these systems defines some of these macros some day,
107 binaries will have to be recompiled so that they recognizes the new
108 errno values from the system. */
112 # define GNULIB_defined_ENOMSG 1
117 # define GNULIB_defined_EIDRM 1
121 # define ENOLINK 2002
122 # define GNULIB_defined_ENOLINK 1
127 # define GNULIB_defined_EPROTO 1
131 # define EMULTIHOP 2004
132 # define GNULIB_defined_EMULTIHOP 1
136 # define EBADMSG 2005
137 # define GNULIB_defined_EBADMSG 1
141 # define EOVERFLOW 2006
142 # define GNULIB_defined_EOVERFLOW 1
146 # define ENOTSUP 2007
147 # define GNULIB_defined_ENOTSUP 1
151 # define ENETRESET 2011
152 # define GNULIB_defined_ENETRESET 1
155 # ifndef ECONNABORTED
156 # define ECONNABORTED 2012
157 # define GNULIB_defined_ECONNABORTED 1
162 # define GNULIB_defined_ESTALE 1
167 # define GNULIB_defined_EDQUOT 1
171 # define ECANCELED 2008
172 # define GNULIB_defined_ECANCELED 1
176 #endif /* _@GUARD_PREFIX@_ERRNO_H */
177 #endif /* _@GUARD_PREFIX@_ERRNO_H */