Files
Odin/vendor/libc/include/assert.h
Laytan Laats 140c902eff vendor/libc: a bunch of additions
All these additions are to allow Dear ImGui to be compiled natively.
2025-03-12 19:25:35 +01:00

29 lines
553 B
C

#ifdef __cplusplus
extern "C" {
#endif
#pragma once
#ifdef NDEBUG
#define assert(e) ((void)0)
#else
#ifdef __FILE_NAME__
#define __ASSERT_FILE_NAME __FILE_NAME__
#else /* __FILE_NAME__ */
#define __ASSERT_FILE_NAME __FILE__
#endif /* __FILE_NAME__ */
void __odin_libc_assert_fail(const char *, const char *, int, const char *);
#define assert(e) \
(__builtin_expect(!(e), 0) ? __odin_libc_assert_fail(__func__, __ASSERT_FILE_NAME, __LINE__, #e) : (void)0)
#endif /* NDEBUG */
#define static_assert _Static_assert
#ifdef __cplusplus
}
#endif