summaryrefslogtreecommitdiff
path: root/src/shared/include
diff options
context:
space:
mode:
authordzwdz2022-08-26 14:16:16 +0200
committerdzwdz2022-08-26 14:16:16 +0200
commite6584db26da34572fb13aa236e16e19f71c8e976 (patch)
tree055c528765e986bc8ed6706cec84289e50b46ed6 /src/shared/include
parentffdf0e8d93f8e98ed9d5a8270feb2a19eb9659e3 (diff)
user/libc: prepare for OpenED port
Diffstat (limited to 'src/shared/include')
-rw-r--r--src/shared/include/assert.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/shared/include/assert.h b/src/shared/include/assert.h
index 7adf297..7520aa9 100644
--- a/src/shared/include/assert.h
+++ b/src/shared/include/assert.h
@@ -1,3 +1,7 @@
-#pragma once
+#ifdef NDEBUG
+#define assert(stmt) do {} while (0)
+#else
#define assert(stmt) do { if (!(stmt)) __badassert(__func__, __FILE__, __LINE__); } while (0)
+#endif
+
_Noreturn void __badassert(const char *func, const char *file, int line);