summaryrefslogtreecommitdiff
path: root/src/shared/include/assert.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/shared/include/assert.h')
-rw-r--r--src/shared/include/assert.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/shared/include/assert.h b/src/shared/include/assert.h
new file mode 100644
index 0000000..7adf297
--- /dev/null
+++ b/src/shared/include/assert.h
@@ -0,0 +1,3 @@
+#pragma once
+#define assert(stmt) do { if (!(stmt)) __badassert(__func__, __FILE__, __LINE__); } while (0)
+_Noreturn void __badassert(const char *func, const char *file, int line);