Fix marco definition
parent
96a42cdfda
commit
bc07174c0e
|
@ -1,4 +1,5 @@
|
|||
#ifdef __linux__ /// Linux
|
||||
#if (defined(__linux__)&&!defined(_TRY_POSIX)) /// Linux platform without trying posix.
|
||||
|
||||
#include "SemaphoreWrapper.h"
|
||||
|
||||
#include <fcntl.h>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#if (!defined(_WIN32)&&!defined(__linux__)) /// Not Windows or linux... Try posix.
|
||||
#ifdef _TRY_POSIX /// Try posix.
|
||||
|
||||
#include "SemaphoreWrapper.h"
|
||||
#include <fcntl.h>
|
||||
|
@ -42,6 +42,7 @@ ProcessSemaphore::ProcessSemaphore(int key, int action, int default_value) : _p(
|
|||
}
|
||||
else
|
||||
{
|
||||
/// Notice: Most platform reports "Function not implemented" on sem_open.
|
||||
dprintf("Failed to sem_open. %s\n",strerror(errno));
|
||||
}
|
||||
}
|
||||
|
@ -86,4 +87,4 @@ int ProcessSemaphore::notify()
|
|||
return v();
|
||||
}
|
||||
|
||||
#endif
|
||||
#endif /// End of Try Posix
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#ifdef _WIN32
|
||||
#if (defined(_WIN32)&&!defined(_TRY_POSIX)) /// Windows platform without trying posix.
|
||||
|
||||
#include "SemaphoreWrapper.h"
|
||||
#include <windows.h>
|
||||
|
|
Loading…
Reference in New Issue