File tree Expand file tree Collapse file tree 11 files changed +118
-24
lines changed Expand file tree Collapse file tree 11 files changed +118
-24
lines changed Original file line number Diff line number Diff line change 15
15
16
16
#include <linux/errno.h>
17
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
29
-
30
- #ifndef ECANCELED
31
- #define ECANCELED 125
32
- #endif // ECANCELED
33
-
34
18
#ifndef ENOTSUP
35
19
#define ENOTSUP EOPNOTSUPP
36
20
#endif // ENOTSUP
37
21
38
- #ifndef ENOTRECOVERABLE
39
- #define ENOTRECOVERABLE 131
40
- #endif // ENOTRECOVERABLE
22
+ #include "llvm-libc-macros/linux/error-number-macros.h"
41
23
42
24
#else // __linux__
43
25
#include "llvm-libc-macros/generic-error-number-macros.h"
Original file line number Diff line number Diff line change @@ -37,6 +37,12 @@ add_macro_header(
37
37
assert-macros.h
38
38
)
39
39
40
+ add_macro_header (
41
+ error_number_macros
42
+ HDR
43
+ error-number-macros.h
44
+ )
45
+
40
46
add_macro_header (
41
47
generic_error_number_macros
42
48
HDR
Original file line number Diff line number Diff line change
1
+ #ifndef LLVM_LIBC_MACROS_ERROR_NUMBER_MACROS_H
2
+ #define LLVM_LIBC_MACROS_ERROR_NUMBER_MACROS_H
3
+
4
+ #ifdef __linux__
5
+ #include "linux/error-number-macros.h"
6
+ #endif
7
+
8
+ #endif // LLVM_LIBC_MACROS_ERROR_NUMBER_MACROS_H
Original file line number Diff line number Diff line change
1
+ add_header (
2
+ error_number_macros
3
+ HDR
4
+ error-number-macros.h
5
+ DEPENDS
6
+ .mips.error_number_macros
7
+ .sparc.error_number_macros
8
+ )
9
+
1
10
add_header (
2
11
fcntl_macros
3
12
HDR
Original file line number Diff line number Diff line change
1
+ #ifndef LLVM_LIBC_MACROS_LINUX_ERROR_NUMBER_MACROS_H
2
+ #define LLVM_LIBC_MACROS_LINUX_ERROR_NUMBER_MACROS_H
3
+
4
+ #if defined(__mips__ )
5
+ #include "mips/error-number-macros.h"
6
+
7
+ #elif defined(__sparc__ )
8
+ #include "sparc/error-number-macros.h"
9
+
10
+ #else
11
+ #ifndef ECANCELED
12
+ #define ECANCELED 125
13
+ #endif // ECANCELED
14
+
15
+ #ifndef EOWNERDEAD
16
+ #define EOWNERDEAD 130
17
+ #endif // EOWNERDEAD
18
+
19
+ #ifndef ENOTRECOVERABLE
20
+ #define ENOTRECOVERABLE 131
21
+ #endif // ENOTRECOVERABLE
22
+
23
+ #ifndef ERFKILL
24
+ #define ERFKILL 132
25
+ #endif // ERFKILL
26
+
27
+ #ifndef EHWPOISON
28
+ #define EHWPOISON 133
29
+ #endif // EHWPOISON
30
+ #endif
31
+
32
+ #endif // LLVM_LIBC_MACROS_LINUX_ERROR_NUMBER_MACROS_H
Original file line number Diff line number Diff line change
1
+ add_header (
2
+ error_number_macros
3
+ HDR
4
+ error-number-macros.h
5
+ )
Original file line number Diff line number Diff line change
1
+ #ifndef LLVM_LIBC_MACROS_LINUX_MIPS_ERROR_NUMBER_MACROS_H
2
+ #define LLVM_LIBC_MACROS_LINUX_MIPS_ERROR_NUMBER_MACROS_H
3
+
4
+ #ifndef ECANCELED
5
+ #define ECANCELED 158
6
+ #endif // ECANCELED
7
+
8
+ #ifndef EOWNERDEAD
9
+ #define EOWNERDEAD 165
10
+ #endif // EOWNERDEAD
11
+
12
+ #ifndef ENOTRECOVERABLE
13
+ #define ENOTRECOVERABLE 166
14
+ #endif // ENOTRECOVERABLE
15
+
16
+ #ifndef ERFKILL
17
+ #define ERFKILL 167
18
+ #endif // ERFKILL
19
+
20
+ #ifndef EHWPOISON
21
+ #define EHWPOISON 168
22
+ #endif // EHWPOISON
23
+
24
+ #endif // LLVM_LIBC_MACROS_LINUX_MIPS_ERROR_NUMBER_MACROS_H
Original file line number Diff line number Diff line change
1
+ add_header (
2
+ error_number_macros
3
+ HDR
4
+ error-number-macros.h
5
+ )
Original file line number Diff line number Diff line change
1
+ #ifndef LLVM_LIBC_MACROS_LINUX_SPARC_ERROR_NUMBER_MACROS_H
2
+ #define LLVM_LIBC_MACROS_LINUX_SPARC_ERROR_NUMBER_MACROS_H
3
+
4
+ #ifndef ECANCELED
5
+ #define ECANCELED 127
6
+ #endif // ECANCELED
7
+
8
+ #ifndef EOWNERDEAD
9
+ #define EOWNERDEAD 132
10
+ #endif // EOWNERDEAD
11
+
12
+ #ifndef ENOTRECOVERABLE
13
+ #define ENOTRECOVERABLE 133
14
+ #endif // ENOTRECOVERABLE
15
+
16
+ #ifndef ERFKILL
17
+ #define ERFKILL 134
18
+ #endif // ERFKILL
19
+
20
+ #ifndef EHWPOISON
21
+ #define EHWPOISON 135
22
+ #endif // EHWPOISON
23
+
24
+ #endif // LLVM_LIBC_MACROS_LINUX_SPARC_ERROR_NUMBER_MACROS_H
Original file line number Diff line number Diff line change @@ -19,5 +19,7 @@ add_entrypoint_object(
19
19
${full_build_flag}
20
20
DEPENDS
21
21
libc.include.errno
22
+ libc.include.llvm-libc-macros.error_number_macros
23
+ libc.include.llvm-libc-macros.generic_error_number_macros
22
24
libc.src.__support.common
23
25
)
Original file line number Diff line number Diff line change 12
12
#include " src/__support/macros/attributes.h"
13
13
#include " src/__support/macros/properties/architectures.h"
14
14
15
- // TODO: https://github.com/llvm/llvm-project/issues/80172
16
- // Separate just the definition of errno numbers in
17
- // include/llvm-libc-macros/* and only include that instead of the system
18
- // <errno.h>.
19
- #include < errno.h>
15
+ #include < include/llvm-libc-macros/error-number-macros.h>
16
+ #include < include/llvm-libc-macros/generic-error-number-macros.h>
20
17
21
18
// This header is to be consumed by internal implementations, in which all of
22
19
// them should refer to `libc_errno` instead of using `errno` directly from
You can’t perform that action at this time.
0 commit comments