fxlibc/src/libc/assert/assert.c
Lephenixnoir 676601b894
assert: add a partial assert implementation (LDEPS)
This currently does not link because fprintf, stderr and abort are
missing on most platforms. But the code is there.
2021-05-16 18:12:45 +02:00

12 lines
250 B
C

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
void __assert_fail(char const *file, int line, char const *func, char const
*expression)
{
fprintf(stderr, "%s:%d:%s: assertion failed: %s\n",
file, line, func, expression);
abort();
}