1 /***************************************************************************
2  * Copyright (c) 2024 Microsoft Corporation
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the MIT License which is available at
6  * https://opensource.org/licenses/MIT.
7  *
8  * SPDX-License-Identifier: MIT
9  **************************************************************************/
10 
11 /**************************************************************************/
12 /**************************************************************************/
13 /**                                                                       */
14 /**   ThreadX Component                                                   */
15 /**                                                                       */
16 /**   POSIX Compliancy Wrapper (POSIX)                                    */
17 /**                                                                       */
18 /**************************************************************************/
19 /**************************************************************************/
20 
21 /**************************************************************************/
22 /*                                                                        */
23 /*  EKP DEFINITIONS                                        RELEASE        */
24 /*                                                                        */
25 /*    errno.h                                             PORTABLE C      */
26 /*                                                           6.1.7        */
27 /*  AUTHOR                                                                */
28 /*                                                                        */
29 /*    William E. Lamie, Microsoft Corporation                             */
30 /*                                                                        */
31 /*  DESCRIPTION                                                           */
32 /*                                                                        */
33 /*    This file defines the constants, structures, etc.needed to          */
34 /*    implement the Evacuation Kit for POSIX Users (POSIX)                */
35 /*                                                                        */
36 /*                                                                        */
37 /*  RELEASE HISTORY                                                       */
38 /*                                                                        */
39 /*    DATE              NAME                      DESCRIPTION             */
40 /*                                                                        */
41 /*  06-02-2021     William E. Lamie         Initial Version 6.1.7         */
42 /*                                                                        */
43 /**************************************************************************/
44 
45 #ifndef _ERRNO_H
46 #define _ERRNO_H
47 
48 
49 
50 #ifndef TX_POSIX_SOURCE
51 #define errno posix_errno
52 #endif
53 
54 /* the POSIX standard does not impose particular values for errno.h        */
55 /* error codes between 200 and 1000 are not used by the Threadx wrapper    */
56 /* but supplied for completeness.                                          */
57 
58 
59 
60 
61 #define E2BIG           200
62 
63 #define EACCES          13
64 
65 #define EADDRINUSE      201
66 
67 #define EADDRNOTAVAIL   202
68 
69 #define EAFNOSUPPORT    203
70 
71 #define EAGAIN          11
72 
73 #define EALREADY        204
74 
75 #define EBADF           9
76 
77 #define EBADMSG         205
78 
79 #define EBUSY           9999
80 
81 #define ECANCELED       206
82 
83 #define ECHILD          207
84 
85 #define ECONNABORTED    208
86 
87 #define ECONNREFUSED    209
88 
89 #define ECONNRESET      210
90 
91 #define EDEADLK         3333
92 
93 #define EDESTADDRREQ    211
94 
95 #define EDOM            212
96 
97 #define EDQUOT          213
98 
99 #define EEXIST          17
100 
101 #define EFAULT          214
102 
103 #define EFBIG           215
104 
105 #define EHOSTUNREACH    216
106 
107 #define EIDRM           217
108 
109 #define EILSEQ          218
110 
111 #define EINPROGRESS     219
112 
113 #define EINTR           4
114 
115 #define EINVAL          22
116 
117 #define EIO             220
118 
119 #define EISCONN         221
120 
121 #define EISDIR          222
122 
123 #define ELOOP           223
124 
125 #define EMFILE          224
126 
127 #define EMLINK          225
128 
129 #define EMSGSIZE        36
130 
131 #define EMULTIHOP       226
132 
133 #define ENAMETOOLONG    26
134 
135 #define ENETDOWN        227
136 
137 #define ENETRESET       228
138 
139 #define ENETUNREACH     229
140 
141 #define ENFILE          230
142 
143 #define ENOBUFS         231
144 
145 #define ENODATA         232
146 
147 #define ENODEV          233
148 
149 #define ENOENT          2
150 
151 #define ENOEXEC         234
152 
153 #define ENOLCK          235
154 
155 #define ENOLINK         236
156 
157 #define ENOMEM          4444
158 
159 #define ENOMSG          237
160 
161 #define ENOPROTOOPT     238
162 
163 #define ENOSPC          28
164 
165 #define ENOSR           239
166 
167 #define ENOSTR          240
168 
169 #define ENOSYS          71
170 
171 #define ENOTCONN        241
172 
173 #define ENOTDIR         242
174 
175 #define ENOTEMPTY       243
176 
177 #define ENOTSOCK        244
178 
179 #define ENOTSUP         126
180 
181 #define ENOTTY          245
182 
183 #define ENXIO           246
184 
185 #define EOPNOTSUPP      247
186 
187 #define EOVERFLOW       248
188 
189 #define EPERM           2222
190 
191 #define EPIPE           249
192 
193 #define EPROTO          250
194 
195 #define EPROTONOSUPPORT 251
196 
197 #define EPROTOTYPE      252
198 
199 #define ERANGE          253
200 
201 #define EROFS           254
202 
203 #define ESPIPE          255
204 
205 #define ESRCH           3
206 
207 #define ESTALE          256
208 
209 #define ETIME           257
210 
211 #define ETIMEDOUT       5555
212 
213 #define ETXTBSY         258
214 
215 #define EWOULDBLOCK     259
216 
217 #define EXDEV           260
218 
219 #endif
220