summaryrefslogtreecommitdiff
path: root/libs/zita-convolver/zita-convolver
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2018-10-21 17:02:14 +0200
committerRobin Gareus <robin@gareus.org>2018-10-21 17:02:14 +0200
commit1229d50e45b47dce5ab59d0c0185e75d50bf3b84 (patch)
tree2d9bb9cefa60510ac9ad2480cf7968158a610087 /libs/zita-convolver/zita-convolver
parent47d341434e1cdcca8b7c359bc01c9032898123dc (diff)
MSVC compatibility for zita-convolver
Diffstat (limited to 'libs/zita-convolver/zita-convolver')
-rw-r--r--libs/zita-convolver/zita-convolver/zita-convolver.h15
1 files changed, 10 insertions, 5 deletions
diff --git a/libs/zita-convolver/zita-convolver/zita-convolver.h b/libs/zita-convolver/zita-convolver/zita-convolver.h
index e655c63643..39ec4ed474 100644
--- a/libs/zita-convolver/zita-convolver/zita-convolver.h
+++ b/libs/zita-convolver/zita-convolver/zita-convolver.h
@@ -17,9 +17,8 @@
//
// ----------------------------------------------------------------------------
-#ifndef _ZITA_CONVOLVER_H
-#define _ZITA_CONVOLVER_H
-
+#ifndef ARDOUR_ZITA_CONVOLVER_H
+#define ARDOUR_ZITA_CONVOLVER_H
#include <fftw3.h>
#include <pthread.h>
@@ -33,7 +32,11 @@ namespace ArdourZita {
#undef ZCSEMA_IS_IMPLEMENTED
#endif
-#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (_WIN32)
+/* Note:
+ * - __MINGW32__ is also defined for 64bit builds
+ * - mingw, x-compile uses PTW32's implementation of semaphores, we should prefer defined(PTW32_VERSION)
+ */
+#if defined(__linux__) || defined(__GNU__) || defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined (__MINGW32__)
#include <semaphore.h>
@@ -80,7 +83,7 @@ private:
#define ZCSEMA_IS_IMPLEMENTED
#endif
-#ifdef __APPLE__
+#if defined (__APPLE__) || defined (_MSC_VER)
// NOTE: ***** I DO NOT REPEAT NOT PROVIDE SUPPORT FOR OSX *****
//
@@ -103,8 +106,10 @@ public:
pthread_cond_destroy (&_cond);
}
+#ifndef _MSC_VER /* remove for MSVC build */
ZCsema (const ZCsema&); // disabled
ZCsema& operator= (const ZCsema&); // disabled
+#endif
int init (int s, int v)
{