summaryrefslogtreecommitdiff
path: root/base/inc/macros.hh
diff options
context:
space:
mode:
authorJoel Klinghed <the_jk@spawned.biz>2023-06-13 10:07:16 +0200
committerJoel Klinghed <the_jk@spawned.biz>2023-06-13 10:07:16 +0200
commitfc4547b412e28164af1bf8981234c6af959ccc0b (patch)
tree061253e7a4f6abaca282223b36d10f0bed8cad23 /base/inc/macros.hh
WIP
Diffstat (limited to 'base/inc/macros.hh')
-rw-r--r--base/inc/macros.hh16
1 files changed, 16 insertions, 0 deletions
diff --git a/base/inc/macros.hh b/base/inc/macros.hh
new file mode 100644
index 0000000..6d88669
--- /dev/null
+++ b/base/inc/macros.hh
@@ -0,0 +1,16 @@
+#ifndef BASE_MACROS_HH
+#define BASE_MACROS_HH
+
+#if defined(HAVE_ATTRIBUTE_VISIBILITY_HIDDEN)
+# define HIDDEN __attribute__((visibility ("hidden")))
+#else
+# define HIDDEN
+#endif
+
+#if defined(HAVE_ATTRIBUTE_UNLIKELY)
+# define UNLIKELY [[unlikely]]
+#else
+# define UNLIKELY
+#endif
+
+#endif // BASE_MACROS_HH