summaryrefslogtreecommitdiff
path: root/base/inc
diff options
context:
space:
mode:
Diffstat (limited to 'base/inc')
-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