aboutsummaryrefslogtreecommitdiff
path: root/include/compiler.h
diff options
context:
space:
mode:
authorKenny Levinsen <kl@kl.wtf>2020-07-31 00:22:18 +0200
committerKenny Levinsen <kl@kl.wtf>2020-07-31 00:22:18 +0200
commit61716a2c77dfde9addf6b41a6d72d26a8584150e (patch)
tree537cd84661955497bdb304f88896e36896df4e5f /include/compiler.h
parentf85434de666f10da0cbcaccdbb7d88917c5fa887 (diff)
Initial implementation of seatd and libseat
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