summaryrefslogtreecommitdiff
path: root/src/wasm-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-internal.h')
-rw-r--r--src/wasm-internal.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/wasm-internal.h b/src/wasm-internal.h
new file mode 100644
index 00000000..9108fe5e
--- /dev/null
+++ b/src/wasm-internal.h
@@ -0,0 +1,10 @@
+#ifndef WASM_INTERNAL_H
+#define WASM_INTERNAL_H
+
+#define FATAL(...) fprintf(stderr, __VA_ARGS__), exit(1)
+#define ARRAY_SIZE(a) (sizeof(a) / sizeof(a[0]))
+#define STATIC_ASSERT__(x, c) typedef char static_assert_##c[x ? 1 : -1]
+#define STATIC_ASSERT_(x, c) STATIC_ASSERT__(x, c)
+#define STATIC_ASSERT(x) STATIC_ASSERT_(x, __COUNTER__)
+
+#endif /* WASM_INTERNAL_H */