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