[rtsan] Remove mkfifoat interceptor (#116997)
[llvm-project.git] / libcxx / include / __cxx03 / errno.h
blob0ebd03c0b6a6250379ab7c0970e9227f7a518178
1 // -*- C++ -*-
2 //===----------------------------------------------------------------------===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
10 #ifndef _LIBCPP_ERRNO_H
11 #define _LIBCPP_ERRNO_H
14 errno.h synopsis
16 Macros:
18 EDOM
19 EILSEQ // C99
20 ERANGE
21 errno
25 #include <__cxx03/__config>
27 #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
28 # pragma GCC system_header
29 #endif
31 #if __has_include_next(<errno.h>)
32 # include_next <errno.h>
33 #endif
35 #ifdef __cplusplus
37 # if !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
39 # ifdef ELAST
41 static const int __elast1 = ELAST + 1;
42 static const int __elast2 = ELAST + 2;
44 # else
46 static const int __elast1 = 104;
47 static const int __elast2 = 105;
49 # endif
51 # ifdef ENOTRECOVERABLE
53 # define EOWNERDEAD __elast1
55 # ifdef ELAST
56 # undef ELAST
57 # define ELAST EOWNERDEAD
58 # endif
60 # elif defined(EOWNERDEAD)
62 # define ENOTRECOVERABLE __elast1
63 # ifdef ELAST
64 # undef ELAST
65 # define ELAST ENOTRECOVERABLE
66 # endif
68 # else // defined(EOWNERDEAD)
70 # define EOWNERDEAD __elast1
71 # define ENOTRECOVERABLE __elast2
72 # ifdef ELAST
73 # undef ELAST
74 # define ELAST ENOTRECOVERABLE
75 # endif
77 # endif // defined(EOWNERDEAD)
79 # endif // !defined(EOWNERDEAD) || !defined(ENOTRECOVERABLE)
81 // supply errno values likely to be missing, particularly on Windows
83 # ifndef EAFNOSUPPORT
84 # define EAFNOSUPPORT 9901
85 # endif
87 # ifndef EADDRINUSE
88 # define EADDRINUSE 9902
89 # endif
91 # ifndef EADDRNOTAVAIL
92 # define EADDRNOTAVAIL 9903
93 # endif
95 # ifndef EISCONN
96 # define EISCONN 9904
97 # endif
99 # ifndef EBADMSG
100 # define EBADMSG 9905
101 # endif
103 # ifndef ECONNABORTED
104 # define ECONNABORTED 9906
105 # endif
107 # ifndef EALREADY
108 # define EALREADY 9907
109 # endif
111 # ifndef ECONNREFUSED
112 # define ECONNREFUSED 9908
113 # endif
115 # ifndef ECONNRESET
116 # define ECONNRESET 9909
117 # endif
119 # ifndef EDESTADDRREQ
120 # define EDESTADDRREQ 9910
121 # endif
123 # ifndef EHOSTUNREACH
124 # define EHOSTUNREACH 9911
125 # endif
127 # ifndef EIDRM
128 # define EIDRM 9912
129 # endif
131 # ifndef EMSGSIZE
132 # define EMSGSIZE 9913
133 # endif
135 # ifndef ENETDOWN
136 # define ENETDOWN 9914
137 # endif
139 # ifndef ENETRESET
140 # define ENETRESET 9915
141 # endif
143 # ifndef ENETUNREACH
144 # define ENETUNREACH 9916
145 # endif
147 # ifndef ENOBUFS
148 # define ENOBUFS 9917
149 # endif
151 # ifndef ENOLINK
152 # define ENOLINK 9918
153 # endif
155 # ifndef ENODATA
156 # define ENODATA 9919
157 # endif
159 # ifndef ENOMSG
160 # define ENOMSG 9920
161 # endif
163 # ifndef ENOPROTOOPT
164 # define ENOPROTOOPT 9921
165 # endif
167 # ifndef ENOSR
168 # define ENOSR 9922
169 # endif
171 # ifndef ENOTSOCK
172 # define ENOTSOCK 9923
173 # endif
175 # ifndef ENOSTR
176 # define ENOSTR 9924
177 # endif
179 # ifndef ENOTCONN
180 # define ENOTCONN 9925
181 # endif
183 # ifndef ENOTSUP
184 # define ENOTSUP 9926
185 # endif
187 # ifndef ECANCELED
188 # define ECANCELED 9927
189 # endif
191 # ifndef EINPROGRESS
192 # define EINPROGRESS 9928
193 # endif
195 # ifndef EOPNOTSUPP
196 # define EOPNOTSUPP 9929
197 # endif
199 # ifndef EWOULDBLOCK
200 # define EWOULDBLOCK 9930
201 # endif
203 # ifndef EOWNERDEAD
204 # define EOWNERDEAD 9931
205 # endif
207 # ifndef EPROTO
208 # define EPROTO 9932
209 # endif
211 # ifndef EPROTONOSUPPORT
212 # define EPROTONOSUPPORT 9933
213 # endif
215 # ifndef ENOTRECOVERABLE
216 # define ENOTRECOVERABLE 9934
217 # endif
219 # ifndef ETIME
220 # define ETIME 9935
221 # endif
223 # ifndef ETXTBSY
224 # define ETXTBSY 9936
225 # endif
227 # ifndef ETIMEDOUT
228 # define ETIMEDOUT 9938
229 # endif
231 # ifndef ELOOP
232 # define ELOOP 9939
233 # endif
235 # ifndef EOVERFLOW
236 # define EOVERFLOW 9940
237 # endif
239 # ifndef EPROTOTYPE
240 # define EPROTOTYPE 9941
241 # endif
243 # ifndef ENOSYS
244 # define ENOSYS 9942
245 # endif
247 # ifndef EINVAL
248 # define EINVAL 9943
249 # endif
251 # ifndef ERANGE
252 # define ERANGE 9944
253 # endif
255 # ifndef EILSEQ
256 # define EILSEQ 9945
257 # endif
259 // Windows Mobile doesn't appear to define these:
261 # ifndef E2BIG
262 # define E2BIG 9946
263 # endif
265 # ifndef EDOM
266 # define EDOM 9947
267 # endif
269 # ifndef EFAULT
270 # define EFAULT 9948
271 # endif
273 # ifndef EBADF
274 # define EBADF 9949
275 # endif
277 # ifndef EPIPE
278 # define EPIPE 9950
279 # endif
281 # ifndef EXDEV
282 # define EXDEV 9951
283 # endif
285 # ifndef EBUSY
286 # define EBUSY 9952
287 # endif
289 # ifndef ENOTEMPTY
290 # define ENOTEMPTY 9953
291 # endif
293 # ifndef ENOEXEC
294 # define ENOEXEC 9954
295 # endif
297 # ifndef EEXIST
298 # define EEXIST 9955
299 # endif
301 # ifndef EFBIG
302 # define EFBIG 9956
303 # endif
305 # ifndef ENAMETOOLONG
306 # define ENAMETOOLONG 9957
307 # endif
309 # ifndef ENOTTY
310 # define ENOTTY 9958
311 # endif
313 # ifndef EINTR
314 # define EINTR 9959
315 # endif
317 # ifndef ESPIPE
318 # define ESPIPE 9960
319 # endif
321 # ifndef EIO
322 # define EIO 9961
323 # endif
325 # ifndef EISDIR
326 # define EISDIR 9962
327 # endif
329 # ifndef ECHILD
330 # define ECHILD 9963
331 # endif
333 # ifndef ENOLCK
334 # define ENOLCK 9964
335 # endif
337 # ifndef ENOSPC
338 # define ENOSPC 9965
339 # endif
341 # ifndef ENXIO
342 # define ENXIO 9966
343 # endif
345 # ifndef ENODEV
346 # define ENODEV 9967
347 # endif
349 # ifndef ENOENT
350 # define ENOENT 9968
351 # endif
353 # ifndef ESRCH
354 # define ESRCH 9969
355 # endif
357 # ifndef ENOTDIR
358 # define ENOTDIR 9970
359 # endif
361 # ifndef ENOMEM
362 # define ENOMEM 9971
363 # endif
365 # ifndef EPERM
366 # define EPERM 9972
367 # endif
369 # ifndef EACCES
370 # define EACCES 9973
371 # endif
373 # ifndef EROFS
374 # define EROFS 9974
375 # endif
377 # ifndef EDEADLK
378 # define EDEADLK 9975
379 # endif
381 # ifndef EAGAIN
382 # define EAGAIN 9976
383 # endif
385 # ifndef ENFILE
386 # define ENFILE 9977
387 # endif
389 # ifndef EMFILE
390 # define EMFILE 9978
391 # endif
393 # ifndef EMLINK
394 # define EMLINK 9979
395 # endif
397 #endif // __cplusplus
399 #endif // _LIBCPP_ERRNO_H