AK: Don't forward declare abort.
There is no portable way to forward declare abort because the libc implementations disagree on the signature. Originally, I added a __portable_abort function with a "portable" signature which just called abort. But I really don't like it and just including <stdlib.h> is simpler. Note that the headers we include in <AK/TestSuite.h> are no longer commutative now, we have to include <stdlib.h> before anything else.
This commit is contained in:
parent
e07490ce13
commit
c1823d8a34
Notes:
sideshowbarker
2024-07-19 01:54:25 +09:00
Author: https://github.com/asynts Commit: https://github.com/SerenityOS/serenity/commit/c1823d8a343 Pull-request: https://github.com/SerenityOS/serenity/pull/3764
1 changed files with 2 additions and 2 deletions
|
@ -28,8 +28,6 @@
|
|||
|
||||
#define AK_TEST_SUITE
|
||||
|
||||
extern "C" __attribute__((noreturn)) void abort() noexcept;
|
||||
|
||||
namespace AK {
|
||||
|
||||
template<typename... Parameters>
|
||||
|
@ -63,6 +61,8 @@ using AK::warnln;
|
|||
::abort(); \
|
||||
} while (false)
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <AK/Format.h>
|
||||
#include <AK/Function.h>
|
||||
#include <AK/NonnullRefPtrVector.h>
|
||||
|
|
Loading…
Add table
Reference in a new issue