diff options
Diffstat (limited to 'src/exit/assert.c')
-rw-r--r-- | src/exit/assert.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/exit/assert.c b/src/exit/assert.c new file mode 100644 index 0000000..e87442a --- /dev/null +++ b/src/exit/assert.c @@ -0,0 +1,9 @@ +#include <stdio.h> +#include <stdlib.h> + +void __assert_fail(const char *expr, const char *file, int line, const char *func) +{ + fprintf(stderr, "Assertion failed: %s (%s: %s: %d)\n", expr, file, func, line); + fflush(NULL); + abort(); +} |