Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions libc/src/__support/StringUtil/tables/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ add_header_library(
DEPENDS
libc.include.errno
libc.src.__support.StringUtil.message_mapper
libc.src.errno.libc_errno
)

add_header_library(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

#include "src/__support/StringUtil/message_mapper.h"
#include "src/__support/macros/config.h"
#include "src/errno/libc_errno.h"

#include <errno.h> // For error macros

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/__support/StringUtil/tables/posix_errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/StringUtil/message_mapper.h"
#include "src/__support/macros/config.h"

#include <errno.h> // For error macros
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the other error table files also need to include libc_errno.h. Also it seems like we don't have a complete list of errno macros in our include files so those will need to be updated before we can remove the public errno includes from these files.


namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/__support/StringUtil/tables/stdc_errors.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/StringUtil/message_mapper.h"
#include "src/__support/macros/config.h"

#include <errno.h> // For error macros

namespace LIBC_NAMESPACE_DECL {

Expand Down
2 changes: 0 additions & 2 deletions libc/src/errno/libc_errno.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,11 @@

// Unit and hermetic tests should:
// - #include "src/errno/libc_errno.h"
// - NOT #include <errno.h>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

these comments should probably stay.

// - Only use `libc_errno` in the code
// - Depend on libc.src.errno.errno

// Integration tests should:
// - NOT #include "src/errno/libc_errno.h"
// - #include <errno.h>
// - Use regular `errno` in the code
// - Still depend on libc.src.errno.errno

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/acosf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY

#include <errno.h>

#include "inv_trigf_utils.h"

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/asinf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA

#include <errno.h>

#include "inv_trigf_utils.h"

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/cosf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/exp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/exp10.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/exp10f_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {
namespace generic {
Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/exp2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/exp2f_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h"

#include <errno.h>

#include "explogxf.h"

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/expf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/explogxf.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/macros/properties/cpu_features.h"

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/expm1f.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/powf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +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 <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/sincosf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/sinf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA

#include <errno.h>

#if defined(LIBC_TARGET_CPU_HAS_FMA)
#include "range_reduction_fma.h"
Expand Down
1 change: 0 additions & 1 deletion libc/src/math/generic/tanf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "src/__support/macros/optimization.h" // LIBC_UNLIKELY
#include "src/__support/macros/properties/cpu_features.h" // LIBC_TARGET_CPU_HAS_FMA

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_atfork.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/fork_callbacks.h"

#include <errno.h>
#include <pthread.h> // For pthread_* type definitions.

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_attr_setdetachstate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_attr_setguardsize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>
#include <linux/param.h> // For EXEC_PAGESIZE.
#include <pthread.h>

Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_attr_setstack.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/thread.h" // For STACK_ALIGNMENT

#include <errno.h>
#include <pthread.h>
#include <stdint.h>

Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_attr_setstacksize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_condattr_setclock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h> // EINVAL
#include <pthread.h> // pthread_condattr_t
#include <sys/types.h> // clockid_t
#include <time.h> // CLOCK_MONOTONIC, CLOCK_REALTIME
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_condattr_setpshared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h> // EINVAL
#include <pthread.h> // pthread_condattr_t, PTHREAD_PROCESS_SHARED, PTHREAD_PROCESS_PRIVATE

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
#include "src/__support/macros/optimization.h"
#include "src/__support/threads/thread.h"

#include <errno.h>
#include <pthread.h> // For pthread_* type definitions.

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_key_create.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/thread.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_key_delete.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/thread.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_mutex_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/mutex.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_mutexattr_destroy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_mutexattr_getpshared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_mutexattr_getrobust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_mutexattr_gettype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>

namespace LIBC_NAMESPACE_DECL {

Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_mutexattr_setpshared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_mutexattr_setrobust.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_mutexattr_settype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlock_destroy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlock_init.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlock_rdlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlock_timedrdlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "src/__support/threads/linux/rwlock.h"
#include "src/__support/time/linux/abs_timeout.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlock_timedwrlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "src/__support/threads/linux/rwlock.h"
#include "src/__support/time/linux/abs_timeout.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlock_tryrdlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlock_trywrlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlock_unlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlock_wrlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
#include "src/__support/macros/config.h"
#include "src/__support/threads/linux/rwlock.h"

#include <errno.h>
#include <pthread.h>

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlockattr_setkind_np.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h>
#include <pthread.h> // pthread_rwlockattr_t

namespace LIBC_NAMESPACE_DECL {
Expand Down
1 change: 0 additions & 1 deletion libc/src/pthread/pthread_rwlockattr_setpshared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
#include "src/__support/common.h"
#include "src/__support/macros/config.h"

#include <errno.h> // EINVAL
#include <pthread.h> // pthread_rwlockattr_t, PTHREAD_PROCESS_SHARED, PTHREAD_PROCESS_PRIVATE

namespace LIBC_NAMESPACE_DECL {
Expand Down
Loading
Loading