Subversion Repositories tendra.SVN

Rev

Rev 74 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 74 Rev 80
Line 1... Line 1...
1
#ifndef __TENDRA_ERRNO_H
1
#ifndef __TENDRA_ERRNO_H
2
#define __TENDRA_ERRNO_H
2
#define __TENDRA_ERRNO_H
3
 
3
 
4
#undef _STANDALONE
4
#undef _STANDALONE
5
#undef _KERNEL
5
#undef _KERNEL
6
/*#include_next <errno.h>*/
6
/* #include_next <errno.h> */
7
 
7
 
8
/*extern int errno;*/
8
/* extern int errno; */
9
/*#define	EDOM		33	*/	/* Numerical argument out of domain */
9
/* #define	EDOM		33	*//* Numerical argument out of domain */
10
/* #define	ERANGE		34	*/	/* Result too large */
10
/* #define	ERANGE		34	*//* Result too large */
11
 
11
 
12
#define	EPERM		1		/* Operation not permitted */
12
#define	EPERM		1	/* Operation not permitted */
13
#define	ENOENT		2		/* No such file or directory */
13
#define	ENOENT		2	/* No such file or directory */
14
#define	ESRCH		3		/* No such process */
14
#define	ESRCH		3	/* No such process */
15
#define	EINTR		4		/* Interrupted system call */
15
#define	EINTR		4	/* Interrupted system call */
16
#define	EIO		5		/* Input/output error */
16
#define	EIO		5	/* Input/output error */
17
#define	ENXIO		6		/* Device not configured */
17
#define	ENXIO		6	/* Device not configured */
18
#define	E2BIG		7		/* Argument list too long */
18
#define	E2BIG		7	/* Argument list too long */
19
#define	ENOEXEC		8		/* Exec format error */
19
#define	ENOEXEC		8	/* Exec format error */
20
#define	EBADF		9		/* Bad file descriptor */
20
#define	EBADF		9	/* Bad file descriptor */
21
#define	ECHILD		10		/* No child processes */
21
#define	ECHILD		10	/* No child processes */
22
#define	EDEADLK		11		/* Resource deadlock avoided */
22
#define	EDEADLK		11	/* Resource deadlock avoided */
23
					/* 11 was EAGAIN */
23
/* 11 was EAGAIN */
24
#define	ENOMEM		12		/* Cannot allocate memory */
24
#define	ENOMEM		12	/* Cannot allocate memory */
25
#define	EACCES		13		/* Permission denied */
25
#define	EACCES		13	/* Permission denied */
26
#define	EFAULT		14		/* Bad address */
26
#define	EFAULT		14	/* Bad address */
27
#ifndef _POSIX_SOURCE
27
#ifndef _POSIX_SOURCE
28
#define	ENOTBLK		15		/* Block device required */
28
#define	ENOTBLK		15	/* Block device required */
29
#endif
29
#endif
30
#define	EBUSY		16		/* Device busy */
30
#define	EBUSY		16	/* Device busy */
31
#define	EEXIST		17		/* File exists */
31
#define	EEXIST		17	/* File exists */
32
#define	EXDEV		18		/* Cross-device link */
32
#define	EXDEV		18	/* Cross-device link */
33
#define	ENODEV		19		/* Operation not supported by device */
33
#define	ENODEV		19	/* Operation not supported by device */
34
#define	ENOTDIR		20		/* Not a directory */
34
#define	ENOTDIR		20	/* Not a directory */
35
#define	EISDIR		21		/* Is a directory */
35
#define	EISDIR		21	/* Is a directory */
36
#define	EINVAL		22		/* Invalid argument */
36
#define	EINVAL		22	/* Invalid argument */
37
#define	ENFILE		23		/* Too many open files in system */
37
#define	ENFILE		23	/* Too many open files in system */
38
#define	EMFILE		24		/* Too many open files */
38
#define	EMFILE		24	/* Too many open files */
39
#define	ENOTTY		25		/* Inappropriate ioctl for device */
39
#define	ENOTTY		25	/* Inappropriate ioctl for device */
40
#ifndef _POSIX_SOURCE
40
#ifndef _POSIX_SOURCE
41
#define	ETXTBSY		26		/* Text file busy */
41
#define	ETXTBSY		26	/* Text file busy */
42
#endif
42
#endif
43
#define	EFBIG		27		/* File too large */
43
#define	EFBIG		27	/* File too large */
44
#define	ENOSPC		28		/* No space left on device */
44
#define	ENOSPC		28	/* No space left on device */
45
#define	ESPIPE		29		/* Illegal seek */
45
#define	ESPIPE		29	/* Illegal seek */
46
#define	EROFS		30		/* Read-only filesystem */
46
#define	EROFS		30	/* Read-only filesystem */
47
#define	EMLINK		31		/* Too many links */
47
#define	EMLINK		31	/* Too many links */
48
#define	EPIPE		32		/* Broken pipe */
48
#define	EPIPE		32	/* Broken pipe */
49
 
