diff options
Diffstat (limited to 'compat/compat.h')
-rw-r--r-- | compat/compat.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/compat/compat.h b/compat/compat.h index 7692b38a..0e488752 100644 --- a/compat/compat.h +++ b/compat/compat.h @@ -6,7 +6,7 @@ */ #pragma once -#if defined(_WIN32) || defined(__WIN32) +#if defined(_WIN32) #include <windows.h> #else #include <stdio.h> @@ -19,10 +19,16 @@ #include <sys/types.h> #endif -#if defined(IN_FTNOIR_COMPAT) && (defined(_WIN32) || defined(__WIN32)) -# define COMPAT_EXPORT __declspec(dllexport) +#if !defined(OPENTRACK_COMPAT_BUNDLED) +# if defined(IN_FTNOIR_COMPAT) && defined(_WIN32) +# define COMPAT_EXPORT __declspec(dllexport) +# elif defined(_WIN32) +# define COMPAT_EXPORT __declspec(dllimport) +# else +# define COMPAT_EXPORT __attribute__ ((visibility ("default"))) +# endif #else -# define COMPAT_EXPORT +# define COMPAT_EXPORT #endif class COMPAT_EXPORT PortableLockedShm { @@ -31,9 +37,10 @@ public: ~PortableLockedShm(); void lock(); void unlock(); + bool success(); void* mem; private: -#if defined(_WIN32) || defined(__WIN32) +#if defined(_WIN32) HANDLE hMutex, hMapFile; #else int fd, size; |