[libc-commits] [libc] e8aaa3e - Revert "[libc] Added transitive bindings for OffsetType (#87397)"
Gulfem Savrun Yeniceri via libc-commits
libc-commits at lists.llvm.org
Wed Apr 3 21:14:44 PDT 2024
Author: Gulfem Savrun Yeniceri
Date: 2024-04-04T04:12:36Z
New Revision: e8aaa3eaedc3b5519747a68e772f0bc664b89154
URL: https://github.com/llvm/llvm-project/commit/e8aaa3eaedc3b5519747a68e772f0bc664b89154
DIFF: https://github.com/llvm/llvm-project/commit/e8aaa3eaedc3b5519747a68e772f0bc664b89154.diff
LOG: Revert "[libc] Added transitive bindings for OffsetType (#87397)"
This reverts commit 3ee93f486293420852fb9ec95af9c5f54cecdb08
because it broke Fuchsia Clang toolchain builders:
https://logs.chromium.org/logs/fuchsia/buildbucket/cr-buildbucket/8751633430491432833/+/u/clang/build/stdout
Added:
Modified:
libc/config/baremetal/api.td
libc/config/gpu/api.td
libc/config/linux/api.td
libc/include/CMakeLists.txt
libc/spec/posix.td
libc/src/stdio/fseeko.h
libc/src/stdio/ftello.h
Removed:
################################################################################
diff --git a/libc/config/baremetal/api.td b/libc/config/baremetal/api.td
index 690edbda1311fe..25aa06aacb642e 100644
--- a/libc/config/baremetal/api.td
+++ b/libc/config/baremetal/api.td
@@ -57,10 +57,7 @@ def MathAPI : PublicAPI<"math.h"> {
}
def StdIOAPI : PublicAPI<"stdio.h"> {
- let Types = [
- "size_t",
- "off_t",
- ];
+ let Types = ["size_t"];
}
def StdlibAPI : PublicAPI<"stdlib.h"> {
diff --git a/libc/config/gpu/api.td b/libc/config/gpu/api.td
index 523ad49ffa3fd4..adaf5bfd747ac7 100644
--- a/libc/config/gpu/api.td
+++ b/libc/config/gpu/api.td
@@ -64,11 +64,7 @@ def StdIOAPI : PublicAPI<"stdio.h"> {
SimpleMacroDef<"_IOLBF", "1">,
SimpleMacroDef<"_IONBF", "2">,
];
- let Types = [
- "FILE",
- "off_t",
- "size_t",
- ];
+ let Types = ["size_t", "FILE"];
}
def IntTypesAPI : PublicAPI<"inttypes.h"> {
diff --git a/libc/config/linux/api.td b/libc/config/linux/api.td
index 9964971f191b75..eb5ed8089850e4 100644
--- a/libc/config/linux/api.td
+++ b/libc/config/linux/api.td
@@ -49,10 +49,7 @@ def CTypeAPI : PublicAPI<"ctype.h"> {
}
def FCntlAPI : PublicAPI<"fcntl.h"> {
- let Types = [
- "mode_t",
- "off_t",
- ];
+ let Types = ["mode_t"];
}
def IntTypesAPI : PublicAPI<"inttypes.h"> {
@@ -80,12 +77,7 @@ def StdIOAPI : PublicAPI<"stdio.h"> {
SimpleMacroDef<"_IOLBF", "1">,
SimpleMacroDef<"_IONBF", "2">,
];
- let Types = [
- "FILE",
- "cookie_io_functions_t",
- "off_t",
- "size_t",
- ];
+ let Types = ["size_t", "FILE", "cookie_io_functions_t"];
}
def StdlibAPI : PublicAPI<"stdlib.h"> {
diff --git a/libc/include/CMakeLists.txt b/libc/include/CMakeLists.txt
index 02c7dc8fbc0b33..4203f0bc901b22 100644
--- a/libc/include/CMakeLists.txt
+++ b/libc/include/CMakeLists.txt
@@ -41,10 +41,9 @@ add_gen_header(
DEF_FILE fcntl.h.def
GEN_HDR fcntl.h
DEPENDS
+ .llvm_libc_common_h
.llvm-libc-macros.fcntl_macros
.llvm-libc-types.mode_t
- .llvm-libc-types.off_t
- .llvm_libc_common_h
)
add_gen_header(
@@ -265,14 +264,13 @@ add_gen_header(
DEF_FILE stdio.h.def
GEN_HDR stdio.h
DEPENDS
+ .llvm_libc_common_h
.llvm-libc-macros.file_seek_macros
.llvm-libc-macros.stdio_macros
- .llvm-libc-types.FILE
- .llvm-libc-types.cookie_io_functions_t
- .llvm-libc-types.off_t
.llvm-libc-types.size_t
.llvm-libc-types.ssize_t
- .llvm_libc_common_h
+ .llvm-libc-types.FILE
+ .llvm-libc-types.cookie_io_functions_t
)
add_gen_header(
diff --git a/libc/spec/posix.td b/libc/spec/posix.td
index 45f7ecfe84e98e..cfa8d3afedde3f 100644
--- a/libc/spec/posix.td
+++ b/libc/spec/posix.td
@@ -210,10 +210,7 @@ def POSIX : StandardSpec<"POSIX"> {
HeaderSpec FCntl = HeaderSpec<
"fcntl.h",
[], // Macros
- [
- ModeTType,
- OffTType,
- ],
+ [ModeTType],
[], // Enumerations
[
FunctionSpec<
@@ -1183,7 +1180,7 @@ def POSIX : StandardSpec<"POSIX"> {
HeaderSpec StdIO = HeaderSpec<
"stdio.h",
[], // Macros
- [OffTType], // Types
+ [], // Types
[], // Enumerations
[
FunctionSpec<
diff --git a/libc/src/stdio/fseeko.h b/libc/src/stdio/fseeko.h
index 77fb41215c318f..3202ed2f97d0ef 100644
--- a/libc/src/stdio/fseeko.h
+++ b/libc/src/stdio/fseeko.h
@@ -10,6 +10,7 @@
#define LLVM_LIBC_SRC_STDIO_FSEEKO_H
#include <stdio.h>
+#include <unistd.h>
namespace LIBC_NAMESPACE {
diff --git a/libc/src/stdio/ftello.h b/libc/src/stdio/ftello.h
index 5ab17f9244a5ad..0fdf13ab6bdbcd 100644
--- a/libc/src/stdio/ftello.h
+++ b/libc/src/stdio/ftello.h
@@ -10,6 +10,7 @@
#define LLVM_LIBC_SRC_STDIO_FTELLO_H
#include <stdio.h>
+#include <unistd.h>
namespace LIBC_NAMESPACE {
More information about the libc-commits
mailing list