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:
asynts 2020-10-14 11:20:14 +02:00 committed by Andreas Kling
parent e07490ce13
commit c1823d8a34

View file

@ -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>