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/stress1.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'tests/stress1.c') diff --git a/tests/stress1.c b/tests/stress1.c index fb50124..e4dbbd2 100644 --- a/tests/stress1.c +++ b/tests/stress1.c @@ -111,7 +111,11 @@ enum { struct timespec * millisecondsFromNow (struct timespec * time, int millisecs) { +#if (defined(__MINGW64__) || defined(__MINGW32__)) && __MSVCRT_VERSION__ >= 0x0601 + struct __timeb64 currSysTime; +#else struct _timeb currSysTime; +#endif int64_t nanosecs, secs; const int64_t NANOSEC_PER_MILLISEC = 1000000; const int64_t NANOSEC_PER_SEC = 1000000000; @@ -141,9 +145,9 @@ millisecondsFromNow (struct timespec * time, int millisecs) void * masterThread (void * arg) { - int dither = (int) arg; + int dither = (int)(size_t)arg; - timeout = (int) arg; + timeout = (int)(size_t)arg; pthread_barrier_wait(&startBarrier); @@ -239,7 +243,7 @@ main () assert(pthread_barrier_init(&readyBarrier, NULL, 3) == 0); assert(pthread_barrier_init(&holdBarrier, NULL, 3) == 0); - assert(pthread_create(&master, NULL, masterThread, (void *) timeout) == 0); + assert(pthread_create(&master, NULL, masterThread, (void *)(size_t)timeout) == 0); assert(pthread_create(&slave, NULL, slaveThread, NULL) == 0); allExit = FALSE; -- cgit v1.2.3