From de64fbacdb7e3113d0d86dba35e933480d97b680 Mon Sep 17 00:00:00 2001 From: Fneufneu Date: Tue, 18 Oct 2011 10:15:33 +0200 Subject: [FreeBSD] rewrite 64bit threadid hack do not use DWORD or LPDWORD to store a thread id anymore use LONG or LPLONG instead switch back dword to int --- lib/timidity/interface/w32g.h | 6 ++++++ lib/timidity/timidity/gogo_a.c | 3 +++ 2 files changed, 9 insertions(+) (limited to 'lib/timidity') diff --git a/lib/timidity/interface/w32g.h b/lib/timidity/interface/w32g.h index c68592cae1..e0960afa8c 100644 --- a/lib/timidity/interface/w32g.h +++ b/lib/timidity/interface/w32g.h @@ -64,6 +64,9 @@ typedef LPTHREAD_START_ROUTINE BCC_BEGINTHREAD_START_ADDRESS; #elif defined(_BORLANDC_) #define crt_beginthread(start_address,stack_size,arglist) \ (HANDLE)_beginthread((BCC_BEGINTHREAD_START_ADDRESS)start_address,(unsigned)stack_size,(void *)arglist) +#elif defined(__FreeBSD__) +#define crt_beginthread(start_address,stack_size,arglist) \ +(HANDLE)CreateThread(NULL,(DWORD)stack_size,(LPTHREAD_START_ROUTINE)start_address,(LPVOID)arglist,0,NULL) #else #define crt_beginthread(start_address,stack_size,arglist) \ (HANDLE)CreateThread(NULL,(DWORD)stack_size,(LPTHREAD_START_ROUTINE)start_address,(LPVOID)arglist,0,&dwTmp) @@ -76,6 +79,9 @@ typedef LPTHREAD_START_ROUTINE BCC_BEGINTHREAD_START_ADDRESS; #elif defined(_BORLANDC_) #define crt_beginthreadex(security,stack_size,start_address,arglist,initflag,thrdaddr ) \ (HANDLE)_beginthreadNT((BCC_BEGINTHREAD_START_ADDRESS)start_address,(unsigned)stack_size,(void *)arglist,(void *)security_attrib,(unsigned long)create_flags,(unsigned long *)thread_id) +#elif defined(__FreeBSD__) +#define crt_beginthreadex(security,stack_size,start_address,arglist,initflag,thrdaddr ) \ +(HANDLE)CreateThread((LPSECURITY_ATTRIBUTES)security,(DWORD)stack_size,(LPTHREAD_START_ROUTINE)start_address,(LPVOID)arglist,(DWORD)initflag,(LPLONG)thrdaddr) #else #define crt_beginthreadex(security,stack_size,start_address,arglist,initflag,thrdaddr ) \ (HANDLE)CreateThread((LPSECURITY_ATTRIBUTES)security,(DWORD)stack_size,(LPTHREAD_START_ROUTINE)start_address,(LPVOID)arglist,(DWORD)initflag,(LPDWORD)thrdaddr) diff --git a/lib/timidity/timidity/gogo_a.c b/lib/timidity/timidity/gogo_a.c index 68eff48585..71ae65c71f 100644 --- a/lib/timidity/timidity/gogo_a.c +++ b/lib/timidity/timidity/gogo_a.c @@ -108,6 +108,9 @@ typedef LPTHREAD_START_ROUTINE BCC_BEGINTHREAD_START_ADDRESS; #elif defined(_BORLANDC_) #define crt_beginthreadex(security,stack_size,start_address,arglist,initflag,thrdaddr ) \ (HANDLE)_beginthreadNT((BCC_BEGINTHREAD_START_ADDRESS)start_address,(unsigned)stack_size,(void *)arglist,(void *)security_attrib,(unsigned long)create_flags,(unsigned long *)thread_id) +#elif defined(__FreeBSD__) +#define crt_beginthreadex(security,stack_size,start_address,arglist,initflag,thrdaddr ) \ +(HANDLE)CreateThread((LPSECURITY_ATTRIBUTES)security,(DWORD)stack_size,(LPTHREAD_START_ROUTINE)start_address,(LPVOID)arglist,(DWORD)initflag,(LPLONG)thrdaddr) #else #define crt_beginthreadex(security,stack_size,start_address,arglist,initflag,thrdaddr ) \ (HANDLE)CreateThread((LPSECURITY_ATTRIBUTES)security,(DWORD)stack_size,(LPTHREAD_START_ROUTINE)start_address,(LPVOID)arglist,(DWORD)initflag,(LPDWORD)thrdaddr) -- cgit v1.2.3