diff options
Diffstat (limited to 'libs/pbd/pbd/semutils.h')
-rw-r--r-- | libs/pbd/pbd/semutils.h | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/libs/pbd/pbd/semutils.h b/libs/pbd/pbd/semutils.h index 5c0191e25b..50ac41919c 100644 --- a/libs/pbd/pbd/semutils.h +++ b/libs/pbd/pbd/semutils.h @@ -19,9 +19,14 @@ #ifndef __pbd_semutils_h__ #define __pbd_semutils_h__ -#ifdef PLATFORM_WINDOWS +#if (defined PLATFORM_WINDOWS && !defined USE_PTW32_SEMAPHORE) +#define WINDOWS_SEMAPHORE 1 +#endif + +#ifdef WINDOWS_SEMAPHORE #include <windows.h> #else +#include <pthread.h> #include <semaphore.h> #endif @@ -31,7 +36,7 @@ namespace PBD { class LIBPBD_API ProcessSemaphore { private: -#ifdef PLATFORM_WINDOWS +#ifdef WINDOWS_SEMAPHORE HANDLE _sem; #elif __APPLE__ @@ -46,7 +51,7 @@ class LIBPBD_API ProcessSemaphore { ProcessSemaphore (const char* name, int val); ~ProcessSemaphore (); -#ifdef PLATFORM_WINDOWS +#ifdef WINDOWS_SEMAPHORE int signal (); int wait (); |