Re: [Mono-dev] mono-semaphore.c broken on MacOSX in SVN

2010-02-23 Thread Geoff Norton
This is fixed in trunk, sorry I forgot to commit it before.

-g

On 2010-02-23, at 7:46 PM, Tom Philpot wrote:

> Mono-semaphore.c won't compile on Mac.
> 
> I *think* the patch below will fix it in both cases, but my macros are pretty 
> rusty. Basically, semaphore_timedwait doesn't take a mach_timespec_t* where 
> as sem_timedwait does take a struct timespec *
> 
> 
> 
> ws1048-snow:mono tom.philpot$ svn diff mono/utils/mono-semaphore.c
> Index: mono/utils/mono-semaphore.c
> ===
> --- mono/utils/mono-semaphore.c   (revision 152312)
> +++ mono/utils/mono-semaphore.c   (working copy)
> @@ -17,7 +17,7 @@
> #define WAIT_BLOCK(a,b) semaphore_timedwait (a, b)
> #  else
> #define TIMESPEC struct timespec
> -#define WAIT_BLOCK(a,b) sem_timedwait (a, b)
> +#define WAIT_BLOCK(a,b) sem_timedwait (a, &##b)
> #  endif
> 
> gboolean
> @@ -32,7 +32,7 @@
> 
>   tv.tv_sec = timeout_ms / 1000;
>   tv.tv_nsec = (timeout_ms % 1000) * 100;
> - return (!WAIT_BLOCK (sem, &tv));
> + return (!WAIT_BLOCK (sem, tv));
> }
> 
> #else
> 
> ___
> Mono-devel-list mailing list
> Mono-devel-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-devel-list

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list


[Mono-dev] mono-semaphore.c broken on MacOSX in SVN

2010-02-23 Thread Tom Philpot
Mono-semaphore.c won't compile on Mac.

I *think* the patch below will fix it in both cases, but my macros are pretty 
rusty. Basically, semaphore_timedwait doesn't take a mach_timespec_t* where as 
sem_timedwait does take a struct timespec *



ws1048-snow:mono tom.philpot$ svn diff mono/utils/mono-semaphore.c
Index: mono/utils/mono-semaphore.c
===
--- mono/utils/mono-semaphore.c (revision 152312)
+++ mono/utils/mono-semaphore.c (working copy)
@@ -17,7 +17,7 @@
 #define WAIT_BLOCK(a,b) semaphore_timedwait (a, b)
 #  else
 #define TIMESPEC struct timespec
-#define WAIT_BLOCK(a,b) sem_timedwait (a, b)
+#define WAIT_BLOCK(a,b) sem_timedwait (a, &##b)
 #  endif
 
 gboolean
@@ -32,7 +32,7 @@
 
tv.tv_sec = timeout_ms / 1000;
tv.tv_nsec = (timeout_ms % 1000) * 100;
-   return (!WAIT_BLOCK (sem, &tv));
+   return (!WAIT_BLOCK (sem, tv));
 }
 
 #else

___
Mono-devel-list mailing list
Mono-devel-list@lists.ximian.com
http://lists.ximian.com/mailman/listinfo/mono-devel-list