Mercurial > projects > ldc
comparison druntime/import/core/stdc/errno.d @ 1458:e0b2d67cfe7c
Added druntime (this should be removed once it works).
author | Robert Clipsham <robert@octarineparrot.com> |
---|---|
date | Tue, 02 Jun 2009 17:43:06 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
1456:7b218ec1044f | 1458:e0b2d67cfe7c |
---|---|
1 /** | |
2 * D header file for C99. | |
3 * | |
4 * Copyright: Copyright Sean Kelly 2005 - 2009. | |
5 * License: <a href="http://www.boost.org/LICENSE_1_0.txt>Boost License 1.0</a>. | |
6 * Authors: Sean Kelly | |
7 * Standards: ISO/IEC 9899:1999 (E) | |
8 * | |
9 * Copyright Sean Kelly 2005 - 2009. | |
10 * Distributed under the Boost Software License, Version 1.0. | |
11 * (See accompanying file LICENSE_1_0.txt or copy at | |
12 * http://www.boost.org/LICENSE_1_0.txt) | |
13 */ | |
14 module core.stdc.errno; | |
15 | |
16 extern (C) int getErrno(); // for internal use | |
17 extern (C) int setErrno(int); // for internal use | |
18 | |
19 alias getErrno errno; | |
20 alias setErrno errno; | |
21 | |
22 extern (C): | |
23 | |
24 version( Windows ) | |
25 { | |
26 enum EPERM = 1; // Operation not permitted | |
27 enum ENOENT = 2; // No such file or directory | |
28 enum ESRCH = 3; // No such process | |
29 enum EINTR = 4; // Interrupted system call | |
30 enum EIO = 5; // I/O error | |
31 enum ENXIO = 6; // No such device or address | |
32 enum E2BIG = 7; // Argument list too long | |
33 enum ENOEXEC = 8; // Exec format error | |
34 enum EBADF = 9; // Bad file number | |
35 enum ECHILD = 10; // No child processes | |
36 enum EAGAIN = 11; // Try again | |
37 enum ENOMEM = 12; // Out of memory | |
38 enum EACCES = 13; // Permission denied | |
39 enum EFAULT = 14; // Bad address | |
40 enum EBUSY = 16; // Device or resource busy | |
41 enum EEXIST = 17; // File exists | |
42 enum EXDEV = 18; // Cross-device link | |
43 enum ENODEV = 19; // No such device | |
44 enum ENOTDIR = 20; // Not a directory | |
45 enum EISDIR = 21; // Is a directory | |
46 enum EINVAL = 22; // Invalid argument | |
47 enum ENFILE = 23; // File table overflow | |
48 enum EMFILE = 24; // Too many open files | |
49 enum ENOTTY = 25; // Not a typewriter | |
50 enum EFBIG = 27; // File too large | |
51 enum ENOSPC = 28; // No space left on device | |
52 enum ESPIPE = 29; // Illegal seek | |
53 enum EROFS = 30; // Read-only file system | |
54 enum EMLINK = 31; // Too many links | |
55 enum EPIPE = 32; // Broken pipe | |
56 enum EDOM = 33; // Math argument out of domain of func | |
57 enum ERANGE = 34; // Math result not representable | |
58 enum EDEADLK = 36; // Resource deadlock would occur | |
59 enum ENAMETOOLONG = 38; // File name too long | |
60 enum ENOLCK = 39; // No record locks available | |
61 enum ENOSYS = 40; // Function not implemented | |
62 enum ENOTEMPTY = 41; // Directory not empty | |
63 enum EILSEQ = 42; // Illegal byte sequence | |
64 enum EDEADLOCK = EDEADLK; | |
65 } | |
66 else version( linux ) | |
67 { | |
68 enum EPERM = 1; // Operation not permitted | |
69 enum ENOENT = 2; // No such file or directory | |
70 enum ESRCH = 3; // No such process | |
71 enum EINTR = 4; // Interrupted system call | |
72 enum EIO = 5; // I/O error | |
73 enum ENXIO = 6; // No such device or address | |
74 enum E2BIG = 7; // Argument list too long | |
75 enum ENOEXEC = 8; // Exec format error | |
76 enum EBADF = 9; // Bad file number | |
77 enum ECHILD = 10; // No child processes | |
78 enum EAGAIN = 11; // Try again | |
79 enum ENOMEM = 12; // Out of memory | |
80 enum EACCES = 13; // Permission denied | |
81 enum EFAULT = 14; // Bad address | |
82 enum ENOTBLK = 15; // Block device required | |
83 enum EBUSY = 16; // Device or resource busy | |
84 enum EEXIST = 17; // File exists | |
85 enum EXDEV = 18; // Cross-device link | |
86 enum ENODEV = 19; // No such device | |
87 enum ENOTDIR = 20; // Not a directory | |
88 enum EISDIR = 21; // Is a directory | |
89 enum EINVAL = 22; // Invalid argument | |
90 enum ENFILE = 23; // File table overflow | |
91 enum EMFILE = 24; // Too many open files | |
92 enum ENOTTY = 25; // Not a typewriter | |
93 enum ETXTBSY = 26; // Text file busy | |
94 enum EFBIG = 27; // File too large | |
95 enum ENOSPC = 28; // No space left on device | |
96 enum ESPIPE = 29; // Illegal seek | |
97 enum EROFS = 30; // Read-only file system | |
98 enum EMLINK = 31; // Too many links | |
99 enum EPIPE = 32; // Broken pipe | |
100 enum EDOM = 33; // Math argument out of domain of func | |
101 enum ERANGE = 34; // Math result not representable | |
102 enum EDEADLK = 35; // Resource deadlock would occur | |
103 enum ENAMETOOLONG = 36; // File name too long | |
104 enum ENOLCK = 37; // No record locks available | |
105 enum ENOSYS = 38; // Function not implemented | |
106 enum ENOTEMPTY = 39; // Directory not empty | |
107 enum ELOOP = 40; // Too many symbolic links encountered | |
108 enum EWOULDBLOCK = EAGAIN; // Operation would block | |
109 enum ENOMSG = 42; // No message of desired type | |
110 enum EIDRM = 43; // Identifier removed | |
111 enum ECHRNG = 44; // Channel number out of range | |
112 enum EL2NSYNC = 45; // Level 2 not synchronized | |
113 enum EL3HLT = 46; // Level 3 halted | |
114 enum EL3RST = 47; // Level 3 reset | |
115 enum ELNRNG = 48; // Link number out of range | |
116 enum EUNATCH = 49; // Protocol driver not attached | |
117 enum ENOCSI = 50; // No CSI structure available | |
118 enum EL2HLT = 51; // Level 2 halted | |
119 enum EBADE = 52; // Invalid exchange | |
120 enum EBADR = 53; // Invalid request descriptor | |
121 enum EXFULL = 54; // Exchange full | |
122 enum ENOANO = 55; // No anode | |
123 enum EBADRQC = 56; // Invalid request code | |
124 enum EBADSLT = 57; // Invalid slot | |
125 enum EDEADLOCK = EDEADLK; | |
126 enum EBFONT = 59; // Bad font file format | |
127 enum ENOSTR = 60; // Device not a stream | |
128 enum ENODATA = 61; // No data available | |
129 enum ETIME = 62; // Timer expired | |
130 enum ENOSR = 63; // Out of streams resources | |
131 enum ENONET = 64; // Machine is not on the network | |
132 enum ENOPKG = 65; // Package not installed | |
133 enum EREMOTE = 66; // Object is remote | |
134 enum ENOLINK = 67; // Link has been severed | |
135 enum EADV = 68; // Advertise error | |
136 enum ESRMNT = 69; // Srmount error | |
137 enum ECOMM = 70; // Communication error on send | |
138 enum EPROTO = 71; // Protocol error | |
139 enum EMULTIHOP = 72; // Multihop attempted | |
140 enum EDOTDOT = 73; // RFS specific error | |
141 enum EBADMSG = 74; // Not a data message | |
142 enum EOVERFLOW = 75; // Value too large for defined data type | |
143 enum ENOTUNIQ = 76; // Name not unique on network | |
144 enum EBADFD = 77; // File descriptor in bad state | |
145 enum EREMCHG = 78; // Remote address changed | |
146 enum ELIBACC = 79; // Can not access a needed shared library | |
147 enum ELIBBAD = 80; // Accessing a corrupted shared library | |
148 enum ELIBSCN = 81; // .lib section in a.out corrupted | |
149 enum ELIBMAX = 82; // Attempting to link in too many shared libraries | |
150 enum ELIBEXEC = 83; // Cannot exec a shared library directly | |
151 enum EILSEQ = 84; // Illegal byte sequence | |
152 enum ERESTART = 85; // Interrupted system call should be restarted | |
153 enum ESTRPIPE = 86; // Streams pipe error | |
154 enum EUSERS = 87; // Too many users | |
155 enum ENOTSOCK = 88; // Socket operation on non-socket | |
156 enum EDESTADDRREQ = 89; // Destination address required | |
157 enum EMSGSIZE = 90; // Message too long | |
158 enum EPROTOTYPE = 91; // Protocol wrong type for socket | |
159 enum ENOPROTOOPT = 92; // Protocol not available | |
160 enum EPROTONOSUPPORT = 93; // Protocol not supported | |
161 enum ESOCKTNOSUPPORT = 94; // Socket type not supported | |
162 enum EOPNOTSUPP = 95; // Operation not supported on transport endpoint | |
163 enum EPFNOSUPPORT = 96; // Protocol family not supported | |
164 enum EAFNOSUPPORT = 97; // Address family not supported by protocol | |
165 enum EADDRINUSE = 98; // Address already in use | |
166 enum EADDRNOTAVAIL = 99; // Cannot assign requested address | |
167 enum ENETDOWN = 100; // Network is down | |
168 enum ENETUNREACH = 101; // Network is unreachable | |
169 enum ENETRESET = 102; // Network dropped connection because of reset | |
170 enum ECONNABORTED = 103; // Software caused connection abort | |
171 enum ECONNRESET = 104; // Connection reset by peer | |
172 enum ENOBUFS = 105; // No buffer space available | |
173 enum EISCONN = 106; // Transport endpoint is already connected | |
174 enum ENOTCONN = 107; // Transport endpoint is not connected | |
175 enum ESHUTDOWN = 108; // Cannot send after transport endpoint shutdown | |
176 enum ETOOMANYREFS = 109; // Too many references: cannot splice | |
177 enum ETIMEDOUT = 110; // Connection timed out | |
178 enum ECONNREFUSED = 111; // Connection refused | |
179 enum EHOSTDOWN = 112; // Host is down | |
180 enum EHOSTUNREACH = 113; // No route to host | |
181 enum EALREADY = 114; // Operation already in progress | |
182 enum EINPROGRESS = 115; // Operation now in progress | |
183 enum ESTALE = 116; // Stale NFS file handle | |
184 enum EUCLEAN = 117; // Structure needs cleaning | |
185 enum ENOTNAM = 118; // Not a XENIX named type file | |
186 enum ENAVAIL = 119; // No XENIX semaphores available | |
187 enum EISNAM = 120; // Is a named type file | |
188 enum EREMOTEIO = 121; // Remote I/O error | |
189 enum EDQUOT = 122; // Quota exceeded | |
190 enum ENOMEDIUM = 123; // No medium found | |
191 enum EMEDIUMTYPE = 124; // Wrong medium type | |
192 enum ECANCELED = 125; // Operation Canceled | |
193 enum ENOKEY = 126; // Required key not available | |
194 enum EKEYEXPIRED = 127; // Key has expired | |
195 enum EKEYREVOKED = 128; // Key has been revoked | |
196 enum EKEYREJECTED = 129; // Key was rejected by service | |
197 enum EOWNERDEAD = 130; // Owner died | |
198 enum ENOTRECOVERABLE = 131; // State not recoverable | |
199 } | |
200 else version( OSX ) | |
201 { | |
202 enum EPERM = 1; // Operation not permitted | |
203 enum ENOENT = 2; // No such file or directory | |
204 enum ESRCH = 3; // No such process | |
205 enum EINTR = 4; // Interrupted system call | |
206 enum EIO = 5; // Input/output error | |
207 enum ENXIO = 6; // Device not configured | |
208 enum E2BIG = 7; // Argument list too long | |
209 enum ENOEXEC = 8; // Exec format error | |
210 enum EBADF = 9; // Bad file descriptor | |
211 enum ECHILD = 10; // No child processes | |
212 enum EDEADLK = 11; // Resource deadlock avoided | |
213 enum ENOMEM = 12; // Cannot allocate memory | |
214 enum EACCES = 13; // Permission denied | |
215 enum EFAULT = 14; // Bad address | |
216 enum EBUSY = 16; // Device busy | |
217 enum EEXIST = 17; // File exists | |
218 enum EXDEV = 18; // Cross-device link | |
219 enum ENODEV = 19; // Operation not supported by device | |
220 enum ENOTDIR = 20; // Not a directory | |
221 enum EISDIR = 21; // Is a directory | |
222 enum EINVAL = 22; // Invalid argument | |
223 enum ENFILE = 23; // Too many open files in system | |
224 enum EMFILE = 24; // Too many open files | |
225 enum ENOTTY = 25; // Inappropriate ioctl for device | |
226 enum ETXTBSY = 26; // Text file busy | |
227 enum EFBIG = 27; // File too large | |
228 enum ENOSPC = 28; // No space left on device | |
229 enum ESPIPE = 29; // Illegal seek | |
230 enum EROFS = 30; // Read-only file system | |
231 enum EMLINK = 31; // Too many links | |
232 enum EPIPE = 32; // Broken pipe | |
233 enum EDOM = 33; // Numerical argument out of domain | |
234 enum ERANGE = 34; // Result too large | |
235 enum EAGAIN = 35; // Resource temporarily unavailable | |
236 enum EWOULDBLOCK = EAGAIN; // Operation would block | |
237 enum EINPROGRESS = 36; // Operation now in progress | |
238 enum EALREADY = 37; // Operation already in progress | |
239 enum ENOTSOCK = 38; // Socket operation on non-socket | |
240 enum EDESTADDRREQ = 39; // Destination address required | |
241 enum EMSGSIZE = 40; // Message too long | |
242 enum EPROTOTYPE = 41; // Protocol wrong type for socket | |
243 enum ENOPROTOOPT = 42; // Protocol not available | |
244 enum EPROTONOSUPPORT = 43; // Protocol not supported | |
245 enum ENOTSUP = 45; // Operation not supported | |
246 enum EOPNOTSUPP = ENOTSUP; // Operation not supported on socket | |
247 enum EAFNOSUPPORT = 47; // Address family not supported by protocol family | |
248 enum EADDRINUSE = 48; // Address already in use | |
249 enum EADDRNOTAVAIL = 49; // Can't assign requested address | |
250 enum ENETDOWN = 50; // Network is down | |
251 enum ENETUNREACH = 51; // Network is unreachable | |
252 enum ENETRESET = 52; // Network dropped connection on reset | |
253 enum ECONNABORTED = 53; // Software caused connection abort | |
254 enum ECONNRESET = 54; // Connection reset by peer | |
255 enum ENOBUFS = 55; // No buffer space available | |
256 enum EISCONN = 56; // Socket is already connected | |
257 enum ENOTCONN = 57; // Socket is not connected | |
258 enum ETIMEDOUT = 60; // Operation timed out | |
259 enum ECONNREFUSED = 61; // Connection refused | |
260 enum ELOOP = 62; // Too many levels of symbolic links | |
261 enum ENAMETOOLONG = 63; // File name too long | |
262 enum EHOSTUNREACH = 65; // No route to host | |
263 enum ENOTEMPTY = 66; // Directory not empty | |
264 enum EDQUOT = 69; // Disc quota exceeded | |
265 enum ESTALE = 70; // Stale NFS file handle | |
266 enum ENOLCK = 77; // No locks available | |
267 enum ENOSYS = 78; // Function not implemented | |
268 enum EOVERFLOW = 84; // Value too large to be stored in data type | |
269 enum ECANCELED = 89; // Operation canceled | |
270 enum EIDRM = 90; // Identifier removed | |
271 enum ENOMSG = 91; // No message of desired type | |
272 enum EILSEQ = 92; // Illegal byte sequence | |
273 enum EBADMSG = 94; // Bad message | |
274 enum EMULTIHOP = 95; // Reserved | |
275 enum ENODATA = 96; // No message available on STREAM | |
276 enum ENOLINK = 97; // Reserved | |
277 enum ENOSR = 98; // No STREAM resources | |
278 enum ENOSTR = 99; // Not a STREAM | |
279 enum EPROTO = 100; // Protocol error | |
280 enum ETIME = 101; // STREAM ioctl timeout | |
281 enum ELAST = 101; // Must be equal largest errno | |
282 } | |
283 else version( freebsd ) | |
284 { | |
285 enum EPERM = 1; // Operation not permitted | |
286 enum ENOENT = 2; // No such file or directory | |
287 enum ESRCH = 3; // No such process | |
288 enum EINTR = 4; // Interrupted system call | |
289 enum EIO = 5; // Input/output error | |
290 enum ENXIO = 6; // Device not configured | |
291 enum E2BIG = 7; // Argument list too long | |
292 enum ENOEXEC = 8; // Exec format error | |
293 enum EBADF = 9; // Bad file descriptor | |
294 enum ECHILD = 10; // No child processes | |
295 enum EDEADLK = 11; // Resource deadlock avoided | |
296 enum ENOMEM = 12; // Cannot allocate memory | |
297 enum EACCES = 13; // Permission denied | |
298 enum EFAULT = 14; // Bad address | |
299 enum ENOTBLK = 15; // Block device required | |
300 enum EBUSY = 16; // Device busy | |
301 enum EEXIST = 17; // File exists | |
302 enum EXDEV = 18; // Cross-device link | |
303 enum ENODEV = 19; // Operation not supported by device | |
304 enum ENOTDIR = 20; // Not a directory | |
305 enum EISDIR = 21; // Is a directory | |
306 enum EINVAL = 22; // Invalid argument | |
307 enum ENFILE = 23; // Too many open files in system | |
308 enum EMFILE = 24; // Too many open files | |
309 enum ENOTTY = 25; // Inappropriate ioctl for device | |
310 enum ETXTBSY = 26; // Text file busy | |
311 enum EFBIG = 27; // File too large | |
312 enum ENOSPC = 28; // No space left on device | |
313 enum ESPIPE = 29; // Illegal seek | |
314 enum EROFS = 30; // Read-only file system | |
315 enum EMLINK = 31; // Too many links | |
316 enum EPIPE = 32; // Broken pipe | |
317 enum EDOM = 33; // Numerical argument out of domain | |
318 enum ERANGE = 34; // Result too large | |
319 enum EAGAIN = 35; // Resource temporarily unavailable | |
320 enum EWOULDBLOCK = EAGAIN; // Operation would block | |
321 enum EINPROGRESS = 36; // Operation now in progress | |
322 enum EALREADY = 37; // Operation already in progress | |
323 enum ENOTSOCK = 38; // Socket operation on non-socket | |
324 enum EDESTADDRREQ = 39; // Destination address required | |
325 enum EMSGSIZE = 40; // Message too long | |
326 enum EPROTOTYPE = 41; // Protocol wrong type for socket | |
327 enum ENOPROTOOPT = 42; // Protocol not available | |
328 enum EPROTONOSUPPORT = 43; // Protocol not supported | |
329 enum ENOTSUP = 45; // Operation not supported | |
330 enum EOPNOTSUPP = ENOTSUP; // Operation not supported on socket | |
331 enum EAFNOSUPPORT = 47; // Address family not supported by protocol family | |
332 enum EADDRINUSE = 48; // Address already in use | |
333 enum EADDRNOTAVAIL = 49; // Can't assign requested address | |
334 enum ENETDOWN = 50; // Network is down | |
335 enum ENETUNREACH = 51; // Network is unreachable | |
336 enum ENETRESET = 52; // Network dropped connection on reset | |
337 enum ECONNABORTED = 53; // Software caused connection abort | |
338 enum ECONNRESET = 54; // Connection reset by peer | |
339 enum ENOBUFS = 55; // No buffer space available | |
340 enum EISCONN = 56; // Socket is already connected | |
341 enum ENOTCONN = 57; // Socket is not connected | |
342 enum ESHUTDOWN = 58; // Can't send after socket shutdown | |
343 enum ETOOMANYREFS = 59; // Too many refrences; can't splice | |
344 enum ETIMEDOUT = 60; // Operation timed out | |
345 enum ECONNREFUSED = 61; // Connection refused | |
346 enum ELOOP = 62; // Too many levels of symbolic links | |
347 enum ENAMETOOLONG = 63; // File name too long | |
348 enum EHOSTUNREACH = 65; // No route to host | |
349 enum ENOTEMPTY = 66; // Directory not empty | |
350 enum EPROCLIM = 67; // Too many processes | |
351 enum EUSERS = 68; // Too many users | |
352 enum EDQUOT = 69; // Disc quota exceeded | |
353 enum ESTALE = 70; // Stale NFS file handle | |
354 enum EREMOTE = 71; // Too many levels of remote in path | |
355 enum EBADRPC = 72; // RPC struct is bad | |
356 enum ERPCMISMATCH = 73; // RPC version wrong | |
357 enum EPROGUNAVAIL = 74; // RPC prog. not avail | |
358 enum EPROGMISMATCH = 75; // Program version wrong | |
359 enum EPROCUNAVAIL = 76; // Bad procedure for program | |
360 enum ENOLCK = 77; // No locks available | |
361 enum ENOSYS = 78; // Function not implemented | |
362 enum EFTYPE = 79; // Inappropriate file type or format | |
363 enum EAUTH = 80; // Authentication error | |
364 enum ENEEDAUTH = 81; // Need authenticator | |
365 enum EIDRM = 82; // Itendifier removed | |
366 enum ENOMSG = 83; // No message of desired type | |
367 enum EOVERFLOW = 84; // Value too large to be stored in data type | |
368 enum ECANCELED = 85; // Operation canceled | |
369 enum EILSEQ = 86; // Illegal byte sequence | |
370 enum ENOATTR = 87; // Attribute not found | |
371 enum EDOOFUS = 88; // Programming error | |
372 enum EBADMSG = 89; // Bad message | |
373 enum EMULTIHOP = 90; // Multihop attempted | |
374 enum ENOLINK = 91; // Link has been severed | |
375 enum EPROTO = 92; // Protocol error | |
376 enum ELAST = 92; // Must be equal largest errno | |
377 } |