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 ENOTSUP = 0x40000076, /* Not supported */ 119 EILSEQ = 0x4000006a, /* Invalid or incomplete multibyte or wide character */ 120 EBACKGROUND = 0x40000064, /* Inappropriate operation for background process */ 121 EDIED = 0x40000065, /* Translator died */ 122 ED = 0x40000066, /* ? */ 123 EGREGIOUS = 0x40000067, /* You really blew it this time */ 124 EIEIO = 0x40000068, /* Computer bought the farm */ 125 EGRATUITOUS = 0x40000069, /* Gratuitous error */ 126 EBADMSG = 0x4000006b, /* Bad message */ 127 EIDRM = 0x4000006c, /* Identifier removed */ 128 EMULTIHOP = 0x4000006d, /* Multihop attempted */ 129 ENODATA = 0x4000006e, /* No data available */ 130 ENOLINK = 0x4000006f, /* Link has been severed */ 131 ENOMSG = 0x40000070, /* No message of desired type */ 132 ENOSR = 0x40000071, /* Out of streams resources */ 133 ENOSTR = 0x40000072, /* Device not a stream */ 134 EOVERFLOW = 0x40000073, /* Value too large for defined data type */ 135 EPROTO = 0x40000074, /* Protocol error */ 136 ETIME = 0x40000075, /* Timer expired */ 137 ECANCELED = 0x40000077, /* Operation canceled */ 138 EOWNERDEAD = 0x40000078, /* Owner died */ 139 ENOTRECOVERABLE = 0x40000079, /* State not recoverable */ 140 141 /* Errors from <mach/message.h>. */ 142 EMACH_SEND_IN_PROGRESS = 0x10000001, 143 EMACH_SEND_INVALID_DATA = 0x10000002, 144 EMACH_SEND_INVALID_DEST = 0x10000003, 145 EMACH_SEND_TIMED_OUT = 0x10000004, 146 EMACH_SEND_WILL_NOTIFY = 0x10000005, 147 EMACH_SEND_NOTIFY_IN_PROGRESS = 0x10000006, 148 EMACH_SEND_INTERRUPTED = 0x10000007, 149 EMACH_SEND_MSG_TOO_SMALL = 0x10000008, 150 EMACH_SEND_INVALID_REPLY = 0x10000009, 151 EMACH_SEND_INVALID_RIGHT = 0x1000000a, 152 EMACH_SEND_INVALID_NOTIFY = 0x1000000b, 153 EMACH_SEND_INVALID_MEMORY = 0x1000000c, 154 EMACH_SEND_NO_BUFFER = 0x1000000d, 155 EMACH_SEND_NO_NOTIFY = 0x1000000e, 156 EMACH_SEND_INVALID_TYPE = 0x1000000f, 157 EMACH_SEND_INVALID_HEADER = 0x10000010, 158 EMACH_RCV_IN_PROGRESS = 0x10004001, 159 EMACH_RCV_INVALID_NAME = 0x10004002, 160 EMACH_RCV_TIMED_OUT = 0x10004003, 161 EMACH_RCV_TOO_LARGE = 0x10004004, 162 EMACH_RCV_INTERRUPTED = 0x10004005, 163 EMACH_RCV_PORT_CHANGED = 0x10004006, 164 EMACH_RCV_INVALID_NOTIFY = 0x10004007, 165 EMACH_RCV_INVALID_DATA = 0x10004008, 166 EMACH_RCV_PORT_DIED = 0x10004009, 167 EMACH_RCV_IN_SET = 0x1000400a, 168 EMACH_RCV_HEADER_ERROR = 0x1000400b, 169 EMACH_RCV_BODY_ERROR = 0x1000400c, 170 171 /* Errors from <mach/kern_return.h>. */ 172 EKERN_INVALID_ADDRESS = 1, 173 EKERN_PROTECTION_FAILURE = 2, 174 EKERN_NO_SPACE = 3, 175 EKERN_INVALID_ARGUMENT = 4, 176 EKERN_FAILURE = 5, 177 EKERN_RESOURCE_SHORTAGE = 6, 178 EKERN_NOT_RECEIVER = 7, 179 EKERN_NO_ACCESS = 8, 180 EKERN_MEMORY_FAILURE = 9, 181 EKERN_MEMORY_ERROR = 10, 182 EKERN_NOT_IN_SET = 12, 183 EKERN_NAME_EXISTS = 13, 184 EKERN_ABORTED = 14, 185 EKERN_INVALID_NAME = 15, 186 EKERN_INVALID_TASK = 16, 187 EKERN_INVALID_RIGHT = 17, 188 EKERN_INVALID_VALUE = 18, 189 EKERN_UREFS_OVERFLOW = 19, 190 EKERN_INVALID_CAPABILITY = 20, 191 EKERN_RIGHT_EXISTS = 21, 192 EKERN_INVALID_HOST = 22, 193 EKERN_MEMORY_PRESENT = 23, 194 EKERN_WRITE_PROTECTION_FAILURE = 24, 195 EKERN_TERMINATED = 26, 196 EKERN_TIMEDOUT = 27, 197 EKERN_INTERRUPTED = 28, 198 199 /* Errors from <mach/mig_errors.h>. */ 200 EMIG_TYPE_ERROR = -300, /* client type check failure */ 201 EMIG_REPLY_MISMATCH = -301, /* wrong reply message ID */ 202 EMIG_REMOTE_ERROR = -302, /* server detected error */ 203 EMIG_BAD_ID = -303, /* bad request message ID */ 204 EMIG_BAD_ARGUMENTS = -304, /* server type check failure */ 205 EMIG_NO_REPLY = -305, /* no reply should be sent */ 206 EMIG_EXCEPTION = -306, /* server raised exception */ 207 EMIG_ARRAY_TOO_LARGE = -307, /* array not large enough */ 208 EMIG_SERVER_DIED = -308, /* server died */ 209 EMIG_DESTROY_REQUEST = -309, /* destroy request with no reply */ 210 211 /* Errors from <device/device_types.h>. */ 212 ED_IO_ERROR = 2500, /* hardware IO error */ 213 ED_WOULD_BLOCK = 2501, /* would block, but D_NOWAIT set */ 214 ED_NO_SUCH_DEVICE = 2502, /* no such device */ 215 ED_ALREADY_OPEN = 2503, /* exclusive-use device already open */ 216 ED_DEVICE_DOWN = 2504, /* device has been shut down */ 217 ED_INVALID_OPERATION = 2505, /* bad operation for device */ 218 ED_INVALID_RECNUM = 2506, /* invalid record (block) number */ 219 ED_INVALID_SIZE = 2507, /* invalid IO size */ 220 ED_NO_MEMORY = 2508, /* memory allocation failure */ 221 ED_READ_ONLY = 2509, /* device cannot be written to */ 222 223 /* Because the C standard requires that errno have type 'int', 224 this enumeration must be a signed type. */ 225 __FORCE_ERROR_T_CODES_SIGNED = -1 226 }; 227 228 #endif /* not __ASSEMBLER__ */ 229 230 /* The C standard requires that all of the E-constants be 231 defined as macros. */ 232 233 #define EPERM 0x40000001 234 #define ENOENT 0x40000002 235 #define ESRCH 0x40000003 236 #define EINTR 0x40000004 237 #define EIO 0x40000005 238 #define ENXIO 0x40000006 239 #define E2BIG 0x40000007 240 #define ENOEXEC 0x40000008 241 #define EBADF 0x40000009 242 #define ECHILD 0x4000000a 243 #define EDEADLK 0x4000000b 244 #define ENOMEM 0x4000000c 245 #define EACCES 0x4000000d 246 #define EFAULT 0x4000000e 247 #define ENOTBLK 0x4000000f 248 #define EBUSY 0x40000010 249 #define EEXIST 0x40000011 250 #define EXDEV 0x40000012 251 #define ENODEV 0x40000013 252 #define ENOTDIR 0x40000014 253 #define EISDIR 0x40000015 254 #define EINVAL 0x40000016 255 #define EMFILE 0x40000018 256 #define ENFILE 0x40000017 257 #define ENOTTY 0x40000019 258 #define ETXTBSY 0x4000001a 259 #define EFBIG 0x4000001b 260 #define ENOSPC 0x4000001c 261 #define ESPIPE 0x4000001d 262 #define EROFS 0x4000001e 263 #define EMLINK 0x4000001f 264 #define EPIPE 0x40000020 265 #define EDOM 0x40000021 266 #define ERANGE 0x40000022 267 #define EAGAIN 0x40000023 268 #define EWOULDBLOCK EAGAIN 269 #define EINPROGRESS 0x40000024 270 #define EALREADY 0x40000025 271 #define ENOTSOCK 0x40000026 272 #define EMSGSIZE 0x40000028 273 #define EPROTOTYPE 0x40000029 274 #define ENOPROTOOPT 0x4000002a 275 #define EPROTONOSUPPORT 0x4000002b 276 #define ESOCKTNOSUPPORT 0x4000002c 277 #define EOPNOTSUPP 0x4000002d 278 #define EPFNOSUPPORT 0x4000002e 279 #define EAFNOSUPPORT 0x4000002f 280 #define EADDRINUSE 0x40000030 281 #define EADDRNOTAVAIL 0x40000031 282 #define ENETDOWN 0x40000032 283 #define ENETUNREACH 0x40000033 284 #define ENETRESET 0x40000034 285 #define ECONNABORTED 0x40000035 286 #define ECONNRESET 0x40000036 287 #define ENOBUFS 0x40000037 288 #define EISCONN 0x40000038 289 #define ENOTCONN 0x40000039 290 #define EDESTADDRREQ 0x40000027 291 #define ESHUTDOWN 0x4000003a 292 #define ETOOMANYREFS 0x4000003b 293 #define ETIMEDOUT 0x4000003c 294 #define ECONNREFUSED 0x4000003d 295 #define ELOOP 0x4000003e 296 #define ENAMETOOLONG 0x4000003f 297 #define EHOSTDOWN 0x40000040 298 #define EHOSTUNREACH 0x40000041 299 #define ENOTEMPTY 0x40000042 300 #define EPROCLIM 0x40000043 301 #define EUSERS 0x40000044 302 #define EDQUOT 0x40000045 303 #define ESTALE 0x40000046 304 #define EREMOTE 0x40000047 305 #define EBADRPC 0x40000048 306 #define ERPCMISMATCH 0x40000049 307 #define EPROGUNAVAIL 0x4000004a 308 #define EPROGMISMATCH 0x4000004b 309 #define EPROCUNAVAIL 0x4000004c 310 #define ENOLCK 0x4000004d 311 #define EFTYPE 0x4000004f 312 #define EAUTH 0x40000050 313 #define ENEEDAUTH 0x40000051 314 #define ENOSYS 0x4000004e 315 #define ENOTSUP 0x40000076 316 #define EILSEQ 0x4000006a 317 #define EBACKGROUND 0x40000064 318 #define EDIED 0x40000065 319 #define ED 0x40000066 320 #define EGREGIOUS 0x40000067 321 #define EIEIO 0x40000068 322 #define EGRATUITOUS 0x40000069 323 #define EBADMSG 0x4000006b 324 #define EIDRM 0x4000006c 325 #define EMULTIHOP 0x4000006d 326 #define ENODATA 0x4000006e 327 #define ENOLINK 0x4000006f 328 #define ENOMSG 0x40000070 329 #define ENOSR 0x40000071 330 #define ENOSTR 0x40000072 331 #define EOVERFLOW 0x40000073 332 #define EPROTO 0x40000074 333 #define ETIME 0x40000075 334 #define ECANCELED 0x40000077 335 #define EOWNERDEAD 0x40000078 336 #define ENOTRECOVERABLE 0x40000079 337 338 /* Errors from <mach/message.h>. */ 339 #define EMACH_SEND_IN_PROGRESS 0x10000001 340 #define EMACH_SEND_INVALID_DATA 0x10000002 341 #define EMACH_SEND_INVALID_DEST 0x10000003 342 #define EMACH_SEND_TIMED_OUT 0x10000004 343 #define EMACH_SEND_WILL_NOTIFY 0x10000005 344 #define EMACH_SEND_NOTIFY_IN_PROGRESS 0x10000006 345 #define EMACH_SEND_INTERRUPTED 0x10000007 346 #define EMACH_SEND_MSG_TOO_SMALL 0x10000008 347 #define EMACH_SEND_INVALID_REPLY 0x10000009 348 #define EMACH_SEND_INVALID_RIGHT 0x1000000a 349 #define EMACH_SEND_INVALID_NOTIFY 0x1000000b 350 #define EMACH_SEND_INVALID_MEMORY 0x1000000c 351 #define EMACH_SEND_NO_BUFFER 0x1000000d 352 #define EMACH_SEND_NO_NOTIFY 0x1000000e 353 #define EMACH_SEND_INVALID_TYPE 0x1000000f 354 #define EMACH_SEND_INVALID_HEADER 0x10000010 355 #define EMACH_RCV_IN_PROGRESS 0x10004001 356 #define EMACH_RCV_INVALID_NAME 0x10004002 357 #define EMACH_RCV_TIMED_OUT 0x10004003 358 #define EMACH_RCV_TOO_LARGE 0x10004004 359 #define EMACH_RCV_INTERRUPTED 0x10004005 360 #define EMACH_RCV_PORT_CHANGED 0x10004006 361 #define EMACH_RCV_INVALID_NOTIFY 0x10004007 362 #define EMACH_RCV_INVALID_DATA 0x10004008 363 #define EMACH_RCV_PORT_DIED 0x10004009 364 #define EMACH_RCV_IN_SET 0x1000400a 365 #define EMACH_RCV_HEADER_ERROR 0x1000400b 366 #define EMACH_RCV_BODY_ERROR 0x1000400c 367 368 /* Errors from <mach/kern_return.h>. */ 369 #define EKERN_INVALID_ADDRESS 1 370 #define EKERN_PROTECTION_FAILURE 2 371 #define EKERN_NO_SPACE 3 372 #define EKERN_INVALID_ARGUMENT 4 373 #define EKERN_FAILURE 5 374 #define EKERN_RESOURCE_SHORTAGE 6 375 #define EKERN_NOT_RECEIVER 7 376 #define EKERN_NO_ACCESS 8 377 #define EKERN_MEMORY_FAILURE 9 378 #define EKERN_MEMORY_ERROR 10 379 #define EKERN_NOT_IN_SET 12 380 #define EKERN_NAME_EXISTS 13 381 #define EKERN_ABORTED 14 382 #define EKERN_INVALID_NAME 15 383 #define EKERN_INVALID_TASK 16 384 #define EKERN_INVALID_RIGHT 17 385 #define EKERN_INVALID_VALUE 18 386 #define EKERN_UREFS_OVERFLOW 19 387 #define EKERN_INVALID_CAPABILITY 20 388 #define EKERN_RIGHT_EXISTS 21 389 #define EKERN_INVALID_HOST 22 390 #define EKERN_MEMORY_PRESENT 23 391 #define EKERN_WRITE_PROTECTION_FAILURE 24 392 #define EKERN_TERMINATED 26 393 #define EKERN_TIMEDOUT 27 394 #define EKERN_INTERRUPTED 28 395 396 /* Errors from <mach/mig_errors.h>. */ 397 #define EMIG_TYPE_ERROR -300 398 #define EMIG_REPLY_MISMATCH -301 399 #define EMIG_REMOTE_ERROR -302 400 #define EMIG_BAD_ID -303 401 #define EMIG_BAD_ARGUMENTS -304 402 #define EMIG_NO_REPLY -305 403 #define EMIG_EXCEPTION -306 404 #define EMIG_ARRAY_TOO_LARGE -307 405 #define EMIG_SERVER_DIED -308 406 #define EMIG_DESTROY_REQUEST -309 407 408 /* Errors from <device/device_types.h>. */ 409 #define ED_IO_ERROR 2500 410 #define ED_WOULD_BLOCK 2501 411 #define ED_NO_SUCH_DEVICE 2502 412 #define ED_ALREADY_OPEN 2503 413 #define ED_DEVICE_DOWN 2504 414 #define ED_INVALID_OPERATION 2505 415 #define ED_INVALID_RECNUM 2506 416 #define ED_INVALID_SIZE 2507 417 #define ED_NO_MEMORY 2508 418 #define ED_READ_ONLY 2509 419 420 #define _HURD_ERRNOS 122 421 422 #endif /* bits/errno.h. */ 423