From ae63d465c7252602500c4de5aa2d2a99df852bfb Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 14 Oct 2013 20:46:48 +0200 Subject: Increase 'max count' on win32. Make linux-hack for include a little bit more generic. --- src/semaphore.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/semaphore.cc b/src/semaphore.cc index 5d90c55..47ce8e0 100644 --- a/src/semaphore.cc +++ b/src/semaphore.cc @@ -31,7 +31,8 @@ #ifdef WIN32 #include #else -#include +// Make sure we don't include /this/ file... +#include <../include/semaphore.h> #endif struct semaphore_private_t { @@ -52,7 +53,7 @@ Semaphore::Semaphore(const char *name) #ifdef WIN32 prv->semaphore = CreateSemaphore(NULL, // default security attributes 0, // initial count - 100000, // maximum count + 2147483647, // maximum count (Max LONG) NULL); // unnamed semaphore #else sem_init(&prv->semaphore, 0, 0); -- cgit v1.2.3