From 620f2dca70f68748c78e9caa634606a56e8b57b4 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Tue, 30 Jan 2024 13:00:19 -0500 Subject: include proper standard and safety checks --- src/assert/__assert.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/assert/__assert.c') diff --git a/src/assert/__assert.c b/src/assert/__assert.c index 8e11b756..0a3f95c3 100644 --- a/src/assert/__assert.c +++ b/src/assert/__assert.c @@ -1,10 +1,11 @@ -#if 0 - #include #include +#include "_safety.h" void __assert(const char *expr, const char *file, int line, const char *func) { + SIGNAL_SAFE(0); + if (func) { fprintf(stderr, "Assertion failed: %s (%s:%d:%s())\n", expr, file, line, func); @@ -12,8 +13,10 @@ void __assert(const char *expr, const char *file, int line, const char *func) fprintf(stderr, "Assertion failed: %s (%s:%d)\n", expr, file, line); } + abort(); } - -#endif +/* +STDC(0) +*/ -- cgit v1.2.1