1 /* This file generated by errnos.awk from
2      errno.texi
3      stdc-predef.h
4      libc-symbols.h
5      mach/message.h
6      mach/kern_return.h
7      mach/i386/kern_return.h
8      mach/port.h
9      mach/boolean.h
10      mach/i386/boolean.h
11      mach/i386/vm_types.h
12      mach/mig_errors.h
13      device/device_types.h
14      mach/std_types.h
15    Do not edit this file; edit errnos.awk and regenerate it.  */
16 
17 #ifndef _BITS_ERRNO_H
18 #define _BITS_ERRNO_H 1
19 
20 #if !defined _ERRNO_H
21 # error "Never include <bits/errno.h> directly; use <errno.h> instead."
22 #endif
23 
24 #ifndef __ASSEMBLER__
25 
26 enum __error_t_codes
27 {
28   /* The value zero always means success and it is perfectly fine
29      for code to use 0 explicitly (or implicitly, e.g. via Boolean
30      coercion.)  Having an enum entry for zero both makes the
31      debugger print the name for error_t-typed zero values, and
32      prevents the compiler from issuing warnings about 'case 0:'
33      in a switch on an error_t-typed value.  */
34   ESUCCESS                       = 0,
35 
36   /* The Hurd uses Mach error system 0x10, subsystem 0. */
37   EPERM                          = 0x40000001,	/* Operation not permitted */
38   ENOENT                         = 0x40000002,	/* No such file or directory */
39   ESRCH                          = 0x40000003,	/* No such process */
40   EINTR                          = 0x40000004,	/* Interrupted system call */
41   EIO                            = 0x40000005,	/* Input/output error */
42   ENXIO                          = 0x40000006,	/* No such device or address */
43   E2BIG                          = 0x40000007,	/* Argument list too long */
44   ENOEXEC                        = 0x40000008,	/* Exec format error */
45   EBADF                          = 0x40000009,	/* Bad file descriptor */
46   ECHILD                         = 0x4000000a,	/* No child processes */
47   EDEADLK                        = 0x4000000b,	/* Resource deadlock avoided */
48   ENOMEM                         = 0x4000000c,	/* Cannot allocate memory */
49   EACCES                         = 0x4000000d,	/* Permission denied */
50   EFAULT                         = 0x4000000e,	/* Bad address */
51   ENOTBLK                        = 0x4000000f,	/* Block device required */
52   EBUSY                          = 0x40000010,	/* Device or resource busy */
53   EEXIST                         = 0x40000011,	/* File exists */
54   EXDEV                          = 0x40000012,	/* Invalid cross-device link */
55   ENODEV                         = 0x40000013,	/* No such device */
56   ENOTDIR                        = 0x40000014,	/* Not a directory */
57   EISDIR                         = 0x40000015,	/* Is a directory */
58   EINVAL                         = 0x40000016,	/* Invalid argument */
59   EMFILE                         = 0x40000018,	/* Too many open files */
60   ENFILE                         = 0x40000017,	/* Too many open files in system */
61   ENOTTY                         = 0x40000019,	/* Inappropriate ioctl for device */
62   ETXTBSY                        = 0x4000001a,	/* Text file busy */
63   EFBIG                          = 0x4000001b,	/* File too large */
64   ENOSPC                         = 0x4000001c,	/* No space left on device */
65   ESPIPE                         = 0x4000001d,	/* Illegal seek */
66   EROFS                          = 0x4000001e,	/* Read-only file system */
67   EMLINK                         = 0x4000001f,	/* Too many links */
68   EPIPE                          = 0x40000020,	/* Broken pipe */
69   EDOM                           = 0x40000021,	/* Numerical argument out of domain */
70   ERANGE                         = 0x40000022,	/* Numerical result out of range */
71   EAGAIN                         = 0x40000023,	/* Resource temporarily unavailable */
72   EINPROGRESS                    = 0x40000024,	/* Operation now in progress */
73   EALREADY                       = 0x40000025,	/* Operation already in progress */
74   ENOTSOCK                       = 0x40000026,	/* Socket operation on non-socket */
75   EMSGSIZE                       = 0x40000028,	/* Message too long */
76   EPROTOTYPE                     = 0x40000029,	/* Protocol wrong type for socket */
77   ENOPROTOOPT                    = 0x4000002a,	/* Protocol not available */
78   EPROTONOSUPPORT                = 0x4000002b,	/* Protocol not supported */
79   ESOCKTNOSUPPORT                = 0x4000002c,	/* Socket type not supported */
80   EOPNOTSUPP                     = 0x4000002d,	/* Operation not supported */
81   EPFNOSUPPORT                   = 0x4000002e,	/* Protocol family not supported */
82   EAFNOSUPPORT                   = 0x4000002f,	/* Address family not supported by protocol */
83   EADDRINUSE                     = 0x40000030,	/* Address already in use */
84   EADDRNOTAVAIL                  = 0x40000031,	/* Cannot assign requested address */
85   ENETDOWN                       = 0x40000032,	/* Network is down */
86   ENETUNREACH                    = 0x40000033,	/* Network is unreachable */
87   ENETRESET                      = 0x40000034,	/* Network dropped connection on reset */
88   ECONNABORTED                   = 0x40000035,	/* Software caused connection abort */
89   ECONNRESET                     = 0x40000036,	/* Connection reset by peer */
90   ENOBUFS                        = 0x40000037,	/* No buffer space available */
91   EISCONN                        = 0x40000038,	/* Transport endpoint is already connected */
92   ENOTCONN                       = 0x40000039,	/* Transport endpoint is not connected */
93   EDESTADDRREQ                   = 0x40000027,	/* Destination address required */
94   ESHUTDOWN                      = 0x4000003a,	/* Cannot send after transport endpoint shutdown */
95   ETOOMANYREFS                   = 0x4000003b,	/* Too many references: cannot splice */
96   ETIMEDOUT                      = 0x4000003c,	/* Connection timed out */
97   ECONNREFUSED                   = 0x4000003d,	/* Connection refused */
98   ELOOP                          = 0x4000003e,	/* Too many levels of symbolic links */
99   ENAMETOOLONG                   = 0x4000003f,	/* File name too long */
100   EHOSTDOWN                      = 0x40000040,	/* Host is down */
101   EHOSTUNREACH                   = 0x40000041,	/* No route to host */
102   ENOTEMPTY                      = 0x40000042,	/* Directory not empty */
103   EPROCLIM                       = 0x40000043,	/* Too many processes */
104   EUSERS                         = 0x40000044,	/* Too many users */
105   EDQUOT                         = 0x40000045,	/* Disk quota exceeded */
106   ESTALE                         = 0x40000046,	/* Stale file handle */
107   EREMOTE                        = 0x40000047,	/* Object is remote */
108   EBADRPC                        = 0x40000048,	/* RPC struct is bad */
109   ERPCMISMATCH                   = 0x40000049,	/* RPC version wrong */
110   EPROGUNAVAIL                   = 0x4000004a,	/* RPC program not available */
111   EPROGMISMATCH                  = 0x4000004b,	/* RPC program version wrong */
112   EPROCUNAVAIL                   = 0x4000004c,	/* RPC bad procedure for program */
113   ENOLCK                         = 0x4000004d,	/* No locks available */
114   EFTYPE                         = 0x4000004f,	/* Inappropriate file type or format */
115   EAUTH                          = 0x40000050,	/* Authentication error */
116   ENEEDAUTH                      = 0x40000051,	/* Need authenticator */
117   ENOSYS                         = 0x4000004e,	/* Function not implemented */
118   ELIBEXEC                       = 0x40000053,	/* Cannot exec a shared library directly */
119   ENOTSUP                        = 0x40000076,	/* Not supported */
120   EILSEQ                         = 0x4000006a,	/* Invalid or incomplete multibyte or wide character */
121   EBACKGROUND                    = 0x40000064,	/* Inappropriate operation for background process */
122   EDIED                          = 0x40000065,	/* Translator died */
123   ED                             = 0x40000066,	/* ? */
124   EGREGIOUS                      = 0x40000067,	/* You really blew it this time */
125   EIEIO                          = 0x40000068,	/* Computer bought the farm */
126   EGRATUITOUS                    = 0x40000069,	/* Gratuitous error */
127   EBADMSG                        = 0x4000006b,	/* Bad message */
128   EIDRM                          = 0x4000006c,	/* Identifier removed */
129   EMULTIHOP                      = 0x4000006d,	/* Multihop attempted */
130   ENODATA                        = 0x4000006e,	/* No data available */
131   ENOLINK                        = 0x4000006f,	/* Link has been severed */
132   ENOMSG                         = 0x40000070,	/* No message of desired type */
133   ENOSR                          = 0x40000071,	/* Out of streams resources */
134   ENOSTR                         = 0x40000072,	/* Device not a stream */
135   EOVERFLOW                      = 0x40000073,	/* Value too large for defined data type */
136   EPROTO                         = 0x40000074,	/* Protocol error */
137   ETIME                          = 0x40000075,	/* Timer expired */
138   ECANCELED                      = 0x40000077,	/* Operation canceled */
139   EOWNERDEAD                     = 0x40000078,	/* Owner died */
140   ENOTRECOVERABLE                = 0x40000079,	/* State not recoverable */
141 
142 /* Errors from <mach/message.h>.  */
143   EMACH_SEND_IN_PROGRESS         = 0x10000001,
144   EMACH_SEND_INVALID_DATA        = 0x10000002,
145   EMACH_SEND_INVALID_DEST        = 0x10000003,
146   EMACH_SEND_TIMED_OUT           = 0x10000004,
147   EMACH_SEND_WILL_NOTIFY         = 0x10000005,
148   EMACH_SEND_NOTIFY_IN_PROGRESS  = 0x10000006,
149   EMACH_SEND_INTERRUPTED         = 0x10000007,
150   EMACH_SEND_MSG_TOO_SMALL       = 0x10000008,
151   EMACH_SEND_INVALID_REPLY       = 0x10000009,
152   EMACH_SEND_INVALID_RIGHT       = 0x1000000a,
153   EMACH_SEND_INVALID_NOTIFY      = 0x1000000b,
154   EMACH_SEND_INVALID_MEMORY      = 0x1000000c,
155   EMACH_SEND_NO_BUFFER           = 0x1000000d,
156   EMACH_SEND_NO_NOTIFY           = 0x1000000e,
157   EMACH_SEND_INVALID_TYPE        = 0x1000000f,
158   EMACH_SEND_INVALID_HEADER      = 0x10000010,
159   EMACH_RCV_IN_PROGRESS          = 0x10004001,
160   EMACH_RCV_INVALID_NAME         = 0x10004002,
161   EMACH_RCV_TIMED_OUT            = 0x10004003,
162   EMACH_RCV_TOO_LARGE            = 0x10004004,
163   EMACH_RCV_INTERRUPTED          = 0x10004005,
164   EMACH_RCV_PORT_CHANGED         = 0x10004006,
165   EMACH_RCV_INVALID_NOTIFY       = 0x10004007,
166   EMACH_RCV_INVALID_DATA         = 0x10004008,
167   EMACH_RCV_PORT_DIED            = 0x10004009,
168   EMACH_RCV_IN_SET               = 0x1000400a,
169   EMACH_RCV_HEADER_ERROR         = 0x1000400b,
170   EMACH_RCV_BODY_ERROR           = 0x1000400c,
171 
172 /* Errors from <mach/kern_return.h>.  */
173   EKERN_INVALID_ADDRESS          = 1,
174   EKERN_PROTECTION_FAILURE       = 2,
175   EKERN_NO_SPACE                 = 3,
176   EKERN_INVALID_ARGUMENT         = 4,
177   EKERN_FAILURE                  = 5,
178   EKERN_RESOURCE_SHORTAGE        = 6,
179   EKERN_NOT_RECEIVER             = 7,
180   EKERN_NO_ACCESS                = 8,
181   EKERN_MEMORY_FAILURE           = 9,
182   EKERN_MEMORY_ERROR             = 10,
183   EKERN_NOT_IN_SET               = 12,
184   EKERN_NAME_EXISTS              = 13,
185   EKERN_ABORTED                  = 14,
186   EKERN_INVALID_NAME             = 15,
187   EKERN_INVALID_TASK             = 16,
188   EKERN_INVALID_RIGHT            = 17,
189   EKERN_INVALID_VALUE            = 18,
190   EKERN_UREFS_OVERFLOW           = 19,
191   EKERN_INVALID_CAPABILITY       = 20,
192   EKERN_RIGHT_EXISTS             = 21,
193   EKERN_INVALID_HOST             = 22,
194   EKERN_MEMORY_PRESENT           = 23,
195   EKERN_WRITE_PROTECTION_FAILURE = 24,
196   EKERN_TERMINATED               = 26,
197   EKERN_TIMEDOUT                 = 27,
198   EKERN_INTERRUPTED              = 28,
199 
200 /* Errors from <mach/mig_errors.h>.  */
201   EMIG_TYPE_ERROR                = -300,	/* client type check failure */
202   EMIG_REPLY_MISMATCH            = -301,	/* wrong reply message ID */
203   EMIG_REMOTE_ERROR              = -302,	/* server detected error */
204   EMIG_BAD_ID                    = -303,	/* bad request message ID */
205   EMIG_BAD_ARGUMENTS             = -304,	/* server type check failure */
206   EMIG_NO_REPLY                  = -305,	/* no reply should be sent */
207   EMIG_EXCEPTION                 = -306,	/* server raised exception */
208   EMIG_ARRAY_TOO_LARGE           = -307,	/* array not large enough */
209   EMIG_SERVER_DIED               = -308,	/* server died */
210   EMIG_DESTROY_REQUEST           = -309,	/* destroy request with no reply */
211 
212 /* Errors from <device/device_types.h>.  */
213   ED_IO_ERROR                    = 2500,	/* hardware IO error */
214   ED_WOULD_BLOCK                 = 2501,	/* would block, but D_NOWAIT set */
215   ED_NO_SUCH_DEVICE              = 2502,	/* no such device */
216   ED_ALREADY_OPEN                = 2503,	/* exclusive-use device already open */
217   ED_DEVICE_DOWN                 = 2504,	/* device has been shut down */
218   ED_INVALID_OPERATION           = 2505,	/* bad operation for device */
219   ED_INVALID_RECNUM              = 2506,	/* invalid record (block) number */
220   ED_INVALID_SIZE                = 2507,	/* invalid IO size */
221   ED_NO_MEMORY                   = 2508,	/* memory allocation failure */
222   ED_READ_ONLY                   = 2509,	/* device cannot be written to */
223 
224   /* Because the C standard requires that errno have type 'int',
225      this enumeration must be a signed type.  */
226   __FORCE_ERROR_T_CODES_SIGNED = -1
227 };
228 
229 #endif /* not __ASSEMBLER__ */
230 
231 /* The C standard requires that all of the E-constants be
232    defined as macros.  */
233 
234 #define EPERM                          0x40000001
235 #define ENOENT                         0x40000002
236 #define ESRCH                          0x40000003
237 #define EINTR                          0x40000004
238 #define EIO                            0x40000005
239 #define ENXIO                          0x40000006
240 #define E2BIG                          0x40000007
241 #define ENOEXEC                        0x40000008
242 #define EBADF                          0x40000009
243 #define ECHILD                         0x4000000a
244 #define EDEADLK                        0x4000000b
245 #define ENOMEM                         0x4000000c
246 #define EACCES                         0x4000000d
247 #define EFAULT                         0x4000000e
248 #define ENOTBLK                        0x4000000f
249 #define EBUSY                          0x40000010
250 #define EEXIST                         0x40000011
251 #define EXDEV                          0x40000012
252 #define ENODEV                         0x40000013
253 #define ENOTDIR                        0x40000014
254 #define EISDIR                         0x40000015
255 #define EINVAL                         0x40000016
256 #define EMFILE                         0x40000018
257 #define ENFILE                         0x40000017
258 #define ENOTTY                         0x40000019
259 #define ETXTBSY                        0x4000001a
260 #define EFBIG                          0x4000001b
261 #define ENOSPC                         0x4000001c
262 #define ESPIPE                         0x4000001d
263 #define EROFS                          0x4000001e
264 #define EMLINK                         0x4000001f
265 #define EPIPE                          0x40000020
266 #define EDOM                           0x40000021
267 #define ERANGE                         0x40000022
268 #define EAGAIN                         0x40000023
269 #define EWOULDBLOCK                    EAGAIN
270 #define EINPROGRESS                    0x40000024
271 #define EALREADY                       0x40000025
272 #define ENOTSOCK                       0x40000026
273 #define EMSGSIZE                       0x40000028
274 #define EPROTOTYPE                     0x40000029
275 #define ENOPROTOOPT                    0x4000002a
276 #define EPROTONOSUPPORT                0x4000002b
277 #define ESOCKTNOSUPPORT                0x4000002c
278 #define EOPNOTSUPP                     0x4000002d
279 #define EPFNOSUPPORT                   0x4000002e
280 #define EAFNOSUPPORT                   0x4000002f
281 #define EADDRINUSE                     0x40000030
282 #define EADDRNOTAVAIL                  0x40000031
283 #define ENETDOWN                       0x40000032
284 #define ENETUNREACH                    0x40000033
285 #define ENETRESET                      0x40000034
286 #define ECONNABORTED                   0x40000035
287 #define ECONNRESET                     0x40000036
288 #define ENOBUFS                        0x40000037
289 #define EISCONN                        0x40000038
290 #define ENOTCONN                       0x40000039
291 #define EDESTADDRREQ                   0x40000027
292 #define ESHUTDOWN                      0x4000003a
293 #define ETOOMANYREFS                   0x4000003b
294 #define ETIMEDOUT                      0x4000003c
295 #define ECONNREFUSED                   0x4000003d
296 #define ELOOP                          0x4000003e
297 #define ENAMETOOLONG                   0x4000003f
298 #define EHOSTDOWN                      0x40000040
299 #define EHOSTUNREACH                   0x40000041
300 #define ENOTEMPTY                      0x40000042
301 #define EPROCLIM                       0x40000043
302 #define EUSERS                         0x40000044
303 #define EDQUOT                         0x40000045
304 #define ESTALE                         0x40000046
305 #define EREMOTE                        0x40000047
306 #define EBADRPC                        0x40000048
307 #define ERPCMISMATCH                   0x40000049
308 #define EPROGUNAVAIL                   0x4000004a
309 #define EPROGMISMATCH                  0x4000004b
310 #define EPROCUNAVAIL                   0x4000004c
311 #define ENOLCK                         0x4000004d
312 #define EFTYPE                         0x4000004f
313 #define EAUTH                          0x40000050
314 #define ENEEDAUTH                      0x40000051
315 #define ENOSYS                         0x4000004e
316 #define ELIBEXEC                       0x40000053
317 #define ENOTSUP                        0x40000076
318 #define EILSEQ                         0x4000006a
319 #define EBACKGROUND                    0x40000064
320 #define EDIED                          0x40000065
321 #define ED                             0x40000066
322 #define EGREGIOUS                      0x40000067
323 #define EIEIO                          0x40000068
324 #define EGRATUITOUS                    0x40000069
325 #define EBADMSG                        0x4000006b
326 #define EIDRM                          0x4000006c
327 #define EMULTIHOP                      0x4000006d
328 #define ENODATA                        0x4000006e
329 #define ENOLINK                        0x4000006f
330 #define ENOMSG                         0x40000070
331 #define ENOSR                          0x40000071
332 #define ENOSTR                         0x40000072
333 #define EOVERFLOW                      0x40000073
334 #define EPROTO                         0x40000074
335 #define ETIME                          0x40000075
336 #define ECANCELED                      0x40000077
337 #define EOWNERDEAD                     0x40000078
338 #define ENOTRECOVERABLE                0x40000079
339 
340 /* Errors from <mach/message.h>.  */
341 #define EMACH_SEND_IN_PROGRESS         0x10000001
342 #define EMACH_SEND_INVALID_DATA        0x10000002
343 #define EMACH_SEND_INVALID_DEST        0x10000003
344 #define EMACH_SEND_TIMED_OUT           0x10000004
345 #define EMACH_SEND_WILL_NOTIFY         0x10000005
346 #define EMACH_SEND_NOTIFY_IN_PROGRESS  0x10000006
347 #define EMACH_SEND_INTERRUPTED         0x10000007
348 #define EMACH_SEND_MSG_TOO_SMALL       0x10000008
349 #define EMACH_SEND_INVALID_REPLY       0x10000009
350 #define EMACH_SEND_INVALID_RIGHT       0x1000000a
351 #define EMACH_SEND_INVALID_NOTIFY      0x1000000b
352 #define EMACH_SEND_INVALID_MEMORY      0x1000000c
353 #define EMACH_SEND_NO_BUFFER           0x1000000d
354 #define EMACH_SEND_NO_NOTIFY           0x1000000e
355 #define EMACH_SEND_INVALID_TYPE        0x1000000f
356 #define EMACH_SEND_INVALID_HEADER      0x10000010
357 #define EMACH_RCV_IN_PROGRESS          0x10004001
358 #define EMACH_RCV_INVALID_NAME         0x10004002
359 #define EMACH_RCV_TIMED_OUT            0x10004003
360 #define EMACH_RCV_TOO_LARGE            0x10004004
361 #define EMACH_RCV_INTERRUPTED          0x10004005
362 #define EMACH_RCV_PORT_CHANGED         0x10004006
363 #define EMACH_RCV_INVALID_NOTIFY       0x10004007
364 #define EMACH_RCV_INVALID_DATA         0x10004008
365 #define EMACH_RCV_PORT_DIED            0x10004009
366 #define EMACH_RCV_IN_SET               0x1000400a
367 #define EMACH_RCV_HEADER_ERROR         0x1000400b
368 #define EMACH_RCV_BODY_ERROR           0x1000400c
369 
370 /* Errors from <mach/kern_return.h>.  */
371 #define EKERN_INVALID_ADDRESS          1
372 #define EKERN_PROTECTION_FAILURE       2
373 #define EKERN_NO_SPACE                 3
374 #define EKERN_INVALID_ARGUMENT         4
375 #define EKERN_FAILURE                  5
376 #define EKERN_RESOURCE_SHORTAGE        6
377 #define EKERN_NOT_RECEIVER             7
378 #define EKERN_NO_ACCESS                8
379 #define EKERN_MEMORY_FAILURE           9
380 #define EKERN_MEMORY_ERROR             10
381 #define EKERN_NOT_IN_SET               12
382 #define EKERN_NAME_EXISTS              13
383 #define EKERN_ABORTED                  14
384 #define EKERN_INVALID_NAME             15
385 #define EKERN_INVALID_TASK             16
386 #define EKERN_INVALID_RIGHT            17
387 #define EKERN_INVALID_VALUE            18
388 #define EKERN_UREFS_OVERFLOW           19
389 #define EKERN_INVALID_CAPABILITY       20
390 #define EKERN_RIGHT_EXISTS             21
391 #define EKERN_INVALID_HOST             22
392 #define EKERN_MEMORY_PRESENT           23
393 #define EKERN_WRITE_PROTECTION_FAILURE 24
394 #define EKERN_TERMINATED               26
395 #define EKERN_TIMEDOUT                 27
396 #define EKERN_INTERRUPTED              28
397 
398 /* Errors from <mach/mig_errors.h>.  */
399 #define EMIG_TYPE_ERROR                -300
400 #define EMIG_REPLY_MISMATCH            -301
401 #define EMIG_REMOTE_ERROR              -302
402 #define EMIG_BAD_ID                    -303
403 #define EMIG_BAD_ARGUMENTS             -304
404 #define EMIG_NO_REPLY                  -305
405 #define EMIG_EXCEPTION                 -306
406 #define EMIG_ARRAY_TOO_LARGE           -307
407 #define EMIG_SERVER_DIED               -308
408 #define EMIG_DESTROY_REQUEST           -309
409 
410 /* Errors from <device/device_types.h>.  */
411 #define ED_IO_ERROR                    2500
412 #define ED_WOULD_BLOCK                 2501
413 #define ED_NO_SUCH_DEVICE              2502
414 #define ED_ALREADY_OPEN                2503
415 #define ED_DEVICE_DOWN                 2504
416 #define ED_INVALID_OPERATION           2505
417 #define ED_INVALID_RECNUM              2506
418 #define ED_INVALID_SIZE                2507
419 #define ED_NO_MEMORY                   2508
420 #define ED_READ_ONLY                   2509
421 
422 #define _HURD_ERRNOS 122
423 
424 #endif /* bits/errno.h.  */
425