summaryrefslogtreecommitdiff
path: root/tests/exception1.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/exception1.c
parent85dfeaf6133e1b74eefed26cf76c3f8631c7dd1d (diff)
64 bit compatibility (mingw64)
Diffstat (limited to 'tests/exception1.c')
-rw-r--r--tests/exception1.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/exception1.c b/tests/exception1.c
index 4ccc24c..a18e078 100644
--- a/tests/exception1.c
+++ b/tests/exception1.c
@@ -86,7 +86,7 @@ void *
exceptionedThread(void * arg)
{
int dummy = 0;
- int result = ((int)PTHREAD_CANCELED + 1);
+ void* result = (void*)((int)(size_t)PTHREAD_CANCELED + 1);
/* Set to async cancelable */
assert(pthread_setcancelstate(PTHREAD_CANCEL_ENABLE, NULL) == 0);
@@ -110,7 +110,7 @@ exceptionedThread(void * arg)
__except (EXCEPTION_EXECUTE_HANDLER)
{
/* Should get into here. */
- result = ((int)PTHREAD_CANCELED + 2);
+ result = (void*)((int)(size_t)PTHREAD_CANCELED + 2);
}
#elif defined(__cplusplus)
try
@@ -129,7 +129,7 @@ exceptionedThread(void * arg)
#endif
{
/* Should get into here. */
- result = ((int)PTHREAD_CANCELED + 2);
+ result = (void*)((int)(size_t)PTHREAD_CANCELED + 2);
}
#endif
@@ -139,7 +139,7 @@ exceptionedThread(void * arg)
void *
canceledThread(void * arg)
{
- int result = ((int)PTHREAD_CANCELED + 1);
+ void* result = (void*)((int)(size_t)PTHREAD_CANCELED + 1);
int count;
/* Set to async cancelable */
@@ -161,7 +161,7 @@ canceledThread(void * arg)
__except (EXCEPTION_EXECUTE_HANDLER)
{
/* Should NOT get into here. */
- result = ((int)PTHREAD_CANCELED + 2);
+ result = (void*)((int)(size_t)PTHREAD_CANCELED + 2);
}
#elif defined(__cplusplus)
try
@@ -180,7 +180,7 @@ canceledThread(void * arg)
#endif
{
/* Should NOT get into here. */
- result = ((int)PTHREAD_CANCELED + 2);
+ result = (void*)((int)(size_t)PTHREAD_CANCELED + 2);
}
#endif
@@ -229,14 +229,14 @@ main()
void* result = (void*)0;
/* Canceled thread */
- assert(pthread_join(ct[i], (void *) &result) == 0);
- assert(!(fail = ((int)(size_t)result != (int) PTHREAD_CANCELED)));
+ assert(pthread_join(ct[i], &result) == 0);
+ assert(!(fail = (result != PTHREAD_CANCELED)));
failed = (failed || fail);
/* Exceptioned thread */
assert(pthread_join(et[i], (void *) &result) == 0);
- assert(!(fail = ((int)(size_t)result != ((int) PTHREAD_CANCELED + 2))));
+ assert(!(fail = (result != (void*)((int)(size_t)PTHREAD_CANCELED + 2))));
failed = (failed || fail);
}