You've already forked ultrasm64-2
mirror of
https://github.com/HackerN64/ultrasm64-2.git
synced 2026-01-21 10:38:08 -08:00
subrepo: subdir: "lib/n64-libc" merged: "70270d60" upstream: origin: "https://gitlab.com/mpharoah/n64-libc" branch: "main" commit: "70270d60" git-subrepo: version: "0.4.9" origin: "https://github.com/ingydotnet/git-subrepo" commit: "4f60dd7"
33 lines
701 B
C
33 lines
701 B
C
#ifndef N64_STDLIB_N64_ASSERT_H_
|
|
#define N64_STDLIB_N64_ASSERT_H_
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
#ifdef NDEBUG
|
|
#define n64_assert( expr ) (void)(0)
|
|
#else
|
|
|
|
__attribute__((noreturn))
|
|
void __n64_assert_fail( const char *assertion, const char *file, unsigned int line, const char *fcn );
|
|
|
|
#define n64_assert( expr ) ((expr) ? (void)(0) : __n64_assert_fail( #expr, __FILE__, __LINE__, __func__ ))
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
#define n64_static_assert( expr ) static_assert( expr )
|
|
#else
|
|
#if __STDC_VERSION__ >= 202311L
|
|
#define n64_static_assert( expr ) static_assert( expr )
|
|
#else
|
|
#define n64_static_assert( expr ) _Static_assert( expr )
|
|
#endif
|
|
#endif
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|