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