diff options
author | Fneufneu <fneufneu@xbmc.org> | 2011-10-18 10:15:33 +0200 |
---|---|---|
committer | Fneufneu <fneufneu@xbmc.org> | 2012-05-07 09:48:08 +0200 |
commit | de64fbacdb7e3113d0d86dba35e933480d97b680 (patch) | |
tree | b05a65a9515dd5bd08da9b7089340623c4c4006e /lib/timidity | |
parent | 801973e51f658db2c9a6c9e37cc0a1ebd3d944a9 (diff) |
[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
Diffstat (limited to 'lib/timidity')
-rw-r--r-- | lib/timidity/interface/w32g.h | 6 | ||||
-rw-r--r-- | lib/timidity/timidity/gogo_a.c | 3 |
2 files changed, 9 insertions, 0 deletions
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) |