Mercurial > projects > ldc
comparison tango/tango/stdc/errno.d @ 132:1700239cab2e trunk
[svn r136] MAJOR UNSTABLE UPDATE!!!
Initial commit after moving to Tango instead of Phobos.
Lots of bugfixes...
This build is not suitable for most things.
author | lindquist |
---|---|
date | Fri, 11 Jan 2008 17:57:40 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
131:5825d48b27d1 | 132:1700239cab2e |
---|---|
1 /** | |
2 * D header file for C99. | |
3 * | |
4 * Copyright: Public Domain | |
5 * License: Public Domain | |
6 * Authors: Sean Kelly | |
7 * Standards: ISO/IEC 9899:1999 (E) | |
8 */ | |
9 module tango.stdc.errno; | |
10 | |
11 private | |
12 { | |
13 extern (C) int getErrno(); | |
14 extern (C) int setErrno(int); | |
15 } | |
16 | |
17 int errno() { return getErrno(); } | |
18 int errno( int val ) { return setErrno( val ); } | |
19 | |
20 extern (C): | |
21 | |
22 version( Win32 ) | |
23 { | |
24 const EPERM = 1; // Operation not permitted | |
25 const ENOENT = 2; // No such file or directory | |
26 const ESRCH = 3; // No such process | |
27 const EINTR = 4; // Interrupted system call | |
28 const EIO = 5; // I/O error | |
29 const ENXIO = 6; // No such device or address | |
30 const E2BIG = 7; // Argument list too long | |
31 const ENOEXEC = 8; // Exec format error | |
32 const EBADF = 9; // Bad file number | |
33 const ECHILD = 10; // No child processes | |
34 const EAGAIN = 11; // Try again | |
35 const ENOMEM = 12; // Out of memory | |
36 const EACCES = 13; // Permission denied | |
37 const EFAULT = 14; // Bad address | |
38 const EBUSY = 16; // Device or resource busy | |
39 const EEXIST = 17; // File exists | |
40 const EXDEV = 18; // Cross-device link | |
41 const ENODEV = 19; // No such device | |
42 const ENOTDIR = 20; // Not a directory | |
43 const EISDIR = 21; // Is a directory | |
44 const EINVAL = 22; // Invalid argument | |
45 const ENFILE = 23; // File table overflow | |
46 const EMFILE = 24; // Too many open files | |
47 const ENOTTY = 25; // Not a typewriter | |
48 const EFBIG = 27; // File too large | |
49 const ENOSPC = 28; // No space left on device | |
50 const ESPIPE = 29; // Illegal seek | |
51 const EROFS = 30; // Read-only file system | |
52 const EMLINK = 31; // Too many links | |
53 const EPIPE = 32; // Broken pipe | |
54 const EDOM = 33; // Math argument out of domain of func | |
55 const ERANGE = 34; // Math result not representable | |
56 const EDEADLK = 36; // Resource deadlock would occur | |
57 const ENAMETOOLONG = 38; // File name too long | |
58 const ENOLCK = 39; // No record locks available | |
59 const ENOSYS = 40; // Function not implemented | |
60 const ENOTEMPTY = 41; // Directory not empty | |
61 const EILSEQ = 42; // Illegal byte sequence | |
62 const EDEADLOCK = EDEADLK; | |
63 } | |
64 else version( linux ) | |
65 { | |
66 const EPERM = 1; // Operation not permitted | |
67 const ENOENT = 2; // No such file or directory | |
68 const ESRCH = 3; // No such process | |
69 const EINTR = 4; // Interrupted system call | |
70 const EIO = 5; // I/O error | |
71 const ENXIO = 6; // No such device or address | |
72 const E2BIG = 7; // Argument list too long | |
73 const ENOEXEC = 8; // Exec format error | |
74 const EBADF = 9; // Bad file number | |
75 const ECHILD = 10; // No child processes | |
76 const EAGAIN = 11; // Try again | |
77 const ENOMEM = 12; // Out of memory | |
78 const EACCES = 13; // Permission denied | |
79 const EFAULT = 14; // Bad address | |
80 const ENOTBLK = 15; // Block device required | |
81 const EBUSY = 16; // Device or resource busy | |
82 const EEXIST = 17; // File exists | |
83 const EXDEV = 18; // Cross-device link | |
84 const ENODEV = 19; // No such device | |
85 const ENOTDIR = 20; // Not a directory | |
86 const EISDIR = 21; // Is a directory | |
87 const EINVAL = 22; // Invalid argument | |
88 const ENFILE = 23; // File table overflow | |
89 const EMFILE = 24; // Too many open files | |
90 const ENOTTY = 25; // Not a typewriter | |
91 const ETXTBSY = 26; // Text file busy | |
92 const EFBIG = 27; // File too large | |
93 const ENOSPC = 28; // No space left on device | |
94 const ESPIPE = 29; // Illegal seek | |
95 const EROFS = 30; // Read-only file system | |
96 const EMLINK = 31; // Too many links | |
97 const EPIPE = 32; // Broken pipe | |
98 const EDOM = 33; // Math argument out of domain of func | |
99 const ERANGE = 34; // Math result not representable | |
100 const EDEADLK = 35; // Resource deadlock would occur | |
101 const ENAMETOOLONG = 36; // File name too long | |
102 const ENOLCK = 37; // No record locks available | |
103 const ENOSYS = 38; // Function not implemented | |
104 const ENOTEMPTY = 39; // Directory not empty | |
105 const ELOOP = 40; // Too many symbolic links encountered | |
106 const EWOULDBLOCK = EAGAIN; // Operation would block | |
107 const ENOMSG = 42; // No message of desired type | |
108 const EIDRM = 43; // Identifier removed | |
109 const ECHRNG = 44; // Channel number out of range | |
110 const EL2NSYNC = 45; // Level 2 not synchronized | |
111 const EL3HLT = 46; // Level 3 halted | |
112 const EL3RST = 47; // Level 3 reset | |
113 const ELNRNG = 48; // Link number out of range | |
114 const EUNATCH = 49; // Protocol driver not attached | |
115 const ENOCSI = 50; // No CSI structure available | |
116 const EL2HLT = 51; // Level 2 halted | |
117 const EBADE = 52; // Invalid exchange | |
118 const EBADR = 53; // Invalid request descriptor | |
119 const EXFULL = 54; // Exchange full | |
120 const ENOANO = 55; // No anode | |
121 const EBADRQC = 56; // Invalid request code | |
122 const EBADSLT = 57; // Invalid slot | |
123 const EDEADLOCK = EDEADLK; | |
124 const EBFONT = 59; // Bad font file format | |
125 const ENOSTR = 60; // Device not a stream | |
126 const ENODATA = 61; // No data available | |
127 const ETIME = 62; // Timer expired | |
128 const ENOSR = 63; // Out of streams resources | |
129 const ENONET = 64; // Machine is not on the network | |
130 const ENOPKG = 65; // Package not installed | |
131 const EREMOTE = 66; // Object is remote | |
132 const ENOLINK = 67; // Link has been severed | |
133 const EADV = 68; // Advertise error | |
134 const ESRMNT = 69; // Srmount error | |
135 const ECOMM = 70; // Communication error on send | |
136 const EPROTO = 71; // Protocol error | |
137 const EMULTIHOP = 72; // Multihop attempted | |
138 const EDOTDOT = 73; // RFS specific error | |
139 const EBADMSG = 74; // Not a data message | |
140 const EOVERFLOW = 75; // Value too large for defined data type | |
141 const ENOTUNIQ = 76; // Name not unique on network | |
142 const EBADFD = 77; // File descriptor in bad state | |
143 const EREMCHG = 78; // Remote address changed | |
144 const ELIBACC = 79; // Can not access a needed shared library | |
145 const ELIBBAD = 80; // Accessing a corrupted shared library | |
146 const ELIBSCN = 81; // .lib section in a.out corrupted | |
147 const ELIBMAX = 82; // Attempting to link in too many shared libraries | |
148 const ELIBEXEC = 83; // Cannot exec a shared library directly | |
149 const EILSEQ = 84; // Illegal byte sequence | |
150 const ERESTART = 85; // Interrupted system call should be restarted | |
151 const ESTRPIPE = 86; // Streams pipe error | |
152 const EUSERS = 87; // Too many users | |
153 const ENOTSOCK = 88; // Socket operation on non-socket | |
154 const EDESTADDRREQ = 89; // Destination address required | |
155 const EMSGSIZE = 90; // Message too long | |
156 const EPROTOTYPE = 91; // Protocol wrong type for socket | |
157 const ENOPROTOOPT = 92; // Protocol not available | |
158 const EPROTONOSUPPORT = 93; // Protocol not supported | |
159 const ESOCKTNOSUPPORT = 94; // Socket type not supported | |
160 const EOPNOTSUPP = 95; // Operation not supported on transport endpoint | |
161 const EPFNOSUPPORT = 96; // Protocol family not supported | |
162 const EAFNOSUPPORT = 97; // Address family not supported by protocol | |
163 const EADDRINUSE = 98; // Address already in use | |
164 const EADDRNOTAVAIL = 99; // Cannot assign requested address | |
165 const ENETDOWN = 100; // Network is down | |
166 const ENETUNREACH = 101; // Network is unreachable | |
167 const ENETRESET = 102; // Network dropped connection because of reset | |
168 const ECONNABORTED = 103; // Software caused connection abort | |
169 const ECONNRESET = 104; // Connection reset by peer | |
170 const ENOBUFS = 105; // No buffer space available | |
171 const EISCONN = 106; // Transport endpoint is already connected | |
172 const ENOTCONN = 107; // Transport endpoint is not connected | |
173 const ESHUTDOWN = 108; // Cannot send after transport endpoint shutdown | |
174 const ETOOMANYREFS = 109; // Too many references: cannot splice | |
175 const ETIMEDOUT = 110; // Connection timed out | |
176 const ECONNREFUSED = 111; // Connection refused | |
177 const EHOSTDOWN = 112; // Host is down | |
178 const EHOSTUNREACH = 113; // No route to host | |
179 const EALREADY = 114; // Operation already in progress | |
180 const EINPROGRESS = 115; // Operation now in progress | |
181 const ESTALE = 116; // Stale NFS file handle | |
182 const EUCLEAN = 117; // Structure needs cleaning | |
183 const ENOTNAM = 118; // Not a XENIX named type file | |
184 const ENAVAIL = 119; // No XENIX semaphores available | |
185 const EISNAM = 120; // Is a named type file | |
186 const EREMOTEIO = 121; // Remote I/O error | |
187 const EDQUOT = 122; // Quota exceeded | |
188 const ENOMEDIUM = 123; // No medium found | |
189 const EMEDIUMTYPE = 124; // Wrong medium type | |
190 const ECANCELED = 125; // Operation Canceled | |
191 const ENOKEY = 126; // Required key not available | |
192 const EKEYEXPIRED = 127; // Key has expired | |
193 const EKEYREVOKED = 128; // Key has been revoked | |
194 const EKEYREJECTED = 129; // Key was rejected by service | |
195 const EOWNERDEAD = 130; // Owner died | |
196 const ENOTRECOVERABLE = 131; // State not recoverable | |
197 } | |
198 else version( darwin ) | |
199 { | |
200 const EPERM = 1; // Operation not permitted | |
201 const ENOENT = 2; // No such file or directory | |
202 const ESRCH = 3; // No such process | |
203 const EINTR = 4; // Interrupted system call | |
204 const EIO = 5; // Input/output error | |
205 const ENXIO = 6; // Device not configured | |
206 const E2BIG = 7; // Argument list too long | |
207 const ENOEXEC = 8; // Exec format error | |
208 const EBADF = 9; // Bad file descriptor | |
209 const ECHILD = 10; // No child processes | |
210 const EDEADLK = 11; // Resource deadlock avoided | |
211 const ENOMEM = 12; // Cannot allocate memory | |
212 const EACCES = 13; // Permission denied | |
213 const EFAULT = 14; // Bad address | |
214 const EBUSY = 16; // Device busy | |
215 const EEXIST = 17; // File exists | |
216 const EXDEV = 18; // Cross-device link | |
217 const ENODEV = 19; // Operation not supported by device | |
218 const ENOTDIR = 20; // Not a directory | |
219 const EISDIR = 21; // Is a directory | |
220 const EINVAL = 22; // Invalid argument | |
221 const ENFILE = 23; // Too many open files in system | |
222 const EMFILE = 24; // Too many open files | |
223 const ENOTTY = 25; // Inappropriate ioctl for device | |
224 const ETXTBSY = 26; // Text file busy | |
225 const EFBIG = 27; // File too large | |
226 const ENOSPC = 28; // No space left on device | |
227 const ESPIPE = 29; // Illegal seek | |
228 const EROFS = 30; // Read-only file system | |
229 const EMLINK = 31; // Too many links | |
230 const EPIPE = 32; // Broken pipe | |
231 const EDOM = 33; // Numerical argument out of domain | |
232 const ERANGE = 34; // Result too large | |
233 const EAGAIN = 35; // Resource temporarily unavailable | |
234 const EWOULDBLOCK = EAGAIN; // Operation would block | |
235 const EINPROGRESS = 36; // Operation now in progress | |
236 const EALREADY = 37; // Operation already in progress | |
237 const ENOTSOCK = 38; // Socket operation on non-socket | |
238 const EDESTADDRREQ = 39; // Destination address required | |
239 const EMSGSIZE = 40; // Message too long | |
240 const EPROTOTYPE = 41; // Protocol wrong type for socket | |
241 const ENOPROTOOPT = 42; // Protocol not available | |
242 const EPROTONOSUPPORT = 43; // Protocol not supported | |
243 const ENOTSUP = 45; // Operation not supported | |
244 const EOPNOTSUPP = ENOTSUP; // Operation not supported on socket | |
245 const EAFNOSUPPORT = 47; // Address family not supported by protocol family | |
246 const EADDRINUSE = 48; // Address already in use | |
247 const EADDRNOTAVAIL = 49; // Can't assign requested address | |
248 const ENETDOWN = 50; // Network is down | |
249 const ENETUNREACH = 51; // Network is unreachable | |
250 const ENETRESET = 52; // Network dropped connection on reset | |
251 const ECONNABORTED = 53; // Software caused connection abort | |
252 const ECONNRESET = 54; // Connection reset by peer | |
253 const ENOBUFS = 55; // No buffer space available | |
254 const EISCONN = 56; // Socket is already connected | |
255 const ENOTCONN = 57; // Socket is not connected | |
256 const ETIMEDOUT = 60; // Operation timed out | |
257 const ECONNREFUSED = 61; // Connection refused | |
258 const ELOOP = 62; // Too many levels of symbolic links | |
259 const ENAMETOOLONG = 63; // File name too long | |
260 const EHOSTUNREACH = 65; // No route to host | |
261 const ENOTEMPTY = 66; // Directory not empty | |
262 const EDQUOT = 69; // Disc quota exceeded | |
263 const ESTALE = 70; // Stale NFS file handle | |
264 const ENOLCK = 77; // No locks available | |
265 const ENOSYS = 78; // Function not implemented | |
266 const EOVERFLOW = 84; // Value too large to be stored in data type | |
267 const ECANCELED = 89; // Operation canceled | |
268 const EIDRM = 90; // Identifier removed | |
269 const ENOMSG = 91; // No message of desired type | |
270 const EILSEQ = 92; // Illegal byte sequence | |
271 const EBADMSG = 94; // Bad message | |
272 const EMULTIHOP = 95; // Reserved | |
273 const ENODATA = 96; // No message available on STREAM | |
274 const ENOLINK = 97; // Reserved | |
275 const ENOSR = 98; // No STREAM resources | |
276 const ENOSTR = 99; // Not a STREAM | |
277 const EPROTO = 100; // Protocol error | |
278 const ETIME = 101; // STREAM ioctl timeout | |
279 const ELAST = 101; // Must be equal largest errno | |
280 } |