Skip to content

Commit e8aaa3e

Browse files
committed
Revert "[libc] Added transitive bindings for OffsetType (#87397)"
This reverts commit 3ee93f4 because it broke Fuchsia Clang toolchain builders: https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8751633430491432833/+/u/clang/build/stdout
1 parent 698bf3d commit e8aaa3e

File tree

7 files changed

+12
-30
lines changed

7 files changed

+12
-30
lines changed

libc/config/baremetal/api.td

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,7 @@ def MathAPI : PublicAPI<"math.h"> {
5757
}
5858

5959
def StdIOAPI : PublicAPI<"stdio.h"> {
60-
let Types = [
61-
"size_t",
62-
"off_t",
63-
];
60+
let Types = ["size_t"];
6461
}
6562

6663
def StdlibAPI : PublicAPI<"stdlib.h"> {

libc/config/gpu/api.td

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,11 +64,7 @@ def StdIOAPI : PublicAPI<"stdio.h"> {
6464
SimpleMacroDef<"_IOLBF", "1">,
6565
SimpleMacroDef<"_IONBF", "2">,
6666
];
67-
let Types = [
68-
"FILE",
69-
"off_t",
70-
"size_t",
71-
];
67+
let Types = ["size_t", "FILE"];
7268
}
7369

7470
def IntTypesAPI : PublicAPI<"inttypes.h"> {

libc/config/linux/api.td

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,7 @@ def CTypeAPI : PublicAPI<"ctype.h"> {
4949
}
5050

5151
def FCntlAPI : PublicAPI<"fcntl.h"> {
52-
let Types = [
53-
"mode_t",
54-
"off_t",
55-
];
52+
let Types = ["mode_t"];
5653
}
5754

5855
def IntTypesAPI : PublicAPI<"inttypes.h"> {
@@ -80,12 +77,7 @@ def StdIOAPI : PublicAPI<"stdio.h"> {
8077
SimpleMacroDef<"_IOLBF", "1">,
8178
SimpleMacroDef<"_IONBF", "2">,
8279
];
83-
let Types = [
84-
"FILE",
85-
"cookie_io_functions_t",
86-
"off_t",
87-
"size_t",
88-
];
80+
let Types = ["size_t", "FILE", "cookie_io_functions_t"];
8981
}
9082

9183
def StdlibAPI : PublicAPI<"stdlib.h"> {

libc/include/CMakeLists.txt

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,9 @@ add_gen_header(
4141
DEF_FILE fcntl.h.def
4242
GEN_HDR fcntl.h
4343
DEPENDS
44+
.llvm_libc_common_h
4445
.llvm-libc-macros.fcntl_macros
4546
.llvm-libc-types.mode_t
46-
.llvm-libc-types.off_t
47-
.llvm_libc_common_h
4847
)
4948

5049
add_gen_header(
@@ -265,14 +264,13 @@ add_gen_header(
265264
DEF_FILE stdio.h.def
266265
GEN_HDR stdio.h
267266
DEPENDS
267+
.llvm_libc_common_h
268268
.llvm-libc-macros.file_seek_macros
269269
.llvm-libc-macros.stdio_macros
270-
.llvm-libc-types.FILE
271-
.llvm-libc-types.cookie_io_functions_t
272-
.llvm-libc-types.off_t
273270
.llvm-libc-types.size_t
274271
.llvm-libc-types.ssize_t
275-
.llvm_libc_common_h
272+
.llvm-libc-types.FILE
273+
.llvm-libc-types.cookie_io_functions_t
276274
)
277275

278276
add_gen_header(

libc/spec/posix.td

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -210,10 +210,7 @@ def POSIX : StandardSpec<"POSIX"> {
210210
HeaderSpec FCntl = HeaderSpec<
211211
"fcntl.h",
212212
[], // Macros
213-
[
214-
ModeTType,
215-
OffTType,
216-
],
213+
[ModeTType],
217214
[], // Enumerations
218215
[
219216
FunctionSpec<
@@ -1183,7 +1180,7 @@ def POSIX : StandardSpec<"POSIX"> {
11831180
HeaderSpec StdIO = HeaderSpec<
11841181
"stdio.h",
11851182
[], // Macros
1186-
[OffTType], // Types
1183+
[], // Types
11871184
[], // Enumerations
11881185
[
11891186
FunctionSpec<

libc/src/stdio/fseeko.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define LLVM_LIBC_SRC_STDIO_FSEEKO_H
1111

1212
#include <stdio.h>
13+
#include <unistd.h>
1314

1415
namespace LIBC_NAMESPACE {
1516

libc/src/stdio/ftello.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
#define LLVM_LIBC_SRC_STDIO_FTELLO_H
1111

1212
#include <stdio.h>
13+
#include <unistd.h>
1314

1415
namespace LIBC_NAMESPACE {
1516

0 commit comments

Comments
 (0)