1 /* errno is not a global variable, because that would make using it 2 non-reentrant. Instead, its address is returned by the function 3 __errno. */ 4 5 #ifndef _SYS_ERRNO_H_ 6 #ifdef __cplusplus 7 extern "C" { 8 #endif 9 #define _SYS_ERRNO_H_ 10 11 #include <sys/reent.h> 12 13 #ifndef _REENT_ONLY 14 #define errno (*__errno()) 15 extern int *__errno _PARAMS ((void)); 16 #endif 17 18 extern __IMPORT _CONST char * _CONST _sys_errlist[]; 19 extern __IMPORT int _sys_nerr; 20 21 #define __errno_r(ptr) ((ptr)->_errno) 22 23 #define EPERM 1 /* Not super-user */ 24 #define ENOENT 2 /* No such file or directory */ 25 #define ESRCH 3 /* No such process */ 26 #define EINTR 4 /* Interrupted system call */ 27 #define EIO 5 /* I/O error */ 28 #define ENXIO 6 /* No such device or address */ 29 #define E2BIG 7 /* Arg list too long */ 30 #define ENOEXEC 8 /* Exec format error */ 31 #define EBADF 9 /* Bad file number */ 32 #define ECHILD 10 /* No children */ 33 #define EAGAIN 11 /* No more processes */ 34 #define ENOMEM 12 /* Not enough core */ 35 #define EACCES 13 /* Permission denied */ 36 #define EFAULT 14 /* Bad address */ 37 #define ENOTBLK 15 /* Block device required */ 38 #define EBUSY 16 /* Mount device busy */ 39 #define EEXIST 17 /* File exists */ 40 #define EXDEV 18 /* Cross-device link */ 41 #define ENODEV 19 /* No such device */ 42 #define ENOTDIR 20 /* Not a directory */ 43 #define EISDIR 21 /* Is a directory */ 44 #define EINVAL 22 /* Invalid argument */ 45 #define ENFILE 23 /* Too many open files in system */ 46 #define EMFILE 24 /* Too many open files */ 47 #define ENOTTY 25 /* Not a typewriter */ 48 #define ETXTBSY 26 /* Text file busy */ 49 #define EFBIG 27 /* File too large */ 50 #define ENOSPC 28 /* No space left on device */ 51 #define ESPIPE 29 /* Illegal seek */ 52 #define EROFS 30 /* Read only file system */ 53 #define EMLINK 31 /* Too many links */ 54 #define EPIPE 32 /* Broken pipe */ 55 #define EDOM 33 /* Math arg out of domain of func */ 56 #define ERANGE 34 /* Math result not representable */ 57 #define ENOMSG 35 /* No message of desired type */ 58 #define EIDRM 36 /* Identifier removed */ 59 #define ECHRNG 37 /* Channel number out of range */ 60 #define EL2NSYNC 38 /* Level 2 not synchronized */ 61 #define EL3HLT 39 /* Level 3 halted */ 62 #define EL3RST 40 /* Level 3 reset */ 63 #define ELNRNG 41 /* Link number out of range */ 64 #define EUNATCH 42 /* Protocol driver not attached */ 65 #define ENOCSI 43 /* No CSI structure available */ 66 #define EL2HLT 44 /* Level 2 halted */ 67 #define EDEADLK 45 /* Deadlock condition */ 68 #define ENOLCK 46 /* No record locks available */ 69 #define EBADE 50 /* Invalid exchange */ 70 #define EBADR 51 /* Invalid request descriptor */ 71 #define EXFULL 52 /* Exchange full */ 72 #define ENOANO 53 /* No anode */ 73 #define EBADRQC 54 /* Invalid request code */ 74 #define EBADSLT 55 /* Invalid slot */ 75 #define EDEADLOCK 56 /* File locking deadlock error */ 76 #define EBFONT 57 /* Bad font file fmt */ 77 #define ENOSTR 60 /* Device not a stream */ 78 #define ENODATA 61 /* No data (for no delay io) */ 79 #define ETIME 62 /* Timer expired */ 80 #define ENOSR 63 /* Out of streams resources */ 81 #define ENONET 64 /* Machine is not on the network */ 82 #define ENOPKG 65 /* Package not installed */ 83 #define EREMOTE 66 /* The object is remote */ 84 #define ENOLINK 67 /* The link has been severed */ 85 #define EADV 68 /* Advertise error */ 86 #define ESRMNT 69 /* Srmount error */ 87 #define ECOMM 70 /* Communication error on send */ 88 #define EPROTO 71 /* Protocol error */ 89 #define EMULTIHOP 74 /* Multihop attempted */ 90 #define ELBIN 75 /* Inode is remote (not really error) */ 91 #define EDOTDOT 76 /* Cross mount point (not really error) */ 92 #define EBADMSG 77 /* Trying to read unreadable message */ 93 #define ENOTUNIQ 80 /* Given log. name not unique */ 94 #define EBADFD 81 /* f.d. invalid for this operation */ 95 #define EREMCHG 82 /* Remote address changed */ 96 #define ELIBACC 83 /* Can't access a needed shared lib */ 97 #define ELIBBAD 84 /* Accessing a corrupted shared lib */ 98 #define ELIBSCN 85 /* .lib section in a.out corrupted */ 99 #define ELIBMAX 86 /* Attempting to link in too many libs */ 100 #define ELIBEXEC 87 /* Attempting to exec a shared library */ 101 #define ENOSYS 88 /* Function not implemented */ 102 #define ENMFILE 89 /* No more files */ 103 #define ENOTEMPTY 90 /* Directory not empty */ 104 #define ENAMETOOLONG 91 /* File or path name too long */ 105 #define ELOOP 92 /* Too many symbolic links */ 106 #define EOPNOTSUPP 95 /* Operation not supported on transport endpoint */ 107 #define EPFNOSUPPORT 96 /* Protocol family not supported */ 108 #define ECONNRESET 104 /* Connection reset by peer */ 109 #define ENOBUFS 105 /* No buffer space available */ 110 #define EAFNOSUPPORT 106 /* Address family not supported by protocol family */ 111 #define EPROTOTYPE 107 /* Protocol wrong type for socket */ 112 #define ENOTSOCK 108 /* Socket operation on non-socket */ 113 #define ENOPROTOOPT 109 /* Protocol not available */ 114 #define ESHUTDOWN 110 /* Can't send after socket shutdown */ 115 #define ECONNREFUSED 111 /* Connection refused */ 116 #define EADDRINUSE 112 /* Address already in use */ 117 #define ECONNABORTED 113 /* Connection aborted */ 118 #define ENETUNREACH 114 /* Network is unreachable */ 119 #define ENETDOWN 115 /* Network interface is not configured */ 120 #define ETIMEDOUT 116 /* Connection timed out */ 121 #define EHOSTDOWN 117 /* Host is down */ 122 #define EHOSTUNREACH 118 /* Host is unreachable */ 123 #define EINPROGRESS 119 /* Connection already in progress */ 124 #define EALREADY 120 /* Socket already connected */ 125 #define EDESTADDRREQ 121 /* Destination address required */ 126 #define EMSGSIZE 122 /* Message too long */ 127 #define EPROTONOSUPPORT 123 /* Unknown protocol */ 128 #define ESOCKTNOSUPPORT 124 /* Socket type not supported */ 129 #define EADDRNOTAVAIL 125 /* Address not available */ 130 #define ENETRESET 126 131 #define EISCONN 127 /* Socket is already connected */ 132 #define ENOTCONN 128 /* Socket is not connected */ 133 #define ETOOMANYREFS 129 134 #define EPROCLIM 130 135 #define EUSERS 131 136 #define EDQUOT 132 137 #define ESTALE 133 138 #define ENOTSUP 134 /* Not supported */ 139 #define ENOMEDIUM 135 /* No medium (in tape drive) */ 140 #define ENOSHARE 136 /* No such host or network path */ 141 142 /* From cygwin32. */ 143 #define EWOULDBLOCK EAGAIN /* Operation would block */ 144 145 #define __ELASTERROR 2000 /* Users can add values starting here */ 146 147 #ifdef __cplusplus 148 } 149 #endif 150 #endif /* _SYS_ERRNO_H */ |