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:
27
targets/_any/stdlib/include/assert.h
Normal file
27
targets/_any/stdlib/include/assert.h
Normal 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)
|
||||
Reference in New Issue
Block a user