File tree Expand file tree Collapse file tree 21 files changed +27
-103
lines changed
utils/bazel/llvm-project-overlay/libc Expand file tree Collapse file tree 21 files changed +27
-103
lines changed Original file line number Diff line number Diff line change @@ -59,6 +59,11 @@ def FenvAPI: PublicAPI<"fenv.h"> {
59
59
}
60
60
61
61
def StdIOAPI : PublicAPI<"stdio.h"> {
62
+ let Macros = [
63
+ SimpleMacroDef<"_IOFBF", "0">,
64
+ SimpleMacroDef<"_IOLBF", "1">,
65
+ SimpleMacroDef<"_IONBF", "2">,
66
+ ];
62
67
let Types = [
63
68
"FILE",
64
69
"off_t",
Original file line number Diff line number Diff line change @@ -76,6 +76,9 @@ def StdIOAPI : PublicAPI<"stdio.h"> {
76
76
SimpleMacroDef<"stderr", "stderr">,
77
77
SimpleMacroDef<"stdin", "stdin">,
78
78
SimpleMacroDef<"stdout", "stdout">,
79
+ SimpleMacroDef<"_IOFBF", "0">,
80
+ SimpleMacroDef<"_IOLBF", "1">,
81
+ SimpleMacroDef<"_IONBF", "2">,
79
82
];
80
83
let Types = [
81
84
"FILE",
Original file line number Diff line number Diff line change @@ -69,16 +69,6 @@ add_proxy_header_library(
69
69
libc.include.signal
70
70
)
71
71
72
- add_proxy_header_library (
73
- stdio_macros
74
- HDRS
75
- stdio_macros.h
76
- FULL_BUILD_DEPENDS
77
- libc.include.stdio
78
- libc.include.llvm-libc-macros.stdio_macros
79
- libc.include.llvm-libc-macros.file_seek_macros
80
- )
81
-
82
72
add_proxy_header_library (
83
73
sys_epoll_macros
84
74
HDRS
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -135,12 +135,3 @@ add_proxy_header_library(
135
135
libc.include.llvm-libc-types.struct_sigaction
136
136
libc.include.signal
137
137
)
138
-
139
- add_proxy_header_library (
140
- off_t
141
- HDRS
142
- off_t.h
143
- FULL_BUILD_DEPENDS
144
- libc.include.llvm-libc-types.off_t
145
- libc.include.stdio
146
- )
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 15
15
16
16
#define BUFSIZ 1024
17
17
18
- #define _IONBF 2
19
- #define _IOLBF 1
20
- #define _IOFBF 0
21
-
22
18
#endif // LLVM_LIBC_MACROS_STDIO_MACROS_H
Original file line number Diff line number Diff line change 1
1
header : stdio.h
2
2
macros :
3
+ - macro_name : _IONBF
4
+ macro_value : 2
5
+ - macro_name : _IOLBF
6
+ macro_value : 1
7
+ - macro_name : _IOFBF
8
+ macro_value : 0
3
9
- macro_name : stdout
4
10
macro_value : stdout
5
11
- macro_name : stdin
Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ add_object_library(
16
16
libc.src.__support.CPP.span
17
17
libc.src.__support.threads.mutex
18
18
libc.src.__support.error_or
19
- libc.hdr.types.off_t
20
- libc.hdr.stdio_macros
21
19
)
22
20
23
21
add_object_library (
Original file line number Diff line number Diff line change 8
8
9
9
#include " file.h"
10
10
11
- #include " hdr/stdio_macros.h"
12
- #include " hdr/types/off_t.h"
13
11
#include " src/__support/CPP/new.h"
14
12
#include " src/__support/CPP/span.h"
15
13
#include " src/errno/libc_errno.h" // For error macros
16
14
15
+ #include < stdio.h>
16
+ #include < stdlib.h>
17
+
17
18
namespace LIBC_NAMESPACE {
18
19
19
20
FileIOResult File::write_unlocked (const void *data, size_t len) {
Original file line number Diff line number Diff line change 9
9
#ifndef LLVM_LIBC_SRC___SUPPORT_FILE_FILE_H
10
10
#define LLVM_LIBC_SRC___SUPPORT_FILE_FILE_H
11
11
12
- #include " hdr/stdio_macros.h"
13
- #include " hdr/types/off_t.h"
12
+ #include " include/llvm-libc-types/off_t.h"
14
13
#include " src/__support/CPP/new.h"
15
14
#include " src/__support/error_or.h"
16
15
#include " src/__support/macros/properties/architectures.h"
Original file line number Diff line number Diff line change @@ -5,7 +5,6 @@ add_object_library(
5
5
file .cpp
6
6
HDRS
7
7
file .h
8
- lseekImpl.h
9
8
DEPENDS
10
9
libc.include.fcntl
11
10
libc.include.stdio
@@ -16,8 +15,6 @@ add_object_library(
16
15
libc.src.errno.errno
17
16
libc.src.__support.error_or
18
17
libc.src.__support.File.file
19
- libc.hdr.types.off_t
20
- libc.hdr.stdio_macros
21
18
)
22
19
23
20
add_object_library (
Original file line number Diff line number Diff line change 8
8
9
9
#include " file.h"
10
10
11
- #include " hdr/stdio_macros.h"
12
- #include " hdr/types/off_t.h"
13
11
#include " src/__support/CPP/new.h"
14
12
#include " src/__support/File/file.h"
15
13
#include " src/__support/File/linux/lseekImpl.h"
16
14
#include " src/__support/OSUtil/fcntl.h"
17
15
#include " src/__support/OSUtil/syscall.h" // For internal syscall function.
18
16
#include " src/errno/libc_errno.h" // For error macros
19
17
20
- #include < fcntl.h> // For mode_t and other flags to the open syscall
18
+ #include < fcntl.h> // For mode_t and other flags to the open syscall
19
+ #include < stdio.h>
21
20
#include < sys/stat.h> // For S_IS*, S_IF*, and S_IR* flags.
22
21
#include < sys/syscall.h> // For syscall numbers
23
22
Original file line number Diff line number Diff line change 6
6
//
7
7
// ===----------------------------------------------------------------------===//
8
8
9
- #include " hdr/types/off_t.h"
10
9
#include " src/__support/File/file.h"
11
10
12
11
namespace LIBC_NAMESPACE {
Original file line number Diff line number Diff line change 9
9
#ifndef LLVM_LIBC_SRC___SUPPORT_FILE_LINUX_LSEEKIMPL_H
10
10
#define LLVM_LIBC_SRC___SUPPORT_FILE_LINUX_LSEEKIMPL_H
11
11
12
- #include " hdr/types/off_t.h"
13
12
#include " src/__support/OSUtil/syscall.h" // For internal syscall function.
14
13
#include " src/__support/common.h"
15
14
#include " src/__support/error_or.h"
16
15
#include " src/errno/libc_errno.h"
17
16
18
17
#include < stdint.h> // For uint64_t.
19
18
#include < sys/syscall.h> // For syscall numbers.
19
+ #include < unistd.h> // For off_t.
20
20
21
21
namespace LIBC_NAMESPACE {
22
22
namespace internal {
Original file line number Diff line number Diff line change @@ -21,5 +21,4 @@ add_object_library(
21
21
libc.hdr.types.struct_flock
22
22
libc.hdr.types.struct_flock64
23
23
libc.hdr.types.struct_f_owner_ex
24
- libc.hdr.types.off_t
25
24
)
Original file line number Diff line number Diff line change 9
9
#include " src/__support/OSUtil/fcntl.h"
10
10
11
11
#include " hdr/fcntl_macros.h"
12
- #include " hdr/types/off_t.h"
13
12
#include " hdr/types/struct_f_owner_ex.h"
14
13
#include " hdr/types/struct_flock.h"
15
14
#include " hdr/types/struct_flock64.h"
Original file line number Diff line number Diff line change @@ -61,8 +61,7 @@ add_entrypoint_object(
61
61
HDRS
62
62
fopencookie.h
63
63
DEPENDS
64
- libc.hdr.stdio_macros
65
- libc.hdr.types.off_t
64
+ libc.include.stdio
66
65
libc.src.__support.CPP.new
67
66
libc.src.__support.File.file
68
67
)
@@ -75,7 +74,7 @@ add_entrypoint_object(
75
74
setbuf.h
76
75
DEPENDS
77
76
libc.src.errno.errno
78
- libc.hdr.types.off_t
77
+ libc.include.stdio
79
78
libc.src.__support.File.file
80
79
libc.src.__support.File.platform_file
81
80
)
Original file line number Diff line number Diff line change 7
7
// ===----------------------------------------------------------------------===//
8
8
9
9
#include " src/stdio/fopencookie.h"
10
- #include " hdr/stdio_macros.h"
11
- #include " hdr/types/off_t.h"
12
10
#include " src/__support/CPP/new.h"
13
11
#include " src/__support/File/file.h"
14
12
15
13
#include " src/errno/libc_errno.h"
14
+ #include < stdio.h>
15
+ #include < stdlib.h>
16
16
17
17
namespace LIBC_NAMESPACE {
18
18
Original file line number Diff line number Diff line change 7
7
// ===----------------------------------------------------------------------===//
8
8
9
9
#include " src/stdio/setbuf.h"
10
- #include " hdr/stdio_macros.h"
11
10
#include " src/__support/File/file.h"
11
+
12
12
#include " src/errno/libc_errno.h"
13
+ #include < stdio.h>
13
14
14
15
namespace LIBC_NAMESPACE {
15
16
Original file line number Diff line number Diff line change @@ -138,11 +138,6 @@ libc_support_library(
138
138
hdrs = ["hdr/float_macros.h" ],
139
139
)
140
140
141
- libc_support_library (
142
- name = "hdr_stdio_macros" ,
143
- hdrs = ["hdr/stdio_macros.h" ],
144
- )
145
-
146
141
############################ Type Proxy Header Files ###########################
147
142
148
143
libc_support_library (
@@ -185,11 +180,6 @@ libc_support_library(
185
180
hdrs = ["hdr/types/pid_t.h" ],
186
181
)
187
182
188
- libc_support_library (
189
- name = "types_off_t" ,
190
- hdrs = ["hdr/types/off_t.h" ],
191
- )
192
-
193
183
############################### Support libraries ##############################
194
184
195
185
libc_support_library (
@@ -677,8 +667,6 @@ libc_support_library(
677
667
":__support_error_or" ,
678
668
":__support_threads_mutex" ,
679
669
":errno" ,
680
- ":hdr_stdio_macros" ,
681
- ":types_off_t" ,
682
670
],
683
671
)
684
672
@@ -690,7 +678,6 @@ libc_support_library(
690
678
":__support_error_or" ,
691
679
":__support_osutil_syscall" ,
692
680
":errno" ,
693
- ":types_off_t" ,
694
681
],
695
682
)
696
683
You can’t perform that action at this time.
0 commit comments