summaryrefslogtreecommitdiff
path: root/libgcompat/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'libgcompat/internal.h')
-rw-r--r--libgcompat/internal.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/libgcompat/internal.h b/libgcompat/internal.h
new file mode 100644
index 0000000..bb107bc
--- /dev/null
+++ b/libgcompat/internal.h
@@ -0,0 +1,14 @@
+#ifndef LIBGCOMPAT_INTERNAL_H
+#define LIBGCOMPAT_INTERNAL_H
+
+void GCOMPAT__panic(const char *fmt, ...) __attribute__((noreturn));
+
+#define GCOMPAT__assert_with_reason(chk, fmt, ...) \
+ do { \
+ if (!(chk)) { \
+ GCOMPAT__panic(fmt, __VA_ARGS__); \
+ } \
+ } \
+ while(0);
+
+#endif