diff --git a/AK/BumpAllocator.h b/AK/BumpAllocator.h index e505e5381dd..cd2f4f4d95e 100644 --- a/AK/BumpAllocator.h +++ b/AK/BumpAllocator.h @@ -103,7 +103,7 @@ protected: void* new_chunk = (void*)s_unused_allocation_cache.exchange(0); if (!new_chunk) { if constexpr (use_mmap) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY new_chunk = serenity_mmap(nullptr, m_chunk_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_RANDOMIZED | MAP_PRIVATE, 0, 0, m_chunk_size, "BumpAllocator Chunk"); #else new_chunk = mmap(nullptr, m_chunk_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0); diff --git a/AK/Error.h b/AK/Error.h index 0ab143d6e7f..56265bf3c76 100644 --- a/AK/Error.h +++ b/AK/Error.h @@ -10,7 +10,7 @@ #include #include -#if defined(__serenity__) && defined(KERNEL) +#if defined(AK_OS_SERENITY) && defined(KERNEL) # include #else # include @@ -86,7 +86,7 @@ public: { } -#ifdef __serenity__ +#ifdef AK_OS_SERENITY ErrorOr(ErrnoCode code) : m_value_or_error(Error::from_errno(code)) { diff --git a/AK/Format.cpp b/AK/Format.cpp index ee68a18f519..e88f516c098 100644 --- a/AK/Format.cpp +++ b/AK/Format.cpp @@ -11,7 +11,7 @@ #include #include -#if defined(__serenity__) && !defined(KERNEL) +#if defined(AK_OS_SERENITY) && !defined(KERNEL) # include #endif @@ -877,7 +877,7 @@ void vdbgln(StringView fmtstr, TypeErasedFormatParams& params) StringBuilder builder; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # ifdef KERNEL if (Kernel::Processor::is_initialized()) { struct timespec ts = {}; @@ -914,7 +914,7 @@ void vdbgln(StringView fmtstr, TypeErasedFormatParams& params) auto const string = builder.string_view(); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # ifdef KERNEL if (!Kernel::Processor::is_initialized()) { kernelearlyputstr(string.characters_without_null_termination(), string.length()); @@ -930,7 +930,7 @@ void vdmesgln(StringView fmtstr, TypeErasedFormatParams& params) { StringBuilder builder; -# ifdef __serenity__ +# ifdef AK_OS_SERENITY struct timespec ts = {}; # if !ARCH(AARCH64) @@ -959,7 +959,7 @@ void v_critical_dmesgln(StringView fmtstr, TypeErasedFormatParams& params) // at OOM conditions. StringBuilder builder; -# ifdef __serenity__ +# ifdef AK_OS_SERENITY if (Kernel::Processor::is_initialized() && Kernel::Thread::current()) { auto& thread = *Kernel::Thread::current(); builder.appendff("[{}({}:{})]: ", thread.process().name(), thread.pid().value(), thread.tid().value()); diff --git a/AK/Format.h b/AK/Format.h index d89699bde5e..dcba9d81dd4 100644 --- a/AK/Format.h +++ b/AK/Format.h @@ -671,7 +671,7 @@ template<> struct Formatter : Formatter { ErrorOr format(FormatBuilder& builder, Error const& error) { -#if defined(__serenity__) && defined(KERNEL) +#if defined(AK_OS_SERENITY) && defined(KERNEL) if (error.is_errno()) return Formatter::format(builder, "Error(errno={})"sv, error.code()); return Formatter::format(builder, "Error({})"sv, error.string_literal()); diff --git a/AK/NoAllocationGuard.h b/AK/NoAllocationGuard.h index d48b5af6e08..544057809b1 100644 --- a/AK/NoAllocationGuard.h +++ b/AK/NoAllocationGuard.h @@ -39,7 +39,7 @@ private: { #if defined(KERNEL) return Processor::current_thread()->get_allocation_enabled(); -#elif defined(__serenity__) +#elif defined(AK_OS_SERENITY) // This extern thread-local lives in our LibC, which doesn't exist on other systems. return s_allocation_enabled; #else @@ -51,7 +51,7 @@ private: { #if defined(KERNEL) Processor::current_thread()->set_allocation_enabled(value); -#elif defined(__serenity__) +#elif defined(AK_OS_SERENITY) s_allocation_enabled = value; #else (void)value; diff --git a/AK/Platform.h b/AK/Platform.h index e6bf438626e..7f6003bff54 100644 --- a/AK/Platform.h +++ b/AK/Platform.h @@ -148,7 +148,7 @@ # define ASAN_UNPOISON_MEMORY_REGION(addr, size) #endif -#ifndef __serenity__ +#ifndef AK_OS_SERENITY // On macOS (at least Mojave), Apple's version of this header is not wrapped // in extern "C". # ifdef AK_OS_MACOS diff --git a/AK/PrintfImplementation.h b/AK/PrintfImplementation.h index 03a00f58f96..5d590f1d5c6 100644 --- a/AK/PrintfImplementation.h +++ b/AK/PrintfImplementation.h @@ -16,7 +16,7 @@ # include #endif -#ifdef __serenity__ +#ifdef AK_OS_SERENITY extern "C" size_t strlen(char const*); #else # include diff --git a/AK/Random.h b/AK/Random.h index 4767c93e5a2..65466680c69 100644 --- a/AK/Random.h +++ b/AK/Random.h @@ -9,7 +9,7 @@ #include #include -#if defined(__serenity__) || defined(AK_OS_ANDROID) +#if defined(AK_OS_SERENITY) || defined(AK_OS_ANDROID) # include #endif @@ -30,7 +30,7 @@ namespace AK { inline void fill_with_random([[maybe_unused]] void* buffer, [[maybe_unused]] size_t length) { -#if defined(__serenity__) || defined(AK_OS_ANDROID) +#if defined(AK_OS_SERENITY) || defined(AK_OS_ANDROID) arc4random_buf(buffer, length); #elif defined(OSS_FUZZ) #elif defined(__unix__) or defined(AK_OS_MACOS) diff --git a/AK/Singleton.h b/AK/Singleton.h index c74b3324697..3365309d283 100644 --- a/AK/Singleton.h +++ b/AK/Singleton.h @@ -23,7 +23,7 @@ extern "C" __declspec(dllimport) void __stdcall Sleep(unsigned long); # include #endif -#ifndef __serenity__ +#ifndef AK_OS_SERENITY # include #endif diff --git a/AK/StackInfo.cpp b/AK/StackInfo.cpp index 4f53947881a..95384f1e08c 100644 --- a/AK/StackInfo.cpp +++ b/AK/StackInfo.cpp @@ -10,7 +10,7 @@ #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # include #elif defined(__linux__) or defined(AK_OS_MACOS) # include @@ -23,7 +23,7 @@ namespace AK { StackInfo::StackInfo() { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY if (get_stack_bounds(&m_base, &m_size) < 0) { perror("get_stack_bounds"); VERIFY_NOT_REACHED(); diff --git a/AK/Types.h b/AK/Types.h index 06e35d4d9cb..7b16d75362e 100644 --- a/AK/Types.h +++ b/AK/Types.h @@ -19,7 +19,7 @@ using i32 = __INT32_TYPE__; using i16 = __INT16_TYPE__; using i8 = __INT8_TYPE__; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY using size_t = __SIZE_TYPE__; using ssize_t = MakeSigned; diff --git a/AK/kmalloc.cpp b/AK/kmalloc.cpp index cba00d36078..0ce83fddab1 100644 --- a/AK/kmalloc.cpp +++ b/AK/kmalloc.cpp @@ -5,10 +5,11 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#if defined(__serenity__) && !defined(KERNEL) +#include + +#if defined(AK_OS_SERENITY) && !defined(KERNEL) # include -# include // However deceptively simple these functions look, they must not be inlined. // Memory allocated in one translation unit has to be deallocatable in another diff --git a/AK/kmalloc.h b/AK/kmalloc.h index 481e2e8ce8c..a6188bff327 100644 --- a/AK/kmalloc.h +++ b/AK/kmalloc.h @@ -8,6 +8,7 @@ #pragma once #include +#include #if defined(KERNEL) # include @@ -25,7 +26,7 @@ inline void kfree_sized(void* ptr, size_t) } #endif -#ifndef __serenity__ +#ifndef AK_OS_SERENITY # include # ifndef AK_OS_MACOS diff --git a/AK/kstdio.h b/AK/kstdio.h index 2ef6b341aa0..2e2a05ac217 100644 --- a/AK/kstdio.h +++ b/AK/kstdio.h @@ -6,7 +6,9 @@ #pragma once -#ifdef __serenity__ +#include + +#ifdef AK_OS_SERENITY # ifdef KERNEL # include # else diff --git a/Kernel/API/Syscall.h b/Kernel/API/Syscall.h index 8e81e9dc3a7..be5cfbd78b3 100644 --- a/Kernel/API/Syscall.h +++ b/Kernel/API/Syscall.h @@ -204,7 +204,7 @@ enum Function { __Count }; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY struct StringArgument { char const* characters; size_t length { 0 }; diff --git a/Tests/LibCompress/TestBrotli.cpp b/Tests/LibCompress/TestBrotli.cpp index 5c4e9788123..e5e14ebf032 100644 --- a/Tests/LibCompress/TestBrotli.cpp +++ b/Tests/LibCompress/TestBrotli.cpp @@ -12,7 +12,7 @@ static void run_test(StringView const file_name) { // This makes sure that the tests will run both on target and in Lagom. -#ifdef __serenity__ +#ifdef AK_OS_SERENITY String path = String::formatted("/usr/Tests/LibCompress/brotli-test-files/{}", file_name); #else String path = String::formatted("brotli-test-files/{}", file_name); @@ -83,7 +83,7 @@ TEST_CASE(brotli_single_z) TEST_CASE(brotli_decompress_zero_one_bin) { // This makes sure that the tests will run both on target and in Lagom. -#ifdef __serenity__ +#ifdef AK_OS_SERENITY String path = "/usr/Tests/LibCompress/brotli-test-files/zero-one.bin"; #else String path = "brotli-test-files/zero-one.bin"; diff --git a/Tests/LibGL/TestRender.cpp b/Tests/LibGL/TestRender.cpp index 9b01dfac989..240f8f23e1a 100644 --- a/Tests/LibGL/TestRender.cpp +++ b/Tests/LibGL/TestRender.cpp @@ -14,7 +14,7 @@ #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # define REFERENCE_IMAGE_DIR "/usr/Tests/LibGL/reference-images" #else # define REFERENCE_IMAGE_DIR "reference-images" diff --git a/Tests/LibJS/test262-runner.cpp b/Tests/LibJS/test262-runner.cpp index f88dcc2fd3d..933a722fbc5 100644 --- a/Tests/LibJS/test262-runner.cpp +++ b/Tests/LibJS/test262-runner.cpp @@ -544,7 +544,7 @@ static bool g_in_assert = false; exit(12); } -#ifdef __serenity__ +#ifdef AK_OS_SERENITY void __assertion_failed(char const* assertion) { handle_failed_assert(assertion); diff --git a/Tests/Spreadsheet/test-spreadsheet.cpp b/Tests/Spreadsheet/test-spreadsheet.cpp index 838164ae5eb..0d87a1d628c 100644 --- a/Tests/Spreadsheet/test-spreadsheet.cpp +++ b/Tests/Spreadsheet/test-spreadsheet.cpp @@ -9,7 +9,7 @@ TEST_ROOT("Userland/Applications/Spreadsheet/Tests"); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY static constexpr auto s_spreadsheet_runtime_path = "/res/js/Spreadsheet/runtime.js"sv; #else static constexpr auto s_spreadsheet_runtime_path = "../../../../Base/res/js/Spreadsheet/runtime.js"sv; @@ -32,7 +32,7 @@ TESTJS_RUN_FILE_FUNCTION(String const&, JS::Interpreter& interpreter, JS::Execut interpreter.vm().pop_execution_context(); }; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY run_file(s_spreadsheet_runtime_path); #else run_file(LexicalPath::join(Test::JS::g_test_root, s_spreadsheet_runtime_path).string()); diff --git a/Userland/Libraries/LibCore/Command.cpp b/Userland/Libraries/LibCore/Command.cpp index ac38243432e..bc2f73378d1 100644 --- a/Userland/Libraries/LibCore/Command.cpp +++ b/Userland/Libraries/LibCore/Command.cpp @@ -16,7 +16,7 @@ namespace Core { // Only supported in serenity mode because we use `posix_spawn_file_actions_addchdir` -#ifdef __serenity__ +#ifdef AK_OS_SERENITY ErrorOr command(String const& command_string, Optional chdir) { diff --git a/Userland/Libraries/LibCore/EventLoop.cpp b/Userland/Libraries/LibCore/EventLoop.cpp index 60e5c96aeb4..c72dd21cf29 100644 --- a/Userland/Libraries/LibCore/EventLoop.cpp +++ b/Userland/Libraries/LibCore/EventLoop.cpp @@ -36,7 +36,7 @@ #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # include extern bool s_global_initializers_ran; @@ -160,7 +160,7 @@ private: return allocator->allocate(); })) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY m_socket->on_ready_to_read = [this] { u32 length; auto maybe_bytes_read = m_socket->read({ (u8*)&length, sizeof(length) }); @@ -236,7 +236,7 @@ public: JsonObject response; response.set("type", type); response.set("pid", getpid()); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY char buffer[1024]; if (get_process_name(buffer, sizeof(buffer)) >= 0) { response.set("process_name", buffer); @@ -312,7 +312,7 @@ EventLoop::EventLoop([[maybe_unused]] MakeInspectable make_inspectable) : m_wake_pipe_fds(&s_wake_pipe_fds) , m_private(make()) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY if (!s_global_initializers_ran) { // NOTE: Trying to have an event loop as a global variable will lead to initialization-order fiascos, // as the event loop constructor accesses and/or sets other global variables. @@ -334,7 +334,7 @@ EventLoop::EventLoop([[maybe_unused]] MakeInspectable make_inspectable) s_pid = getpid(); s_event_loop_stack->append(*this); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY if (getuid() != 0) { if (getenv("MAKE_INSPECTABLE") == "1"sv) make_inspectable = Core::EventLoop::MakeInspectable::Yes; @@ -361,7 +361,7 @@ EventLoop::~EventLoop() bool connect_to_inspector_server() { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY auto maybe_path = SessionManagement::parse_path_with_sid("/tmp/session/%sid/portal/inspectables"sv); if (maybe_path.is_error()) { dbgln("connect_to_inspector_server: {}", maybe_path.error()); diff --git a/Userland/Libraries/LibCore/File.cpp b/Userland/Libraries/LibCore/File.cpp index c3a83a5c854..94014771d9b 100644 --- a/Userland/Libraries/LibCore/File.cpp +++ b/Userland/Libraries/LibCore/File.cpp @@ -4,9 +4,6 @@ * SPDX-License-Identifier: BSD-2-Clause */ -#ifdef __serenity__ -# include -#endif #include #include #include @@ -20,6 +17,10 @@ #include #include +#ifdef AK_OS_SERENITY +# include +#endif + // On Linux distros that use glibc `basename` is defined as a macro that expands to `__xpg_basename`, so we undefine it #if defined(__linux__) && defined(basename) # undef basename @@ -241,7 +242,7 @@ String File::absolute_path(String const& path) return LexicalPath::canonicalized_path(full_path.string()); } -#ifdef __serenity__ +#ifdef AK_OS_SERENITY ErrorOr File::read_link(String const& link_path) { diff --git a/Userland/Libraries/LibCore/FileWatcher.cpp b/Userland/Libraries/LibCore/FileWatcher.cpp index 73ae7ce64eb..57ebfb33840 100644 --- a/Userland/Libraries/LibCore/FileWatcher.cpp +++ b/Userland/Libraries/LibCore/FileWatcher.cpp @@ -21,7 +21,7 @@ namespace Core { // Only supported in serenity mode because we use InodeWatcher syscalls -#ifdef __serenity__ +#ifdef AK_OS_SERENITY static Optional get_event_from_fd(int fd, HashMap const& wd_to_path) { diff --git a/Userland/Libraries/LibCore/Process.cpp b/Userland/Libraries/LibCore/Process.cpp index a7c5747dc66..623a71a780c 100644 --- a/Userland/Libraries/LibCore/Process.cpp +++ b/Userland/Libraries/LibCore/Process.cpp @@ -12,7 +12,7 @@ #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # include #endif @@ -46,7 +46,7 @@ struct ArgvList { ErrorOr spawn() { auto pid = TRY(System::posix_spawn(m_path.view(), nullptr, nullptr, const_cast(get().data()), environ)); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY TRY(System::disown(pid)); #endif return pid; diff --git a/Userland/Libraries/LibCore/Stream.cpp b/Userland/Libraries/LibCore/Stream.cpp index bab2474af58..6d8cd80fee9 100644 --- a/Userland/Libraries/LibCore/Stream.cpp +++ b/Userland/Libraries/LibCore/Stream.cpp @@ -14,7 +14,7 @@ #include #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # include #endif #ifdef __FreeBSD__ diff --git a/Userland/Libraries/LibCore/System.cpp b/Userland/Libraries/LibCore/System.cpp index c156d14daa4..6359b34d5d5 100644 --- a/Userland/Libraries/LibCore/System.cpp +++ b/Userland/Libraries/LibCore/System.cpp @@ -25,7 +25,7 @@ #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # include # include # include @@ -61,7 +61,7 @@ namespace Core::System { # endif #endif -#ifdef __serenity__ +#ifdef AK_OS_SERENITY ErrorOr beep() { @@ -256,7 +256,7 @@ ErrorOr fcntl(int fd, int command, ...) ErrorOr mmap(void* address, size_t size, int protection, int flags, int fd, off_t offset, [[maybe_unused]] size_t alignment, [[maybe_unused]] StringView name) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_mmap_params params { address, size, alignment, protection, flags, fd, offset, { name.characters_without_null_termination(), name.length() } }; ptrdiff_t rc = syscall(SC_mmap, ¶ms); if (rc < 0 && rc > -EMAXERRNO) @@ -282,7 +282,7 @@ ErrorOr munmap(void* address, size_t size) ErrorOr anon_create([[maybe_unused]] size_t size, [[maybe_unused]] int options) { int fd = -1; -#if defined(__serenity__) +#if defined(AK_OS_SERENITY) fd = ::anon_create(round_up_to_power_of_two(size, PAGE_SIZE), options); #elif defined(__linux__) || defined(__FreeBSD__) // FIXME: Support more options on Linux. @@ -337,7 +337,7 @@ ErrorOr openat(int fd, StringView path, int options, mode_t mode) { if (!path.characters_without_null_termination()) return Error::from_syscall("open"sv, -EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_open_params params { fd, { path.characters_without_null_termination(), path.length() }, options, mode }; int rc = syscall(SC_open, ¶ms); HANDLE_SYSCALL_RETURN_VALUE("open", rc, rc); @@ -371,7 +371,7 @@ ErrorOr stat(StringView path) return Error::from_syscall("stat"sv, -EFAULT); struct stat st = {}; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_stat_params params { { path.characters_without_null_termination(), path.length() }, &st, AT_FDCWD, true }; int rc = syscall(SC_stat, ¶ms); HANDLE_SYSCALL_RETURN_VALUE("stat", rc, st); @@ -389,7 +389,7 @@ ErrorOr lstat(StringView path) return Error::from_syscall("lstat"sv, -EFAULT); struct stat st = {}; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_stat_params params { { path.characters_without_null_termination(), path.length() }, &st, AT_FDCWD, false }; int rc = syscall(SC_stat, ¶ms); HANDLE_SYSCALL_RETURN_VALUE("lstat", rc, st); @@ -522,7 +522,7 @@ ErrorOr chmod(StringView pathname, mode_t mode) if (!pathname.characters_without_null_termination()) return Error::from_syscall("chmod"sv, -EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_chmod_params params { AT_FDCWD, { pathname.characters_without_null_termination(), pathname.length() }, @@ -558,7 +558,7 @@ ErrorOr lchown(StringView pathname, uid_t uid, gid_t gid) if (!pathname.characters_without_null_termination()) return Error::from_syscall("chown"sv, -EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_chown_params params = { { pathname.characters_without_null_termination(), pathname.length() }, uid, gid, AT_FDCWD, false }; int rc = syscall(SC_chown, ¶ms); HANDLE_SYSCALL_RETURN_VALUE("chown", rc, {}); @@ -575,7 +575,7 @@ ErrorOr chown(StringView pathname, uid_t uid, gid_t gid) if (!pathname.characters_without_null_termination()) return Error::from_syscall("chown"sv, -EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_chown_params params = { { pathname.characters_without_null_termination(), pathname.length() }, uid, gid, AT_FDCWD, true }; int rc = syscall(SC_chown, ¶ms); HANDLE_SYSCALL_RETURN_VALUE("chown", rc, {}); @@ -649,7 +649,7 @@ ErrorOr> getgrnam(StringView name) ErrorOr clock_settime(clockid_t clock_id, struct timespec* ts) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY int rc = syscall(SC_clock_settime, clock_id, ts); HANDLE_SYSCALL_RETURN_VALUE("clocksettime", rc, {}); #else @@ -777,7 +777,7 @@ ErrorOr isatty(int fd) ErrorOr link(StringView old_path, StringView new_path) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_link_params params { .old_path = { old_path.characters_without_null_termination(), old_path.length() }, .new_path = { new_path.characters_without_null_termination(), new_path.length() }, @@ -795,7 +795,7 @@ ErrorOr link(StringView old_path, StringView new_path) ErrorOr symlink(StringView target, StringView link_path) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_symlink_params params { .target = { target.characters_without_null_termination(), target.length() }, .linkpath = { link_path.characters_without_null_termination(), link_path.length() }, @@ -815,7 +815,7 @@ ErrorOr mkdir(StringView path, mode_t mode) { if (path.is_null()) return Error::from_errno(EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY int rc = syscall(SC_mkdir, path.characters_without_null_termination(), path.length(), mode); HANDLE_SYSCALL_RETURN_VALUE("mkdir", rc, {}); #else @@ -830,7 +830,7 @@ ErrorOr chdir(StringView path) { if (path.is_null()) return Error::from_errno(EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY int rc = syscall(SC_chdir, path.characters_without_null_termination(), path.length()); HANDLE_SYSCALL_RETURN_VALUE("chdir", rc, {}); #else @@ -845,7 +845,7 @@ ErrorOr rmdir(StringView path) { if (path.is_null()) return Error::from_errno(EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY int rc = syscall(SC_rmdir, path.characters_without_null_termination(), path.length()); HANDLE_SYSCALL_RETURN_VALUE("rmdir", rc, {}); #else @@ -877,7 +877,7 @@ ErrorOr rename(StringView old_path, StringView new_path) if (old_path.is_null() || new_path.is_null()) return Error::from_errno(EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_rename_params params { .old_path = { old_path.characters_without_null_termination(), old_path.length() }, .new_path = { new_path.characters_without_null_termination(), new_path.length() }, @@ -898,7 +898,7 @@ ErrorOr unlink(StringView path) if (path.is_null()) return Error::from_errno(EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY int rc = syscall(SC_unlink, AT_FDCWD, path.characters_without_null_termination(), path.length(), 0); HANDLE_SYSCALL_RETURN_VALUE("unlink", rc, {}); #else @@ -917,7 +917,7 @@ ErrorOr utime(StringView path, Optional maybe_buf) struct utimbuf* buf = nullptr; if (maybe_buf.has_value()) buf = &maybe_buf.value(); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY int rc = syscall(SC_utime, path.characters_without_null_termination(), path.length(), buf); HANDLE_SYSCALL_RETURN_VALUE("utime", rc, {}); #else @@ -931,7 +931,7 @@ ErrorOr utime(StringView path, Optional maybe_buf) ErrorOr uname() { utsname uts; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY int rc = syscall(SC_uname, &uts); HANDLE_SYSCALL_RETURN_VALUE("uname", rc, uts); #else @@ -944,7 +944,7 @@ ErrorOr uname() #ifndef AK_OS_ANDROID ErrorOr adjtime(const struct timeval* delta, struct timeval* old_delta) { -# ifdef __serenity__ +# ifdef AK_OS_SERENITY int rc = syscall(SC_adjtime, delta, old_delta); HANDLE_SYSCALL_RETURN_VALUE("adjtime", rc, {}); # else @@ -957,7 +957,7 @@ ErrorOr adjtime(const struct timeval* delta, struct timeval* old_delta) ErrorOr exec(StringView filename, Span arguments, SearchInPath search_in_path, Optional> environment) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_execve_params params; auto argument_strings = TRY(FixedArray::try_create(arguments.size())); @@ -1231,7 +1231,7 @@ ErrorOr mknod(StringView pathname, mode_t mode, dev_t dev) if (pathname.is_null()) return Error::from_syscall("mknod"sv, -EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY Syscall::SC_mknod_params params { { pathname.characters_without_null_termination(), pathname.length() }, mode, dev }; int rc = syscall(SC_mknod, ¶ms); HANDLE_SYSCALL_RETURN_VALUE("mknod", rc, {}); @@ -1250,7 +1250,7 @@ ErrorOr mkfifo(StringView pathname, mode_t mode) ErrorOr setenv(StringView name, StringView value, bool overwrite) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY auto const rc = ::serenity_setenv(name.characters_without_null_termination(), name.length(), value.characters_without_null_termination(), value.length(), overwrite); #else String name_string = name; @@ -1291,7 +1291,7 @@ ErrorOr access(StringView pathname, int mode) if (pathname.is_null()) return Error::from_syscall("access"sv, -EFAULT); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY int rc = ::syscall(Syscall::SC_access, pathname.characters_without_null_termination(), pathname.length(), mode); HANDLE_SYSCALL_RETURN_VALUE("access", rc, {}); #else diff --git a/Userland/Libraries/LibCore/System.h b/Userland/Libraries/LibCore/System.h index fd9a4d7603f..36badbf244e 100644 --- a/Userland/Libraries/LibCore/System.h +++ b/Userland/Libraries/LibCore/System.h @@ -32,7 +32,7 @@ namespace Core::System { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY ErrorOr beep(); ErrorOr pledge(StringView promises, StringView execpromises = {}); ErrorOr unveil(StringView path, StringView permissions); diff --git a/Userland/Libraries/LibELF/DynamicLoader.cpp b/Userland/Libraries/LibELF/DynamicLoader.cpp index 6d28491d5ab..1e7cd74032a 100644 --- a/Userland/Libraries/LibELF/DynamicLoader.cpp +++ b/Userland/Libraries/LibELF/DynamicLoader.cpp @@ -26,7 +26,7 @@ #include #include -#ifndef __serenity__ +#ifndef AK_OS_SERENITY static void* mmap_with_name(void* addr, size_t length, int prot, int flags, int fd, off_t offset, char const*) { return mmap(addr, length, prot, flags, fd, offset); @@ -239,7 +239,7 @@ Result, DlErrorMessage> DynamicLoader::load_stage_3 return DlErrorMessage { String::formatted("mprotect .relro: PROT_READ: {}", strerror(errno)) }; } -#ifdef __serenity__ +#ifdef AK_OS_SERENITY if (set_mmap_name(m_relro_segment_address.as_ptr(), m_relro_segment_size, String::formatted("{}: .relro", m_filepath).characters()) < 0) { return DlErrorMessage { String::formatted("set_mmap_name .relro: {}", strerror(errno)) }; } diff --git a/Userland/Libraries/LibGPU/Driver.cpp b/Userland/Libraries/LibGPU/Driver.cpp index 7bdcad4a96f..e2d2d973a03 100644 --- a/Userland/Libraries/LibGPU/Driver.cpp +++ b/Userland/Libraries/LibGPU/Driver.cpp @@ -15,9 +15,9 @@ namespace GPU { // FIXME: Think of a better way to configure these paths. Maybe use ConfigServer? static HashMap const s_driver_path_map { -#if defined(__serenity__) +#if defined(AK_OS_SERENITY) { "softgpu", "libsoftgpu.so.serenity" }, -#elif defined(__APPLE__) +#elif defined(AK_OS_MACOS) { "softgpu", "liblagom-softgpu.dylib" }, #else { "softgpu", "liblagom-softgpu.so.0" }, diff --git a/Userland/Libraries/LibGfx/Bitmap.cpp b/Userland/Libraries/LibGfx/Bitmap.cpp index 3a6f1cb9412..bb6a0e828e3 100644 --- a/Userland/Libraries/LibGfx/Bitmap.cpp +++ b/Userland/Libraries/LibGfx/Bitmap.cpp @@ -498,7 +498,7 @@ Bitmap::~Bitmap() void Bitmap::set_mmap_name([[maybe_unused]] String const& name) { VERIFY(m_needs_munmap); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY ::set_mmap_name(m_data, size_in_bytes(), name.characters()); #endif } @@ -516,7 +516,7 @@ void Bitmap::set_volatile() { if (m_volatile) return; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY int rc = madvise(m_data, size_in_bytes(), MADV_SET_VOLATILE); if (rc < 0) { perror("madvise(MADV_SET_VOLATILE)"); @@ -533,7 +533,7 @@ void Bitmap::set_volatile() return true; } -#ifdef __serenity__ +#ifdef AK_OS_SERENITY int rc = madvise(m_data, size_in_bytes(), MADV_SET_NONVOLATILE); if (rc < 0) { if (errno == ENOMEM) { @@ -566,7 +566,7 @@ ErrorOr Bitmap::allocate_backing_store(BitmapFormat format, IntSiz auto const data_size_in_bytes = size_in_bytes(pitch, size.height() * scale_factor); int map_flags = MAP_ANONYMOUS | MAP_PRIVATE; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY map_flags |= MAP_PURGEABLE; void* data = mmap_with_name(nullptr, data_size_in_bytes, PROT_READ | PROT_WRITE, map_flags, 0, 0, String::formatted("GraphicsBitmap [{}]", size).characters()); #else diff --git a/Userland/Libraries/LibJS/Console.cpp b/Userland/Libraries/LibJS/Console.cpp index b8bdd161e7f..165723e7c66 100644 --- a/Userland/Libraries/LibJS/Console.cpp +++ b/Userland/Libraries/LibJS/Console.cpp @@ -429,7 +429,7 @@ MarkedVector Console::vm_arguments() void Console::output_debug_message([[maybe_unused]] LogLevel log_level, [[maybe_unused]] String output) const { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY switch (log_level) { case Console::LogLevel::Debug: dbgln("\033[32;1m(js debug)\033[0m {}", output); diff --git a/Userland/Libraries/LibJS/Heap/BlockAllocator.cpp b/Userland/Libraries/LibJS/Heap/BlockAllocator.cpp index c3ab61237a4..a351bfa45c0 100644 --- a/Userland/Libraries/LibJS/Heap/BlockAllocator.cpp +++ b/Userland/Libraries/LibJS/Heap/BlockAllocator.cpp @@ -21,7 +21,7 @@ BlockAllocator::~BlockAllocator() { for (auto* block : m_blocks) { ASAN_UNPOISON_MEMORY_REGION(block, HeapBlock::block_size); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY if (munmap(block, HeapBlock::block_size) < 0) { perror("munmap"); VERIFY_NOT_REACHED(); @@ -39,7 +39,7 @@ void* BlockAllocator::allocate_block([[maybe_unused]] char const* name) size_t random_index = get_random_uniform(m_blocks.size()); auto* block = m_blocks.unstable_take(random_index); ASAN_UNPOISON_MEMORY_REGION(block, HeapBlock::block_size); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY if (set_mmap_name(block, HeapBlock::block_size, name) < 0) { perror("set_mmap_name"); VERIFY_NOT_REACHED(); @@ -48,7 +48,7 @@ void* BlockAllocator::allocate_block([[maybe_unused]] char const* name) return block; } -#ifdef __serenity__ +#ifdef AK_OS_SERENITY auto* block = (HeapBlock*)serenity_mmap(nullptr, HeapBlock::block_size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_RANDOMIZED | MAP_PRIVATE, 0, 0, HeapBlock::block_size, name); VERIFY(block != MAP_FAILED); #else @@ -62,7 +62,7 @@ void BlockAllocator::deallocate_block(void* block) { VERIFY(block); if (m_blocks.size() >= max_cached_blocks) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY if (munmap(block, HeapBlock::block_size) < 0) { perror("munmap"); VERIFY_NOT_REACHED(); diff --git a/Userland/Libraries/LibJS/Heap/Heap.cpp b/Userland/Libraries/LibJS/Heap/Heap.cpp index a6eee105a6e..a9860b94736 100644 --- a/Userland/Libraries/LibJS/Heap/Heap.cpp +++ b/Userland/Libraries/LibJS/Heap/Heap.cpp @@ -20,13 +20,13 @@ #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # include #endif namespace JS { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY static int gc_perf_string_id; #endif @@ -36,7 +36,7 @@ static __thread HashMap* s_custom_ranges_for_conservative_scan Heap::Heap(VM& vm) : m_vm(vm) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY auto gc_signpost_string = "Garbage collection"sv; gc_perf_string_id = perf_register_string(gc_signpost_string.characters_without_null_termination(), gc_signpost_string.length()); #endif @@ -91,7 +91,7 @@ void Heap::collect_garbage(CollectionType collection_type, bool print_report) VERIFY(!m_collecting_garbage); TemporaryChange change(m_collecting_garbage, true); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY static size_t global_gc_counter = 0; perf_event(PERF_EVENT_SIGNPOST, gc_perf_string_id, global_gc_counter++); #endif diff --git a/Userland/Libraries/LibJS/Heap/HeapBlock.cpp b/Userland/Libraries/LibJS/Heap/HeapBlock.cpp index fd997857d22..6fe8c6e4e40 100644 --- a/Userland/Libraries/LibJS/Heap/HeapBlock.cpp +++ b/Userland/Libraries/LibJS/Heap/HeapBlock.cpp @@ -20,7 +20,7 @@ namespace JS { NonnullOwnPtr HeapBlock::create_with_cell_size(Heap& heap, size_t cell_size) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY char name[64]; snprintf(name, sizeof(name), "LibJS: HeapBlock(%zu)", cell_size); #else diff --git a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp index 003add64d5c..68f5b1ec532 100644 --- a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp +++ b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp @@ -200,7 +200,7 @@ GlobalObject::~GlobalObject() = default; JS_DEFINE_NATIVE_FUNCTION(GlobalObject::gc) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY dbgln("Forced garbage collection requested!"); #endif vm.heap().collect_garbage(); diff --git a/Userland/Libraries/LibMain/Main.cpp b/Userland/Libraries/LibMain/Main.cpp index 69f6e30fa81..6b0604c02e4 100644 --- a/Userland/Libraries/LibMain/Main.cpp +++ b/Userland/Libraries/LibMain/Main.cpp @@ -44,7 +44,7 @@ int main(int argc, char** argv) if (result.is_error()) { auto error = result.release_error(); warnln("\033[31;1mRuntime error\033[0m: {}", error); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY dbgln("\033[31;1mExiting with runtime error\033[0m: {}", error); #endif return Main::return_code_for_errors(); diff --git a/Userland/Libraries/LibRegex/RegexError.h b/Userland/Libraries/LibRegex/RegexError.h index 9d4d5060c99..c778c2e258a 100644 --- a/Userland/Libraries/LibRegex/RegexError.h +++ b/Userland/Libraries/LibRegex/RegexError.h @@ -8,7 +8,7 @@ #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # include #else # include diff --git a/Userland/Libraries/LibRegex/RegexOptions.h b/Userland/Libraries/LibRegex/RegexOptions.h index d369770c940..a292783128b 100644 --- a/Userland/Libraries/LibRegex/RegexOptions.h +++ b/Userland/Libraries/LibRegex/RegexOptions.h @@ -8,7 +8,7 @@ #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # include #else # include diff --git a/Userland/Libraries/LibTest/JavaScriptTestRunner.h b/Userland/Libraries/LibTest/JavaScriptTestRunner.h index bad1cdf63d4..b2d4e01fe85 100644 --- a/Userland/Libraries/LibTest/JavaScriptTestRunner.h +++ b/Userland/Libraries/LibTest/JavaScriptTestRunner.h @@ -37,7 +37,7 @@ #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # include #endif @@ -292,7 +292,7 @@ inline JSFileResult TestRunner::run_file_test(String const& test_path) { g_currently_running_test = test_path; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY auto string_id = perf_register_string(test_path.characters(), test_path.length()); perf_event(PERF_EVENT_SIGNPOST, string_id, 0); #endif @@ -499,7 +499,7 @@ inline void TestRunner::print_file_result(JSFileResult const& file_result) const if (!file_result.logged_messages.is_empty()) { print_modifiers({ FG_GRAY, FG_BOLD }); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY outln(" ℹ Console output:"); #else // This emoji has a second invisible byte after it. The one above does not @@ -514,7 +514,7 @@ inline void TestRunner::print_file_result(JSFileResult const& file_result) const auto test_error = file_result.error.value(); print_modifiers({ FG_RED }); -#ifdef __serenity__ +#ifdef AK_OS_SERENITY outln(" ❌ The file failed to parse"); #else // No invisible byte here, but the spacing still needs to be altered on the host @@ -541,14 +541,14 @@ inline void TestRunner::print_file_result(JSFileResult const& file_result) const print_modifiers({ FG_GRAY, FG_BOLD }); if (failed) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY out(" ❌ Suite: "); #else // No invisible byte here, but the spacing still needs to be altered on the host out(" ❌ Suite: "); #endif } else { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY out(" ⚠ Suite: "); #else // This emoji has a second invisible byte after it. The one above does not diff --git a/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp b/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp index 9496615516b..fa6fc4a36f7 100644 --- a/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp +++ b/Userland/Libraries/LibTest/JavaScriptTestRunnerMain.cpp @@ -81,7 +81,7 @@ int main(int argc, char** argv) bool print_times = false; bool print_progress = -#ifdef __serenity__ +#ifdef AK_OS_SERENITY true; // Use OSC 9 to print progress #else false; @@ -140,7 +140,7 @@ int main(int argc, char** argv) if (specified_test_root) { test_root = String { specified_test_root }; } else { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY test_root = LexicalPath::join("/home/anon/Tests"sv, String::formatted("{}-tests", program_name.split_view('-').last())).string(); #else char* serenity_source_dir = getenv("SERENITY_SOURCE_DIR"); @@ -158,7 +158,7 @@ int main(int argc, char** argv) } if (common_path.is_empty()) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY common_path = "/home/anon/Tests/js-tests/test-common.js"; #else char* serenity_source_dir = getenv("SERENITY_SOURCE_DIR"); diff --git a/Userland/Libraries/LibThreading/Mutex.h b/Userland/Libraries/LibThreading/Mutex.h index 9ffb0613062..1ef71943142 100644 --- a/Userland/Libraries/LibThreading/Mutex.h +++ b/Userland/Libraries/LibThreading/Mutex.h @@ -24,7 +24,7 @@ public: Mutex() : m_lock_count(0) { -#ifndef __serenity__ +#ifndef AK_OS_SERENITY pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); @@ -41,7 +41,7 @@ public: void unlock(); private: -#ifdef __serenity__ +#ifdef AK_OS_SERENITY pthread_mutex_t m_mutex = PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP; #else pthread_mutex_t m_mutex; diff --git a/Userland/Libraries/LibTimeZone/TimeZone.cpp b/Userland/Libraries/LibTimeZone/TimeZone.cpp index 175bf5fd0f8..4bc21a27d7c 100644 --- a/Userland/Libraries/LibTimeZone/TimeZone.cpp +++ b/Userland/Libraries/LibTimeZone/TimeZone.cpp @@ -101,7 +101,7 @@ StringView current_time_zone() dbgln_if(TIME_ZONE_DEBUG, "Could not determine time zone from TZ environment: {}", time_zone); } -#ifdef __serenity__ +#ifdef AK_OS_SERENITY return system_time_zone(); #else static constexpr auto zoneinfo = "/zoneinfo/"sv; @@ -127,7 +127,7 @@ StringView current_time_zone() ErrorOr change_time_zone([[maybe_unused]] StringView time_zone) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY TimeZoneFile time_zone_file("w"); if (auto new_time_zone = canonicalize_time_zone(time_zone); new_time_zone.has_value()) diff --git a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp index c1270dc9174..845e9391eae 100644 --- a/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp +++ b/Userland/Libraries/LibWeb/Loader/ResourceLoader.cpp @@ -18,7 +18,7 @@ #include #include -#ifdef __serenity__ +#ifdef AK_OS_SERENITY # include #endif @@ -127,7 +127,7 @@ static String sanitized_url_for_logging(AK::URL const& url) static void emit_signpost(String const& message, int id) { -#ifdef __serenity__ +#ifdef AK_OS_SERENITY auto string_id = perf_register_string(message.characters(), message.length()); perf_event(PERF_EVENT_SIGNPOST, string_id, id); #else diff --git a/Userland/Libraries/LibWebView/DOMTreeModel.cpp b/Userland/Libraries/LibWebView/DOMTreeModel.cpp index 295cfdaa095..6096acc23d6 100644 --- a/Userland/Libraries/LibWebView/DOMTreeModel.cpp +++ b/Userland/Libraries/LibWebView/DOMTreeModel.cpp @@ -19,7 +19,7 @@ DOMTreeModel::DOMTreeModel(JsonObject dom_tree, GUI::TreeView* tree_view) , m_dom_tree(move(dom_tree)) { // FIXME: Get these from the outside somehow instead of hard-coding paths here. -#ifdef __serenity__ +#ifdef AK_OS_SERENITY m_document_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-html.png"sv).release_value_but_fixme_should_propagate_errors()); m_element_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/inspector-object.png"sv).release_value_but_fixme_should_propagate_errors()); m_text_icon.set_bitmap_for_size(16, Gfx::Bitmap::try_load_from_file("/res/icons/16x16/filetype-unknown.png"sv).release_value_but_fixme_should_propagate_errors()); @@ -123,7 +123,7 @@ GUI::Variant DOMTreeModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol auto type = node.get("type"sv).as_string_or("unknown"sv); // FIXME: This FIXME can go away when we fix the one below. -#ifdef __serenity__ +#ifdef AK_OS_SERENITY if (role == GUI::ModelRole::ForegroundColor) { // FIXME: Allow models to return a foreground color *role*. // Then we won't need to have a GUI::TreeView& member anymore. @@ -138,7 +138,7 @@ GUI::Variant DOMTreeModel::data(const GUI::ModelIndex& index, GUI::ModelRole rol #endif // FIXME: This FIXME can go away when the icons are provided from the outside (see constructor). -#ifdef __serenity__ +#ifdef AK_OS_SERENITY if (role == GUI::ModelRole::Icon) { if (type == "document") return m_document_icon; diff --git a/Userland/Shell/AST.cpp b/Userland/Shell/AST.cpp index d26d17b72a7..ba79b546f95 100644 --- a/Userland/Shell/AST.cpp +++ b/Userland/Shell/AST.cpp @@ -625,7 +625,7 @@ void BarewordLiteral::highlight_in_editor(Line::Editor& editor, Shell& shell, Hi Line::Style bold = { Line::Style::Bold }; Line::Style style = bold; -#ifdef __serenity__ +#ifdef AK_OS_SERENITY if (runnable->kind == Shell::RunnablePath::Kind::Executable || runnable->kind == Shell::RunnablePath::Kind::Alias) { auto name = shell.help_path_for({}, *runnable); if (name.has_value()) { diff --git a/Userland/Utilities/run-tests.cpp b/Userland/Utilities/run-tests.cpp index f2ad1b23b7f..04e86bf2e9c 100644 --- a/Userland/Utilities/run-tests.cpp +++ b/Userland/Utilities/run-tests.cpp @@ -306,7 +306,7 @@ ErrorOr serenity_main(Main::Arguments arguments) #endif bool print_progress = -#ifdef __serenity__ +#ifdef AK_OS_SERENITY true; // Use OSC 9 to print progress #else false;