3 * @copy 2012 MinGW.org project
5 * Permission is hereby granted, free of charge, to any person obtaining a
6 * copy of this software and associated documentation files (the "Software"),
7 * to deal in the Software without restriction, including without limitation
8 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9 * and/or sell copies of the Software, and to permit persons to whom the
10 * Software is furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice (including the next
13 * paragraph) shall be included in all copies or substantial portions of the
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
26 #pragma GCC system_header
29 * Error numbers and access to error reporting.
32 /* All the headers include this file. */
37 * TODO: Can't be sure of some of these assignments, I guessed from the
38 * names given by strerror and the defines in the Cygnus errno.h. A lot
39 * of the names from the Cygnus errno.h are not represented, and a few
40 * of the descriptions returned by strerror do not obviously match
43 #define EPERM 1 /* Operation not permitted */
44 #define ENOFILE 2 /* No such file or directory */
46 #define ESRCH 3 /* No such process */
47 #define EINTR 4 /* Interrupted function call */
48 #define EIO 5 /* Input/output error */
49 #define ENXIO 6 /* No such device or address */
50 #define E2BIG 7 /* Arg list too long */
51 #define ENOEXEC 8 /* Exec format error */
52 #define EBADF 9 /* Bad file descriptor */
53 #define ECHILD 10 /* No child processes */
54 #define EAGAIN 11 /* Resource temporarily unavailable */
55 #define ENOMEM 12 /* Not enough space */
56 #define EACCES 13 /* Permission denied */
57 #define EFAULT 14 /* Bad address */
58 /* 15 - Unknown Error */
59 #define EBUSY 16 /* strerror reports "Resource device" */
60 #define EEXIST 17 /* File exists */
61 #define EXDEV 18 /* Improper link (cross-device link?) */
62 #define ENODEV 19 /* No such device */
63 #define ENOTDIR 20 /* Not a directory */
64 #define EISDIR 21 /* Is a directory */
65 #define EINVAL 22 /* Invalid argument */
66 #define ENFILE 23 /* Too many open files in system */
67 #define EMFILE 24 /* Too many open files */
68 #define ENOTTY 25 /* Inappropriate I/O control operation */
69 /* 26 - Unknown Error */
70 #define EFBIG 27 /* File too large */
71 #define ENOSPC 28 /* No space left on device */
72 #define ESPIPE 29 /* Invalid seek (seek on a pipe?) */
73 #define EROFS 30 /* Read-only file system */
74 #define EMLINK 31 /* Too many links */
75 #define EPIPE 32 /* Broken pipe */
76 #define EDOM 33 /* Domain error (math functions) */
77 #define ERANGE 34 /* Result too large (possibly too small) */
78 /* 35 - Unknown Error */
79 #define EDEADLOCK 36 /* Resource deadlock avoided (non-Cyg) */
81 /* 37 - Unknown Error */
82 #define ENAMETOOLONG 38 /* Filename too long (91 in Cyg?) */
83 #define ENOLCK 39 /* No locks available (46 in Cyg?) */
84 #define ENOSYS 40 /* Function not implemented (88 in Cyg?) */
85 #define ENOTEMPTY 41 /* Directory not empty (90 in Cyg?) */
86 #define EILSEQ 42 /* Illegal byte sequence */
89 * NOTE: ENAMETOOLONG and ENOTEMPTY conflict with definitions in the
90 * sockets.h header provided with windows32api-0.1.2.
91 * You should go and put an #if 0 ... #endif around the whole block
92 * of errors (look at the comment above them).
102 * Definitions of errno. For _doserrno, sys_nerr and * sys_errlist, see
109 _CRTIMP int* __cdecl __MINGW_NOTHROW _errno(void);
110 #define errno (*_errno())
117 #endif /* Not RC_INVOKED */
119 #endif /* Not _ERRNO_H_ */