Moved stdlib to a seperate folder and added some more headers that are required for compiling libgcc (no implementation yet).

This commit is contained in:
2024-02-02 00:01:48 +01:00
parent 00f4e0de3a
commit 712b95c9d7
22 changed files with 154 additions and 42 deletions

View File

@@ -0,0 +1,27 @@
#pragma once
#if !defined(BAD_APPLE_OS_ASSERT_H_INCLUDED)
#define BAD_APPLE_OS_ASSERT_H_INCLUDED
#include "./detail/common.h"
BA_EXTERN_C_BEGIN
#if defined(NDEBUG)
#define assert(condition) ((void) 0)
#else
#define assert(condition) \
if (!(condition)) \
{ \
__ba__assert_fail(__FILE__, __LINE__, #condition); \
}
#endif
#if !defined(NDEBUG)
BA_CXX_NORETURN void __ba__assert_fail(const char* filename, int line, const char* condition) BA_CXX_NOEXCEPT;
#endif
BA_EXTERN_C_END
#endif // !defined(BAD_APPLE_OS_ASSERT_H_INCLUDED)