2.9
[glibc/nacl-glibc.git] / sysdeps / mach / hurd / bits / errno.h
bloba7d57adeb6a55af344121ddc37d7069e2b69180d
1 /* This file generated by errnos.awk. */
3 /* The Hurd uses Mach error system 0x10, currently only subsystem 0. */
4 #ifndef _HURD_ERRNO
5 #define _HURD_ERRNO(n) ((0x10 << 26) | ((n) & 0x3fff))
6 #endif
8 #ifdef _ERRNO_H
10 enum __error_t_codes
12 #undef EDOM
13 #undef ERANGE
14 EPERM = _HURD_ERRNO (1),
15 #define EPERM _HURD_ERRNO (1) /* Operation not permitted */
16 ENOENT = _HURD_ERRNO (2),
17 #define ENOENT _HURD_ERRNO (2) /* No such file or directory */
18 ESRCH = _HURD_ERRNO (3),
19 #define ESRCH _HURD_ERRNO (3) /* No such process */
20 EINTR = _HURD_ERRNO (4),
21 #define EINTR _HURD_ERRNO (4) /* Interrupted system call */
22 EIO = _HURD_ERRNO (5),
23 #define EIO _HURD_ERRNO (5) /* Input/output error */
24 ENXIO = _HURD_ERRNO (6),
25 #define ENXIO _HURD_ERRNO (6) /* No such device or address */
26 E2BIG = _HURD_ERRNO (7),
27 #define E2BIG _HURD_ERRNO (7) /* Argument list too long */
28 ENOEXEC = _HURD_ERRNO (8),
29 #define ENOEXEC _HURD_ERRNO (8) /* Exec format error */
30 EBADF = _HURD_ERRNO (9),
31 #define EBADF _HURD_ERRNO (9) /* Bad file descriptor */
32 ECHILD = _HURD_ERRNO (10),
33 #define ECHILD _HURD_ERRNO (10)/* No child processes */
34 EDEADLK = _HURD_ERRNO (11),
35 #define EDEADLK _HURD_ERRNO (11)/* Resource deadlock avoided */
36 ENOMEM = _HURD_ERRNO (12),
37 #define ENOMEM _HURD_ERRNO (12)/* Cannot allocate memory */
38 EACCES = _HURD_ERRNO (13),
39 #define EACCES _HURD_ERRNO (13)/* Permission denied */
40 EFAULT = _HURD_ERRNO (14),
41 #define EFAULT _HURD_ERRNO (14)/* Bad address */
42 ENOTBLK = _HURD_ERRNO (15),
43 #define ENOTBLK _HURD_ERRNO (15)/* Block device required */
44 EBUSY = _HURD_ERRNO (16),
45 #define EBUSY _HURD_ERRNO (16)/* Device or resource busy */
46 EEXIST = _HURD_ERRNO (17),
47 #define EEXIST _HURD_ERRNO (17)/* File exists */
48 EXDEV = _HURD_ERRNO (18),
49 #define EXDEV _HURD_ERRNO (18)/* Invalid cross-device link */
50 ENODEV = _HURD_ERRNO (19),
51 #define ENODEV _HURD_ERRNO (19)/* No such device */
52 ENOTDIR = _HURD_ERRNO (20),
53 #define ENOTDIR _HURD_ERRNO (20)/* Not a directory */
54 EISDIR = _HURD_ERRNO (21),
55 #define EISDIR _HURD_ERRNO (21)/* Is a directory */
56 EINVAL = _HURD_ERRNO (22),
57 #define EINVAL _HURD_ERRNO (22)/* Invalid argument */
58 EMFILE = _HURD_ERRNO (24),
59 #define EMFILE _HURD_ERRNO (24)/* Too many open files */
60 ENFILE = _HURD_ERRNO (23),
61 #define ENFILE _HURD_ERRNO (23)/* Too many open files in system */
62 ENOTTY = _HURD_ERRNO (25),
63 #define ENOTTY _HURD_ERRNO (25)/* Inappropriate ioctl for device */
64 ETXTBSY = _HURD_ERRNO (26),
65 #define ETXTBSY _HURD_ERRNO (26)/* Text file busy */
66 EFBIG = _HURD_ERRNO (27),
67 #define EFBIG _HURD_ERRNO (27)/* File too large */
68 ENOSPC = _HURD_ERRNO (28),
69 #define ENOSPC _HURD_ERRNO (28)/* No space left on device */
70 ESPIPE = _HURD_ERRNO (29),
71 #define ESPIPE _HURD_ERRNO (29)/* Illegal seek */
72 EROFS = _HURD_ERRNO (30),
73 #define EROFS _HURD_ERRNO (30)/* Read-only file system */
74 EMLINK = _HURD_ERRNO (31),
75 #define EMLINK _HURD_ERRNO (31)/* Too many links */
76 EPIPE = _HURD_ERRNO (32),
77 #define EPIPE _HURD_ERRNO (32)/* Broken pipe */
78 EDOM = _HURD_ERRNO (33),
79 #define EDOM _HURD_ERRNO (33)/* Numerical argument out of domain */
80 ERANGE = _HURD_ERRNO (34),
81 #define ERANGE _HURD_ERRNO (34)/* Numerical result out of range */
82 EAGAIN = _HURD_ERRNO (35),
83 #define EAGAIN _HURD_ERRNO (35)/* Resource temporarily unavailable */
84 #define EWOULDBLOCK EAGAIN /* Operation would block */
85 EINPROGRESS = _HURD_ERRNO (36),
86 #define EINPROGRESS _HURD_ERRNO (36)/* Operation now in progress */
87 EALREADY = _HURD_ERRNO (37),
88 #define EALREADY _HURD_ERRNO (37)/* Operation already in progress */
89 ENOTSOCK = _HURD_ERRNO (38),
90 #define ENOTSOCK _HURD_ERRNO (38)/* Socket operation on non-socket */
91 EMSGSIZE = _HURD_ERRNO (40),
92 #define EMSGSIZE _HURD_ERRNO (40)/* Message too long */
93 EPROTOTYPE = _HURD_ERRNO (41),
94 #define EPROTOTYPE _HURD_ERRNO (41)/* Protocol wrong type for socket */
95 ENOPROTOOPT = _HURD_ERRNO (42),
96 #define ENOPROTOOPT _HURD_ERRNO (42)/* Protocol not available */
97 EPROTONOSUPPORT = _HURD_ERRNO (43),
98 #define EPROTONOSUPPORT _HURD_ERRNO (43)/* Protocol not supported */
99 ESOCKTNOSUPPORT = _HURD_ERRNO (44),
100 #define ESOCKTNOSUPPORT _HURD_ERRNO (44)/* Socket type not supported */
101 EOPNOTSUPP = _HURD_ERRNO (45),
102 #define EOPNOTSUPP _HURD_ERRNO (45)/* Operation not supported */
103 EPFNOSUPPORT = _HURD_ERRNO (46),
104 #define EPFNOSUPPORT _HURD_ERRNO (46)/* Protocol family not supported */
105 EAFNOSUPPORT = _HURD_ERRNO (47),
106 #define EAFNOSUPPORT _HURD_ERRNO (47)/* Address family not supported by protocol */
107 EADDRINUSE = _HURD_ERRNO (48),
108 #define EADDRINUSE _HURD_ERRNO (48)/* Address already in use */
109 EADDRNOTAVAIL = _HURD_ERRNO (49),
110 #define EADDRNOTAVAIL _HURD_ERRNO (49)/* Cannot assign requested address */
111 ENETDOWN = _HURD_ERRNO (50),
112 #define ENETDOWN _HURD_ERRNO (50)/* Network is down */
113 ENETUNREACH = _HURD_ERRNO (51),
114 #define ENETUNREACH _HURD_ERRNO (51)/* Network is unreachable */
115 ENETRESET = _HURD_ERRNO (52),
116 #define ENETRESET _HURD_ERRNO (52)/* Network dropped connection on reset */
117 ECONNABORTED = _HURD_ERRNO (53),
118 #define ECONNABORTED _HURD_ERRNO (53)/* Software caused connection abort */
119 ECONNRESET = _HURD_ERRNO (54),
120 #define ECONNRESET _HURD_ERRNO (54)/* Connection reset by peer */
121 ENOBUFS = _HURD_ERRNO (55),
122 #define ENOBUFS _HURD_ERRNO (55)/* No buffer space available */
123 EISCONN = _HURD_ERRNO (56),
124 #define EISCONN _HURD_ERRNO (56)/* Transport endpoint is already connected */
125 ENOTCONN = _HURD_ERRNO (57),
126 #define ENOTCONN _HURD_ERRNO (57)/* Transport endpoint is not connected */
127 EDESTADDRREQ = _HURD_ERRNO (39),
128 #define EDESTADDRREQ _HURD_ERRNO (39)/* Destination address required */
129 ESHUTDOWN = _HURD_ERRNO (58),
130 #define ESHUTDOWN _HURD_ERRNO (58)/* Cannot send after transport endpoint shutdown */
131 ETOOMANYREFS = _HURD_ERRNO (59),
132 #define ETOOMANYREFS _HURD_ERRNO (59)/* Too many references: cannot splice */
133 ETIMEDOUT = _HURD_ERRNO (60),
134 #define ETIMEDOUT _HURD_ERRNO (60)/* Connection timed out */
135 ECONNREFUSED = _HURD_ERRNO (61),
136 #define ECONNREFUSED _HURD_ERRNO (61)/* Connection refused */
137 ELOOP = _HURD_ERRNO (62),
138 #define ELOOP _HURD_ERRNO (62)/* Too many levels of symbolic links */
139 ENAMETOOLONG = _HURD_ERRNO (63),
140 #define ENAMETOOLONG _HURD_ERRNO (63)/* File name too long */
141 EHOSTDOWN = _HURD_ERRNO (64),
142 #define EHOSTDOWN _HURD_ERRNO (64)/* Host is down */
143 EHOSTUNREACH = _HURD_ERRNO (65),
144 #define EHOSTUNREACH _HURD_ERRNO (65)/* No route to host */
145 ENOTEMPTY = _HURD_ERRNO (66),
146 #define ENOTEMPTY _HURD_ERRNO (66)/* Directory not empty */
147 EPROCLIM = _HURD_ERRNO (67),
148 #define EPROCLIM _HURD_ERRNO (67)/* Too many processes */
149 EUSERS = _HURD_ERRNO (68),
150 #define EUSERS _HURD_ERRNO (68)/* Too many users */
151 EDQUOT = _HURD_ERRNO (69),
152 #define EDQUOT _HURD_ERRNO (69)/* Disk quota exceeded */
153 ESTALE = _HURD_ERRNO (70),
154 #define ESTALE _HURD_ERRNO (70)/* Stale NFS file handle */
155 EREMOTE = _HURD_ERRNO (71),
156 #define EREMOTE _HURD_ERRNO (71)/* Object is remote */
157 EBADRPC = _HURD_ERRNO (72),
158 #define EBADRPC _HURD_ERRNO (72)/* RPC struct is bad */
159 ERPCMISMATCH = _HURD_ERRNO (73),
160 #define ERPCMISMATCH _HURD_ERRNO (73)/* RPC version wrong */
161 EPROGUNAVAIL = _HURD_ERRNO (74),
162 #define EPROGUNAVAIL _HURD_ERRNO (74)/* RPC program not available */
163 EPROGMISMATCH = _HURD_ERRNO (75),
164 #define EPROGMISMATCH _HURD_ERRNO (75)/* RPC program version wrong */
165 EPROCUNAVAIL = _HURD_ERRNO (76),
166 #define EPROCUNAVAIL _HURD_ERRNO (76)/* RPC bad procedure for program */
167 ENOLCK = _HURD_ERRNO (77),
168 #define ENOLCK _HURD_ERRNO (77)/* No locks available */
169 EFTYPE = _HURD_ERRNO (79),
170 #define EFTYPE _HURD_ERRNO (79)/* Inappropriate file type or format */
171 EAUTH = _HURD_ERRNO (80),
172 #define EAUTH _HURD_ERRNO (80)/* Authentication error */
173 ENEEDAUTH = _HURD_ERRNO (81),
174 #define ENEEDAUTH _HURD_ERRNO (81)/* Need authenticator */
175 ENOSYS = _HURD_ERRNO (78),
176 #define ENOSYS _HURD_ERRNO (78)/* Function not implemented */
177 ENOTSUP = _HURD_ERRNO (118),
178 #define ENOTSUP _HURD_ERRNO (118)/* Not supported */
179 EILSEQ = _HURD_ERRNO (106),
180 #define EILSEQ _HURD_ERRNO (106)/* Invalid or incomplete multibyte or wide character */
181 EBACKGROUND = _HURD_ERRNO (100),
182 #define EBACKGROUND _HURD_ERRNO (100)/* Inappropriate operation for background process */
183 EDIED = _HURD_ERRNO (101),
184 #define EDIED _HURD_ERRNO (101)/* Translator died */
185 ED = _HURD_ERRNO (102),
186 #define ED _HURD_ERRNO (102)/* ? */
187 EGREGIOUS = _HURD_ERRNO (103),
188 #define EGREGIOUS _HURD_ERRNO (103)/* You really blew it this time */
189 EIEIO = _HURD_ERRNO (104),
190 #define EIEIO _HURD_ERRNO (104)/* Computer bought the farm */
191 EGRATUITOUS = _HURD_ERRNO (105),
192 #define EGRATUITOUS _HURD_ERRNO (105)/* Gratuitous error */
193 EBADMSG = _HURD_ERRNO (107),
194 #define EBADMSG _HURD_ERRNO (107)/* Bad message */
195 EIDRM = _HURD_ERRNO (108),
196 #define EIDRM _HURD_ERRNO (108)/* Identifier removed */
197 EMULTIHOP = _HURD_ERRNO (109),
198 #define EMULTIHOP _HURD_ERRNO (109)/* Multihop attempted */
199 ENODATA = _HURD_ERRNO (110),
200 #define ENODATA _HURD_ERRNO (110)/* No data available */
201 ENOLINK = _HURD_ERRNO (111),
202 #define ENOLINK _HURD_ERRNO (111)/* Link has been severed */
203 ENOMSG = _HURD_ERRNO (112),
204 #define ENOMSG _HURD_ERRNO (112)/* No message of desired type */
205 ENOSR = _HURD_ERRNO (113),
206 #define ENOSR _HURD_ERRNO (113)/* Out of streams resources */
207 ENOSTR = _HURD_ERRNO (114),
208 #define ENOSTR _HURD_ERRNO (114)/* Device not a stream */
209 EOVERFLOW = _HURD_ERRNO (115),
210 #define EOVERFLOW _HURD_ERRNO (115)/* Value too large for defined data type */
211 EPROTO = _HURD_ERRNO (116),
212 #define EPROTO _HURD_ERRNO (116)/* Protocol error */
213 ETIME = _HURD_ERRNO (117),
214 #define ETIME _HURD_ERRNO (117)/* Timer expired */
215 ECANCELED = _HURD_ERRNO (118),
216 #define ECANCELED _HURD_ERRNO (118)/* Operation canceled */
218 /* Errors from <mach/message.h>. */
219 EMACH_SEND_IN_PROGRESS = 0x10000001,
220 EMACH_SEND_INVALID_DATA = 0x10000002,
221 EMACH_SEND_INVALID_DEST = 0x10000003,
222 EMACH_SEND_TIMED_OUT = 0x10000004,
223 EMACH_SEND_WILL_NOTIFY = 0x10000005,
224 EMACH_SEND_NOTIFY_IN_PROGRESS = 0x10000006,
225 EMACH_SEND_INTERRUPTED = 0x10000007,
226 EMACH_SEND_MSG_TOO_SMALL = 0x10000008,
227 EMACH_SEND_INVALID_REPLY = 0x10000009,
228 EMACH_SEND_INVALID_RIGHT = 0x1000000a,
229 EMACH_SEND_INVALID_NOTIFY = 0x1000000b,
230 EMACH_SEND_INVALID_MEMORY = 0x1000000c,
231 EMACH_SEND_NO_BUFFER = 0x1000000d,
232 EMACH_SEND_NO_NOTIFY = 0x1000000e,
233 EMACH_SEND_INVALID_TYPE = 0x1000000f,
234 EMACH_SEND_INVALID_HEADER = 0x10000010,
235 EMACH_RCV_IN_PROGRESS = 0x10004001,
236 EMACH_RCV_INVALID_NAME = 0x10004002,
237 EMACH_RCV_TIMED_OUT = 0x10004003,
238 EMACH_RCV_TOO_LARGE = 0x10004004,
239 EMACH_RCV_INTERRUPTED = 0x10004005,
240 EMACH_RCV_PORT_CHANGED = 0x10004006,
241 EMACH_RCV_INVALID_NOTIFY = 0x10004007,
242 EMACH_RCV_INVALID_DATA = 0x10004008,
243 EMACH_RCV_PORT_DIED = 0x10004009,
244 EMACH_RCV_IN_SET = 0x1000400a,
245 EMACH_RCV_HEADER_ERROR = 0x1000400b,
246 EMACH_RCV_BODY_ERROR = 0x1000400c,
248 /* Errors from <mach/kern_return.h>. */
249 EKERN_INVALID_ADDRESS = 1,
250 EKERN_PROTECTION_FAILURE = 2,
251 EKERN_NO_SPACE = 3,
252 EKERN_INVALID_ARGUMENT = 4,
253 EKERN_FAILURE = 5,
254 EKERN_RESOURCE_SHORTAGE = 6,
255 EKERN_NOT_RECEIVER = 7,
256 EKERN_NO_ACCESS = 8,
257 EKERN_MEMORY_FAILURE = 9,
258 EKERN_MEMORY_ERROR = 10,
259 EKERN_NOT_IN_SET = 12,
260 EKERN_NAME_EXISTS = 13,
261 EKERN_ABORTED = 14,
262 EKERN_INVALID_NAME = 15,
263 EKERN_INVALID_TASK = 16,
264 EKERN_INVALID_RIGHT = 17,
265 EKERN_INVALID_VALUE = 18,
266 EKERN_UREFS_OVERFLOW = 19,
267 EKERN_INVALID_CAPABILITY = 20,
268 EKERN_RIGHT_EXISTS = 21,
269 EKERN_INVALID_HOST = 22,
270 EKERN_MEMORY_PRESENT = 23,
271 EKERN_WRITE_PROTECTION_FAILURE = 24,
272 EKERN_TERMINATED = 26,
274 /* Errors from <mach/mig_errors.h>. */
275 EMIG_TYPE_ERROR = -300 /* client type check failure */,
276 EMIG_REPLY_MISMATCH = -301 /* wrong reply message ID */,
277 EMIG_REMOTE_ERROR = -302 /* server detected error */,
278 EMIG_BAD_ID = -303 /* bad request message ID */,
279 EMIG_BAD_ARGUMENTS = -304 /* server type check failure */,
280 EMIG_NO_REPLY = -305 /* no reply should be sent */,
281 EMIG_EXCEPTION = -306 /* server raised exception */,
282 EMIG_ARRAY_TOO_LARGE = -307 /* array not large enough */,
283 EMIG_SERVER_DIED = -308 /* server died */,
284 EMIG_DESTROY_REQUEST = -309 /* destroy request with no reply */,
286 /* Errors from <device/device_types.h>. */
287 ED_IO_ERROR = 2500 /* hardware IO error */,
288 ED_WOULD_BLOCK = 2501 /* would block, but D_NOWAIT set */,
289 ED_NO_SUCH_DEVICE = 2502 /* no such device */,
290 ED_ALREADY_OPEN = 2503 /* exclusive-use device already open */,
291 ED_DEVICE_DOWN = 2504 /* device has been shut down */,
292 ED_INVALID_OPERATION = 2505 /* bad operation for device */,
293 ED_INVALID_RECNUM = 2506 /* invalid record (block) number */,
294 ED_INVALID_SIZE = 2507 /* invalid IO size */,
295 ED_NO_MEMORY = 2508 /* memory allocation failure */,
296 ED_READ_ONLY = 2509 /* device cannot be written to */
300 #define _HURD_ERRNOS 119
302 /* User-visible type of error codes. It is ok to use `int' or
303 `kern_return_t' for these, but with `error_t' the debugger prints
304 symbolic values. */
305 #ifdef __USE_GNU
306 typedef enum __error_t_codes error_t;
307 #define __error_t_defined 1
308 #endif
310 /* Return the current thread's location for `errno'.
311 The syntax of this function allows redeclarations like `int errno'. */
312 extern int *__errno_location (void) __THROW __attribute__ ((__const__));
314 #define errno (*__errno_location ())
316 #endif /* <errno.h> included. */
318 #if !defined (_ERRNO_H) && defined (__need_Emath)
319 #define EDOM _HURD_ERRNO (33)/* Numerical argument out of domain */
320 #define ERANGE _HURD_ERRNO (34)/* Numerical result out of range */
321 #endif /* <errno.h> not included and need math error codes. */