diff options
author | Kenny Levinsen <kl@kl.wtf> | 2020-07-31 00:22:18 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-07-31 00:22:18 +0200 |
commit | 61716a2c77dfde9addf6b41a6d72d26a8584150e (patch) | |
tree | 537cd84661955497bdb304f88896e36896df4e5f /include/compiler.h | |
parent | f85434de666f10da0cbcaccdbb7d88917c5fa887 (diff) |
Initial implementation of seatd and libseat
Diffstat (limited to 'include/compiler.h')
-rw-r--r-- | include/compiler.h | 18 |
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 |