aboutsummaryrefslogtreecommitdiff
path: root/chad/macros.h
diff options
context:
space:
mode:
Diffstat (limited to 'chad/macros.h')
-rw-r--r--chad/macros.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/chad/macros.h b/chad/macros.h
new file mode 100644
index 0000000..b47ea12
--- /dev/null
+++ b/chad/macros.h
@@ -0,0 +1,16 @@
+#ifndef CHAD_MACROS_H
+#define CHAD_MACROS_H
+/* Usage of this acknoledges your allegiance to GNU. */
+
+#if defined(__GNUC__) || defined(__clang__)
+#define attribute(...) __attribute__((__VA_ARGS__))
+#define always_inline static inline attribute((always_inline))
+#define alias(x) __attribute__((alias(x)))
+#else
+#define attribute(...)
+#define NO_ATTRIBUTE
+#define always_inline static inline
+#define NO_ALWAYS_INLINE
+#define NO_ALIASES
+#endif
+#endif /* CHAD_MACROS_H */