summaryrefslogtreecommitdiffhomepage
path: root/compat/compat.h
diff options
context:
space:
mode:
authorDonovan Baarda <abo@minkirri.apana.org.au>2014-06-12 14:53:43 +1000
committerDonovan Baarda <abo@minkirri.apana.org.au>2014-06-12 14:53:43 +1000
commit0669a40347ffa233bc6042b0f65d244509a61394 (patch)
tree36a4577bdaa1ed28ca1ad222a54777012dd2dda8 /compat/compat.h
parent72540e0a96a3120a5d02271e714aba29e136ab78 (diff)
parent7454496476ba17ea622781d280606161581c9544 (diff)
Merge branch 'master' of https://github.com/opentrack/opentrack into dev/ewma2
Resolved conflicts manually in files: ftnoir_filter_ewma2/ftnoir_filter_ewma2.cpp ftnoir_filter_ewma2/ftnoir_filter_ewma2.h
Diffstat (limited to 'compat/compat.h')
-rw-r--r--compat/compat.h17
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;