diff options
| author | Greg Ercolano <erco@seriss.com> | 2013-09-21 16:41:23 +0000 |
|---|---|---|
| committer | Greg Ercolano <erco@seriss.com> | 2013-09-21 16:41:23 +0000 |
| commit | 2082d7e1978952138155be7dce29f20004bd71a5 (patch) | |
| tree | 0c64cec27ca635de750158a18715cf39d482bfa7 /test/threads.h | |
| parent | 2fc6c3a39b6be6f8a6b9a9dd1d030b46d7ea71bf (diff) | |
Fixes STR# 2973: collection of Sun compiler fixes.
Applied str_2973_r9979_sun-fix-warnings-7.patch (with small mods)
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9980 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'test/threads.h')
| -rw-r--r-- | test/threads.h | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/test/threads.h b/test/threads.h index c3ebf0c72..73191459b 100644 --- a/test/threads.h +++ b/test/threads.h @@ -40,8 +40,11 @@ # include <pthread.h> typedef pthread_t Fl_Thread; +extern "C" { + typedef void *(Fl_Thread_Func)(void *); +} -static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) { +static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) { return pthread_create((pthread_t*)&t, 0, f, p); } @@ -51,8 +54,11 @@ static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) { # include <process.h> typedef unsigned long Fl_Thread; +extern "C" { + typedef void *(__cdecl Fl_Thread_Func)(void *); +} -static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) { +static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) { return t = (Fl_Thread)_beginthread((void( __cdecl * )( void * ))f, 0, p); } @@ -60,8 +66,11 @@ static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) { # include <process.h> typedef unsigned long Fl_Thread; +extern "C" { + typedef void *(__cdecl Fl_Thread_Func)(void *); +} -static int fl_create_thread(Fl_Thread& t, void *(*f) (void *), void* p) { +static int fl_create_thread(Fl_Thread& t, Fl_Thread_Func* f, void* p) { return t = (Fl_Thread)_beginthread((void(* )( void * ))f, 32000, p); } # endif // !HAVE_PTHREAD_H |
