|
| 1 | +.ifndef __ERRNO_INC__ |
| 2 | + .set __ERRNO_INC__, 1 |
| 3 | + |
| 4 | +; errno.inc |
| 5 | +; Assembly errno equates for libc <errno.h> |
| 6 | +; Remember to keep this file in sync with <errno.h> |
| 7 | + |
| 8 | +; Note that many routines assume that EDOM and ERANGE are between 1 and 255. |
| 9 | + |
| 10 | + .equ EPERM , 1 ; permission error |
| 11 | + .equ EINVAL , 2 ; invalid argument |
| 12 | + .equ EIO , 3 ; io error |
| 13 | + .equ EDOM , 4 ; math domain error |
| 14 | + .equ ERANGE , 5 ; math range error |
| 15 | + .equ EILSEQ , 6 ; Illegal byte sequence (C95) |
| 16 | + .equ E2BIG , 7 ; Argument list too long |
| 17 | + .equ EACCES , 8 ; Permission denied |
| 18 | + .equ EADDRINUSE , 9 ; Address in use |
| 19 | + .equ EADDRNOTAVAIL , 10 ; Address not available |
| 20 | + .equ EAFNOSUPPORT , 11 ; Address family not supported |
| 21 | + .equ EAGAIN , 12 ; Resource unavailable, try again |
| 22 | + .equ EALREADY , 13 ; Connection already in progress |
| 23 | + .equ EBADF , 14 ; Bad file descriptor |
| 24 | + .equ EBADMSG , 15 ; Bad message |
| 25 | + .equ EBUSY , 16 ; Device or resource busy |
| 26 | + .equ ECANCELED , 17 ; Operation canceled |
| 27 | + .equ ECHILD , 18 ; No child processes |
| 28 | + .equ ECONNABORTED , 19 ; Connection aborted |
| 29 | + .equ ECONNREFUSED , 20 ; Connection refused |
| 30 | + .equ ECONNRESET , 21 ; Connection reset |
| 31 | + .equ EDEADLK , 22 ; Resource deadlock avoided |
| 32 | + .equ EDESTADDRREQ , 23 ; Destination address required |
| 33 | + .equ EEXIST , 24 ; File exists |
| 34 | + .equ EFAULT , 25 ; Bad address |
| 35 | + .equ EFBIG , 26 ; File too large |
| 36 | + .equ EHOSTUNREACH , 27 ; Host is unreachable |
| 37 | + .equ EIDRM , 28 ; Identifier removed |
| 38 | + .equ EINPROGRESS , 29 ; Operation in progress |
| 39 | + .equ EINTR , 30 ; Interrupted function |
| 40 | + .equ EISCONN , 31 ; Socket is connected |
| 41 | + .equ EISDIR , 32 ; Is a directory |
| 42 | + .equ ELOOP , 33 ; Too many levels of symbolic links |
| 43 | + .equ EMFILE , 34 ; Too many open files |
| 44 | + .equ EMLINK , 35 ; Too many links |
| 45 | + .equ EMSGSIZE , 36 ; Message too long |
| 46 | + .equ ENAMETOOLONG , 37 ; Filename too long |
| 47 | + .equ ENETDOWN , 38 ; Network is down |
| 48 | + .equ ENETRESET , 39 ; Connection aborted by network |
| 49 | + .equ ENETUNREACH , 40 ; Network is unreachable |
| 50 | + .equ ENFILE , 41 ; Too many open files in system |
| 51 | + .equ ENOBUFS , 42 ; No buffer space available |
| 52 | + .equ ENODATA , 43 ; No message is available on the STREAM head read queue |
| 53 | + .equ ENODEV , 44 ; No such device |
| 54 | + .equ ENOENT , 45 ; No such file or directory |
| 55 | + .equ ENOEXEC , 46 ; Executable file format error |
| 56 | + .equ ENOLCK , 47 ; No locks available |
| 57 | + .equ ENOLINK , 48 ; Link has been severed |
| 58 | + .equ ENOMEM , 49 ; Not enough space |
| 59 | + .equ ENOMSG , 50 ; No message of desired type |
| 60 | + .equ ENOPROTOOPT , 51 ; Protocol not available |
| 61 | + .equ ENOSPC , 52 ; No space left on device |
| 62 | + .equ ENOSR , 53 ; No stream resources |
| 63 | + .equ ENOSTR , 54 ; Not a stream |
| 64 | + .equ ENOSYS , 55 ; Function not implemented |
| 65 | + .equ ENOTCONN , 56 ; The socket is not connected |
| 66 | + .equ ENOTDIR , 57 ; Not a directory |
| 67 | + .equ ENOTEMPTY , 58 ; Directory not empty |
| 68 | + .equ ENOTRECOVERABLE , 59 ; State not recoverable |
| 69 | + .equ ENOTSOCK , 60 ; Not a socket |
| 70 | + .equ ENOTSUP , 61 ; Not supported |
| 71 | + .equ ENOTTY , 62 ; Inappropriate I/O control operation |
| 72 | + .equ ENXIO , 63 ; No such device or address |
| 73 | + .equ EOPNOTSUPP , 64 ; Operation not supported on socket |
| 74 | + .equ EOVERFLOW , 65 ; Value too large to be stored in data type |
| 75 | + .equ EOWNERDEAD , 66 ; Previous owner died |
| 76 | + .equ EPIPE , 67 ; Broken pipe |
| 77 | + .equ EPROTO , 68 ; Protocol error |
| 78 | + .equ EPROTONOSUPPORT , 69 ; Protocol not supported |
| 79 | + .equ EPROTOTYPE , 70 ; Protocol wrong type for socket |
| 80 | + .equ EROFS , 71 ; Read-only file system |
| 81 | + .equ ESPIPE , 72 ; Invalid seek |
| 82 | + .equ ESRCH , 73 ; No such process |
| 83 | + .equ ETIME , 74 ; Stream ioctl() timeout |
| 84 | + .equ ETIMEDOUT , 75 ; Connection timed out |
| 85 | + .equ ETXTBSY , 76 ; Text file busy |
| 86 | + .equ EWOULDBLOCK , 77 ; Operation would block |
| 87 | + .equ EXDEV , 78 ; Cross-device link |
| 88 | + |
| 89 | +.if ERANGE & 0xFF != ERANGE |
| 90 | + .print "ERANGE is assumed to be between 1 and 255" |
| 91 | + .err |
| 92 | +.endif |
| 93 | +.if EDOM & 0xFF != EDOM |
| 94 | + .print "EDOM is assumed to be between 1 and 255" |
| 95 | + .err |
| 96 | +.endif |
| 97 | + |
| 98 | +.endif |
0 commit comments