49
 
50
/* math software */
50
/* math software */
51
#define	EDOM		33		/* Numerical argument out of domain */
51
#define	EDOM		33	/* Numerical argument out of domain */
52
#define	ERANGE		34		/* Result too large */
52
#define	ERANGE		34	/* Result too large */
53
 
53
 
54
/* non-blocking and interrupt i/o */
54
/* non-blocking and interrupt i/o */
55
#define	EAGAIN		35		/* Resource temporarily unavailable */
55
#define	EAGAIN		35	/* Resource temporarily unavailable */
56
#ifndef _POSIX_SOURCE
56
#ifndef _POSIX_SOURCE
57
#define	EWOULDBLOCK	EAGAIN		/* Operation would block */
57
#define	EWOULDBLOCK	EAGAIN	/* Operation would block */
58
#define	EINPROGRESS	36		/* Operation now in progress */
58
#define	EINPROGRESS	36	/* Operation now in progress */
59
#define	EALREADY	37		/* Operation already in progress */
59
#define	EALREADY	37	/* Operation already in progress */
60
 
60
 
61
/* ipc/network software -- argument errors */
61
/* ipc/network software -- argument errors */
62
#define	ENOTSOCK	38		/* Socket operation on non-socket */
62
#define	ENOTSOCK	38	/* Socket operation on non-socket */
63
#define	EDESTADDRREQ	39		/* Destination address required */
63
#define	EDESTADDRREQ	39	/* Destination address required */
64
#define	EMSGSIZE	40		/* Message too long */
64
#define	EMSGSIZE	40	/* Message too long */
65
#define	EPROTOTYPE	41		/* Protocol wrong type for socket */
65
#define	EPROTOTYPE	41	/* Protocol wrong type for socket */
66
#define	ENOPROTOOPT	42		/* Protocol not available */
66
#define	ENOPROTOOPT	42	/* Protocol not available */
67
#define	EPROTONOSUPPORT	43		/* Protocol not supported */
67
#define	EPROTONOSUPPORT	43	/* Protocol not supported */
68
#define	ESOCKTNOSUPPORT	44		/* Socket type not supported */
68
#define	ESOCKTNOSUPPORT	44	/* Socket type not supported */
69
#define	EOPNOTSUPP	45		/* Operation not supported */
69
#define	EOPNOTSUPP	45	/* Operation not supported */
70
#define	ENOTSUP		EOPNOTSUPP	/* Operation not supported */
70
#define	ENOTSUP		EOPNOTSUPP	/* Operation not supported */
71
#define	EPFNOSUPPORT	46		/* Protocol family not supported */
71
#define	EPFNOSUPPORT	46	/* Protocol family not supported */
72
#define	EAFNOSUPPORT	47		/* Address family not supported by protocol family */
72
#define	EAFNOSUPPORT	47	/* Address family not supported by protocol
-
 
73
				 * family */
73
#define	EADDRINUSE	48		/* Address already in use */
74
#define	EADDRINUSE	48	/* Address already in use */
74
#define	EADDRNOTAVAIL	49		/* Can't assign requested address */
75
#define	EADDRNOTAVAIL	49	/* Can't assign requested address */
75
 
76
 
76
/* ipc/network software -- operational errors */
77
/* ipc/network software -- operational errors */
77
#define	ENETDOWN	50		/* Network is down */
78
#define	ENETDOWN	50	/* Network is down */
78
#define	ENETUNREACH	51		/* Network is unreachable */
79
#define	ENETUNREACH	51	/* Network is unreachable */
79
#define	ENETRESET	52		/* Network dropped connection on reset */
80
#define	ENETRESET	52	/* Network dropped connection on reset */
80
#define	ECONNABORTED	53		/* Software caused connection abort */
81
#define	ECONNABORTED	53	/* Software caused connection abort */
81
#define	ECONNRESET	54		/* Connection reset by peer */
82
#define	ECONNRESET	54	/* Connection reset by peer */
82
#define	ENOBUFS		55		/* No buffer space available */
83
#define	ENOBUFS		55	/* No buffer space available */
83
#define	EISCONN		56		/* Socket is already connected */
84
#define	EISCONN		56	/* Socket is already connected */
84
#define	ENOTCONN	57		/* Socket is not connected */
85
#define	ENOTCONN	57	/* Socket is not connected */
85
#define	ESHUTDOWN	58		/* Can't send after socket shutdown */
86
#define	ESHUTDOWN	58	/* Can't send after socket shutdown */
86
#define	ETOOMANYREFS	59		/* Too many references: can't splice */
87
#define	ETOOMANYREFS	59	/* Too many references: can't splice */
87
#define	ETIMEDOUT	60		/* Operation timed out */
88
#define	ETIMEDOUT	60	/* Operation timed out */
88
#define	ECONNREFUSED	61		/* Connection refused */
89
#define	ECONNREFUSED	61	/* Connection refused */
89
 
