condition gcd on HAVE_GCD
authorLove Hornquist Astrand <lha@h5l.org>
Wed, 8 Sep 2010 16:18:03 +0000 (09:18 -0700)
committerLove Hornquist Astrand <lha@h5l.org>
Wed, 8 Sep 2010 16:18:03 +0000 (09:18 -0700)
lib/ipc/common.c

index 107b51d59a7156834ff547c60dab03976308bd53..a0184740b1837b5aa8e763de5e473b7504412bbc 100644 (file)
@@ -34,7 +34,7 @@
  */
 
 #include "hi_locl.h"
-#ifdef __APPLE__
+#ifdef HAVE_GCD
 #include <dispatch/dispatch.h>
 #endif
 
@@ -92,7 +92,7 @@ _heim_ipc_create_cred(uid_t uid, gid_t gid, pid_t pid, pid_t session, heim_icred
 heim_isemaphore
 heim_ipc_semaphore_create(long value)
 {
-#ifdef __APPLE__
+#ifdef HAVE_GCD
     return (heim_isemaphore)dispatch_semaphore_create(value);
 #else
     abort();
@@ -102,7 +102,7 @@ heim_ipc_semaphore_create(long value)
 long
 heim_ipc_semaphore_wait(heim_isemaphore s, time_t t)
 {
-#ifdef __APPLE__
+#ifdef HAVE_GCD
     uint64_t timeout;
     if (t == HEIM_IPC_WAIT_FOREVER)
        timeout = DISPATCH_TIME_FOREVER;
@@ -118,7 +118,7 @@ heim_ipc_semaphore_wait(heim_isemaphore s, time_t t)
 long
 heim_ipc_semaphore_signal(heim_isemaphore s)
 {
-#ifdef __APPLE__
+#ifdef HAVE_GCD
     return dispatch_semaphore_signal((dispatch_semaphore_t)s);
 #else
     abort();
@@ -128,7 +128,7 @@ heim_ipc_semaphore_signal(heim_isemaphore s)
 void
 heim_ipc_semaphore_release(heim_isemaphore s)
 {
-#ifdef __APPLE__
+#ifdef HAVE_GCD
     return dispatch_release((dispatch_semaphore_t)s);
 #else
     abort();