summaryrefslogtreecommitdiff
path: root/tests/rwlock7.c
diff options
context:
space:
mode:
authorrpj <rpj>2011-03-06 10:46:44 +0000
committerrpj <rpj>2011-03-06 10:46:44 +0000
commit1183e5acfa10c7bda1dc39034d6e2fa6dec6016f (patch)
treefd5220ed96e0fef2390b72ad170b62f0516242ce /tests/rwlock7.c
parent85dfeaf6133e1b74eefed26cf76c3f8631c7dd1d (diff)
64 bit compatibility (mingw64)
Diffstat (limited to 'tests/rwlock7.c')
-rw-r--r--tests/rwlock7.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/rwlock7.c b/tests/rwlock7.c
index 1e8fdf0..33e87e2 100644
--- a/tests/rwlock7.c
+++ b/tests/rwlock7.c
@@ -108,8 +108,13 @@ main (int argc, char *argv[])
int data_updates = 0;
int seed = 1;
+#if (defined(__MINGW64__) || defined(__MINGW32__)) && __MSVCRT_VERSION__ >= 0x0601
+ struct __timeb64 currSysTime1;
+ struct __timeb64 currSysTime2;
+#else
struct _timeb currSysTime1;
struct _timeb currSysTime2;
+#endif
/*
* Initialize the shared data.
@@ -135,7 +140,7 @@ main (int argc, char *argv[])
threads[count].seed = 1 + rand_r (&seed) % 71;
assert(pthread_create (&threads[count].thread_id,
- NULL, thread_routine, (void*)&threads[count]) == 0);
+ NULL, thread_routine, (void*)(size_t)&threads[count]) == 0);
}
/*
@@ -190,8 +195,8 @@ main (int argc, char *argv[])
PTW32_FTIME(&currSysTime2);
printf( "\nstart: %ld/%d, stop: %ld/%d, duration:%ld\n",
- currSysTime1.time,currSysTime1.millitm,
- currSysTime2.time,currSysTime2.millitm,
+ (long)currSysTime1.time,currSysTime1.millitm,
+ (long)currSysTime2.time,currSysTime2.millitm,
((long)((currSysTime2.time*1000+currSysTime2.millitm) -
(currSysTime1.time*1000+currSysTime1.millitm))));