From 12dedc7e2e51390fdf2caec3700e75db19be1cd4 Mon Sep 17 00:00:00 2001 From: Felix Morgner Date: Tue, 28 Oct 2025 18:31:39 +0100 Subject: kstd: don't rely on newlib --- libs/kstd/src/cstdlib.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 libs/kstd/src/cstdlib.cpp (limited to 'libs/kstd/src/cstdlib.cpp') diff --git a/libs/kstd/src/cstdlib.cpp b/libs/kstd/src/cstdlib.cpp new file mode 100644 index 0000000..8fb5f63 --- /dev/null +++ b/libs/kstd/src/cstdlib.cpp @@ -0,0 +1,18 @@ +#include "kstd/bits/os.hpp" + +namespace kstd +{ + + extern "C" + { + [[noreturn]] auto abort() -> void + { + if (!kstd::os::abort()) + { + os::panic("System abort handler returned."); + } + __builtin_trap(); + } + } + +} // namespace kstd \ No newline at end of file -- cgit v1.2.3