xref: /plan9/sys/include/ape/errno.h (revision 1936bb650459bace06c38a45b60888b47e5cd459)
1 #ifndef __ERRNO
2 #define __ERRNO
3 #pragma lib "/$M/lib/ape/libap.a"
4 
5 extern int errno;
6 
7 #define EDOM	1000
8 #define ERANGE	1001
9 #define EPLAN9	1002
10 
11 #ifdef _POSIX_SOURCE
12 
13 #define E2BIG	1
14 #define EACCES	2
15 #define	EAGAIN	3
16 #define EBADF	4
17 #define EBUSY	5
18 #define ECHILD	6
19 #define EDEADLK	7
20 #define EEXIST	8
21 #define EFAULT	9
22 #define EFBIG	10
23 #define EINTR	11
24 #define EINVAL	12
25 #define EIO	13
26 #define EISDIR	14
27 #define EMFILE	15
28 #define EMLINK	16
29 #define ENAMETOOLONG	17
30 #define ENFILE	18
31 #define ENODEV	19
32 #define ENOENT	20
33 #define ENOEXEC	21
34 #define ENOLCK	22
35 #define ENOMEM	23
36 #define ENOSPC	24
37 #define ENOSYS	25
38 #define ENOTDIR	26
39 #define ENOTEMPTY	27
40 #define ENOTTY	28
41 #define ENXIO	29
42 #define EPERM	30
43 #define EPIPE	31
44 #define EROFS	32
45 #define ESPIPE	33
46 #define ESRCH	34
47 #define EXDEV	35
48 
49 /* bsd networking software */
50 #define ENOTSOCK	36
51 #define EPROTONOSUPPORT	37
52 #define EPROTOTYPE	37	/* two names for 37 */
53 #define ECONNREFUSED	38
54 #define EAFNOSUPPORT	39
55 #define ENOBUFS		40
56 #define EOPNOTSUPP	41
57 #define EADDRINUSE	42
58 #define EDESTADDRREQ	43
59 #define EMSGSIZE	44
60 #define ENOPROTOOPT	45
61 #define ESOCKTNOSUPPORT	46
62 #define EPFNOSUPPORT	47
63 #define EADDRNOTAVAIL	48
64 #define ENETDOWN	49
65 #define ENETUNREACH	50
66 #define ENETRESET	51
67 #define ECONNABORTED	52
68 #define EISCONN		53
69 #define ENOTCONN	54
70 #define ESHUTDOWN	55
71 #define ETOOMANYREFS	56
72 #define ETIMEDOUT	57
73 #define EHOSTDOWN	58
74 #define EHOSTUNREACH	59
75 #define EGREG		60
76 
77 /* These added in 1003.1b-1993 */
78 #define ECANCELED	61
79 #define EINPROGRESS	62
80 
81 /* from research unix */
82 #define ETXTBSY		63
83 
84 #endif /* _POSIX_SOURCE */
85 
86 #endif /* __ERRNO */
87