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 | |
| parent | 664aefb41351113fbd43962aa534befe18ff9d4a (diff) | |
| parent | 0ff658f908bc3e07bca9987dfd5b7c365b7d8353 (diff) | |
Merge branch 'unstable' into trackhat
Diffstat (limited to 'opentrack-compat')
| -rw-r--r-- | opentrack-compat/CMakeLists.txt | 2 | ||||
| -rw-r--r-- | opentrack-compat/shm.h | 29 | 
2 files changed, 29 insertions, 2 deletions
diff --git a/opentrack-compat/CMakeLists.txt b/opentrack-compat/CMakeLists.txt index 4f5fd724..a92f4f31 100644 --- a/opentrack-compat/CMakeLists.txt +++ b/opentrack-compat/CMakeLists.txt @@ -1,4 +1,4 @@ -opentrack_boilerplate(opentrack-compat STATIC NO-COMPAT) +opentrack_boilerplate(opentrack-compat NO-COMPAT NO-LINKER-SCRIPT)  if(NOT WIN32 AND NOT APPLE)      target_link_libraries(opentrack-compat rt)  endif() 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  | 
