diff options
Diffstat (limited to 'src/userspace/libc/assert.h')
-rw-r--r-- | src/userspace/libc/assert.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/userspace/libc/assert.h b/src/userspace/libc/assert.h new file mode 100644 index 0000000..5ff70ab --- /dev/null +++ b/src/userspace/libc/assert.h @@ -0,0 +1,8 @@ +#ifndef MELVIX_ASSERT_H +#define MELVIX_ASSERT_H + +#define __FILENAME__ \ + (__builtin_strrchr(__FILE__, '/') ? __builtin_strrchr(__FILE__, '/') + 1 : __FILE__) +#define assert(exp) (exp) ? 0 : _assert(__FILENAME__, __LINE__, __func__, #exp) + +#endif
\ No newline at end of file |