aboutsummaryrefslogtreecommitdiff
path: root/libc/src
diff options
context:
space:
mode:
authorlntue <lntue@google.com>2025-07-24 00:19:52 +0000
committerGitHub <noreply@github.com>2025-07-23 20:19:52 -0400
commit66603dd1f10e0f6c0510273378334971159f6b69 (patch)
tree091fc43db7f538b10296dd735ac98e877528594c /libc/src
parentc21e2a5e24c7bc55767055e25bb2fb40cbec68c3 (diff)
downloadllvm-66603dd1f10e0f6c0510273378334971159f6b69.zip
llvm-66603dd1f10e0f6c0510273378334971159f6b69.tar.gz
llvm-66603dd1f10e0f6c0510273378334971159f6b69.tar.bz2
[libc][NFC] Add stdint.h proxy header to fix dependency issue with <stdint.h> includes. (#150303)
https://github.com/llvm/llvm-project/issues/149993
Diffstat (limited to 'libc/src')
-rw-r--r--libc/src/__support/CMakeLists.txt12
-rw-r--r--libc/src/__support/CPP/CMakeLists.txt3
-rw-r--r--libc/src/__support/CPP/bit.h3
-rw-r--r--libc/src/__support/CPP/functional.h3
-rw-r--r--libc/src/__support/FPUtil/CMakeLists.txt5
-rw-r--r--libc/src/__support/FPUtil/FPBits.h3
-rw-r--r--libc/src/__support/FPUtil/NormalFloat.h3
-rw-r--r--libc/src/__support/FPUtil/aarch64/FEnvImpl.h2
-rw-r--r--libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h2
-rw-r--r--libc/src/__support/FPUtil/arm/FEnvImpl.h2
-rw-r--r--libc/src/__support/FPUtil/bfloat16.h3
-rw-r--r--libc/src/__support/FPUtil/riscv/FEnvImpl.h3
-rw-r--r--libc/src/__support/FPUtil/x86_64/FEnvImpl.h3
-rw-r--r--libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h3
-rw-r--r--libc/src/__support/File/CMakeLists.txt7
-rw-r--r--libc/src/__support/File/file.h2
-rw-r--r--libc/src/__support/File/linux/CMakeLists.txt9
-rw-r--r--libc/src/__support/File/linux/lseekImpl.h2
-rw-r--r--libc/src/__support/GPU/CMakeLists.txt1
-rw-r--r--libc/src/__support/GPU/allocator.h2
-rw-r--r--libc/src/__support/HashTable/CMakeLists.txt2
-rw-r--r--libc/src/__support/HashTable/bitmask.h2
-rw-r--r--libc/src/__support/HashTable/table.h2
-rw-r--r--libc/src/__support/arg_list.h2
-rw-r--r--libc/src/__support/big_int.h2
-rw-r--r--libc/src/__support/block.h3
-rw-r--r--libc/src/__support/blockstore.h2
-rw-r--r--libc/src/__support/detailed_powers_of_ten.h3
-rw-r--r--libc/src/__support/endian_internal.h5
-rw-r--r--libc/src/__support/fixed_point/CMakeLists.txt1
-rw-r--r--libc/src/__support/fixed_point/fx_rep.h3
-rw-r--r--libc/src/__support/float_to_string.h3
-rw-r--r--libc/src/__support/hash.h2
-rw-r--r--libc/src/__support/high_precision_decimal.h2
-rw-r--r--libc/src/__support/integer_literals.h2
-rw-r--r--libc/src/__support/integer_to_string.h3
-rw-r--r--libc/src/__support/macros/properties/CMakeLists.txt1
-rw-r--r--libc/src/__support/macros/properties/types.h5
-rw-r--r--libc/src/__support/math/CMakeLists.txt1
-rw-r--r--libc/src/__support/math/exp10_float16_constants.h2
-rw-r--r--libc/src/__support/ryu_constants.h2
-rw-r--r--libc/src/__support/ryu_long_double_constants.h2
-rw-r--r--libc/src/__support/str_to_float.h3
-rw-r--r--libc/src/__support/threads/CMakeLists.txt2
-rw-r--r--libc/src/__support/threads/CndVar.h3
-rw-r--r--libc/src/__support/threads/linux/CMakeLists.txt3
-rw-r--r--libc/src/__support/threads/linux/futex_word.h2
-rw-r--r--libc/src/__support/threads/linux/thread.cpp2
-rw-r--r--libc/src/__support/threads/thread.h2
-rw-r--r--libc/src/__support/wchar/CMakeLists.txt3
-rw-r--r--libc/src/__support/wchar/mbstate.h2
-rw-r--r--libc/src/arpa/inet/CMakeLists.txt4
-rw-r--r--libc/src/arpa/inet/htonl.h2
-rw-r--r--libc/src/arpa/inet/htons.h2
-rw-r--r--libc/src/arpa/inet/ntohl.h2
-rw-r--r--libc/src/arpa/inet/ntohs.h2
-rw-r--r--libc/src/compiler/generic/CMakeLists.txt1
-rw-r--r--libc/src/compiler/generic/__stack_chk_fail.cpp2
-rw-r--r--libc/src/inttypes/CMakeLists.txt2
-rw-r--r--libc/src/inttypes/strtoimax.h2
-rw-r--r--libc/src/inttypes/strtoumax.h2
-rw-r--r--libc/src/link/CMakeLists.txt2
-rw-r--r--libc/src/math/generic/CMakeLists.txt1
-rw-r--r--libc/src/math/generic/expxf16.h3
-rw-r--r--libc/src/pthread/CMakeLists.txt1
-rw-r--r--libc/src/pthread/pthread_attr_setstack.cpp2
-rw-r--r--libc/src/sched/linux/CMakeLists.txt1
-rw-r--r--libc/src/sched/linux/sched_getaffinity.cpp2
-rw-r--r--libc/src/spawn/CMakeLists.txt1
-rw-r--r--libc/src/spawn/file_actions.h2
-rw-r--r--libc/src/stdio/gpu/CMakeLists.txt1
-rw-r--r--libc/src/stdio/gpu/fgets.cpp3
-rw-r--r--libc/src/stdlib/CMakeLists.txt9
-rw-r--r--libc/src/stdlib/a64l.cpp3
-rw-r--r--libc/src/stdlib/bsearch.cpp2
-rw-r--r--libc/src/stdlib/l64a.cpp3
-rw-r--r--libc/src/stdlib/qsort.cpp3
-rw-r--r--libc/src/stdlib/qsort_data.h3
-rw-r--r--libc/src/stdlib/qsort_r.cpp3
-rw-r--r--libc/src/stdlib/quick_sort.h3
-rw-r--r--libc/src/string/CMakeLists.txt1
-rw-r--r--libc/src/string/memory_utils/CMakeLists.txt1
-rw-r--r--libc/src/string/memory_utils/op_generic.h3
-rw-r--r--libc/src/string/memory_utils/utils.h2
-rw-r--r--libc/src/string/memory_utils/x86_64/inline_memcpy.h2
-rw-r--r--libc/src/string/string_utils.h3
-rw-r--r--libc/src/sys/stat/linux/CMakeLists.txt1
-rw-r--r--libc/src/sys/stat/linux/kernel_statx.h2
-rw-r--r--libc/src/time/CMakeLists.txt4
-rw-r--r--libc/src/time/linux/CMakeLists.txt1
-rw-r--r--libc/src/time/linux/nanosleep.cpp2
-rw-r--r--libc/src/time/strftime_core/CMakeLists.txt1
-rw-r--r--libc/src/time/strftime_core/core_structs.h3
-rw-r--r--libc/src/time/time_constants.h2
-rw-r--r--libc/src/time/time_utils.cpp3
-rw-r--r--libc/src/time/time_utils.h3
-rw-r--r--libc/src/unistd/linux/CMakeLists.txt4
-rw-r--r--libc/src/unistd/linux/ftruncate.cpp2
-rw-r--r--libc/src/unistd/linux/pread.cpp2
-rw-r--r--libc/src/unistd/linux/pwrite.cpp2
-rw-r--r--libc/src/unistd/linux/truncate.cpp2
101 files changed, 148 insertions, 114 deletions
diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt
index 37a27cc..2196d9e 100644
--- a/libc/src/__support/CMakeLists.txt
+++ b/libc/src/__support/CMakeLists.txt
@@ -15,6 +15,7 @@ add_header_library(
HDRS
block.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.CPP.algorithm
libc.src.__support.CPP.limits
libc.src.__support.CPP.new
@@ -86,6 +87,7 @@ add_header_library(
blockstore.h
DEPENDS
.libc_assert
+ libc.hdr.stdint_proxy
libc.src.__support.CPP.new
)
@@ -97,6 +99,8 @@ add_header_library(
macros/properties/architectures.h
macros/attributes.h
macros/config.h
+ DEPENDS
+ libc.hdr.stdint_proxy
)
add_header_library(
@@ -199,6 +203,7 @@ add_header_library(
integer_to_string.h
DEPENDS
.big_int
+ libc.hdr.stdint_proxy
libc.src.__support.common
libc.src.__support.CPP.algorithm
libc.src.__support.CPP.limits
@@ -215,6 +220,7 @@ add_header_library(
ryu_long_double_constants.h
DEPENDS
.libc_assert
+ libc.hdr.stdint_proxy
libc.src.__support.CPP.type_traits
libc.src.__support.FPUtil.fp_bits
libc.src.__support.common
@@ -226,6 +232,7 @@ add_header_library(
high_precision_decimal.h
DEPENDS
.str_to_integer
+ libc.hdr.stdint_proxy
)
add_header_library(
@@ -240,6 +247,7 @@ add_header_library(
.str_to_num_result
.uint128
libc.hdr.errno_macros
+ libc.hdr.stdint_proxy
libc.src.__support.common
libc.src.__support.CPP.bit
libc.src.__support.CPP.limits
@@ -257,6 +265,7 @@ add_header_library(
integer_literals.h
DEPENDS
.uint128
+ libc.hdr.stdint_proxy
libc.src.__support.CPP.limits
)
@@ -290,6 +299,7 @@ add_header_library(
HDRS
arg_list.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.common
)
@@ -329,6 +339,7 @@ add_header_library(
DEPENDS
.math_extras
.number_pair
+ libc.hdr.stdint_proxy
libc.src.__support.CPP.array
libc.src.__support.CPP.bit
libc.src.__support.CPP.type_traits
@@ -361,6 +372,7 @@ add_header_library(
hash.h
DEPENDS
.uint128
+ libc.hdr.stdint_proxy
libc.src.__support.CPP.bit
libc.src.__support.CPP.limits
libc.src.__support.macros.attributes
diff --git a/libc/src/__support/CPP/CMakeLists.txt b/libc/src/__support/CPP/CMakeLists.txt
index d2ba00a..8b65a8839 100644
--- a/libc/src/__support/CPP/CMakeLists.txt
+++ b/libc/src/__support/CPP/CMakeLists.txt
@@ -17,6 +17,7 @@ add_header_library(
DEPENDS
.limits
.type_traits
+ libc.hdr.stdint_proxy
libc.src.__support.macros.attributes
libc.src.__support.macros.sanitizer
)
@@ -39,6 +40,8 @@ add_header_library(
functional
HDRS
functional.h
+ DEPENDS
+ libc.hdr.stdint_proxy
)
add_header_library(
diff --git a/libc/src/__support/CPP/bit.h b/libc/src/__support/CPP/bit.h
index e491f3e..df1b177 100644
--- a/libc/src/__support/CPP/bit.h
+++ b/libc/src/__support/CPP/bit.h
@@ -11,14 +11,13 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_CPP_BIT_H
#define LLVM_LIBC_SRC___SUPPORT_CPP_BIT_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/limits.h" // numeric_limits
#include "src/__support/CPP/type_traits.h"
#include "src/__support/macros/attributes.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/sanitizer.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace cpp {
diff --git a/libc/src/__support/CPP/functional.h b/libc/src/__support/CPP/functional.h
index 50cfa256..5c43d22 100644
--- a/libc/src/__support/CPP/functional.h
+++ b/libc/src/__support/CPP/functional.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_CPP_FUNCTIONAL_H
#define LLVM_LIBC_SRC___SUPPORT_CPP_FUNCTIONAL_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/type_traits/enable_if.h"
#include "src/__support/CPP/type_traits/is_convertible.h"
#include "src/__support/CPP/type_traits/is_same.h"
@@ -19,8 +20,6 @@
#include "src/__support/macros/attributes.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace cpp {
diff --git a/libc/src/__support/FPUtil/CMakeLists.txt b/libc/src/__support/FPUtil/CMakeLists.txt
index 3024ac6..94f8b95 100644
--- a/libc/src/__support/FPUtil/CMakeLists.txt
+++ b/libc/src/__support/FPUtil/CMakeLists.txt
@@ -6,6 +6,7 @@ add_header_library(
libc.hdr.types.fenv_t
libc.hdr.fenv_macros
libc.hdr.math_macros
+ libc.hdr.stdint_proxy
libc.src.__support.macros.attributes
libc.src.errno.errno
)
@@ -28,6 +29,7 @@ add_header_library(
HDRS
FPBits.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.common
libc.src.__support.CPP.bit
libc.src.__support.CPP.type_traits
@@ -72,6 +74,7 @@ add_header_library(
NormalFloat.h
DEPENDS
.fp_bits
+ libc.hdr.stdint_proxy
libc.src.__support.CPP.type_traits
libc.src.__support.common
)
@@ -248,6 +251,7 @@ add_header_library(
.nearest_integer_operations
.normal_float
libc.hdr.math_macros
+ libc.hdr.stdint_proxy
libc.src.errno.errno
libc.src.__support.common
libc.src.__support.CPP.bit
@@ -277,6 +281,7 @@ add_header_library(
.cast
.comparison_operations
.dyadic_float
+ libc.hdr.stdint_proxy
libc.src.__support.CPP.bit
libc.src.__support.CPP.type_traits
libc.src.__support.macros.config
diff --git a/libc/src/__support/FPUtil/FPBits.h b/libc/src/__support/FPUtil/FPBits.h
index 9e21136..2f695c1 100644
--- a/libc/src/__support/FPUtil/FPBits.h
+++ b/libc/src/__support/FPUtil/FPBits.h
@@ -15,6 +15,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_FPUTIL_FPBITS_H
#define LLVM_LIBC_SRC___SUPPORT_FPUTIL_FPBITS_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/common.h"
@@ -26,8 +27,6 @@
#include "src/__support/sign.h" // Sign
#include "src/__support/uint128.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace fputil {
diff --git a/libc/src/__support/FPUtil/NormalFloat.h b/libc/src/__support/FPUtil/NormalFloat.h
index a2f285f..b30e36f 100644
--- a/libc/src/__support/FPUtil/NormalFloat.h
+++ b/libc/src/__support/FPUtil/NormalFloat.h
@@ -11,12 +11,11 @@
#include "FPBits.h"
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace fputil {
diff --git a/libc/src/__support/FPUtil/aarch64/FEnvImpl.h b/libc/src/__support/FPUtil/aarch64/FEnvImpl.h
index 914155a..18182ed 100644
--- a/libc/src/__support/FPUtil/aarch64/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/aarch64/FEnvImpl.h
@@ -18,9 +18,9 @@
#endif
#include <arm_acle.h>
-#include <stdint.h>
#include "hdr/fenv_macros.h"
+#include "hdr/stdint_proxy.h"
#include "hdr/types/fenv_t.h"
#include "src/__support/FPUtil/FPBits.h"
diff --git a/libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h b/libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h
index dcce76b..a2066d1 100644
--- a/libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h
+++ b/libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h
@@ -18,9 +18,9 @@
#endif
#include <arm_acle.h>
-#include <stdint.h>
#include "hdr/fenv_macros.h"
+#include "hdr/stdint_proxy.h"
#include "hdr/types/fenv_t.h"
#include "src/__support/FPUtil/FPBits.h"
diff --git a/libc/src/__support/FPUtil/arm/FEnvImpl.h b/libc/src/__support/FPUtil/arm/FEnvImpl.h
index aaf37c0..64ab4a9 100644
--- a/libc/src/__support/FPUtil/arm/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/arm/FEnvImpl.h
@@ -10,11 +10,11 @@
#define LLVM_LIBC_SRC___SUPPORT_FPUTIL_ARM_FENVIMPL_H
#include "hdr/fenv_macros.h"
+#include "hdr/stdint_proxy.h"
#include "hdr/types/fenv_t.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/macros/attributes.h" // For LIBC_INLINE
#include "src/__support/macros/config.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
namespace fputil {
diff --git a/libc/src/__support/FPUtil/bfloat16.h b/libc/src/__support/FPUtil/bfloat16.h
index 84a0dca..fa45d73 100644
--- a/libc/src/__support/FPUtil/bfloat16.h
+++ b/libc/src/__support/FPUtil/bfloat16.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_FPUTIL_BFLOAT16_H
#define LLVM_LIBC_SRC___SUPPORT_FPUTIL_BFLOAT16_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/FPUtil/cast.h"
@@ -17,8 +18,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/types.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace fputil {
diff --git a/libc/src/__support/FPUtil/riscv/FEnvImpl.h b/libc/src/__support/FPUtil/riscv/FEnvImpl.h
index 2f525eb..cb2d2d5 100644
--- a/libc/src/__support/FPUtil/riscv/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/riscv/FEnvImpl.h
@@ -10,13 +10,12 @@
#define LLVM_LIBC_SRC___SUPPORT_FPUTIL_RISCV_FENVIMPL_H
#include "hdr/fenv_macros.h"
+#include "hdr/stdint_proxy.h"
#include "hdr/types/fenv_t.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/macros/attributes.h" // For LIBC_INLINE_ASM
#include "src/__support/macros/config.h" // For LIBC_INLINE
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace fputil {
diff --git a/libc/src/__support/FPUtil/x86_64/FEnvImpl.h b/libc/src/__support/FPUtil/x86_64/FEnvImpl.h
index 560727c..5da5097 100644
--- a/libc/src/__support/FPUtil/x86_64/FEnvImpl.h
+++ b/libc/src/__support/FPUtil/x86_64/FEnvImpl.h
@@ -17,8 +17,7 @@
#error "Invalid include"
#endif
-#include <stdint.h>
-
+#include "hdr/stdint_proxy.h"
#include "hdr/types/fenv_t.h"
#include "src/__support/macros/sanitizer.h"
diff --git a/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h b/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h
index 2e6b297..74a991d 100644
--- a/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h
+++ b/libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h
@@ -16,12 +16,11 @@
#error "Invalid include"
#endif
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/FPUtil/FEnvImpl.h"
#include "src/__support/FPUtil/FPBits.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace fputil {
diff --git a/libc/src/__support/File/CMakeLists.txt b/libc/src/__support/File/CMakeLists.txt
index 5a4af5e..253243f 100644
--- a/libc/src/__support/File/CMakeLists.txt
+++ b/libc/src/__support/File/CMakeLists.txt
@@ -12,13 +12,14 @@ add_object_library(
HDRS
file.h
DEPENDS
+ libc.hdr.stdio_macros
+ libc.hdr.stdint_proxy
+ libc.hdr.func.realloc
+ libc.hdr.types.off_t
libc.src.__support.CPP.new
libc.src.__support.CPP.span
libc.src.__support.threads.mutex
libc.src.__support.error_or
- libc.hdr.types.off_t
- libc.hdr.stdio_macros
- libc.hdr.func.realloc
)
add_object_library(
diff --git a/libc/src/__support/File/file.h b/libc/src/__support/File/file.h
index 5c97a9c..3652e44 100644
--- a/libc/src/__support/File/file.h
+++ b/libc/src/__support/File/file.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_FILE_FILE_H
#define LLVM_LIBC_SRC___SUPPORT_FILE_FILE_H
+#include "hdr/stdint_proxy.h"
#include "hdr/stdio_macros.h"
#include "hdr/types/off_t.h"
#include "src/__support/CPP/new.h"
@@ -18,7 +19,6 @@
#include "src/__support/threads/mutex.h"
#include <stddef.h>
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/__support/File/linux/CMakeLists.txt b/libc/src/__support/File/linux/CMakeLists.txt
index 84e3d56..7a7bd6c 100644
--- a/libc/src/__support/File/linux/CMakeLists.txt
+++ b/libc/src/__support/File/linux/CMakeLists.txt
@@ -8,16 +8,17 @@ add_object_library(
lseekImpl.h
DEPENDS
libc.hdr.fcntl_macros
+ libc.hdr.stdio_macros
+ libc.hdr.stdint_proxy
+ libc.hdr.types.off_t
+ libc.hdr.types.FILE
libc.include.sys_syscall
libc.include.sys_stat
libc.src.__support.CPP.new
libc.src.__support.OSUtil.osutil
- libc.src.errno.errno
libc.src.__support.error_or
libc.src.__support.File.file
- libc.hdr.types.off_t
- libc.hdr.types.FILE
- libc.hdr.stdio_macros
+ libc.src.errno.errno
)
add_object_library(
diff --git a/libc/src/__support/File/linux/lseekImpl.h b/libc/src/__support/File/linux/lseekImpl.h
index 300e5c5..c22a6c5 100644
--- a/libc/src/__support/File/linux/lseekImpl.h
+++ b/libc/src/__support/File/linux/lseekImpl.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_FILE_LINUX_LSEEKIMPL_H
#define LLVM_LIBC_SRC___SUPPORT_FILE_LINUX_LSEEKIMPL_H
+#include "hdr/stdint_proxy.h" // For uint64_t.
#include "hdr/types/off_t.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
@@ -16,7 +17,6 @@
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include <stdint.h> // For uint64_t.
#include <sys/syscall.h> // For syscall numbers.
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/__support/GPU/CMakeLists.txt b/libc/src/__support/GPU/CMakeLists.txt
index 4ffee01..f8fdfeb 100644
--- a/libc/src/__support/GPU/CMakeLists.txt
+++ b/libc/src/__support/GPU/CMakeLists.txt
@@ -16,6 +16,7 @@ add_object_library(
HDRS
allocator.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.common
libc.src.__support.RPC.rpc_client
libc.src.__support.CPP.atomic
diff --git a/libc/src/__support/GPU/allocator.h b/libc/src/__support/GPU/allocator.h
index a7cf8bc..67a7ff5 100644
--- a/libc/src/__support/GPU/allocator.h
+++ b/libc/src/__support/GPU/allocator.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_GPU_ALLOCATOR_H
#define LLVM_LIBC_SRC___SUPPORT_GPU_ALLOCATOR_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
namespace gpu {
diff --git a/libc/src/__support/HashTable/CMakeLists.txt b/libc/src/__support/HashTable/CMakeLists.txt
index 698b8d0..d5861e7 100644
--- a/libc/src/__support/HashTable/CMakeLists.txt
+++ b/libc/src/__support/HashTable/CMakeLists.txt
@@ -5,6 +5,7 @@ add_header_library(
FLAGS
EXPLICIT_SIMD_OPT
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.common
libc.src.__support.CPP.bit
libc.src.__support.macros.properties.cpu_features
@@ -26,6 +27,7 @@ add_header_library(
table.h
DEPENDS
.bitmask
+ libc.hdr.stdint_proxy
libc.hdr.types.ENTRY
libc.src.__support.CPP.bit
libc.src.__support.CPP.new
diff --git a/libc/src/__support/HashTable/bitmask.h b/libc/src/__support/HashTable/bitmask.h
index 3cac481..a4af496 100644
--- a/libc/src/__support/HashTable/bitmask.h
+++ b/libc/src/__support/HashTable/bitmask.h
@@ -9,11 +9,11 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_HASHTABLE_BITMASK_H
#define LLVM_LIBC_SRC___SUPPORT_HASHTABLE_BITMASK_H
+#include "hdr/stdint_proxy.h" // uint8_t, uint64_t
#include "src/__support/CPP/bit.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/cpu_features.h"
#include <stddef.h> // size_t
-#include <stdint.h> // uint8_t, uint64_t
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/__support/HashTable/table.h b/libc/src/__support/HashTable/table.h
index 10dd971..966ee0f 100644
--- a/libc/src/__support/HashTable/table.h
+++ b/libc/src/__support/HashTable/table.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_HASHTABLE_TABLE_H
#define LLVM_LIBC_SRC___SUPPORT_HASHTABLE_TABLE_H
+#include "hdr/stdint_proxy.h"
#include "hdr/types/ENTRY.h"
#include "src/__support/CPP/bit.h" // bit_ceil
#include "src/__support/CPP/new.h"
@@ -21,7 +22,6 @@
#include "src/string/memory_utils/inline_strcmp.h"
#include "src/string/string_utils.h"
#include <stddef.h>
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/__support/arg_list.h b/libc/src/__support/arg_list.h
index 66afa67..1e26a5e 100644
--- a/libc/src/__support/arg_list.h
+++ b/libc/src/__support/arg_list.h
@@ -9,12 +9,12 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_ARG_LIST_H
#define LLVM_LIBC_SRC___SUPPORT_ARG_LIST_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include <stdarg.h>
#include <stddef.h>
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/__support/big_int.h b/libc/src/__support/big_int.h
index 85db31d..10e35ef 100644
--- a/libc/src/__support/big_int.h
+++ b/libc/src/__support/big_int.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_BIG_INT_H
#define LLVM_LIBC_SRC___SUPPORT_BIG_INT_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/array.h"
#include "src/__support/CPP/bit.h" // countl_zero
#include "src/__support/CPP/limits.h"
@@ -23,7 +24,6 @@
#include "src/__support/number_pair.h"
#include <stddef.h> // For size_t
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/__support/block.h b/libc/src/__support/block.h
index a58c38b..b0d6576 100644
--- a/libc/src/__support/block.h
+++ b/libc/src/__support/block.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_BLOCK_H
#define LLVM_LIBC_SRC___SUPPORT_BLOCK_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/algorithm.h"
#include "src/__support/CPP/cstddef.h"
#include "src/__support/CPP/limits.h"
@@ -20,8 +21,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/math_extras.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
/// Returns the value rounded down to the nearest multiple of alignment.
diff --git a/libc/src/__support/blockstore.h b/libc/src/__support/blockstore.h
index efe2234..61ee0ee 100644
--- a/libc/src/__support/blockstore.h
+++ b/libc/src/__support/blockstore.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_BLOCKSTORE_H
#define LLVM_LIBC_SRC___SUPPORT_BLOCKSTORE_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/array.h"
#include "src/__support/CPP/new.h"
#include "src/__support/CPP/type_traits.h"
@@ -16,7 +17,6 @@
#include "src/__support/macros/config.h"
#include <stddef.h>
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/__support/detailed_powers_of_ten.h b/libc/src/__support/detailed_powers_of_ten.h
index 28741b8..ab6f2be 100644
--- a/libc/src/__support/detailed_powers_of_ten.h
+++ b/libc/src/__support/detailed_powers_of_ten.h
@@ -9,11 +9,10 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_DETAILED_POWERS_OF_TEN_H
#define LLVM_LIBC_SRC___SUPPORT_DETAILED_POWERS_OF_TEN_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/__support/endian_internal.h b/libc/src/__support/endian_internal.h
index 77839ad..c78090a 100644
--- a/libc/src/__support/endian_internal.h
+++ b/libc/src/__support/endian_internal.h
@@ -9,11 +9,10 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_ENDIAN_INTERNAL_H
#define LLVM_LIBC_SRC___SUPPORT_ENDIAN_INTERNAL_H
-#include "common.h"
+#include "hdr/stdint_proxy.h"
+#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
// We rely on compiler preprocessor defines to allow for cross compilation.
diff --git a/libc/src/__support/fixed_point/CMakeLists.txt b/libc/src/__support/fixed_point/CMakeLists.txt
index 235c030..145eedb 100644
--- a/libc/src/__support/fixed_point/CMakeLists.txt
+++ b/libc/src/__support/fixed_point/CMakeLists.txt
@@ -3,6 +3,7 @@ add_header_library(
HDRS
fx_rep.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.llvm-libc-macros.stdfix_macros
libc.src.__support.macros.attributes
libc.src.__support.CPP.type_traits
diff --git a/libc/src/__support/fixed_point/fx_rep.h b/libc/src/__support/fixed_point/fx_rep.h
index 7227fff..e68be57 100644
--- a/libc/src/__support/fixed_point/fx_rep.h
+++ b/libc/src/__support/fixed_point/fx_rep.h
@@ -9,13 +9,12 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_FIXED_POINT_FX_REP_H
#define LLVM_LIBC_SRC___SUPPORT_FIXED_POINT_FX_REP_H
+#include "hdr/stdint_proxy.h"
#include "include/llvm-libc-macros/stdfix-macros.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/macros/attributes.h" // LIBC_INLINE, LIBC_INLINE_VAR
#include "src/__support/macros/config.h"
-#include <stdint.h>
-
#ifdef LIBC_COMPILER_HAS_FIXED_POINT
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/__support/float_to_string.h b/libc/src/__support/float_to_string.h
index d88bf84..cab146a 100644
--- a/libc/src/__support/float_to_string.h
+++ b/libc/src/__support/float_to_string.h
@@ -9,8 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_FLOAT_TO_STRING_H
#define LLVM_LIBC_SRC___SUPPORT_FLOAT_TO_STRING_H
-#include <stdint.h>
-
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/limits.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/FPUtil/FPBits.h"
diff --git a/libc/src/__support/hash.h b/libc/src/__support/hash.h
index 49138b1..6dfaadf 100644
--- a/libc/src/__support/hash.h
+++ b/libc/src/__support/hash.h
@@ -9,12 +9,12 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_HASH_H
#define LLVM_LIBC_SRC___SUPPORT_HASH_H
+#include "hdr/stdint_proxy.h" // For uint64_t
#include "src/__support/CPP/bit.h" // rotl
#include "src/__support/CPP/limits.h" // numeric_limits
#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/config.h"
#include "src/__support/uint128.h" // UInt128
-#include <stdint.h> // For uint64_t
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/__support/high_precision_decimal.h b/libc/src/__support/high_precision_decimal.h
index cb4b50c..08af786 100644
--- a/libc/src/__support/high_precision_decimal.h
+++ b/libc/src/__support/high_precision_decimal.h
@@ -15,11 +15,11 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_HIGH_PRECISION_DECIMAL_H
#define LLVM_LIBC_SRC___SUPPORT_HIGH_PRECISION_DECIMAL_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/limits.h"
#include "src/__support/ctype_utils.h"
#include "src/__support/macros/config.h"
#include "src/__support/str_to_integer.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/__support/integer_literals.h b/libc/src/__support/integer_literals.h
index f68b7ef..67d241d 100644
--- a/libc/src/__support/integer_literals.h
+++ b/libc/src/__support/integer_literals.h
@@ -13,13 +13,13 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_INTEGER_LITERALS_H
#define LLVM_LIBC_SRC___SUPPORT_INTEGER_LITERALS_H
+#include "hdr/stdint_proxy.h" // uintxx_t
#include "src/__support/CPP/limits.h" // CHAR_BIT
#include "src/__support/ctype_utils.h"
#include "src/__support/macros/attributes.h" // LIBC_INLINE
#include "src/__support/macros/config.h"
#include "src/__support/uint128.h" // UInt128
#include <stddef.h> // size_t
-#include <stdint.h> // uintxx_t
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/__support/integer_to_string.h b/libc/src/__support/integer_to_string.h
index 65bdcf1..29449bd 100644
--- a/libc/src/__support/integer_to_string.h
+++ b/libc/src/__support/integer_to_string.h
@@ -57,8 +57,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_INTEGER_TO_STRING_H
#define LLVM_LIBC_SRC___SUPPORT_INTEGER_TO_STRING_H
-#include <stdint.h>
-
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/algorithm.h" // max
#include "src/__support/CPP/array.h"
#include "src/__support/CPP/bit.h"
diff --git a/libc/src/__support/macros/properties/CMakeLists.txt b/libc/src/__support/macros/properties/CMakeLists.txt
index 80ed63a..dfa2f9c 100644
--- a/libc/src/__support/macros/properties/CMakeLists.txt
+++ b/libc/src/__support/macros/properties/CMakeLists.txt
@@ -34,6 +34,7 @@ add_header_library(
.cpu_features
.os
libc.hdr.float_macros
+ libc.hdr.stdint_proxy
libc.include.llvm-libc-macros.float16_macros
libc.include.llvm-libc-types.float128
)
diff --git a/libc/src/__support/macros/properties/types.h b/libc/src/__support/macros/properties/types.h
index aec4a48..3259c8a 100644
--- a/libc/src/__support/macros/properties/types.h
+++ b/libc/src/__support/macros/properties/types.h
@@ -10,7 +10,8 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_TYPES_H
#define LLVM_LIBC_SRC___SUPPORT_MACROS_PROPERTIES_TYPES_H
-#include "hdr/float_macros.h" // LDBL_MANT_DIG
+#include "hdr/float_macros.h" // LDBL_MANT_DIG
+#include "hdr/stdint_proxy.h" // UINT64_MAX, __SIZEOF_INT128__
#include "include/llvm-libc-macros/float16-macros.h" // LIBC_TYPES_HAS_FLOAT16
#include "include/llvm-libc-types/float128.h" // float128
#include "src/__support/macros/config.h" // LIBC_NAMESPACE_DECL
@@ -19,8 +20,6 @@
#include "src/__support/macros/properties/cpu_features.h"
#include "src/__support/macros/properties/os.h"
-#include <stdint.h> // UINT64_MAX, __SIZEOF_INT128__
-
// 'long double' properties.
#if (LDBL_MANT_DIG == 53)
#define LIBC_TYPES_LONG_DOUBLE_IS_FLOAT64
diff --git a/libc/src/__support/math/CMakeLists.txt b/libc/src/__support/math/CMakeLists.txt
index 9a8a4d1..926bbd5 100644
--- a/libc/src/__support/math/CMakeLists.txt
+++ b/libc/src/__support/math/CMakeLists.txt
@@ -337,6 +337,7 @@ add_header_library(
HDRS
exp10_float16_constants.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.CPP.array
)
diff --git a/libc/src/__support/math/exp10_float16_constants.h b/libc/src/__support/math/exp10_float16_constants.h
index f5928db..ef50185 100644
--- a/libc/src/__support/math/exp10_float16_constants.h
+++ b/libc/src/__support/math/exp10_float16_constants.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_MATH_EXP10_FLOAT16_CONSTANTS_H
#define LLVM_LIBC_SRC___SUPPORT_MATH_EXP10_FLOAT16_CONSTANTS_H
+#include "hdr/stdint_proxy.h"
#include "include/llvm-libc-macros/float16-macros.h"
-#include <stdint.h>
#ifdef LIBC_TYPES_HAS_FLOAT16
diff --git a/libc/src/__support/ryu_constants.h b/libc/src/__support/ryu_constants.h
index 1ecb34e..09bc235 100644
--- a/libc/src/__support/ryu_constants.h
+++ b/libc/src/__support/ryu_constants.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_RYU_CONSTANTS_H
#define LLVM_LIBC_SRC___SUPPORT_RYU_CONSTANTS_H
+#include "hdr/stdint_proxy.h"
#include <stddef.h>
-#include <stdint.h>
constexpr size_t TABLE_SHIFT_CONST = 120;
constexpr size_t IDX_SIZE = 16;
diff --git a/libc/src/__support/ryu_long_double_constants.h b/libc/src/__support/ryu_long_double_constants.h
index 8ebb297..487fd4a 100644
--- a/libc/src/__support/ryu_long_double_constants.h
+++ b/libc/src/__support/ryu_long_double_constants.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_RYU_LONG_DOUBLE_CONSTANTS_H
#define LLVM_LIBC_SRC___SUPPORT_RYU_LONG_DOUBLE_CONSTANTS_H
+#include "hdr/stdint_proxy.h"
#include <stddef.h>
-#include <stdint.h>
constexpr size_t TABLE_SHIFT_CONST = 120;
constexpr size_t IDX_SIZE = 128;
diff --git a/libc/src/__support/str_to_float.h b/libc/src/__support/str_to_float.h
index a7dd7ce..3d35d8a 100644
--- a/libc/src/__support/str_to_float.h
+++ b/libc/src/__support/str_to_float.h
@@ -16,6 +16,7 @@
#define LLVM_LIBC_SRC___SUPPORT_STR_TO_FLOAT_H
#include "hdr/errno_macros.h" // For ERANGE
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/limits.h"
#include "src/__support/CPP/optional.h"
@@ -33,8 +34,6 @@
#include "src/__support/str_to_num_result.h"
#include "src/__support/uint128.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/__support/threads/CMakeLists.txt b/libc/src/__support/threads/CMakeLists.txt
index bd49bbb..b084346 100644
--- a/libc/src/__support/threads/CMakeLists.txt
+++ b/libc/src/__support/threads/CMakeLists.txt
@@ -49,6 +49,7 @@ add_header_library(
HDRS
thread.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.common
libc.src.__support.CPP.atomic
libc.src.__support.CPP.optional
@@ -64,6 +65,7 @@ if(TARGET libc.src.__support.threads.${LIBC_TARGET_OS}.thread)
DEPENDS
.mutex
.${LIBC_TARGET_OS}.thread
+ libc.hdr.stdint_proxy
libc.src.__support.common
libc.src.__support.fixedvector
libc.src.__support.CPP.array
diff --git a/libc/src/__support/threads/CndVar.h b/libc/src/__support/threads/CndVar.h
index e42fa14..7b2a712 100644
--- a/libc/src/__support/threads/CndVar.h
+++ b/libc/src/__support/threads/CndVar.h
@@ -9,13 +9,12 @@
#ifndef LLVM_LIBC___SUPPORT_SRC_THREADS_LINUX_CNDVAR_H
#define LLVM_LIBC___SUPPORT_SRC_THREADS_LINUX_CNDVAR_H
+#include "hdr/stdint_proxy.h" // uint32_t
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/futex_utils.h" // Futex
#include "src/__support/threads/linux/raw_mutex.h" // RawMutex
#include "src/__support/threads/mutex.h" // Mutex
-#include <stdint.h> // uint32_t
-
namespace LIBC_NAMESPACE_DECL {
class CndVar {
diff --git a/libc/src/__support/threads/linux/CMakeLists.txt b/libc/src/__support/threads/linux/CMakeLists.txt
index 364e7e2..cbb7886 100644
--- a/libc/src/__support/threads/linux/CMakeLists.txt
+++ b/libc/src/__support/threads/linux/CMakeLists.txt
@@ -2,6 +2,8 @@ add_header_library(
futex_word_type
HDRS
futex_word.h
+ DEPENDS
+ libc.hdr.stdint_proxy
)
if(NOT TARGET libc.src.__support.OSUtil.osutil)
@@ -114,6 +116,7 @@ add_object_library(
HDRS
../CndVar.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
libc.src.__support.threads.linux.futex_word_type
diff --git a/libc/src/__support/threads/linux/futex_word.h b/libc/src/__support/threads/linux/futex_word.h
index a5a6a0c..1cf7bef 100644
--- a/libc/src/__support/threads/linux/futex_word.h
+++ b/libc/src/__support/threads/linux/futex_word.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_THREADS_LINUX_FUTEX_WORD_H
#define LLVM_LIBC_SRC___SUPPORT_THREADS_LINUX_FUTEX_WORD_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
#include <sys/syscall.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/__support/threads/linux/thread.cpp b/libc/src/__support/threads/linux/thread.cpp
index baad26a..d9e479ee 100644
--- a/libc/src/__support/threads/linux/thread.cpp
+++ b/libc/src/__support/threads/linux/thread.cpp
@@ -23,10 +23,10 @@
#endif
#include "hdr/fcntl_macros.h"
+#include "hdr/stdint_proxy.h"
#include <linux/param.h> // For EXEC_PAGESIZE.
#include <linux/prctl.h> // For PR_SET_NAME
#include <linux/sched.h> // For CLONE_* flags.
-#include <stdint.h>
#include <sys/mman.h> // For PROT_* and MAP_* definitions.
#include <sys/syscall.h> // For syscall numbers.
diff --git a/libc/src/__support/threads/thread.h b/libc/src/__support/threads/thread.h
index f2b1f6b..114ab49 100644
--- a/libc/src/__support/threads/thread.h
+++ b/libc/src/__support/threads/thread.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_THREADS_THREAD_H
#define LLVM_LIBC_SRC___SUPPORT_THREADS_THREAD_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/atomic.h"
#include "src/__support/CPP/optional.h"
#include "src/__support/CPP/string_view.h"
@@ -21,7 +22,6 @@
#include <linux/param.h> // for exec_pagesize.
#include <stddef.h> // For size_t
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/__support/wchar/CMakeLists.txt b/libc/src/__support/wchar/CMakeLists.txt
index 802441d..cf3e641 100644
--- a/libc/src/__support/wchar/CMakeLists.txt
+++ b/libc/src/__support/wchar/CMakeLists.txt
@@ -3,7 +3,8 @@ add_header_library(
HDRS
mbstate.h
DEPENDS
- libc.hdr.types.char32_t
+ libc.hdr.stdint_proxy
+ libc.hdr.types.char32_t
)
add_header_library(
diff --git a/libc/src/__support/wchar/mbstate.h b/libc/src/__support/wchar/mbstate.h
index 32304a5..96256ca 100644
--- a/libc/src/__support/wchar/mbstate.h
+++ b/libc/src/__support/wchar/mbstate.h
@@ -9,9 +9,9 @@
#ifndef LLVM_LIBC_SRC___SUPPORT_MBSTATE_H
#define LLVM_LIBC_SRC___SUPPORT_MBSTATE_H
+#include "hdr/stdint_proxy.h"
#include "hdr/types/char32_t.h"
#include "src/__support/common.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/arpa/inet/CMakeLists.txt b/libc/src/arpa/inet/CMakeLists.txt
index cdd53e9..1f39a07 100644
--- a/libc/src/arpa/inet/CMakeLists.txt
+++ b/libc/src/arpa/inet/CMakeLists.txt
@@ -5,6 +5,7 @@ add_entrypoint_object(
HDRS
htonl.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.arpa_inet
libc.src.__support.common
)
@@ -16,6 +17,7 @@ add_entrypoint_object(
HDRS
htons.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.arpa_inet
libc.src.__support.common
)
@@ -27,6 +29,7 @@ add_entrypoint_object(
HDRS
ntohl.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.arpa_inet
libc.src.__support.common
)
@@ -38,6 +41,7 @@ add_entrypoint_object(
HDRS
ntohs.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.arpa_inet
libc.src.__support.common
)
diff --git a/libc/src/arpa/inet/htonl.h b/libc/src/arpa/inet/htonl.h
index e444972..34f017d 100644
--- a/libc/src/arpa/inet/htonl.h
+++ b/libc/src/arpa/inet/htonl.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC_ARPA_INET_HTONL_H
#define LLVM_LIBC_SRC_ARPA_INET_HTONL_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/arpa/inet/htons.h b/libc/src/arpa/inet/htons.h
index 35c2acdc..5e283cd 100644
--- a/libc/src/arpa/inet/htons.h
+++ b/libc/src/arpa/inet/htons.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC_ARPA_INET_HTONS_H
#define LLVM_LIBC_SRC_ARPA_INET_HTONS_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/arpa/inet/ntohl.h b/libc/src/arpa/inet/ntohl.h
index 4007965..76ba02b 100644
--- a/libc/src/arpa/inet/ntohl.h
+++ b/libc/src/arpa/inet/ntohl.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC_ARPA_INET_NTOHL_H
#define LLVM_LIBC_SRC_ARPA_INET_NTOHL_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/arpa/inet/ntohs.h b/libc/src/arpa/inet/ntohs.h
index 5fe3ebc..b98c852 100644
--- a/libc/src/arpa/inet/ntohs.h
+++ b/libc/src/arpa/inet/ntohs.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC_ARPA_INET_NTOHS_H
#define LLVM_LIBC_SRC_ARPA_INET_NTOHS_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/compiler/generic/CMakeLists.txt b/libc/src/compiler/generic/CMakeLists.txt
index 2fc8f7f..d9ad42e 100644
--- a/libc/src/compiler/generic/CMakeLists.txt
+++ b/libc/src/compiler/generic/CMakeLists.txt
@@ -5,6 +5,7 @@ add_entrypoint_object(
HDRS
../__stack_chk_fail.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.OSUtil.osutil
libc.src.stdlib.abort
)
diff --git a/libc/src/compiler/generic/__stack_chk_fail.cpp b/libc/src/compiler/generic/__stack_chk_fail.cpp
index 00e976a..7edd16c 100644
--- a/libc/src/compiler/generic/__stack_chk_fail.cpp
+++ b/libc/src/compiler/generic/__stack_chk_fail.cpp
@@ -7,9 +7,9 @@
//===----------------------------------------------------------------------===//
#include "src/compiler/__stack_chk_fail.h"
+#include "hdr/stdint_proxy.h" // For uintptr_t
#include "src/__support/OSUtil/io.h"
#include "src/stdlib/abort.h"
-#include <stdint.h> // For uintptr_t
extern "C" {
diff --git a/libc/src/inttypes/CMakeLists.txt b/libc/src/inttypes/CMakeLists.txt
index c3111ed..3a48c9a 100644
--- a/libc/src/inttypes/CMakeLists.txt
+++ b/libc/src/inttypes/CMakeLists.txt
@@ -5,6 +5,7 @@ add_entrypoint_object(
HDRS
strtoimax.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.str_to_integer
libc.src.errno.errno
)
@@ -16,6 +17,7 @@ add_entrypoint_object(
HDRS
strtoumax.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.str_to_integer
libc.src.errno.errno
)
diff --git a/libc/src/inttypes/strtoimax.h b/libc/src/inttypes/strtoimax.h
index 804d07c..fedc458b 100644
--- a/libc/src/inttypes/strtoimax.h
+++ b/libc/src/inttypes/strtoimax.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC_INTTYPES_STRTOIMAX_H
#define LLVM_LIBC_SRC_INTTYPES_STRTOIMAX_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/inttypes/strtoumax.h b/libc/src/inttypes/strtoumax.h
index 4c53c03..d5b82af 100644
--- a/libc/src/inttypes/strtoumax.h
+++ b/libc/src/inttypes/strtoumax.h
@@ -9,8 +9,8 @@
#ifndef LLVM_LIBC_SRC_INTTYPES_STRTOUMAX_H
#define LLVM_LIBC_SRC_INTTYPES_STRTOUMAX_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/link/CMakeLists.txt b/libc/src/link/CMakeLists.txt
index f68950e..55f5edf 100644
--- a/libc/src/link/CMakeLists.txt
+++ b/libc/src/link/CMakeLists.txt
@@ -4,4 +4,6 @@ add_entrypoint_object(
dl_iterate_phdr.cpp
HDRS
dl_iterate_phdr.h
+ DEPENDS
+ libc.hdr.stdint_proxy
)
diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt
index 408f99e..a001d99 100644
--- a/libc/src/math/generic/CMakeLists.txt
+++ b/libc/src/math/generic/CMakeLists.txt
@@ -4942,6 +4942,7 @@ add_header_library(
HDRS
expxf16.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.FPUtil.fp_bits
libc.src.__support.FPUtil.cast
libc.src.__support.FPUtil.multiply_add
diff --git a/libc/src/math/generic/expxf16.h b/libc/src/math/generic/expxf16.h
index b17b14f..562a427 100644
--- a/libc/src/math/generic/expxf16.h
+++ b/libc/src/math/generic/expxf16.h
@@ -9,14 +9,13 @@
#ifndef LLVM_LIBC_SRC_MATH_GENERIC_EXPXF16_H
#define LLVM_LIBC_SRC_MATH_GENERIC_EXPXF16_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/FPUtil/FPBits.h"
#include "src/__support/FPUtil/cast.h"
#include "src/__support/FPUtil/multiply_add.h"
#include "src/__support/FPUtil/nearest_integer.h"
#include "src/__support/macros/attributes.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
-
#include "src/__support/math/exp10_float16_constants.h"
#include "src/__support/math/expf16_utils.h"
diff --git a/libc/src/pthread/CMakeLists.txt b/libc/src/pthread/CMakeLists.txt
index c8c6680..c5db6fa 100644
--- a/libc/src/pthread/CMakeLists.txt
+++ b/libc/src/pthread/CMakeLists.txt
@@ -99,6 +99,7 @@ add_entrypoint_object(
HDRS
pthread_attr_setstack.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.pthread
libc.src.pthread.pthread_attr_setstacksize
libc.src.errno.errno
diff --git a/libc/src/pthread/pthread_attr_setstack.cpp b/libc/src/pthread/pthread_attr_setstack.cpp
index 767f959..b66072c 100644
--- a/libc/src/pthread/pthread_attr_setstack.cpp
+++ b/libc/src/pthread/pthread_attr_setstack.cpp
@@ -9,13 +9,13 @@
#include "pthread_attr_setstack.h"
#include "pthread_attr_setstacksize.h"
+#include "hdr/stdint_proxy.h"
#include "src/__support/common.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
#include "src/__support/threads/thread.h" // For STACK_ALIGNMENT
#include <pthread.h>
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/sched/linux/CMakeLists.txt b/libc/src/sched/linux/CMakeLists.txt
index 4852c90..e690e76 100644
--- a/libc/src/sched/linux/CMakeLists.txt
+++ b/libc/src/sched/linux/CMakeLists.txt
@@ -5,6 +5,7 @@ add_entrypoint_object(
HDRS
../sched_getaffinity.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.sched
libc.src.__support.OSUtil.osutil
libc.src.errno.errno
diff --git a/libc/src/sched/linux/sched_getaffinity.cpp b/libc/src/sched/linux/sched_getaffinity.cpp
index e005819..4a5e91a 100644
--- a/libc/src/sched/linux/sched_getaffinity.cpp
+++ b/libc/src/sched/linux/sched_getaffinity.cpp
@@ -8,13 +8,13 @@
#include "src/sched/sched_getaffinity.h"
+#include "hdr/stdint_proxy.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
#include <sched.h>
-#include <stdint.h>
#include <sys/syscall.h> // For syscall numbers.
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/spawn/CMakeLists.txt b/libc/src/spawn/CMakeLists.txt
index 11621da7..fe5f81e 100644
--- a/libc/src/spawn/CMakeLists.txt
+++ b/libc/src/spawn/CMakeLists.txt
@@ -7,6 +7,7 @@ add_header_library(
HDRS
file_actions.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.spawn
)
diff --git a/libc/src/spawn/file_actions.h b/libc/src/spawn/file_actions.h
index 80b9295..c69640a3d 100644
--- a/libc/src/spawn/file_actions.h
+++ b/libc/src/spawn/file_actions.h
@@ -9,9 +9,9 @@
#ifndef LLVM_LIBC_SRC_SPAWN_FILE_ACTIONS_H
#define LLVM_LIBC_SRC_SPAWN_FILE_ACTIONS_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/macros/config.h"
#include <spawn.h> // For mode_t
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/stdio/gpu/CMakeLists.txt b/libc/src/stdio/gpu/CMakeLists.txt
index bea1134..8412153 100644
--- a/libc/src/stdio/gpu/CMakeLists.txt
+++ b/libc/src/stdio/gpu/CMakeLists.txt
@@ -259,6 +259,7 @@ add_entrypoint_object(
HDRS
../fgets.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.hdr.types.FILE
.gpu_file
)
diff --git a/libc/src/stdio/gpu/fgets.cpp b/libc/src/stdio/gpu/fgets.cpp
index 5447e86..e1c6088 100644
--- a/libc/src/stdio/gpu/fgets.cpp
+++ b/libc/src/stdio/gpu/fgets.cpp
@@ -9,12 +9,11 @@
#include "src/stdio/fgets.h"
#include "file.h"
+#include "hdr/stdint_proxy.h"
#include "hdr/stdio_macros.h" // for EOF.
#include "hdr/types/FILE.h"
#include "src/__support/common.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(char *, fgets,
diff --git a/libc/src/stdlib/CMakeLists.txt b/libc/src/stdlib/CMakeLists.txt
index 74ae864..aa653c3 100644
--- a/libc/src/stdlib/CMakeLists.txt
+++ b/libc/src/stdlib/CMakeLists.txt
@@ -191,8 +191,9 @@ add_entrypoint_object(
HDRS
a64l.h
DEPENDS
- libc.src.__support.ctype_utils
+ libc.hdr.stdint_proxy
libc.hdr.types.size_t
+ libc.src.__support.ctype_utils
)
add_entrypoint_object(
@@ -202,8 +203,9 @@ add_entrypoint_object(
HDRS
l64a.h
DEPENDS
- libc.src.__support.ctype_utils
+ libc.hdr.stdint_proxy
libc.hdr.types.size_t
+ libc.src.__support.ctype_utils
)
add_entrypoint_object(
@@ -287,6 +289,7 @@ add_header_library(
heap_sort.h
quick_sort.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.stdlib
libc.src.__support.CPP.cstddef
)
@@ -299,6 +302,7 @@ add_entrypoint_object(
qsort.h
DEPENDS
.qsort_util
+ libc.hdr.stdint_proxy
libc.hdr.types.size_t
)
@@ -310,6 +314,7 @@ add_entrypoint_object(
qsort_r.h
DEPENDS
.qsort_util
+ libc.hdr.stdint_proxy
libc.hdr.types.size_t
)
diff --git a/libc/src/stdlib/a64l.cpp b/libc/src/stdlib/a64l.cpp
index 84be2d2..690b70d 100644
--- a/libc/src/stdlib/a64l.cpp
+++ b/libc/src/stdlib/a64l.cpp
@@ -7,13 +7,12 @@
//===----------------------------------------------------------------------===//
#include "src/stdlib/a64l.h"
+#include "hdr/stdint_proxy.h"
#include "hdr/types/size_t.h"
#include "src/__support/common.h"
#include "src/__support/ctype_utils.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
// I'm not sure this should go in ctype_utils since the specific ordering of
diff --git a/libc/src/stdlib/bsearch.cpp b/libc/src/stdlib/bsearch.cpp
index 69b3e74..f084805 100644
--- a/libc/src/stdlib/bsearch.cpp
+++ b/libc/src/stdlib/bsearch.cpp
@@ -10,7 +10,7 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
+#include "hdr/stdint_proxy.h"
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/stdlib/l64a.cpp b/libc/src/stdlib/l64a.cpp
index b5506c3e..d59e65e 100644
--- a/libc/src/stdlib/l64a.cpp
+++ b/libc/src/stdlib/l64a.cpp
@@ -7,14 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/stdlib/l64a.h"
+#include "hdr/stdint_proxy.h"
#include "hdr/types/size_t.h"
#include "src/__support/common.h"
#include "src/__support/ctype_utils.h"
#include "src/__support/libc_assert.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
// the standard says to only use up to 6 characters. Null terminator is
diff --git a/libc/src/stdlib/qsort.cpp b/libc/src/stdlib/qsort.cpp
index 0bf5fc7..f66b686 100644
--- a/libc/src/stdlib/qsort.cpp
+++ b/libc/src/stdlib/qsort.cpp
@@ -7,12 +7,11 @@
//===----------------------------------------------------------------------===//
#include "src/stdlib/qsort.h"
+#include "hdr/stdint_proxy.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/stdlib/qsort_util.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(void, qsort,
diff --git a/libc/src/stdlib/qsort_data.h b/libc/src/stdlib/qsort_data.h
index aa6d9bb..739fce8 100644
--- a/libc/src/stdlib/qsort_data.h
+++ b/libc/src/stdlib/qsort_data.h
@@ -9,11 +9,10 @@
#ifndef LLVM_LIBC_SRC_STDLIB_QSORT_DATA_H
#define LLVM_LIBC_SRC_STDLIB_QSORT_DATA_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/cstddef.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/stdlib/qsort_r.cpp b/libc/src/stdlib/qsort_r.cpp
index 4e60998..4744820 100644
--- a/libc/src/stdlib/qsort_r.cpp
+++ b/libc/src/stdlib/qsort_r.cpp
@@ -7,12 +7,11 @@
//===----------------------------------------------------------------------===//
#include "src/stdlib/qsort_r.h"
+#include "hdr/stdint_proxy.h"
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/stdlib/qsort_util.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(void, qsort_r,
diff --git a/libc/src/stdlib/quick_sort.h b/libc/src/stdlib/quick_sort.h
index 8ba0098..00115bd 100644
--- a/libc/src/stdlib/quick_sort.h
+++ b/libc/src/stdlib/quick_sort.h
@@ -9,13 +9,12 @@
#ifndef LLVM_LIBC_SRC_STDLIB_QUICK_SORT_H
#define LLVM_LIBC_SRC_STDLIB_QUICK_SORT_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/cstddef.h"
#include "src/__support/macros/config.h"
#include "src/stdlib/qsort_pivot.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/string/CMakeLists.txt b/libc/src/string/CMakeLists.txt
index 8784bc3..809decf 100644
--- a/libc/src/string/CMakeLists.txt
+++ b/libc/src/string/CMakeLists.txt
@@ -17,6 +17,7 @@ add_header_library(
DEPENDS
libc.hdr.types.size_t
libc.hdr.limits_macros
+ libc.hdr.stdint_proxy
libc.src.__support.CPP.bitset
libc.src.__support.CPP.type_traits
libc.src.__support.common
diff --git a/libc/src/string/memory_utils/CMakeLists.txt b/libc/src/string/memory_utils/CMakeLists.txt
index 8ab1c9f..670db30 100644
--- a/libc/src/string/memory_utils/CMakeLists.txt
+++ b/libc/src/string/memory_utils/CMakeLists.txt
@@ -34,6 +34,7 @@ add_header_library(
x86_64/inline_memmove.h
x86_64/inline_memset.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.src.__support.common
libc.src.__support.CPP.bit
libc.src.__support.CPP.cstddef
diff --git a/libc/src/string/memory_utils/op_generic.h b/libc/src/string/memory_utils/op_generic.h
index 9349cfdd..3760341 100644
--- a/libc/src/string/memory_utils/op_generic.h
+++ b/libc/src/string/memory_utils/op_generic.h
@@ -23,6 +23,7 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_GENERIC_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_OP_GENERIC_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/array.h"
#include "src/__support/CPP/type_traits.h"
#include "src/__support/common.h"
@@ -34,8 +35,6 @@
#include "src/string/memory_utils/op_builtin.h"
#include "src/string/memory_utils/utils.h"
-#include <stdint.h>
-
static_assert((UINTPTR_MAX == 4294967295U) ||
(UINTPTR_MAX == 18446744073709551615UL),
"We currently only support 32- or 64-bit platforms");
diff --git a/libc/src/string/memory_utils/utils.h b/libc/src/string/memory_utils/utils.h
index c08608c..0f9c9e3 100644
--- a/libc/src/string/memory_utils/utils.h
+++ b/libc/src/string/memory_utils/utils.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_UTILS_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_UTILS_H
+#include "hdr/stdint_proxy.h" // intptr_t / uintptr_t / INT32_MAX / INT32_MIN
#include "src/__support/CPP/bit.h"
#include "src/__support/CPP/cstddef.h"
#include "src/__support/CPP/type_traits.h"
@@ -18,7 +19,6 @@
#include "src/__support/macros/properties/architectures.h"
#include <stddef.h> // size_t
-#include <stdint.h> // intptr_t / uintptr_t / INT32_MAX / INT32_MIN
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/string/memory_utils/x86_64/inline_memcpy.h b/libc/src/string/memory_utils/x86_64/inline_memcpy.h
index 68f64fb..bf3aa1f 100644
--- a/libc/src/string/memory_utils/x86_64/inline_memcpy.h
+++ b/libc/src/string/memory_utils/x86_64/inline_memcpy.h
@@ -8,6 +8,7 @@
#ifndef LLVM_LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_MEMCPY_H
#define LLVM_LIBC_SRC_STRING_MEMORY_UTILS_X86_64_INLINE_MEMCPY_H
+#include "hdr/stdint_proxy.h" // SIZE_MAX
#include "src/__support/macros/attributes.h" // LIBC_INLINE_VAR
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/string/memory_utils/op_builtin.h"
@@ -15,7 +16,6 @@
#include "src/string/memory_utils/utils.h"
#include <stddef.h> // size_t
-#include <stdint.h> // SIZE_MAX
#ifdef LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB
#error LLVM_LIBC_MEMCPY_X86_USE_ONLY_REPMOVSB is deprecated use LIBC_COPT_MEMCPY_X86_USE_REPMOVSB_FROM_SIZE=0 instead.
diff --git a/libc/src/string/string_utils.h b/libc/src/string/string_utils.h
index 1231117..80e5783 100644
--- a/libc/src/string/string_utils.h
+++ b/libc/src/string/string_utils.h
@@ -15,14 +15,13 @@
#define LLVM_LIBC_SRC_STRING_STRING_UTILS_H
#include "hdr/limits_macros.h"
+#include "hdr/stdint_proxy.h" // uintptr_t
#include "hdr/types/size_t.h"
#include "src/__support/CPP/bitset.h"
#include "src/__support/CPP/type_traits.h" // cpp::is_same_v
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
-#include <stdint.h> // uintptr_t
-
namespace LIBC_NAMESPACE_DECL {
namespace internal {
diff --git a/libc/src/sys/stat/linux/CMakeLists.txt b/libc/src/sys/stat/linux/CMakeLists.txt
index 9aeb146..c99872c 100644
--- a/libc/src/sys/stat/linux/CMakeLists.txt
+++ b/libc/src/sys/stat/linux/CMakeLists.txt
@@ -73,6 +73,7 @@ add_header_library(
HDRS
kernel_statx.h
DEPENDS
+ libc.hdr.stdint_proxy
libc.include.sys_stat
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
diff --git a/libc/src/sys/stat/linux/kernel_statx.h b/libc/src/sys/stat/linux/kernel_statx.h
index d0e223a..455ab17 100644
--- a/libc/src/sys/stat/linux/kernel_statx.h
+++ b/libc/src/sys/stat/linux/kernel_statx.h
@@ -9,11 +9,11 @@
#ifndef LLVM_LIBC_SRC_SYS_STAT_LINUX_KERNEL_STATX_H
#define LLVM_LIBC_SRC_SYS_STAT_LINUX_KERNEL_STATX_H
+#include "hdr/stdint_proxy.h"
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
-#include <stdint.h>
#include <sys/stat.h>
#include <sys/syscall.h> // For syscall numbers.
diff --git a/libc/src/time/CMakeLists.txt b/libc/src/time/CMakeLists.txt
index 3b951df..304b3f2 100644
--- a/libc/src/time/CMakeLists.txt
+++ b/libc/src/time/CMakeLists.txt
@@ -7,10 +7,11 @@ add_header_library(
HDRS
time_constants.h
DEPENDS
+ libc.hdr.stdint_proxy
+ libc.hdr.types.time_t
libc.include.time
libc.src.__support.CPP.array
libc.src.__support.CPP.string_view
- libc.hdr.types.time_t
)
add_object_library(
@@ -29,6 +30,7 @@ add_object_library(
libc.hdr.types.time_t
libc.hdr.types.size_t
libc.hdr.types.struct_tm
+ libc.hdr.stdint_proxy
)
add_entrypoint_object(
diff --git a/libc/src/time/linux/CMakeLists.txt b/libc/src/time/linux/CMakeLists.txt
index 314623f..a6ec7c7 100644
--- a/libc/src/time/linux/CMakeLists.txt
+++ b/libc/src/time/linux/CMakeLists.txt
@@ -34,6 +34,7 @@ add_entrypoint_object(
../nanosleep.h
DEPENDS
libc.hdr.types.struct_timespec
+ libc.hdr.stdint_proxy
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
libc.src.__support.CPP.limits
diff --git a/libc/src/time/linux/nanosleep.cpp b/libc/src/time/linux/nanosleep.cpp
index 6b97041..e5df158 100644
--- a/libc/src/time/linux/nanosleep.cpp
+++ b/libc/src/time/linux/nanosleep.cpp
@@ -7,13 +7,13 @@
//===----------------------------------------------------------------------===//
#include "src/time/nanosleep.h"
+#include "hdr/stdint_proxy.h" // For int64_t.
#include "hdr/time_macros.h"
#include "src/__support/OSUtil/syscall.h" // For syscall functions.
#include "src/__support/common.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include <stdint.h> // For int64_t.
#include <sys/syscall.h> // For syscall numbers.
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/time/strftime_core/CMakeLists.txt b/libc/src/time/strftime_core/CMakeLists.txt
index 5e40e66..3ffd283 100644
--- a/libc/src/time/strftime_core/CMakeLists.txt
+++ b/libc/src/time/strftime_core/CMakeLists.txt
@@ -5,6 +5,7 @@ add_header_library(
DEPENDS
libc.src.__support.CPP.string_view
libc.hdr.types.struct_tm
+ libc.hdr.stdint_proxy
)
add_header_library(
diff --git a/libc/src/time/strftime_core/core_structs.h b/libc/src/time/strftime_core/core_structs.h
index 25bf5e6..9da57aa 100644
--- a/libc/src/time/strftime_core/core_structs.h
+++ b/libc/src/time/strftime_core/core_structs.h
@@ -9,11 +9,10 @@
#ifndef LLVM_LIBC_SRC_STDIO_STRFTIME_CORE_CORE_STRUCTS_H
#define LLVM_LIBC_SRC_STDIO_STRFTIME_CORE_CORE_STRUCTS_H
+#include "hdr/stdint_proxy.h"
#include "hdr/types/struct_tm.h"
#include "src/__support/CPP/string_view.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace strftime_core {
diff --git a/libc/src/time/time_constants.h b/libc/src/time/time_constants.h
index 0fcb7ff..32eb0a1 100644
--- a/libc/src/time/time_constants.h
+++ b/libc/src/time/time_constants.h
@@ -9,10 +9,10 @@
#ifndef LLVM_LIBC_SRC_TIME_TIME_CONSTANTS_H
#define LLVM_LIBC_SRC_TIME_TIME_CONSTANTS_H
+#include "hdr/stdint_proxy.h"
#include "hdr/types/time_t.h"
#include "src/__support/CPP/array.h"
#include "src/__support/CPP/string_view.h"
-#include <stdint.h>
namespace LIBC_NAMESPACE_DECL {
namespace time_constants {
diff --git a/libc/src/time/time_utils.cpp b/libc/src/time/time_utils.cpp
index 1c519c3..1d0daea 100644
--- a/libc/src/time/time_utils.cpp
+++ b/libc/src/time/time_utils.cpp
@@ -7,13 +7,12 @@
//===----------------------------------------------------------------------===//
#include "src/time/time_utils.h"
+#include "hdr/stdint_proxy.h"
#include "src/__support/CPP/limits.h" // INT_MIN, INT_MAX
#include "src/__support/common.h"
#include "src/__support/macros/config.h"
#include "src/time/time_constants.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace time_utils {
diff --git a/libc/src/time/time_utils.h b/libc/src/time/time_utils.h
index 0541c24..84d412c 100644
--- a/libc/src/time/time_utils.h
+++ b/libc/src/time/time_utils.h
@@ -9,6 +9,7 @@
#ifndef LLVM_LIBC_SRC_TIME_TIME_UTILS_H
#define LLVM_LIBC_SRC_TIME_TIME_UTILS_H
+#include "hdr/stdint_proxy.h"
#include "hdr/types/size_t.h"
#include "hdr/types/struct_tm.h"
#include "hdr/types/time_t.h"
@@ -19,8 +20,6 @@
#include "src/__support/macros/config.h"
#include "time_constants.h"
-#include <stdint.h>
-
namespace LIBC_NAMESPACE_DECL {
namespace time_utils {
diff --git a/libc/src/unistd/linux/CMakeLists.txt b/libc/src/unistd/linux/CMakeLists.txt
index 368593a..382a61f 100644
--- a/libc/src/unistd/linux/CMakeLists.txt
+++ b/libc/src/unistd/linux/CMakeLists.txt
@@ -172,6 +172,7 @@ add_entrypoint_object(
DEPENDS
libc.hdr.types.off_t
libc.hdr.fcntl_macros
+ libc.hdr.stdint_proxy
libc.include.unistd
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
@@ -385,6 +386,7 @@ add_entrypoint_object(
libc.hdr.types.size_t
libc.hdr.types.ssize_t
libc.hdr.fcntl_macros
+ libc.hdr.stdint_proxy
libc.include.unistd
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
@@ -403,6 +405,7 @@ add_entrypoint_object(
libc.hdr.types.size_t
libc.hdr.types.ssize_t
libc.hdr.fcntl_macros
+ libc.hdr.stdint_proxy
libc.include.unistd
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
@@ -546,6 +549,7 @@ add_entrypoint_object(
DEPENDS
libc.hdr.types.off_t
libc.hdr.fcntl_macros
+ libc.hdr.stdint_proxy
libc.include.unistd
libc.include.sys_syscall
libc.src.__support.OSUtil.osutil
diff --git a/libc/src/unistd/linux/ftruncate.cpp b/libc/src/unistd/linux/ftruncate.cpp
index f6aa6f8..b4729f8 100644
--- a/libc/src/unistd/linux/ftruncate.cpp
+++ b/libc/src/unistd/linux/ftruncate.cpp
@@ -11,10 +11,10 @@
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
+#include "hdr/stdint_proxy.h" // For uint64_t.
#include "hdr/unistd_macros.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include <stdint.h> // For uint64_t.
#include <sys/syscall.h> // For syscall numbers.
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/unistd/linux/pread.cpp b/libc/src/unistd/linux/pread.cpp
index 2f86e39..cf3152d 100644
--- a/libc/src/unistd/linux/pread.cpp
+++ b/libc/src/unistd/linux/pread.cpp
@@ -8,12 +8,12 @@
#include "src/unistd/pread.h"
+#include "hdr/stdint_proxy.h" // For uint64_t.
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
#include "src/__support/macros/sanitizer.h" // for MSAN_UNPOISON
-#include <stdint.h> // For uint64_t.
#include <sys/syscall.h> // For syscall numbers.
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/unistd/linux/pwrite.cpp b/libc/src/unistd/linux/pwrite.cpp
index f4cf8e1..7672063 100644
--- a/libc/src/unistd/linux/pwrite.cpp
+++ b/libc/src/unistd/linux/pwrite.cpp
@@ -11,9 +11,9 @@
#include "src/__support/OSUtil/syscall.h" // For internal syscall function.
#include "src/__support/common.h"
+#include "hdr/stdint_proxy.h" // For uint64_t.
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
-#include <stdint.h> // For uint64_t.
#include <sys/syscall.h> // For syscall numbers.
namespace LIBC_NAMESPACE_DECL {
diff --git a/libc/src/unistd/linux/truncate.cpp b/libc/src/unistd/linux/truncate.cpp
index 6103d4b..204b27f7 100644
--- a/libc/src/unistd/linux/truncate.cpp
+++ b/libc/src/unistd/linux/truncate.cpp
@@ -13,8 +13,8 @@
#include "src/__support/libc_errno.h"
#include "src/__support/macros/config.h"
+#include "hdr/stdint_proxy.h" // For uint64_t.
#include "hdr/unistd_macros.h"
-#include <stdint.h> // For uint64_t.
#include <sys/syscall.h> // For syscall numbers.
namespace LIBC_NAMESPACE_DECL {