From add27db4e53a9e5cf6580378230b57f81d47284e Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 1 Nov 2015 08:45:50 +0100 Subject: compat: we can't use Qt here --- opentrack-compat/shm.h | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) (limited to 'opentrack-compat') diff --git a/opentrack-compat/shm.h b/opentrack-compat/shm.h index 7c8a66a9..53248ac6 100644 --- a/opentrack-compat/shm.h +++ b/opentrack-compat/shm.h @@ -18,14 +18,29 @@ #include #include #endif -#include + +#ifdef __GNUC__ +# define COMPAT_GNUC_VISIBILITY __attribute__ ((visibility ("default"))) +#else +# define COMPAT_GNUC_VISIBILITY +#endif #ifdef BUILD_opentrack_compat -# define COMPAT_EXPORT Q_DECL_EXPORT +# ifdef _WIN32 +# define COMPAT_WIN32_EXPORT __declspec(dllexport) +# else +# define COMPAT_WIN32_EXPORT +# endif #else -# define COMPAT_EXPORT Q_DECL_IMPORT +# ifdef _WIN32 +# define COMPAT_WIN32_EXPORT __declspec(dllimport) +# else +# define COMPAT_WIN32_EXPORT +# endif #endif +#define COMPAT_EXPORT COMPAT_WIN32_EXPORT COMPAT_GNUC_VISIBILITY + class COMPAT_EXPORT PortableLockedShm { public: PortableLockedShm(const char *shmName, const char *mutexName, int mapSize); -- cgit v1.2.3