From 1183e5acfa10c7bda1dc39034d6e2fa6dec6016f Mon Sep 17 00:00:00 2001 From: rpj Date: Sun, 6 Mar 2011 10:46:44 +0000 Subject: 64 bit compatibility (mingw64) --- tests/once3.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/once3.c') diff --git a/tests/once3.c b/tests/once3.c index c706f80..e1886c1 100644 --- a/tests/once3.c +++ b/tests/once3.c @@ -86,11 +86,11 @@ mythread(void * arg) * eventually cancels only when it becomes the new once thread. */ assert(pthread_cancel(pthread_self()) == 0); - assert(pthread_once(&once[(int) arg], myfunc) == 0); + assert(pthread_once(&once[(int)(size_t)arg], myfunc) == 0); EnterCriticalSection(&numThreads.cs); numThreads.i++; LeaveCriticalSection(&numThreads.cs); - return 0; + return (void*)(size_t)0; } int @@ -108,7 +108,7 @@ main() for (i = 0; i < NUM_THREADS; i++) { - assert(pthread_create(&t[i][j], NULL, mythread, (void *) j) == 0); + assert(pthread_create(&t[i][j], NULL, mythread, (void *)(size_t)j) == 0); } } -- cgit v1.2.3