diff options
author | rpj <rpj> | 2011-03-06 10:46:44 +0000 |
---|---|---|
committer | rpj <rpj> | 2011-03-06 10:46:44 +0000 |
commit | 1183e5acfa10c7bda1dc39034d6e2fa6dec6016f (patch) | |
tree | fd5220ed96e0fef2390b72ad170b62f0516242ce /tests/rwlock8.c | |
parent | 85dfeaf6133e1b74eefed26cf76c3f8631c7dd1d (diff) |
64 bit compatibility (mingw64)
Diffstat (limited to 'tests/rwlock8.c')
-rw-r--r-- | tests/rwlock8.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/rwlock8.c b/tests/rwlock8.c index 207646c..28552ba 100644 --- a/tests/rwlock8.c +++ b/tests/rwlock8.c @@ -114,8 +114,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. @@ -141,7 +146,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); } /* @@ -196,8 +201,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)))); |