From 61716a2c77dfde9addf6b41a6d72d26a8584150e Mon Sep 17 00:00:00 2001 From: Kenny Levinsen Date: Fri, 31 Jul 2020 00:22:18 +0200 Subject: Initial implementation of seatd and libseat --- include/compiler.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 include/compiler.h (limited to 'include/compiler.h') 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 -- cgit v1.2.3