173
|
1 //===-- C standard library header errno.h ---------------------------------===//
|
150
|
2 //
|
|
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
4 // See https://llvm.org/LICENSE.txt for license information.
|
|
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
6 //
|
|
7 //===----------------------------------------------------------------------===//
|
|
8
|
|
9 #ifndef LLVM_LIBC_ERRNO_H
|
|
10 #define LLVM_LIBC_ERRNO_H
|
|
11
|
|
12 #include <__llvm-libc-common.h>
|
|
13
|
252
|
14 #ifdef __linux__
|
|
15
|
|
16 #include <linux/errno.h>
|
|
17
|
|
18 #ifndef ERFKILL
|
|
19 #define ERFKILL 132
|
|
20 #endif // ERFKILL
|
|
21
|
|
22 #ifndef EOWNERDEAD
|
|
23 #define EOWNERDEAD 130
|
|
24 #endif // EOWNERDEAD
|
|
25
|
|
26 #ifndef EHWPOISON
|
|
27 #define EHWPOISON 133
|
|
28 #endif // EHWPOISON
|
150
|
29
|
252
|
30 #ifndef ECANCELED
|
|
31 #define ECANCELED 125
|
|
32 #endif // ECANCELED
|
|
33
|
|
34 #ifndef ENOTSUP
|
|
35 #define ENOTSUP EOPNOTSUPP
|
|
36 #endif // ENOTSUP
|
|
37
|
|
38 #ifndef ENOTRECOVERABLE
|
|
39 #define ENOTRECOVERABLE 131
|
|
40 #endif // ENOTRECOVERABLE
|
|
41
|
|
42 #else // __linux__
|
|
43 #include <llvm-libc-macros/generic-error-number-macros.h>
|
|
44 #endif
|
|
45
|
|
46 #if !defined(__AMDGPU__) && !defined(__NVPTX__)
|
|
47 extern _Thread_local int __llvmlibc_errno;
|
|
48 #define errno __llvmlibc_errno
|
|
49 #endif
|
150
|
50
|
|
51 #endif // LLVM_LIBC_ERRNO_H
|