diff --git a/libc/include/llvm-libc-macros/linux/error-number-macros.h b/libc/include/llvm-libc-macros/linux/error-number-macros.h index 1643a70918da4..9a7304fa161ad 100644 --- a/libc/include/llvm-libc-macros/linux/error-number-macros.h +++ b/libc/include/llvm-libc-macros/linux/error-number-macros.h @@ -21,4 +21,12 @@ #define EHWPOISON 133 #endif // EHWPOISON +#ifndef EOPNOTSUPP +#define EOPNOTSUPP 95 +#endif + +#ifndef ENOTSUP +#define ENOTSUP EOPNOTSUPP +#endif + #endif // LLVM_LIBC_MACROS_LINUX_ERROR_NUMBER_MACROS_H diff --git a/libc/src/__support/StringUtil/tables/CMakeLists.txt b/libc/src/__support/StringUtil/tables/CMakeLists.txt index b7bb33ee0a0fe..ad4007f494749 100644 --- a/libc/src/__support/StringUtil/tables/CMakeLists.txt +++ b/libc/src/__support/StringUtil/tables/CMakeLists.txt @@ -3,7 +3,7 @@ add_header_library( HDRS stdc_errors.h DEPENDS - libc.include.errno + libc.src.errno.errno libc.src.__support.StringUtil.message_mapper ) @@ -12,7 +12,7 @@ add_header_library( HDRS posix_errors.h DEPENDS - libc.include.errno + libc.src.errno.errno libc.src.__support.StringUtil.message_mapper ) @@ -21,8 +21,8 @@ add_header_library( HDRS linux_extension_errors.h DEPENDS - libc.include.errno libc.src.__support.StringUtil.message_mapper + libc.src.errno.errno ) add_header_library( diff --git a/libc/src/__support/StringUtil/tables/linux_extension_errors.h b/libc/src/__support/StringUtil/tables/linux_extension_errors.h index f6e8dea154d3b..425590f6e91c9 100644 --- a/libc/src/__support/StringUtil/tables/linux_extension_errors.h +++ b/libc/src/__support/StringUtil/tables/linux_extension_errors.h @@ -11,8 +11,7 @@ #include "src/__support/StringUtil/message_mapper.h" #include "src/__support/macros/config.h" - -#include // For error macros +#include "src/errno/libc_errno.h" namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/__support/StringUtil/tables/posix_errors.h b/libc/src/__support/StringUtil/tables/posix_errors.h index 5294f85eb8d24..b21f28f0b1321 100644 --- a/libc/src/__support/StringUtil/tables/posix_errors.h +++ b/libc/src/__support/StringUtil/tables/posix_errors.h @@ -9,11 +9,10 @@ #ifndef LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_POSIX_ERRORS_H #define LLVM_LIBC_SRC___SUPPORT_STRINGUTIL_TABLES_POSIX_ERRORS_H +#include "hdr/errno_macros.h" #include "src/__support/StringUtil/message_mapper.h" #include "src/__support/macros/config.h" -#include // For error macros - namespace LIBC_NAMESPACE_DECL { LIBC_INLINE_VAR constexpr MsgTable<76> POSIX_ERRORS = { diff --git a/libc/src/__support/StringUtil/tables/stdc_errors.h b/libc/src/__support/StringUtil/tables/stdc_errors.h index 1f0beef82001c..b2a0d36a53637 100644 --- a/libc/src/__support/StringUtil/tables/stdc_errors.h +++ b/libc/src/__support/StringUtil/tables/stdc_errors.h @@ -12,8 +12,6 @@ #include "src/__support/StringUtil/message_mapper.h" #include "src/__support/macros/config.h" -#include // For error macros - namespace LIBC_NAMESPACE_DECL { LIBC_INLINE_VAR constexpr const MsgTable<4> STDC_ERRORS = { diff --git a/libc/src/math/generic/CMakeLists.txt b/libc/src/math/generic/CMakeLists.txt index 93e632c38af23..627168ee13699 100644 --- a/libc/src/math/generic/CMakeLists.txt +++ b/libc/src/math/generic/CMakeLists.txt @@ -1372,7 +1372,6 @@ add_entrypoint_object( DEPENDS .common_constants .explogxf - libc.include.errno libc.src.__support.CPP.bit libc.src.__support.CPP.optional libc.src.__support.FPUtil.dyadic_float @@ -1406,7 +1405,6 @@ add_entrypoint_object( libc.src.__support.FPUtil.polyeval libc.src.__support.FPUtil.rounding_mode libc.src.__support.macros.optimization - libc.include.errno libc.src.errno.errno COMPILE_OPTIONS -O3 @@ -1445,7 +1443,6 @@ add_entrypoint_object( DEPENDS .common_constants .explogxf - libc.include.errno libc.src.__support.CPP.bit libc.src.__support.CPP.optional libc.src.__support.FPUtil.dyadic_float @@ -1478,7 +1475,6 @@ add_header_library( libc.src.__support.FPUtil.rounding_mode libc.src.__support.macros.optimization libc.src.__support.common - libc.include.errno libc.src.errno.errno ) @@ -1548,7 +1544,6 @@ add_entrypoint_object( DEPENDS .common_constants .explogxf - libc.include.errno libc.src.__support.CPP.bit libc.src.__support.CPP.optional libc.src.__support.FPUtil.dyadic_float @@ -1580,7 +1575,6 @@ add_header_library( libc.src.__support.FPUtil.rounding_mode libc.src.__support.macros.optimization libc.src.__support.common - libc.include.errno libc.src.errno.errno COMPILE_OPTIONS -O3 @@ -1632,7 +1626,6 @@ add_entrypoint_object( DEPENDS .common_constants .explogxf - libc.include.errno libc.src.__support.CPP.bit libc.src.__support.CPP.optional libc.src.__support.FPUtil.dyadic_float @@ -1666,7 +1659,6 @@ add_entrypoint_object( libc.src.__support.FPUtil.polyeval libc.src.__support.FPUtil.rounding_mode libc.src.__support.macros.optimization - libc.include.errno libc.src.errno.errno COMPILE_OPTIONS -O3 @@ -1705,7 +1697,6 @@ add_entrypoint_object( .exp10f_impl .exp2f_impl .explogxf - libc.include.errno libc.src.__support.CPP.bit libc.src.__support.CPP.optional libc.src.__support.FPUtil.fenv_impl @@ -4144,7 +4135,6 @@ add_object_library( libc.src.__support.FPUtil.nearest_integer libc.src.__support.FPUtil.polyeval libc.src.__support.common - libc.include.errno libc.src.errno.errno COMPILE_OPTIONS -O3 diff --git a/libc/src/math/generic/acosf.cpp b/libc/src/math/generic/acosf.cpp index 95d8bc0213cba..3c097a7871380 100644 --- a/libc/src/math/generic/acosf.cpp +++ b/libc/src/math/generic/acosf.cpp @@ -16,8 +16,6 @@ #include "src/__support/macros/config.h" #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY -#include - #include "inv_trigf_utils.h" namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/math/generic/asinf.cpp b/libc/src/math/generic/asinf.cpp index d6acc3a1692bc..3a89def8f6e0c 100644 --- a/libc/src/math/generic/asinf.cpp +++ b/libc/src/math/generic/asinf.cpp @@ -17,8 +17,6 @@ #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY #include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA -#include - #include "inv_trigf_utils.h" namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/math/generic/cosf.cpp b/libc/src/math/generic/cosf.cpp index 6a59b3763b6e8..972ffa923aedf 100644 --- a/libc/src/math/generic/cosf.cpp +++ b/libc/src/math/generic/cosf.cpp @@ -18,8 +18,6 @@ #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY #include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA -#include - namespace LIBC_NAMESPACE_DECL { // Exceptional cases for cosf. diff --git a/libc/src/math/generic/exp.cpp b/libc/src/math/generic/exp.cpp index df0c2eab7155c..38b683aa01166 100644 --- a/libc/src/math/generic/exp.cpp +++ b/libc/src/math/generic/exp.cpp @@ -25,8 +25,6 @@ #include "src/__support/macros/config.h" #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY -#include - namespace LIBC_NAMESPACE_DECL { using fputil::DoubleDouble; diff --git a/libc/src/math/generic/exp10.cpp b/libc/src/math/generic/exp10.cpp index d01bbd8fc01c3..748c8a22b2368 100644 --- a/libc/src/math/generic/exp10.cpp +++ b/libc/src/math/generic/exp10.cpp @@ -25,8 +25,6 @@ #include "src/__support/macros/config.h" #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY -#include - namespace LIBC_NAMESPACE_DECL { using fputil::DoubleDouble; diff --git a/libc/src/math/generic/exp10f_impl.h b/libc/src/math/generic/exp10f_impl.h index fe2195c6e0473..d741318382e1f 100644 --- a/libc/src/math/generic/exp10f_impl.h +++ b/libc/src/math/generic/exp10f_impl.h @@ -21,8 +21,6 @@ #include "src/__support/macros/config.h" #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY -#include - namespace LIBC_NAMESPACE_DECL { namespace generic { diff --git a/libc/src/math/generic/exp2.cpp b/libc/src/math/generic/exp2.cpp index fbabb625af51f..935548b538b94 100644 --- a/libc/src/math/generic/exp2.cpp +++ b/libc/src/math/generic/exp2.cpp @@ -25,8 +25,6 @@ #include "src/__support/macros/config.h" #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY -#include - namespace LIBC_NAMESPACE_DECL { using fputil::DoubleDouble; diff --git a/libc/src/math/generic/exp2f_impl.h b/libc/src/math/generic/exp2f_impl.h index 3f1c5ee68f081..ae2d0628c1205 100644 --- a/libc/src/math/generic/exp2f_impl.h +++ b/libc/src/math/generic/exp2f_impl.h @@ -21,8 +21,6 @@ #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY #include "src/__support/macros/properties/cpu_features.h" -#include - #include "explogxf.h" namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/math/generic/expf.cpp b/libc/src/math/generic/expf.cpp index 1d7c0478eb225..ee5c2a32b6c6b 100644 --- a/libc/src/math/generic/expf.cpp +++ b/libc/src/math/generic/expf.cpp @@ -19,8 +19,6 @@ #include "src/__support/macros/config.h" #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY -#include - namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(float, expf, (float x)) { diff --git a/libc/src/math/generic/explogxf.h b/libc/src/math/generic/explogxf.h index 7daed558f74b1..f3f50c21aacce 100644 --- a/libc/src/math/generic/explogxf.h +++ b/libc/src/math/generic/explogxf.h @@ -20,8 +20,6 @@ #include "src/__support/macros/config.h" #include "src/__support/macros/properties/cpu_features.h" -#include - namespace LIBC_NAMESPACE_DECL { struct ExpBase { diff --git a/libc/src/math/generic/expm1f.cpp b/libc/src/math/generic/expm1f.cpp index b1a0fe16de077..d5e9e85ed4bd3 100644 --- a/libc/src/math/generic/expm1f.cpp +++ b/libc/src/math/generic/expm1f.cpp @@ -21,8 +21,6 @@ #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY #include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA -#include - namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(float, expm1f, (float x)) { diff --git a/libc/src/math/generic/powf.cpp b/libc/src/math/generic/powf.cpp index e3dee678a1a70..8ce2465ba229c 100644 --- a/libc/src/math/generic/powf.cpp +++ b/libc/src/math/generic/powf.cpp @@ -25,8 +25,6 @@ #include "exp10f_impl.h" // Speedup for powf(10, y) = exp10f(y) #include "exp2f_impl.h" // Speedup for powf(2, y) = exp2f(y) -#include - namespace LIBC_NAMESPACE_DECL { using fputil::DoubleDouble; diff --git a/libc/src/math/generic/sincosf.cpp b/libc/src/math/generic/sincosf.cpp index 3bf8e9772231d..ccaa29c10c4c6 100644 --- a/libc/src/math/generic/sincosf.cpp +++ b/libc/src/math/generic/sincosf.cpp @@ -17,8 +17,6 @@ #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY #include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA -#include - namespace LIBC_NAMESPACE_DECL { // Exceptional values diff --git a/libc/src/math/generic/sinf.cpp b/libc/src/math/generic/sinf.cpp index 43c2c2a8d883d..cea267d4c683e 100644 --- a/libc/src/math/generic/sinf.cpp +++ b/libc/src/math/generic/sinf.cpp @@ -19,8 +19,6 @@ #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY #include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA -#include - #if defined(LIBC_TARGET_CPU_HAS_FMA) #include "range_reduction_fma.h" #else diff --git a/libc/src/math/generic/tanf.cpp b/libc/src/math/generic/tanf.cpp index 01d8c9855d461..6fd5f9a103676 100644 --- a/libc/src/math/generic/tanf.cpp +++ b/libc/src/math/generic/tanf.cpp @@ -19,8 +19,6 @@ #include "src/__support/macros/optimization.h" // LIBC_UNLIKELY #include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA -#include - namespace LIBC_NAMESPACE_DECL { // Exceptional cases for tanf. diff --git a/libc/src/pthread/CMakeLists.txt b/libc/src/pthread/CMakeLists.txt index e7e92e5b60dc2..8480fd8942222 100644 --- a/libc/src/pthread/CMakeLists.txt +++ b/libc/src/pthread/CMakeLists.txt @@ -36,6 +36,7 @@ add_entrypoint_object( pthread_attr_setdetachstate.h DEPENDS libc.include.pthread + libc.src.errno.errno ) add_entrypoint_object( @@ -56,6 +57,7 @@ add_entrypoint_object( pthread_attr_setguardsize.h DEPENDS libc.include.pthread + libc.src.errno.errno ) add_entrypoint_object( @@ -76,6 +78,7 @@ add_entrypoint_object( pthread_attr_setstacksize.h DEPENDS libc.include.pthread + libc.src.errno.errno ) add_entrypoint_object( @@ -98,6 +101,7 @@ add_entrypoint_object( DEPENDS libc.include.pthread libc.src.pthread.pthread_attr_setstacksize + libc.src.errno.errno ) add_entrypoint_object( @@ -149,10 +153,10 @@ add_entrypoint_object( HDRS pthread_condattr_setclock.h DEPENDS - libc.include.errno libc.include.pthread libc.include.sys_types libc.include.time + libc.src.errno.errno ) add_entrypoint_object( @@ -163,6 +167,7 @@ add_entrypoint_object( pthread_condattr_setpshared.h DEPENDS libc.include.pthread + libc.src.errno.errno ) add_header_library( @@ -205,6 +210,7 @@ add_entrypoint_object( DEPENDS .pthread_mutexattr libc.include.pthread + libc.src.errno.errno ) add_entrypoint_object( @@ -215,7 +221,7 @@ add_entrypoint_object( pthread_mutexattr_destroy.h DEPENDS .pthread_mutexattr - libc.include.errno + libc.src.errno.errno libc.include.pthread ) @@ -238,8 +244,8 @@ add_entrypoint_object( pthread_mutexattr_setrobust.h DEPENDS .pthread_mutexattr - libc.include.errno libc.include.pthread + libc.src.errno.errno ) add_entrypoint_object( @@ -261,8 +267,8 @@ add_entrypoint_object( pthread_mutexattr_setpshared.h DEPENDS .pthread_mutexattr - libc.include.errno libc.include.pthread + libc.src.errno.errno ) add_entrypoint_object( @@ -273,7 +279,7 @@ add_entrypoint_object( pthread_mutex_init.h DEPENDS .pthread_mutexattr - libc.include.errno + libc.src.errno.errno libc.include.pthread libc.src.__support.threads.mutex ) @@ -318,7 +324,6 @@ add_entrypoint_object( HDRS pthread_create.h DEPENDS - libc.include.errno libc.include.pthread libc.src.__support.threads.thread libc.src.pthread.pthread_attr_destroy @@ -326,6 +331,7 @@ add_entrypoint_object( libc.src.pthread.pthread_attr_getdetachstate libc.src.pthread.pthread_attr_getguardsize libc.src.pthread.pthread_attr_getstack + libc.src.errno.errno COMPILE_OPTIONS -O3 -fno-omit-frame-pointer @@ -419,9 +425,9 @@ add_entrypoint_object( HDRS pthread_key_create.h DEPENDS - libc.include.errno libc.include.pthread libc.src.__support.threads.thread + libc.src.errno.errno ) add_entrypoint_object( @@ -431,9 +437,9 @@ add_entrypoint_object( HDRS pthread_key_delete.h DEPENDS - libc.include.errno libc.include.pthread libc.src.__support.threads.thread + libc.src.errno.errno ) add_entrypoint_object( @@ -443,8 +449,8 @@ add_entrypoint_object( HDRS pthread_getspecific.h DEPENDS - libc.include.errno libc.include.pthread + libc.src.errno.errno libc.src.__support.threads.thread ) @@ -455,9 +461,9 @@ add_entrypoint_object( HDRS pthread_setspecific.h DEPENDS - libc.include.errno libc.include.pthread libc.src.__support.threads.thread + libc.src.errno.errno ) add_entrypoint_object( @@ -508,7 +514,7 @@ add_entrypoint_object( pthread_rwlockattr_setkind_np.h DEPENDS libc.include.pthread - libc.include.errno + libc.src.errno.errno ) add_entrypoint_object( @@ -519,7 +525,7 @@ add_entrypoint_object( pthread_rwlockattr_setpshared.h DEPENDS libc.include.pthread - libc.include.errno + libc.src.errno.errno ) add_entrypoint_object( @@ -554,6 +560,7 @@ add_entrypoint_object( DEPENDS libc.include.pthread libc.src.__support.threads.linux.rwlock + libc.src.errno.errno ) add_entrypoint_object( @@ -587,6 +594,7 @@ add_entrypoint_object( DEPENDS libc.include.pthread libc.src.__support.threads.linux.rwlock + libc.src.errno.errno ) add_entrypoint_object( @@ -631,6 +639,7 @@ add_entrypoint_object( DEPENDS libc.include.pthread libc.src.__support.threads.linux.rwlock + libc.src.errno.errno ) add_entrypoint_object( @@ -727,7 +736,7 @@ add_entrypoint_object( HDRS pthread_atfork.h DEPENDS - libc.include.errno libc.include.pthread libc.src.__support.threads.fork_callbacks + libc.src.errno.errno ) diff --git a/libc/src/pthread/pthread_atfork.cpp b/libc/src/pthread/pthread_atfork.cpp index d3f3c259992ec..b2c67c78e5d94 100644 --- a/libc/src/pthread/pthread_atfork.cpp +++ b/libc/src/pthread/pthread_atfork.cpp @@ -11,8 +11,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" #include "src/__support/threads/fork_callbacks.h" +#include "src/errno/libc_errno.h" -#include #include // For pthread_* type definitions. namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_attr_setdetachstate.cpp b/libc/src/pthread/pthread_attr_setdetachstate.cpp index 3aa72d217f28b..872f694e01f3a 100644 --- a/libc/src/pthread/pthread_attr_setdetachstate.cpp +++ b/libc/src/pthread/pthread_attr_setdetachstate.cpp @@ -10,8 +10,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_attr_setguardsize.cpp b/libc/src/pthread/pthread_attr_setguardsize.cpp index 389ee773fc5db..fa4375e915ab4 100644 --- a/libc/src/pthread/pthread_attr_setguardsize.cpp +++ b/libc/src/pthread/pthread_attr_setguardsize.cpp @@ -10,8 +10,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include // For EXEC_PAGESIZE. #include diff --git a/libc/src/pthread/pthread_attr_setstack.cpp b/libc/src/pthread/pthread_attr_setstack.cpp index f4f2d1450633e..1154055a63a7e 100644 --- a/libc/src/pthread/pthread_attr_setstack.cpp +++ b/libc/src/pthread/pthread_attr_setstack.cpp @@ -12,8 +12,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" #include "src/__support/threads/thread.h" // For STACK_ALIGNMENT +#include "src/errno/libc_errno.h" -#include #include #include diff --git a/libc/src/pthread/pthread_attr_setstacksize.cpp b/libc/src/pthread/pthread_attr_setstacksize.cpp index f327d3365b5d8..0a5d1af661abf 100644 --- a/libc/src/pthread/pthread_attr_setstacksize.cpp +++ b/libc/src/pthread/pthread_attr_setstacksize.cpp @@ -10,8 +10,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_condattr_setclock.cpp b/libc/src/pthread/pthread_condattr_setclock.cpp index 5c0144523f93e..37fbd6b27143d 100644 --- a/libc/src/pthread/pthread_condattr_setclock.cpp +++ b/libc/src/pthread/pthread_condattr_setclock.cpp @@ -10,8 +10,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include // EINVAL #include // pthread_condattr_t #include // clockid_t #include // CLOCK_MONOTONIC, CLOCK_REALTIME diff --git a/libc/src/pthread/pthread_condattr_setpshared.cpp b/libc/src/pthread/pthread_condattr_setpshared.cpp index 536aeadac5d44..433b2dc1d2d93 100644 --- a/libc/src/pthread/pthread_condattr_setpshared.cpp +++ b/libc/src/pthread/pthread_condattr_setpshared.cpp @@ -10,8 +10,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include // EINVAL #include // pthread_condattr_t, PTHREAD_PROCESS_SHARED, PTHREAD_PROCESS_PRIVATE namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_create.cpp b/libc/src/pthread/pthread_create.cpp index 1fb4b50109401..e1b1f3b325d1c 100644 --- a/libc/src/pthread/pthread_create.cpp +++ b/libc/src/pthread/pthread_create.cpp @@ -19,8 +19,8 @@ #include "src/__support/macros/config.h" #include "src/__support/macros/optimization.h" #include "src/__support/threads/thread.h" +#include "src/errno/libc_errno.h" -#include #include // For pthread_* type definitions. namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_key_create.cpp b/libc/src/pthread/pthread_key_create.cpp index 0583baca22f4d..383762f273e7a 100644 --- a/libc/src/pthread/pthread_key_create.cpp +++ b/libc/src/pthread/pthread_key_create.cpp @@ -11,8 +11,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" #include "src/__support/threads/thread.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_key_delete.cpp b/libc/src/pthread/pthread_key_delete.cpp index 20484fa9bdf82..b54db821ab05a 100644 --- a/libc/src/pthread/pthread_key_delete.cpp +++ b/libc/src/pthread/pthread_key_delete.cpp @@ -11,8 +11,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" #include "src/__support/threads/thread.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_mutex_init.cpp b/libc/src/pthread/pthread_mutex_init.cpp index 0281f732473d9..94052e53d8c0a 100644 --- a/libc/src/pthread/pthread_mutex_init.cpp +++ b/libc/src/pthread/pthread_mutex_init.cpp @@ -13,7 +13,6 @@ #include "src/__support/macros/config.h" #include "src/__support/threads/mutex.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_mutexattr_destroy.cpp b/libc/src/pthread/pthread_mutexattr_destroy.cpp index 3b2551afd11b5..bddeb8b75acd1 100644 --- a/libc/src/pthread/pthread_mutexattr_destroy.cpp +++ b/libc/src/pthread/pthread_mutexattr_destroy.cpp @@ -12,8 +12,6 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" -#include - namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(int, pthread_mutexattr_destroy, (pthread_mutexattr_t *)) { diff --git a/libc/src/pthread/pthread_mutexattr_getpshared.cpp b/libc/src/pthread/pthread_mutexattr_getpshared.cpp index 2d83a5229e9ec..0ea5d42834618 100644 --- a/libc/src/pthread/pthread_mutexattr_getpshared.cpp +++ b/libc/src/pthread/pthread_mutexattr_getpshared.cpp @@ -12,8 +12,6 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" -#include - namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(int, pthread_mutexattr_getpshared, diff --git a/libc/src/pthread/pthread_mutexattr_getrobust.cpp b/libc/src/pthread/pthread_mutexattr_getrobust.cpp index 508b502a58008..b2359e0ac8c9c 100644 --- a/libc/src/pthread/pthread_mutexattr_getrobust.cpp +++ b/libc/src/pthread/pthread_mutexattr_getrobust.cpp @@ -12,8 +12,6 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" -#include - namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(int, pthread_mutexattr_getrobust, diff --git a/libc/src/pthread/pthread_mutexattr_gettype.cpp b/libc/src/pthread/pthread_mutexattr_gettype.cpp index 3747bf5ce73e9..0bd226ef89e5e 100644 --- a/libc/src/pthread/pthread_mutexattr_gettype.cpp +++ b/libc/src/pthread/pthread_mutexattr_gettype.cpp @@ -12,8 +12,6 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" -#include - namespace LIBC_NAMESPACE_DECL { LLVM_LIBC_FUNCTION(int, pthread_mutexattr_gettype, diff --git a/libc/src/pthread/pthread_mutexattr_setpshared.cpp b/libc/src/pthread/pthread_mutexattr_setpshared.cpp index b290de764c91b..deeae15be2303 100644 --- a/libc/src/pthread/pthread_mutexattr_setpshared.cpp +++ b/libc/src/pthread/pthread_mutexattr_setpshared.cpp @@ -11,8 +11,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_mutexattr_setrobust.cpp b/libc/src/pthread/pthread_mutexattr_setrobust.cpp index e572827486c07..9fd46f4c928d7 100644 --- a/libc/src/pthread/pthread_mutexattr_setrobust.cpp +++ b/libc/src/pthread/pthread_mutexattr_setrobust.cpp @@ -11,8 +11,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_mutexattr_settype.cpp b/libc/src/pthread/pthread_mutexattr_settype.cpp index 27e8ff859ba34..c7e78271f9c38 100644 --- a/libc/src/pthread/pthread_mutexattr_settype.cpp +++ b/libc/src/pthread/pthread_mutexattr_settype.cpp @@ -11,8 +11,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlock_destroy.cpp b/libc/src/pthread/pthread_rwlock_destroy.cpp index 345076aae4348..afc5622e54a00 100644 --- a/libc/src/pthread/pthread_rwlock_destroy.cpp +++ b/libc/src/pthread/pthread_rwlock_destroy.cpp @@ -12,7 +12,6 @@ #include "src/__support/macros/config.h" #include "src/__support/threads/linux/rwlock.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlock_init.cpp b/libc/src/pthread/pthread_rwlock_init.cpp index d1a31625d0dab..dc5424cbc4838 100644 --- a/libc/src/pthread/pthread_rwlock_init.cpp +++ b/libc/src/pthread/pthread_rwlock_init.cpp @@ -14,7 +14,6 @@ #include "src/__support/macros/config.h" #include "src/__support/threads/linux/rwlock.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlock_rdlock.cpp b/libc/src/pthread/pthread_rwlock_rdlock.cpp index 16d82301c54a9..7dee8eb9a44b1 100644 --- a/libc/src/pthread/pthread_rwlock_rdlock.cpp +++ b/libc/src/pthread/pthread_rwlock_rdlock.cpp @@ -12,7 +12,6 @@ #include "src/__support/macros/config.h" #include "src/__support/threads/linux/rwlock.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlock_timedrdlock.cpp b/libc/src/pthread/pthread_rwlock_timedrdlock.cpp index 905541014a4a4..112ff5c9cdad3 100644 --- a/libc/src/pthread/pthread_rwlock_timedrdlock.cpp +++ b/libc/src/pthread/pthread_rwlock_timedrdlock.cpp @@ -7,15 +7,14 @@ //===----------------------------------------------------------------------===// #include "src/pthread/pthread_rwlock_timedrdlock.h" - #include "src/__support/common.h" #include "src/__support/libc_assert.h" #include "src/__support/macros/config.h" #include "src/__support/macros/optimization.h" #include "src/__support/threads/linux/rwlock.h" #include "src/__support/time/linux/abs_timeout.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlock_timedwrlock.cpp b/libc/src/pthread/pthread_rwlock_timedwrlock.cpp index f77ac40f22b89..d2dc70e992e82 100644 --- a/libc/src/pthread/pthread_rwlock_timedwrlock.cpp +++ b/libc/src/pthread/pthread_rwlock_timedwrlock.cpp @@ -15,7 +15,6 @@ #include "src/__support/threads/linux/rwlock.h" #include "src/__support/time/linux/abs_timeout.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlock_tryrdlock.cpp b/libc/src/pthread/pthread_rwlock_tryrdlock.cpp index da59a576b8274..d54b57f056090 100644 --- a/libc/src/pthread/pthread_rwlock_tryrdlock.cpp +++ b/libc/src/pthread/pthread_rwlock_tryrdlock.cpp @@ -12,7 +12,6 @@ #include "src/__support/macros/config.h" #include "src/__support/threads/linux/rwlock.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlock_trywrlock.cpp b/libc/src/pthread/pthread_rwlock_trywrlock.cpp index ccd1bd49c402c..a63dc893e7169 100644 --- a/libc/src/pthread/pthread_rwlock_trywrlock.cpp +++ b/libc/src/pthread/pthread_rwlock_trywrlock.cpp @@ -11,8 +11,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" #include "src/__support/threads/linux/rwlock.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlock_unlock.cpp b/libc/src/pthread/pthread_rwlock_unlock.cpp index 77c50a8e65fdf..e61290179bd62 100644 --- a/libc/src/pthread/pthread_rwlock_unlock.cpp +++ b/libc/src/pthread/pthread_rwlock_unlock.cpp @@ -11,8 +11,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" #include "src/__support/threads/linux/rwlock.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlock_wrlock.cpp b/libc/src/pthread/pthread_rwlock_wrlock.cpp index c2561c81f4bd0..f02fb6b5db9c0 100644 --- a/libc/src/pthread/pthread_rwlock_wrlock.cpp +++ b/libc/src/pthread/pthread_rwlock_wrlock.cpp @@ -12,7 +12,6 @@ #include "src/__support/macros/config.h" #include "src/__support/threads/linux/rwlock.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlockattr_setkind_np.cpp b/libc/src/pthread/pthread_rwlockattr_setkind_np.cpp index 45dbb05c7ab89..80d34a35c717a 100644 --- a/libc/src/pthread/pthread_rwlockattr_setkind_np.cpp +++ b/libc/src/pthread/pthread_rwlockattr_setkind_np.cpp @@ -10,8 +10,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include // pthread_rwlockattr_t namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_rwlockattr_setpshared.cpp b/libc/src/pthread/pthread_rwlockattr_setpshared.cpp index 8088b68fdf33f..5a7191aefd3d0 100644 --- a/libc/src/pthread/pthread_rwlockattr_setpshared.cpp +++ b/libc/src/pthread/pthread_rwlockattr_setpshared.cpp @@ -10,8 +10,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include // EINVAL #include // pthread_rwlockattr_t, PTHREAD_PROCESS_SHARED, PTHREAD_PROCESS_PRIVATE namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/pthread/pthread_setspecific.cpp b/libc/src/pthread/pthread_setspecific.cpp index 5587a2d937abb..70c29c1670841 100644 --- a/libc/src/pthread/pthread_setspecific.cpp +++ b/libc/src/pthread/pthread_setspecific.cpp @@ -11,8 +11,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" #include "src/__support/threads/thread.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/spawn/CMakeLists.txt b/libc/src/spawn/CMakeLists.txt index 4fbbaacb10d26..11621da782ed1 100644 --- a/libc/src/spawn/CMakeLists.txt +++ b/libc/src/spawn/CMakeLists.txt @@ -28,9 +28,9 @@ add_entrypoint_object( posix_spawn_file_actions_destroy.h DEPENDS .file_actions - libc.include.errno libc.include.spawn libc.src.__support.CPP.new + libc.src.errno.errno ) add_entrypoint_object( @@ -41,9 +41,9 @@ add_entrypoint_object( posix_spawn_file_actions_adddup2.h DEPENDS .file_actions - libc.include.errno libc.include.spawn libc.src.__support.CPP.new + libc.src.errno.errno ) add_entrypoint_object( @@ -54,9 +54,9 @@ add_entrypoint_object( posix_spawn_file_actions_addopen.h DEPENDS .file_actions - libc.include.errno libc.include.spawn libc.src.__support.CPP.new + libc.src.errno.errno ) add_entrypoint_object( @@ -67,9 +67,9 @@ add_entrypoint_object( posix_spawn_file_actions_addclose.h DEPENDS .file_actions - libc.include.errno libc.include.spawn libc.src.__support.CPP.new + libc.src.errno.errno ) add_entrypoint_object( diff --git a/libc/src/spawn/posix_spawn_file_actions_addclose.cpp b/libc/src/spawn/posix_spawn_file_actions_addclose.cpp index e43af8f665f95..bb8504f655c4a 100644 --- a/libc/src/spawn/posix_spawn_file_actions_addclose.cpp +++ b/libc/src/spawn/posix_spawn_file_actions_addclose.cpp @@ -12,8 +12,8 @@ #include "src/__support/CPP/new.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/spawn/posix_spawn_file_actions_adddup2.cpp b/libc/src/spawn/posix_spawn_file_actions_adddup2.cpp index 9f28ffa48bee0..710063d52e74d 100644 --- a/libc/src/spawn/posix_spawn_file_actions_adddup2.cpp +++ b/libc/src/spawn/posix_spawn_file_actions_adddup2.cpp @@ -12,8 +12,8 @@ #include "src/__support/CPP/new.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/spawn/posix_spawn_file_actions_addopen.cpp b/libc/src/spawn/posix_spawn_file_actions_addopen.cpp index 7f9286099573e..028d6e895f3c4 100644 --- a/libc/src/spawn/posix_spawn_file_actions_addopen.cpp +++ b/libc/src/spawn/posix_spawn_file_actions_addopen.cpp @@ -12,8 +12,8 @@ #include "src/__support/CPP/new.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/spawn/posix_spawn_file_actions_destroy.cpp b/libc/src/spawn/posix_spawn_file_actions_destroy.cpp index 155e4c6a3b2be..168118da249d1 100644 --- a/libc/src/spawn/posix_spawn_file_actions_destroy.cpp +++ b/libc/src/spawn/posix_spawn_file_actions_destroy.cpp @@ -9,11 +9,12 @@ #include "posix_spawn_file_actions_destroy.h" #include "file_actions.h" + #include "src/__support/CPP/new.h" #include "src/__support/common.h" #include "src/__support/macros/config.h" +#include "src/errno/libc_errno.h" -#include #include namespace LIBC_NAMESPACE_DECL { diff --git a/libc/src/threads/CMakeLists.txt b/libc/src/threads/CMakeLists.txt index b3b22e7f5c735..c33be265369fe 100644 --- a/libc/src/threads/CMakeLists.txt +++ b/libc/src/threads/CMakeLists.txt @@ -22,6 +22,7 @@ add_entrypoint_object( DEPENDS libc.src.__support.threads.thread libc.include.threads + libc.src.errno.errno COMPILE_OPTIONS -O3 -fno-omit-frame-pointer # This allows us to sniff out the thread args from diff --git a/libc/src/threads/thrd_create.cpp b/libc/src/threads/thrd_create.cpp index 52af72b07c8a8..4680944c2eee0 100644 --- a/libc/src/threads/thrd_create.cpp +++ b/libc/src/threads/thrd_create.cpp @@ -10,8 +10,8 @@ #include "src/__support/common.h" #include "src/__support/macros/config.h" #include "src/__support/threads/thread.h" +#include "src/errno/libc_errno.h" -#include #include // For thrd_* type definitions. namespace LIBC_NAMESPACE_DECL { diff --git a/libc/test/UnitTest/PrintfMatcher.h b/libc/test/UnitTest/PrintfMatcher.h index e0c16cf05f281..4f79832ab59fa 100644 --- a/libc/test/UnitTest/PrintfMatcher.h +++ b/libc/test/UnitTest/PrintfMatcher.h @@ -13,8 +13,6 @@ #include "src/stdio/printf_core/core_structs.h" #include "test/UnitTest/Test.h" -#include - namespace LIBC_NAMESPACE_DECL { namespace testing { diff --git a/libc/test/UnitTest/ScanfMatcher.h b/libc/test/UnitTest/ScanfMatcher.h index d64258f3f4f2c..cb9d13f7572b7 100644 --- a/libc/test/UnitTest/ScanfMatcher.h +++ b/libc/test/UnitTest/ScanfMatcher.h @@ -13,8 +13,6 @@ #include "src/stdio/scanf_core/core_structs.h" #include "test/UnitTest/Test.h" -#include - namespace LIBC_NAMESPACE_DECL { namespace testing { diff --git a/libc/test/integration/src/pthread/CMakeLists.txt b/libc/test/integration/src/pthread/CMakeLists.txt index 48d4368df156d..208ba3fd43507 100644 --- a/libc/test/integration/src/pthread/CMakeLists.txt +++ b/libc/test/integration/src/pthread/CMakeLists.txt @@ -115,7 +115,6 @@ add_integration_test( SRCS pthread_name_test.cpp DEPENDS - libc.include.errno libc.include.pthread libc.src.errno.errno libc.src.pthread.pthread_create @@ -185,8 +184,8 @@ add_integration_test( pthread_join_test.cpp DEPENDS libc.include.pthread - libc.include.errno libc.include.stdio + libc.src.errno.errno libc.src.pthread.pthread_create libc.src.pthread.pthread_join ) @@ -199,7 +198,7 @@ add_integration_test( pthread_create_test.cpp DEPENDS libc.include.pthread - libc.include.errno + libc.src.errno.errno libc.src.pthread.pthread_create libc.src.pthread.pthread_join libc.src.pthread.pthread_attr_getdetachstate diff --git a/libc/test/integration/src/pthread/pthread_name_test.cpp b/libc/test/integration/src/pthread/pthread_name_test.cpp index d341792d11d6c..37ceceee880de 100644 --- a/libc/test/integration/src/pthread/pthread_name_test.cpp +++ b/libc/test/integration/src/pthread/pthread_name_test.cpp @@ -7,6 +7,7 @@ //===----------------------------------------------------------------------===// #include "src/__support/CPP/string_view.h" +#include "src/errno/libc_errno.h" #include "src/pthread/pthread_create.h" #include "src/pthread/pthread_getname_np.h" #include "src/pthread/pthread_join.h" @@ -19,7 +20,6 @@ #include "test/IntegrationTest/test.h" -#include #include #include // uintptr_t diff --git a/libc/test/integration/src/spawn/posix_spawn_test_binary.cpp b/libc/test/integration/src/spawn/posix_spawn_test_binary.cpp index 7aec39c192928..c1b0cd671da71 100644 --- a/libc/test/integration/src/spawn/posix_spawn_test_binary.cpp +++ b/libc/test/integration/src/spawn/posix_spawn_test_binary.cpp @@ -1,5 +1,4 @@ #include "test_binary_properties.h" -#include #include #include diff --git a/libc/test/integration/src/unistd/CMakeLists.txt b/libc/test/integration/src/unistd/CMakeLists.txt index 644f16fa46347..5bcb712dd56d3 100644 --- a/libc/test/integration/src/unistd/CMakeLists.txt +++ b/libc/test/integration/src/unistd/CMakeLists.txt @@ -21,10 +21,10 @@ add_integration_test( SRCS fork_test.cpp DEPENDS - libc.include.errno libc.include.signal libc.include.sys_wait libc.include.unistd + libc.src.errno.errno libc.src.pthread.pthread_atfork libc.src.signal.raise libc.src.sys.wait.wait @@ -45,11 +45,11 @@ if((${LIBC_TARGET_OS} STREQUAL "linux") AND (${LIBC_TARGET_ARCHITECTURE_IS_X86}) SRCS stack_smashing_test.cpp DEPENDS - libc.include.errno libc.include.signal libc.include.sys_wait libc.include.unistd libc.src.compiler.__stack_chk_fail + libc.src.errno.errno libc.src.pthread.pthread_atfork libc.src.signal.raise libc.src.sys.wait.wait @@ -94,7 +94,7 @@ add_integration_test( DEPENDS libc_execv_test_normal_exit libc_execv_test_signal_exit - libc.include.errno + libc.src.errno.errno libc.src.sys.wait.waitpid libc.src.unistd.execv libc.src.unistd.fork @@ -111,7 +111,7 @@ add_integration_test( DEPENDS libc_execv_test_normal_exit libc_execv_test_signal_exit - libc.include.errno + libc.errno.errno libc.src.sys.wait.waitpid libc.src.unistd.execve libc.src.unistd.fork diff --git a/libc/test/integration/src/unistd/fork_test.cpp b/libc/test/integration/src/unistd/fork_test.cpp index 87f314f305101..010f57a7d2448 100644 --- a/libc/test/integration/src/unistd/fork_test.cpp +++ b/libc/test/integration/src/unistd/fork_test.cpp @@ -18,7 +18,6 @@ #include "test/IntegrationTest/test.h" -#include #include #include #include diff --git a/libc/test/integration/src/unistd/stack_smashing_test.cpp b/libc/test/integration/src/unistd/stack_smashing_test.cpp index 89fc53dac506a..3508b1695cfdc 100644 --- a/libc/test/integration/src/unistd/stack_smashing_test.cpp +++ b/libc/test/integration/src/unistd/stack_smashing_test.cpp @@ -17,7 +17,6 @@ #include "test/IntegrationTest/test.h" -#include #include #include #include diff --git a/libc/test/integration/startup/linux/CMakeLists.txt b/libc/test/integration/startup/linux/CMakeLists.txt index 6f0517a832d20..511b16d613026 100644 --- a/libc/test/integration/startup/linux/CMakeLists.txt +++ b/libc/test/integration/startup/linux/CMakeLists.txt @@ -38,7 +38,6 @@ add_integration_test( SRCS tls_test.cpp DEPENDS - libc.include.errno libc.include.sys_mman libc.src.errno.errno libc.src.sys.mman.mmap diff --git a/libc/test/integration/startup/linux/tls_test.cpp b/libc/test/integration/startup/linux/tls_test.cpp index 2a6385e195a49..ef9fd9fcb7ff4 100644 --- a/libc/test/integration/startup/linux/tls_test.cpp +++ b/libc/test/integration/startup/linux/tls_test.cpp @@ -10,7 +10,6 @@ #include "src/sys/mman/mmap.h" #include "test/IntegrationTest/test.h" -#include #include constexpr int threadLocalDataSize = 101; diff --git a/libc/test/src/__support/File/CMakeLists.txt b/libc/test/src/__support/File/CMakeLists.txt index 9191469b4927c..9fa3b518421cc 100644 --- a/libc/test/src/__support/File/CMakeLists.txt +++ b/libc/test/src/__support/File/CMakeLists.txt @@ -14,9 +14,9 @@ add_libc_test( LINK_LIBRARIES LibcMemoryHelpers DEPENDS - libc.include.errno libc.include.stdio libc.include.stdlib + libc.src.errno.errno libc.src.__support.CPP.new libc.src.__support.File.file ) diff --git a/libc/test/src/math/RoundToIntegerTest.h b/libc/test/src/math/RoundToIntegerTest.h index 910ff968c1a03..995aba7b233ec 100644 --- a/libc/test/src/math/RoundToIntegerTest.h +++ b/libc/test/src/math/RoundToIntegerTest.h @@ -19,7 +19,6 @@ #include "utils/MPFRWrapper/MPFRUtils.h" #include "hdr/math_macros.h" -#include namespace mpfr = LIBC_NAMESPACE::testing::mpfr; using LIBC_NAMESPACE::Sign; diff --git a/libc/test/src/math/acosf_test.cpp b/libc/test/src/math/acosf_test.cpp index 488058237d191..2e4c8eb2ab961 100644 --- a/libc/test/src/math/acosf_test.cpp +++ b/libc/test/src/math/acosf_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include namespace mpfr = LIBC_NAMESPACE::testing::mpfr; diff --git a/libc/test/src/math/acoshf_test.cpp b/libc/test/src/math/acoshf_test.cpp index 5d7f59792b52b..18ed5a11d50a7 100644 --- a/libc/test/src/math/acoshf_test.cpp +++ b/libc/test/src/math/acoshf_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcAcoshfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/asinf_test.cpp b/libc/test/src/math/asinf_test.cpp index 09dc3c960ed9a..5197810d8bd58 100644 --- a/libc/test/src/math/asinf_test.cpp +++ b/libc/test/src/math/asinf_test.cpp @@ -15,7 +15,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcAsinfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/asinhf_test.cpp b/libc/test/src/math/asinhf_test.cpp index 3e55a563879d0..ac125c3520c44 100644 --- a/libc/test/src/math/asinhf_test.cpp +++ b/libc/test/src/math/asinhf_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcAsinhfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/atanf_test.cpp b/libc/test/src/math/atanf_test.cpp index 376b4724b5a3a..575ec89bd493c 100644 --- a/libc/test/src/math/atanf_test.cpp +++ b/libc/test/src/math/atanf_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcAtanfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/atanhf_test.cpp b/libc/test/src/math/atanhf_test.cpp index 488a9a942ce91..8b9db1dfdd976 100644 --- a/libc/test/src/math/atanhf_test.cpp +++ b/libc/test/src/math/atanhf_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcAtanhfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/cosf_test.cpp b/libc/test/src/math/cosf_test.cpp index 82790e3a9d480..2143c36f3d30b 100644 --- a/libc/test/src/math/cosf_test.cpp +++ b/libc/test/src/math/cosf_test.cpp @@ -15,7 +15,6 @@ #include "test/src/math/sdcomp26094.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LIBC_NAMESPACE::testing::SDCOMP26094_VALUES; diff --git a/libc/test/src/math/coshf_test.cpp b/libc/test/src/math/coshf_test.cpp index 00bbf4b0bd946..0d1c322b8e622 100644 --- a/libc/test/src/math/coshf_test.cpp +++ b/libc/test/src/math/coshf_test.cpp @@ -15,7 +15,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcCoshfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/erff_test.cpp b/libc/test/src/math/erff_test.cpp index 851eda4b1542f..f9b03377daa9b 100644 --- a/libc/test/src/math/erff_test.cpp +++ b/libc/test/src/math/erff_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcErffTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/exp10_test.cpp b/libc/test/src/math/exp10_test.cpp index 61ae33ecae525..6fb1d2d9d925e 100644 --- a/libc/test/src/math/exp10_test.cpp +++ b/libc/test/src/math/exp10_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcExp10Test = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/exp2_test.cpp b/libc/test/src/math/exp2_test.cpp index f218eea0b358f..adfceceeef4b7 100644 --- a/libc/test/src/math/exp2_test.cpp +++ b/libc/test/src/math/exp2_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcExp2Test = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/exp_test.cpp b/libc/test/src/math/exp_test.cpp index ee674c5fe6cb5..0ab3a4e543464 100644 --- a/libc/test/src/math/exp_test.cpp +++ b/libc/test/src/math/exp_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcExpTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/log10_test.cpp b/libc/test/src/math/log10_test.cpp index 32b84686badea..01aa1f82ae5d8 100644 --- a/libc/test/src/math/log10_test.cpp +++ b/libc/test/src/math/log10_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcLog10Test = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/log10f_test.cpp b/libc/test/src/math/log10f_test.cpp index 4ba118455df4d..b2c1c283e08e5 100644 --- a/libc/test/src/math/log10f_test.cpp +++ b/libc/test/src/math/log10f_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcLog10fTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/log1p_test.cpp b/libc/test/src/math/log1p_test.cpp index 98486deb12c74..107e965a0d3ae 100644 --- a/libc/test/src/math/log1p_test.cpp +++ b/libc/test/src/math/log1p_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcLog1pTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/log1pf_test.cpp b/libc/test/src/math/log1pf_test.cpp index b42cf3b8681b2..bb181dc5e43b0 100644 --- a/libc/test/src/math/log1pf_test.cpp +++ b/libc/test/src/math/log1pf_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcLog1pfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/log2_test.cpp b/libc/test/src/math/log2_test.cpp index f9bd93d44e50f..8a07991a68886 100644 --- a/libc/test/src/math/log2_test.cpp +++ b/libc/test/src/math/log2_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcLog2Test = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/log_test.cpp b/libc/test/src/math/log_test.cpp index c0f9edfc540a1..969a469b2e1c6 100644 --- a/libc/test/src/math/log_test.cpp +++ b/libc/test/src/math/log_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcLogTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/powf_test.cpp b/libc/test/src/math/powf_test.cpp index c13231f9d83b8..448dcc0035e9b 100644 --- a/libc/test/src/math/powf_test.cpp +++ b/libc/test/src/math/powf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcPowfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/sincosf_test.cpp b/libc/test/src/math/sincosf_test.cpp index 7254c3be5b75f..2823110331f30 100644 --- a/libc/test/src/math/sincosf_test.cpp +++ b/libc/test/src/math/sincosf_test.cpp @@ -15,7 +15,6 @@ #include "test/src/math/sdcomp26094.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcSinCosfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/sinf_test.cpp b/libc/test/src/math/sinf_test.cpp index 370362639490b..8fd3ed1577cee 100644 --- a/libc/test/src/math/sinf_test.cpp +++ b/libc/test/src/math/sinf_test.cpp @@ -15,7 +15,6 @@ #include "test/src/math/sdcomp26094.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcSinfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/sinhf_test.cpp b/libc/test/src/math/sinhf_test.cpp index 400df2f18dabc..6867c7aec57df 100644 --- a/libc/test/src/math/sinhf_test.cpp +++ b/libc/test/src/math/sinhf_test.cpp @@ -15,7 +15,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcSinhfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/RoundToIntegerTest.h b/libc/test/src/math/smoke/RoundToIntegerTest.h index 8b5f678b32449..6ae97ce35a0d6 100644 --- a/libc/test/src/math/smoke/RoundToIntegerTest.h +++ b/libc/test/src/math/smoke/RoundToIntegerTest.h @@ -17,7 +17,6 @@ #include "test/UnitTest/Test.h" #include "hdr/math_macros.h" -#include static constexpr int ROUNDING_MODES[4] = {FE_UPWARD, FE_DOWNWARD, FE_TOWARDZERO, FE_TONEAREST}; diff --git a/libc/test/src/math/smoke/acosf_test.cpp b/libc/test/src/math/smoke/acosf_test.cpp index 732c29548c60d..039d8c2013830 100644 --- a/libc/test/src/math/smoke/acosf_test.cpp +++ b/libc/test/src/math/smoke/acosf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcAcosfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/acoshf_test.cpp b/libc/test/src/math/smoke/acoshf_test.cpp index 2e94216ede364..91d433df80558 100644 --- a/libc/test/src/math/smoke/acoshf_test.cpp +++ b/libc/test/src/math/smoke/acoshf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcAcoshfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/asinf_test.cpp b/libc/test/src/math/smoke/asinf_test.cpp index c67d07711cd13..450255ccd3020 100644 --- a/libc/test/src/math/smoke/asinf_test.cpp +++ b/libc/test/src/math/smoke/asinf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcAsinfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/asinhf_test.cpp b/libc/test/src/math/smoke/asinhf_test.cpp index f95184676303d..a8e54f379a1fd 100644 --- a/libc/test/src/math/smoke/asinhf_test.cpp +++ b/libc/test/src/math/smoke/asinhf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcAsinhfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/atanf_test.cpp b/libc/test/src/math/smoke/atanf_test.cpp index 56bf2f951b336..0fe11d7953381 100644 --- a/libc/test/src/math/smoke/atanf_test.cpp +++ b/libc/test/src/math/smoke/atanf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcAtanfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/atanhf_test.cpp b/libc/test/src/math/smoke/atanhf_test.cpp index fa07b62e9f43f..e22926bd2f037 100644 --- a/libc/test/src/math/smoke/atanhf_test.cpp +++ b/libc/test/src/math/smoke/atanhf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LIBC_NAMESPACE::Sign; diff --git a/libc/test/src/math/smoke/cosf_test.cpp b/libc/test/src/math/smoke/cosf_test.cpp index 7000fe2f2b07d..62f7ede9cf178 100644 --- a/libc/test/src/math/smoke/cosf_test.cpp +++ b/libc/test/src/math/smoke/cosf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcCosfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/coshf_test.cpp b/libc/test/src/math/smoke/coshf_test.cpp index 4d915b12dee16..ddaa19f4c392f 100644 --- a/libc/test/src/math/smoke/coshf_test.cpp +++ b/libc/test/src/math/smoke/coshf_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcCoshfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/erff_test.cpp b/libc/test/src/math/smoke/erff_test.cpp index 102126ee4e23f..8a970f3a4b7ed 100644 --- a/libc/test/src/math/smoke/erff_test.cpp +++ b/libc/test/src/math/smoke/erff_test.cpp @@ -12,7 +12,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcErffTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/exp10_test.cpp b/libc/test/src/math/smoke/exp10_test.cpp index 7154cb176038c..282ddc987b499 100644 --- a/libc/test/src/math/smoke/exp10_test.cpp +++ b/libc/test/src/math/smoke/exp10_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcExp10Test = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/exp2_test.cpp b/libc/test/src/math/smoke/exp2_test.cpp index a8ef6cfa7f6a1..d148d27fad38d 100644 --- a/libc/test/src/math/smoke/exp2_test.cpp +++ b/libc/test/src/math/smoke/exp2_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcExp2Test = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/exp_test.cpp b/libc/test/src/math/smoke/exp_test.cpp index 2abaa7230831f..5fe6f3e92f4a6 100644 --- a/libc/test/src/math/smoke/exp_test.cpp +++ b/libc/test/src/math/smoke/exp_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcExpTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/expm1_test.cpp b/libc/test/src/math/smoke/expm1_test.cpp index d5f166d53a50e..bafdbda8af03b 100644 --- a/libc/test/src/math/smoke/expm1_test.cpp +++ b/libc/test/src/math/smoke/expm1_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcExpm1Test = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/log10_test.cpp b/libc/test/src/math/smoke/log10_test.cpp index 37baf89128f2e..e03416ae20c8f 100644 --- a/libc/test/src/math/smoke/log10_test.cpp +++ b/libc/test/src/math/smoke/log10_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcLog10Test = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/log10f_test.cpp b/libc/test/src/math/smoke/log10f_test.cpp index 721045d355da8..2524545e01812 100644 --- a/libc/test/src/math/smoke/log10f_test.cpp +++ b/libc/test/src/math/smoke/log10f_test.cpp @@ -12,7 +12,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcLog10fTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/log1p_test.cpp b/libc/test/src/math/smoke/log1p_test.cpp index 993dbf8001df8..63237f3259b21 100644 --- a/libc/test/src/math/smoke/log1p_test.cpp +++ b/libc/test/src/math/smoke/log1p_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcLog1pTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/log1pf_test.cpp b/libc/test/src/math/smoke/log1pf_test.cpp index 6127cc89a7421..c14d655294697 100644 --- a/libc/test/src/math/smoke/log1pf_test.cpp +++ b/libc/test/src/math/smoke/log1pf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcLog1pfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/log2_test.cpp b/libc/test/src/math/smoke/log2_test.cpp index b59767e668eb6..89d8e56510911 100644 --- a/libc/test/src/math/smoke/log2_test.cpp +++ b/libc/test/src/math/smoke/log2_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcLog2Test = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/log_test.cpp b/libc/test/src/math/smoke/log_test.cpp index fd527dee50847..e7897add575fa 100644 --- a/libc/test/src/math/smoke/log_test.cpp +++ b/libc/test/src/math/smoke/log_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcLogTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/powf_test.cpp b/libc/test/src/math/smoke/powf_test.cpp index 6aa1ac2b661be..bd4f98e30fbdc 100644 --- a/libc/test/src/math/smoke/powf_test.cpp +++ b/libc/test/src/math/smoke/powf_test.cpp @@ -12,7 +12,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcPowfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/sincosf_test.cpp b/libc/test/src/math/smoke/sincosf_test.cpp index 8c35953240d8d..e6896ca3dc21a 100644 --- a/libc/test/src/math/smoke/sincosf_test.cpp +++ b/libc/test/src/math/smoke/sincosf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcSinCosfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/sinf_test.cpp b/libc/test/src/math/smoke/sinf_test.cpp index 9fc208dd545b2..1bf6eaa8b78d7 100644 --- a/libc/test/src/math/smoke/sinf_test.cpp +++ b/libc/test/src/math/smoke/sinf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcSinfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/sinhf_test.cpp b/libc/test/src/math/smoke/sinhf_test.cpp index 1e052988eb286..635a10627a210 100644 --- a/libc/test/src/math/smoke/sinhf_test.cpp +++ b/libc/test/src/math/smoke/sinhf_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcSinhfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/tanf_test.cpp b/libc/test/src/math/smoke/tanf_test.cpp index ab3f7c1aeb7e4..b90c5da874189 100644 --- a/libc/test/src/math/smoke/tanf_test.cpp +++ b/libc/test/src/math/smoke/tanf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcTanfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/smoke/tanhf_test.cpp b/libc/test/src/math/smoke/tanhf_test.cpp index ddae021d2bc42..748e6fe8c6269 100644 --- a/libc/test/src/math/smoke/tanhf_test.cpp +++ b/libc/test/src/math/smoke/tanhf_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/FPMatcher.h" #include "test/UnitTest/Test.h" -#include #include using LlvmLibcTanhfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/tanf_test.cpp b/libc/test/src/math/tanf_test.cpp index 9b9e1278cf563..9061cf6fb30b8 100644 --- a/libc/test/src/math/tanf_test.cpp +++ b/libc/test/src/math/tanf_test.cpp @@ -15,7 +15,6 @@ #include "test/src/math/sdcomp26094.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcTanfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/math/tanhf_test.cpp b/libc/test/src/math/tanhf_test.cpp index 2e74984ad9549..389abe4d85897 100644 --- a/libc/test/src/math/tanhf_test.cpp +++ b/libc/test/src/math/tanhf_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/Test.h" #include "utils/MPFRWrapper/MPFRUtils.h" -#include #include using LlvmLibcTanhfTest = LIBC_NAMESPACE::testing::FPTest; diff --git a/libc/test/src/pthread/CMakeLists.txt b/libc/test/src/pthread/CMakeLists.txt index 0eeec445d5f49..2cb80e2b6ae2e 100644 --- a/libc/test/src/pthread/CMakeLists.txt +++ b/libc/test/src/pthread/CMakeLists.txt @@ -7,7 +7,6 @@ add_libc_unittest( SRCS pthread_attr_test.cpp DEPENDS - libc.include.errno libc.include.pthread libc.src.pthread.pthread_attr_destroy libc.src.pthread.pthread_attr_init @@ -19,6 +18,7 @@ add_libc_unittest( libc.src.pthread.pthread_attr_setguardsize libc.src.pthread.pthread_attr_setstacksize libc.src.pthread.pthread_attr_setstack + libc.hdr.errno_macros ) add_libc_unittest( @@ -28,7 +28,6 @@ add_libc_unittest( SRCS pthread_mutexattr_test.cpp DEPENDS - libc.include.errno libc.include.pthread libc.src.pthread.pthread_mutexattr_destroy libc.src.pthread.pthread_mutexattr_init @@ -38,6 +37,7 @@ add_libc_unittest( libc.src.pthread.pthread_mutexattr_setpshared libc.src.pthread.pthread_mutexattr_setrobust libc.src.pthread.pthread_mutexattr_settype + libc.hdr.errno_macros ) add_libc_unittest( @@ -65,8 +65,8 @@ add_libc_unittest( SRCS pthread_rwlockattr_test.cpp DEPENDS - libc.include.errno libc.include.pthread + libc.src.errno.errno libc.src.pthread.pthread_rwlockattr_destroy libc.src.pthread.pthread_rwlockattr_getkind_np libc.src.pthread.pthread_rwlockattr_getpshared diff --git a/libc/test/src/pthread/pthread_attr_test.cpp b/libc/test/src/pthread/pthread_attr_test.cpp index 1af585a003e3b..bee9a1ca4f893 100644 --- a/libc/test/src/pthread/pthread_attr_test.cpp +++ b/libc/test/src/pthread/pthread_attr_test.cpp @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// +#include "hdr/errno_macros.h" #include "src/pthread/pthread_attr_destroy.h" #include "src/pthread/pthread_attr_getdetachstate.h" #include "src/pthread/pthread_attr_getguardsize.h" @@ -19,7 +20,6 @@ #include "test/UnitTest/Test.h" -#include #include // For EXEC_PAGESIZE. #include diff --git a/libc/test/src/pthread/pthread_mutexattr_test.cpp b/libc/test/src/pthread/pthread_mutexattr_test.cpp index a7acd580a6b8e..7fbdd2efd9858 100644 --- a/libc/test/src/pthread/pthread_mutexattr_test.cpp +++ b/libc/test/src/pthread/pthread_mutexattr_test.cpp @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// +#include "hdr/errno_macros.h" #include "src/pthread/pthread_mutexattr_destroy.h" #include "src/pthread/pthread_mutexattr_getpshared.h" #include "src/pthread/pthread_mutexattr_getrobust.h" @@ -15,8 +16,6 @@ #include "src/pthread/pthread_mutexattr_setrobust.h" #include "src/pthread/pthread_mutexattr_settype.h" #include "test/UnitTest/Test.h" - -#include #include TEST(LlvmLibcPThreadMutexAttrTest, InitAndDestroy) { diff --git a/libc/test/src/signal/CMakeLists.txt b/libc/test/src/signal/CMakeLists.txt index f7923204eaf49..87aa42faae8e5 100644 --- a/libc/test/src/signal/CMakeLists.txt +++ b/libc/test/src/signal/CMakeLists.txt @@ -61,8 +61,8 @@ add_libc_unittest( SRCS sigaddset_test.cpp DEPENDS - libc.include.errno libc.include.signal + libc.src.errno.errno libc.src.signal.sigaddset libc.test.UnitTest.ErrnoSetterMatcher ) @@ -88,8 +88,8 @@ add_libc_unittest( SRCS sigfillset_test.cpp DEPENDS - libc.include.errno libc.include.signal + libc.src.errno.errno libc.src.signal.raise libc.src.signal.sigfillset libc.src.signal.sigprocmask @@ -103,8 +103,8 @@ add_libc_unittest( SRCS sigdelset_test.cpp DEPENDS - libc.include.errno libc.include.signal + libc.src.errno.errno libc.src.signal.raise libc.src.signal.sigdelset libc.src.signal.sigfillset diff --git a/libc/test/src/signal/sigaddset_test.cpp b/libc/test/src/signal/sigaddset_test.cpp index ac9334f4ff68c..bc33750cf787d 100644 --- a/libc/test/src/signal/sigaddset_test.cpp +++ b/libc/test/src/signal/sigaddset_test.cpp @@ -11,7 +11,6 @@ #include "test/UnitTest/ErrnoSetterMatcher.h" #include "test/UnitTest/Test.h" -#include #include // This tests invalid inputs and ensures errno is properly set. diff --git a/libc/test/src/signal/sigdelset_test.cpp b/libc/test/src/signal/sigdelset_test.cpp index aeae66f86bf88..622f1a32fbbe9 100644 --- a/libc/test/src/signal/sigdelset_test.cpp +++ b/libc/test/src/signal/sigdelset_test.cpp @@ -14,7 +14,6 @@ #include "test/UnitTest/ErrnoSetterMatcher.h" #include "test/UnitTest/Test.h" -#include #include TEST(LlvmLibcSigdelset, Invalid) { diff --git a/libc/test/src/signal/sigfillset_test.cpp b/libc/test/src/signal/sigfillset_test.cpp index 7922b3a4e1190..0604bc2a95bf6 100644 --- a/libc/test/src/signal/sigfillset_test.cpp +++ b/libc/test/src/signal/sigfillset_test.cpp @@ -13,7 +13,6 @@ #include "test/UnitTest/ErrnoSetterMatcher.h" #include "test/UnitTest/Test.h" -#include #include TEST(LlvmLibcSigfillset, Invalid) { diff --git a/libc/test/src/spawn/CMakeLists.txt b/libc/test/src/spawn/CMakeLists.txt index 39b63df190849..ce246d4a1b774 100644 --- a/libc/test/src/spawn/CMakeLists.txt +++ b/libc/test/src/spawn/CMakeLists.txt @@ -7,7 +7,6 @@ add_libc_unittest( SRCS posix_spawn_file_actions_test.cpp DEPENDS - libc.include.errno libc.include.spawn libc.src.spawn.file_actions libc.src.spawn.posix_spawn_file_actions_addclose @@ -15,4 +14,5 @@ add_libc_unittest( libc.src.spawn.posix_spawn_file_actions_addopen libc.src.spawn.posix_spawn_file_actions_destroy libc.src.spawn.posix_spawn_file_actions_init + libc.src.errno.errno ) diff --git a/libc/test/src/spawn/posix_spawn_file_actions_test.cpp b/libc/test/src/spawn/posix_spawn_file_actions_test.cpp index 008167e07221f..c1edf56bdbd87 100644 --- a/libc/test/src/spawn/posix_spawn_file_actions_test.cpp +++ b/libc/test/src/spawn/posix_spawn_file_actions_test.cpp @@ -6,6 +6,7 @@ // //===----------------------------------------------------------------------===// +#include "src/errno/libc_errno.h" #include "src/spawn/file_actions.h" #include "src/spawn/posix_spawn_file_actions_addclose.h" #include "src/spawn/posix_spawn_file_actions_adddup2.h" @@ -14,7 +15,6 @@ #include "src/spawn/posix_spawn_file_actions_init.h" #include "test/UnitTest/Test.h" -#include #include #include diff --git a/libc/test/src/sys/prctl/linux/CMakeLists.txt b/libc/test/src/sys/prctl/linux/CMakeLists.txt index 25e9b8fd8a007..845452c9099eb 100644 --- a/libc/test/src/sys/prctl/linux/CMakeLists.txt +++ b/libc/test/src/sys/prctl/linux/CMakeLists.txt @@ -8,7 +8,6 @@ add_libc_unittest( prctl_test.cpp DEPENDS libc.include.sys_prctl - libc.include.errno libc.src.sys.prctl.prctl libc.src.errno.errno ) diff --git a/libc/test/src/sys/prctl/linux/prctl_test.cpp b/libc/test/src/sys/prctl/linux/prctl_test.cpp index b528edc65595d..987c35d553470 100644 --- a/libc/test/src/sys/prctl/linux/prctl_test.cpp +++ b/libc/test/src/sys/prctl/linux/prctl_test.cpp @@ -9,7 +9,6 @@ #include "src/errno/libc_errno.h" #include "src/sys/prctl/prctl.h" #include "test/UnitTest/ErrnoSetterMatcher.h" -#include #include using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails; diff --git a/libc/test/src/sys/resource/CMakeLists.txt b/libc/test/src/sys/resource/CMakeLists.txt index 90dc0e846df6d..32186de4b111b 100644 --- a/libc/test/src/sys/resource/CMakeLists.txt +++ b/libc/test/src/sys/resource/CMakeLists.txt @@ -9,9 +9,9 @@ add_libc_unittest( SRCS getrlimit_setrlimit_test.cpp DEPENDS - libc.include.errno libc.include.fcntl libc.include.sys_resource + libc.src.errno.errno libc.src.fcntl.open libc.src.sys.resource.getrlimit libc.src.sys.resource.setrlimit diff --git a/libc/test/src/sys/select/CMakeLists.txt b/libc/test/src/sys/select/CMakeLists.txt index c2d57052c3837..2b465d32c2c33 100644 --- a/libc/test/src/sys/select/CMakeLists.txt +++ b/libc/test/src/sys/select/CMakeLists.txt @@ -8,8 +8,8 @@ add_libc_unittest( SRCS select_ui_test.cpp DEPENDS - libc.include.errno libc.include.unistd + libc.src.errno.errno libc.src.sys.select.select libc.src.unistd.read ) @@ -21,8 +21,8 @@ add_libc_unittest( SRCS select_failure_test.cpp DEPENDS - libc.include.errno libc.include.unistd + libc.src.errno.errno libc.src.sys.select.select libc.src.unistd.read libc.test.UnitTest.ErrnoSetterMatcher diff --git a/libc/test/src/sys/select/select_failure_test.cpp b/libc/test/src/sys/select/select_failure_test.cpp index 61df532b3e96c..a4990bfd4b1b5 100644 --- a/libc/test/src/sys/select/select_failure_test.cpp +++ b/libc/test/src/sys/select/select_failure_test.cpp @@ -11,7 +11,6 @@ #include "test/UnitTest/ErrnoSetterMatcher.h" #include "test/UnitTest/Test.h" -#include #include #include diff --git a/libc/test/src/sys/sendfile/CMakeLists.txt b/libc/test/src/sys/sendfile/CMakeLists.txt index 57dac4accd828..82efaa147bd89 100644 --- a/libc/test/src/sys/sendfile/CMakeLists.txt +++ b/libc/test/src/sys/sendfile/CMakeLists.txt @@ -9,9 +9,9 @@ add_libc_unittest( SRCS sendfile_test.cpp DEPENDS - libc.include.errno libc.include.fcntl libc.include.sys_stat + libc.src.errno.errno libc.src.fcntl.open libc.src.sys.sendfile.sendfile libc.src.unistd.close diff --git a/libc/test/src/sys/utsname/CMakeLists.txt b/libc/test/src/sys/utsname/CMakeLists.txt index 435c190cc6212..3640fc3bc5e25 100644 --- a/libc/test/src/sys/utsname/CMakeLists.txt +++ b/libc/test/src/sys/utsname/CMakeLists.txt @@ -7,8 +7,8 @@ add_libc_unittest( SRCS uname_test.cpp DEPENDS - libc.include.errno libc.include.sys_utsname + libc.src.errno.errno libc.src.__support.common libc.src.sys.utsname.uname libc.test.UnitTest.ErrnoSetterMatcher diff --git a/libc/test/src/sys/utsname/uname_test.cpp b/libc/test/src/sys/utsname/uname_test.cpp index 79822c112a5b6..6452021bd6c35 100644 --- a/libc/test/src/sys/utsname/uname_test.cpp +++ b/libc/test/src/sys/utsname/uname_test.cpp @@ -12,7 +12,6 @@ #include "test/UnitTest/ErrnoSetterMatcher.h" #include "test/UnitTest/Test.h" -#include #include TEST(LlvmLibcUnameTest, GetMachineName) { diff --git a/libc/test/src/sys/wait/CMakeLists.txt b/libc/test/src/sys/wait/CMakeLists.txt index 4ba1a939d6a8e..db737a46f0d0f 100644 --- a/libc/test/src/sys/wait/CMakeLists.txt +++ b/libc/test/src/sys/wait/CMakeLists.txt @@ -7,8 +7,8 @@ add_libc_unittest( SRCS waitpid_test.cpp DEPENDS - libc.include.errno libc.include.sys_wait + libc.src.errno.errno libc.src.sys.wait.waitpid ) @@ -19,7 +19,7 @@ add_libc_unittest( SRCS wait4_test.cpp DEPENDS - libc.include.errno libc.include.sys_wait + libc.src.errno.errno libc.src.sys.wait.wait4 ) diff --git a/libc/test/src/sys/wait/wait4_test.cpp b/libc/test/src/sys/wait/wait4_test.cpp index 70d4d436927e6..c4080047ee38f 100644 --- a/libc/test/src/sys/wait/wait4_test.cpp +++ b/libc/test/src/sys/wait/wait4_test.cpp @@ -10,7 +10,6 @@ #include "test/UnitTest/ErrnoSetterMatcher.h" #include "test/UnitTest/Test.h" -#include #include // The test here is a simpl test for WNOHANG functionality. For a more diff --git a/libc/test/src/sys/wait/waitpid_test.cpp b/libc/test/src/sys/wait/waitpid_test.cpp index b2ace2617d2d3..fb456bfaedc7d 100644 --- a/libc/test/src/sys/wait/waitpid_test.cpp +++ b/libc/test/src/sys/wait/waitpid_test.cpp @@ -10,7 +10,6 @@ #include "test/UnitTest/ErrnoSetterMatcher.h" #include "test/UnitTest/Test.h" -#include #include // The test here is a simpl test for WNOHANG functionality. For a more diff --git a/libc/test/src/unistd/CMakeLists.txt b/libc/test/src/unistd/CMakeLists.txt index 332455b791aee..e03e56b3cf8ad 100644 --- a/libc/test/src/unistd/CMakeLists.txt +++ b/libc/test/src/unistd/CMakeLists.txt @@ -39,7 +39,6 @@ add_libc_unittest( SRCS dup_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -58,7 +57,6 @@ add_libc_unittest( SRCS dup2_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -77,7 +75,6 @@ add_libc_unittest( SRCS dup3_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -96,7 +93,6 @@ add_libc_unittest( SRCS fchdir_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -112,7 +108,6 @@ add_libc_unittest( SRCS ftruncate_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -131,7 +126,6 @@ add_libc_unittest( SRCS pread_pwrite_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -151,7 +145,6 @@ add_libc_unittest( SRCS read_write_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -170,7 +163,6 @@ add_libc_unittest( SRCS link_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -186,7 +178,6 @@ add_libc_unittest( SRCS linkat_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -202,7 +193,6 @@ add_libc_unittest( SRCS lseek_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -219,7 +209,6 @@ add_libc_unittest( SRCS pipe_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.unistd.close @@ -234,7 +223,6 @@ add_libc_unittest( SRCS rmdir_test.cpp DEPENDS - libc.include.errno libc.include.fcntl libc.src.errno.errno libc.src.sys.stat.mkdir @@ -258,7 +246,6 @@ add_libc_unittest( SRCS readlink_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.unistd.readlink @@ -275,7 +262,6 @@ add_libc_unittest( SRCS readlinkat_test.cpp DEPENDS - libc.include.errno libc.include.fcntl libc.include.unistd libc.src.errno.errno @@ -293,7 +279,6 @@ add_libc_unittest( SRCS symlink_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -309,7 +294,6 @@ add_libc_unittest( SRCS symlinkat_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -325,7 +309,6 @@ add_libc_unittest( SRCS truncate_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -344,7 +327,6 @@ add_libc_unittest( SRCS unlink_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -359,7 +341,6 @@ add_libc_unittest( SRCS unlinkat_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.src.errno.errno libc.src.fcntl.open @@ -428,10 +409,10 @@ add_libc_unittest( SRCS syscall_test.cpp DEPENDS - libc.include.errno libc.include.unistd libc.include.fcntl libc.include.sys_syscall + libc.src.errno.errno libc.src.unistd.__llvm_libc_syscall libc.test.UnitTest.ErrnoSetterMatcher )