bc664daeda0d4ffcbf4abd792a13c02c1fc32add
[reactos.git] / posix / include / errno.h
1 /*
2 * errno.h
3 *
4 * system error numbers. Based on the Single UNIX(r) Specification,
5 * Version 2
6 *
7 * This file is part of the ReactOS Operating System.
8 *
9 * Contributors:
10 * Created by KJK::Hyperion <noog@libero.it>
11 *
12 * THIS SOFTWARE IS NOT COPYRIGHTED
13 *
14 * This source code is offered for use in the public domain. You may
15 * use, modify or distribute it freely.
16 *
17 * This code is distributed in the hope that it will be useful but
18 * WITHOUT ANY WARRANTY. ALL WARRANTIES, EXPRESS OR IMPLIED ARE HEREBY
19 * DISCLAMED. This includes but is not limited to warranties of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
21 *
22 */
23 #ifndef __ERRNO_H_INCLUDED__
24 #define __ERRNO_H_INCLUDED__
25
26 /* INCLUDES */
27
28 /* OBJECTS */
29
30 /* TYPES */
31
32 /* CONSTANTS */
33 #define E2BIG ( 1) /* Argument list too long. */
34 #define EACCES ( 2) /* Permission denied. */
35 #define EADDRINUSE ( 3) /* Address in use. */
36 #define EADDRNOTAVAIL ( 4) /* Address not available. */
37 #define EAFNOSUPPORT ( 5) /* Address family not supported. */
38 #define EAGAIN ( 6) /* Resource unavailable, try again */
39 #define EALREADY ( 7) /* Connection already in progress. */
40 #define EBADF ( 8) /* Bad file descriptor. */
41 #define EBADMSG ( 9) /* Bad message. */
42 #define EBUSY (10) /* Device or resource busy. */
43 #define ECANCELED (11) /* Operation canceled. */
44 #define ECHILD (12) /* No child processes. */
45 #define ECONNABORTED (13) /* Connection aborted. */
46 #define ECONNREFUSED (14) /* Connection refused. */
47 #define ECONNRESET (15) /* Connection reset. */
48 #define EDEADLK (16) /* Resource deadlock would occur. */
49 #define EDESTADDRREQ (17) /* Destination address required. */
50 #define EDOM (18) /* Mathematics argument out of domain of function. */
51 #define EDQUOT (19) /* Reserved. */
52 #define EEXIST (20) /* File exists. */
53 #define EFAULT (21) /* Bad address. */
54 #define EFBIG (22) /* File too large. */
55 #define EHOSTUNREACH (23) /* Host is unreachable. */
56 #define EIDRM (24) /* Identifier removed. */
57 #define EILSEQ (25) /* Illegal byte sequence. */
58 #define EINPROGRESS (26) /* Operation in progress. */
59 #define EINTR (27) /* Interrupted function. */
60 #define EINVAL (28) /* Invalid argument. */
61 #define EIO (29) /* I/O error. */
62 #define EISCONN (30) /* Socket is connected. */
63 #define EISDIR (31) /* Is a directory. */
64 #define ELOOP (32) /* Too many levels of symbolic links. */
65 #define EMFILE (33) /* Too many open files. */
66 #define EMLINK (34) /* Too many links. */
67 #define EMSGSIZE (35) /* Message too large. */
68 #define EMULTIHOP (36) /* Reserved. */
69 #define ENAMETOOLONG (37) /* Filename too long. */
70 #define ENETDOWN (38) /* Network is down. */
71 #define ENETUNREACH (39) /* Network unreachable. */
72 #define ENFILE (40) /* Too many files open in system. */
73 #define ENOBUFS (41) /* No buffer space available. */
74 #define ENODATA (42) /* No message is available on the STREAM head read queue. */
75 #define ENODEV (43) /* No such device. */
76 #define ENOENT (44) /* No such file or directory. */
77 #define ENOEXEC (45) /* Executable file format error. */
78 #define ENOLCK (46) /* No locks available. */
79 #define ENOLINK (47) /* Reserved. */
80 #define ENOMEM (48) /* Not enough space. */
81 #define ENOMSG (49) /* No message of the desired type. */
82 #define ENOPROTOOPT (50) /* Protocol not available. */
83 #define ENOSPC (51) /* No space left on device. */
84 #define ENOSR (52) /* No STREAM resources. */
85 #define ENOSTR (53) /* Not a STREAM. */
86 #define ENOSYS (54) /* Function not supported. */
87 #define ENOTCONN (55) /* The socket is not connected. */
88 #define ENOTDIR (56) /* Not a directory. */
89 #define ENOTEMPTY (57) /* Directory not empty. */
90 #define ENOTSOCK (58) /* Not a socket. */
91 #define ENOTSUP (59) /* Not supported. */
92 #define ENOTTY (60) /* Inappropriate I/O control operation. */
93 #define ENXIO (61) /* No such device or address. */
94 #define EOPNOTSUPP (62) /* Operation not supported on socket. */
95 #define EOVERFLOW (63) /* Value too large to be stored in data type. */
96 #define EPERM (64) /* Operation not permitted. */
97 #define EPIPE (65) /* Broken pipe. */
98 #define EPROTO (66) /* Protocol error. */
99 #define EPROTONOSUPPORT (67) /* Protocol not supported. */
100 #define EPROTOTYPE (68) /* Socket type not supported. */
101 #define ERANGE (69) /* Result too large. */
102 #define EROFS (70) /* Read-only file system. */
103 #define ESPIPE (71) /* Invalid seek. */
104 #define ESRCH (72) /* No such process. */
105 #define ESTALE (73) /* Reserved. */
106 #define ETIME (74) /* Streamioctl()timeout. */
107 #define ETIMEDOUT (75) /* Connection timed out. */
108 #define ETXTBSY (76) /* Text file busy. */
109 #define EWOULDBLOCK (77) /* Operation would block */
110 #define EXDEV (78) /* Cross-device link. */
111
112 /* PROTOTYPES */
113 int * __PdxGetThreadErrNum(void); /* returns a pointer to the current thread's errno */
114
115 /* MACROS */
116 #define errno (*__PdxGetThreadErrNum())
117
118 #endif /* __ERRNO_H_INCLUDED__ */
119
120 /* EOF */
121