90
 
90
#define	ELOOP		62		/* Too many levels of symbolic links */
91
#define	ELOOP		62	/* Too many levels of symbolic links */
91
#endif /* _POSIX_SOURCE */
92
#endif				/* _POSIX_SOURCE */
92
#define	ENAMETOOLONG	63		/* File name too long */
93
#define	ENAMETOOLONG	63	/* File name too long */
93
 
94
 
94
/* should be rearranged */
95
/* should be rearranged */
95
#ifndef _POSIX_SOURCE
96
#ifndef _POSIX_SOURCE
96
#define	EHOSTDOWN	64		/* Host is down */
97
#define	EHOSTDOWN	64	/* Host is down */
97
#define	EHOSTUNREACH	65		/* No route to host */
98
#define	EHOSTUNREACH	65	/* No route to host */
98
#endif /* _POSIX_SOURCE */
99
#endif				/* _POSIX_SOURCE */
99
#define	ENOTEMPTY	66		/* Directory not empty */
100
#define	ENOTEMPTY	66	/* Directory not empty */
100
 
101
 
101
/* quotas & mush */
102
/* quotas & mush */
102
#ifndef _POSIX_SOURCE
103
#ifndef _POSIX_SOURCE
103
#define	EPROCLIM	67		/* Too many processes */
104
#define	EPROCLIM	67	/* Too many processes */
104
#define	EUSERS		68		/* Too many users */
105
#define	EUSERS		68	/* Too many users */
105
#define	EDQUOT		69		/* Disc quota exceeded */
106
#define	EDQUOT		69	/* Disc quota exceeded */
106
 
107
 
107
/* Network File System */
108
/* Network File System */
108
#define	ESTALE		70		/* Stale NFS file handle */
109
#define	ESTALE		70	/* Stale NFS file handle */
109
#define	EREMOTE		71		/* Too many levels of remote in path */
110
#define	EREMOTE		71	/* Too many levels of remote in path */
110
#define	EBADRPC		72		/* RPC struct is bad */
111
#define	EBADRPC		72	/* RPC struct is bad */
111
#define	ERPCMISMATCH	73		/* RPC version wrong */
112
#define	ERPCMISMATCH	73	/* RPC version wrong */
112
#define	EPROGUNAVAIL	74		/* RPC prog. not avail */
113
#define	EPROGUNAVAIL	74	/* RPC prog. not avail */
113
#define	EPROGMISMATCH	75		/* Program version wrong */
114
#define	EPROGMISMATCH	75	/* Program version wrong */
114
#define	EPROCUNAVAIL	76		/* Bad procedure for program */
115
#define	EPROCUNAVAIL	76	/* Bad procedure for program */
115
#endif /* _POSIX_SOURCE */
116
#endif				/* _POSIX_SOURCE */
116
 
117
 
117
#define	ENOLCK		77		/* No locks available */
118
#define	ENOLCK		77	/* No locks available */
118
#define	ENOSYS		78		/* Function not implemented */
119
#define	ENOSYS		78	/* Function not implemented */
119
 
120
 
120
#ifndef _POSIX_SOURCE
121
#ifndef _POSIX_SOURCE
121
#define	EFTYPE		79		/* Inappropriate file type or format */
122
#define	EFTYPE		79	/* Inappropriate file type or format */
122
#define	EAUTH		80		/* Authentication error */
123
#define	EAUTH		80	/* Authentication error */
123
#define	ENEEDAUTH	81		/* Need authenticator */
124
#define	ENEEDAUTH	81	/* Need authenticator */
124
#define	EIDRM		82		/* Identifier removed */
125
#define	EIDRM		82	/* Identifier removed */
125
#define	ENOMSG		83		/* No message of desired type */
126
#define	ENOMSG		83	/* No message of desired type */
126
#define	EOVERFLOW	84		/* Value too large to be stored in data type */
127
#define	EOVERFLOW	84	/* Value too large to be stored in data type */
127
#define	ECANCELED	85		/* Operation canceled */
128
#define	ECANCELED	85	/* Operation canceled */
128
#define	EILSEQ		86		/* Illegal byte sequence */
129
#define	EILSEQ		86	/* Illegal byte sequence */
129
#define	ENOATTR		87		/* Attribute not found */
130
#define	ENOATTR		87	/* Attribute not found */
130
 
