git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11117
static sem_t* create_semaphore(const char* const name, const int value)
{
-#ifndef HAVE_SEM_INIT
+#ifdef __APPLE__
sem_t* p = sem_open(name, O_CREAT, 0600, value);
return p;
#else
static void destroy_semaphore(const char* const name, sem_t* p)
{
-#ifndef HAVE_SEM_INIT
+#ifdef __APPLE__
sem_close(p);
sem_unlink(name);
#else
static sem_t* create_semaphore(const char* const name)
{
-#ifndef HAVE_SEM_INIT
+#ifdef __APPLE__
sem_t* p = sem_open(name, O_CREAT, 0600, 0);
return p;
#else
static void destroy_semaphore(const char* const name, sem_t* p)
{
-#ifndef HAVE_SEM_INIT
+#ifdef __APPLE__
sem_close(p);
sem_unlink(name);
#else