diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-01 08:56:23 +0100 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2015-11-01 08:56:23 +0100 |
commit | 7e3807d048c5e0a8e0aa64fb49807bf5dfd11fc1 (patch) | |
tree | 22029a8b36a593585dcd962b81ff80199a4f9984 /opentrack-compat/shm.h | |
parent | 664aefb41351113fbd43962aa534befe18ff9d4a (diff) | |
parent | 0ff658f908bc3e07bca9987dfd5b7c365b7d8353 (diff) |
Merge branch 'unstable' into trackhat
Diffstat (limited to 'opentrack-compat/shm.h')
-rw-r--r-- | opentrack-compat/shm.h | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/opentrack-compat/shm.h b/opentrack-compat/shm.h index 17a0d843..c74534e7 100644 --- a/opentrack-compat/shm.h +++ b/opentrack-compat/shm.h @@ -19,7 +19,32 @@ #include <sys/types.h> #endif -class PortableLockedShm { +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wattributes" + +#ifdef __GNUC__ +# define COMPAT_GNUC_VISIBILITY __attribute__ ((visibility ("default"))) +#else +# define COMPAT_GNUC_VISIBILITY +#endif + +#ifdef BUILD_opentrack_compat +# ifdef _WIN32 +# define COMPAT_WIN32_EXPORT __declspec(dllexport) +# else +# define COMPAT_WIN32_EXPORT +# endif +#else +# 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); ~PortableLockedShm(); @@ -35,3 +60,5 @@ private: int fd, size; #endif }; + +#pragma GCC diagnostic pop |