131
 
131
#define	EDOOFUS		88		/* Programming error */
132
#define	EDOOFUS		88	/* Programming error */
132
#endif /* _POSIX_SOURCE */
133
#endif				/* _POSIX_SOURCE */
133
 
134
 
134
#define	EBADMSG		89		/* Bad message */
135
#define	EBADMSG		89	/* Bad message */
135
#define	EMULTIHOP	90		/* Multihop attempted */
136
#define	EMULTIHOP	90	/* Multihop attempted */
136
#define	ENOLINK		91		/* Link has been severed */
137
#define	ENOLINK		91	/* Link has been severed */
137
#define	EPROTO		92		/* Protocol error */
138
#define	EPROTO		92	/* Protocol error */
138
 
139
 
139
#ifndef _POSIX_SOURCE
140
#ifndef _POSIX_SOURCE
140
#define	ENOTCAPABLE	93		/* Capabilities insufficient */
141
#define	ENOTCAPABLE	93	/* Capabilities insufficient */
141
#define	ECAPMODE	94		/* Not permitted in capability mode */
142
#define	ECAPMODE	94	/* Not permitted in capability mode */
142
#define	ENOTRECOVERABLE	95		/* State not recoverable */
143
#define	ENOTRECOVERABLE	95	/* State not recoverable */
143
#define	EOWNERDEAD	96		/* Previous owner died */
144
#define	EOWNERDEAD	96	/* Previous owner died */
144
#endif /* _POSIX_SOURCE */
145
#endif				/* _POSIX_SOURCE */
145
 
146
 
146
#ifndef _POSIX_SOURCE
147
#ifndef _POSIX_SOURCE
147
#define	ELAST		96		/* Must be equal largest errno */
148
#define	ELAST		96	/* Must be equal largest errno */
148
#endif /* _POSIX_SOURCE */
149
#endif				/* _POSIX_SOURCE */
149
 
150
 
150
#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO)
151
#if defined(_KERNEL) || defined(_WANT_KERNEL_ERRNO)
151
/* pseudo-errors returned inside kernel to modify return to process */
152
/* pseudo-errors returned inside kernel to modify return to process */
152
#define	ERESTART	(-1)		/* restart syscall */
153
#define	ERESTART	(-1)	/* restart syscall */
153
#define	EJUSTRETURN	(-2)		/* don't modify regs, just return */
154
#define	EJUSTRETURN	(-2)	/* don't modify regs, just return */
154
#define	ENOIOCTL	(-3)		/* ioctl not handled by this layer */
155
#define	ENOIOCTL	(-3)	/* ioctl not handled by this layer */
155
#define	EDIRIOCTL	(-4)		/* do direct ioctl in GEOM */
156
#define	EDIRIOCTL	(-4)	/* do direct ioctl in GEOM */
156
#define	ERELOOKUP	(-5)		/* retry the directory lookup */
157
#define	ERELOOKUP	(-5)	/* retry the directory lookup */
157
#endif
158
#endif
158
 
159
 
159
int *	__error(void);
160
int	       *__error(void);
160
#define	errno		(* __error())
161
#define	errno		(* __error())
161
 
162
 
162
#endif
-
 
163
 
163
 
-
 
164
/* Solaris SysV */
-
 
165
#ifdef _SVID_SOURCE	
-
 
166
 
-
 
167
#define	ENOSTR		60	
-
 
168
#define	ENOSR		63	
-
 
169
#define	ETIME		62
-
 
170
#define	ECOMM		70	
-
 
171
#define	ELIBACC		83	
-
 
172
#define	ELIBBAD		84	
-
 
173
#define ELIBSCN		85	
-
 
174
#define	ELIBMAX		86	
-
 
175
#define	ELIBEXEC	87	
-
 
176
#define	ERESTART	91
-
 
177
#define	ESTRPIPE	92	
-
 
178
 
-
 
179
#endif
-
 
180
 
-
 
181
 
-
 
182
#endif