From 72514d6915a685552a258d2e4c85d9d52184c1b6 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Tue, 13 Dec 2022 08:37:01 +0330 Subject: AK: Make Types.h not export its functions if !USING_AK_GLOBALLY --- AK/Types.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'AK/Types.h') diff --git a/AK/Types.h b/AK/Types.h index 0bf39d30bf..32a8607d1c 100644 --- a/AK/Types.h +++ b/AK/Types.h @@ -38,7 +38,7 @@ using f128 = long double; #ifdef AK_OS_SERENITY using size_t = __SIZE_TYPE__; -using ssize_t = MakeSigned; +using ssize_t = AK::Detail::MakeSigned; using ptrdiff_t = __PTRDIFF_TYPE__; @@ -67,7 +67,7 @@ using __ptrdiff_t = __PTRDIFF_TYPE__; # endif # if defined(AK_OS_WINDOWS) -using ssize_t = MakeSigned; +using ssize_t = AK::Detail::MakeSigned; using mode_t = unsigned short; # endif #endif @@ -85,6 +85,8 @@ namespace std { // NOLINT(cert-dcl58-cpp) nullptr_t must be in ::std:: for some using nullptr_t = decltype(nullptr); } +namespace AK { + using nullptr_t = std::nullptr_t; static constexpr FlatPtr explode_byte(u8 b) @@ -117,8 +119,6 @@ enum class [[nodiscard]] TriState : u8 { Unknown }; -namespace AK { - enum MemoryOrder { memory_order_relaxed = __ATOMIC_RELAXED, memory_order_consume = __ATOMIC_CONSUME, @@ -129,3 +129,11 @@ enum MemoryOrder { }; } + +#if USING_AK_GLOBALLY +using AK::align_down_to; +using AK::align_up_to; +using AK::MemoryOrder; +using AK::nullptr_t; +using AK::TriState; +#endif -- cgit v1.2.3