diff options
author | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-28 16:20:17 -0400 |
---|---|---|
committer | Jon Santmyer <jon@jonsantmyer.com> | 2025-08-28 16:20:17 -0400 |
commit | c92305221770bb1316d026c200d569ca4e930e42 (patch) | |
tree | bf3e496991e74bd6f2415cf156a7226729f0058b /lib/libc/include/assert.h | |
parent | 69f2ee15025ccedaae0308c50b7d0d400b854c5b (diff) | |
download | jove-os-c92305221770bb1316d026c200d569ca4e930e42.tar.gz jove-os-c92305221770bb1316d026c200d569ca4e930e42.tar.bz2 jove-os-c92305221770bb1316d026c200d569ca4e930e42.zip |
merge libc files, new init methods for libjove
Diffstat (limited to 'lib/libc/include/assert.h')
-rw-r--r-- | lib/libc/include/assert.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/libc/include/assert.h b/lib/libc/include/assert.h new file mode 100644 index 0000000..4b8fbf8 --- /dev/null +++ b/lib/libc/include/assert.h @@ -0,0 +1,16 @@ +#ifndef _ASSERT_H +#define _ASSERT_H 1 + +#ifdef NDEBUG +#define assert(ignore)((void)0) +#else +#include <stdio.h> +#define assert(condition) \ + if(!(condition)) { \ + fprintf(stderr, "%s:%s:%s: Assertion '%s' failed!\n", \ + __FILE__, __LINE__, __FUNCTION__, #condition); \ + abort(); \ + } +#endif + +#endif |