diff options
Diffstat (limited to 'include/assert.h')
-rw-r--r-- | include/assert.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/include/assert.h b/include/assert.h new file mode 100644 index 00000000..bad2ccd0 --- /dev/null +++ b/include/assert.h @@ -0,0 +1,17 @@ +#undef assert + +#ifdef NDEBUG +#define assert(x) (void)0 +#else +#define assert(x) ((x) || (__assert_fail(#x, __FILE__, __LINE__, __func__),0)) +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +void __assert_fail (const char *, const char *, int, const char *); + +#ifdef __cplusplus +} +#endif |