summaryrefslogtreecommitdiff
path: root/tests/test.c
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-11-25 22:35:06 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-11-25 22:35:06 +0400
commitb9260aa98074770c042ccb654e806e3d17d9cf3d (patch)
tree654a87fcfe3b26d1d8e454be7d4d01abc1cda88e /tests/test.c
parent37d8fb73e7210509bdc5f3e69b1ec5f8dcc6bda0 (diff)
downloadbdwgc-b9260aa98074770c042ccb654e806e3d17d9cf3d.tar.gz
Fix GC_CreateThread 'dwStackSize' argument type for Win64
* include/gc.h (GC_uintptr_t): Define (for Win32/CE) even if GC_NO_THREAD_DECLS; move definition upper than GC_CreateThread. * include/gc.h (GC_WIN32_SIZE_T): New macro (defined as GC_uintptr_t, Win32 threads only). * include/gc.h (GC_CreateThread): Use GC_WIN32_SIZE_T instead of DWORD type for "dwStackSize" argument (Win32 threads only). * win32_threads.c (GC_CreateThread): Likewise. * tests/test.c (fork_a_thread): Verify types of GC_CreateThread arguments by explicit casts (only if GC_WIN32_THREADS).
Diffstat (limited to 'tests/test.c')
-rw-r--r--tests/test.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/test.c b/tests/test.c
index 189aee33..7309755b 100644
--- a/tests/test.c
+++ b/tests/test.c
@@ -532,7 +532,10 @@ void check_marks_int_list(sexpr x)
{
DWORD thread_id;
HANDLE h;
- h = GC_CreateThread(NULL, 0, tiny_reverse_test, 0, 0, &thread_id);
+ h = GC_CreateThread((SECURITY_ATTRIBUTES *)NULL, (word)0,
+ tiny_reverse_test, NULL, (DWORD)0, &thread_id);
+ /* Explicitly specify types of the */
+ /* arguments to test the prototype. */
if (h == (HANDLE)NULL) {
GC_printf("Small thread creation failed %d\n",
(int)GetLastError());