aboutsummaryrefslogtreecommitdiff
path: root/include/compiler.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/compiler.h')
-rw-r--r--include/compiler.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/include/compiler.h b/include/compiler.h
new file mode 100644
index 0000000..d0f6ed2
--- /dev/null
+++ b/include/compiler.h
@@ -0,0 +1,18 @@
+#ifndef _VISIBILITY_H
+#define _VISIBILITY_H
+
+#ifdef __GNUC__
+#define ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end)))
+#else
+#define ATTRIB_PRINTF(start, end)
+#endif
+
+#if defined(__GNUC__) && __GNUC__ >= 4
+#define LIBSEAT_EXPORT __attribute__((visibility("default")))
+#define ALWAYS_INLINE __attribute__((always_inline)) inline
+#else
+#define LIBSEAT_EXPORT
+#define ALWAYS_INLINE inline
+#endif
+
+#endif