From a35ededf121322bbf5506d34857ab5bac00431b4 Mon Sep 17 00:00:00 2001 From: rswindell <> Date: Fri, 26 Apr 2002 23:39:17 +0000 Subject: [PATCH] Added code to eliminate warnings and problems with Borland C++ for Linux. --- src/xpdev/threadwrap.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/xpdev/threadwrap.c b/src/xpdev/threadwrap.c index 7063f056f1..add73472bb 100644 --- a/src/xpdev/threadwrap.c +++ b/src/xpdev/threadwrap.c @@ -47,6 +47,9 @@ /****************************************************************************/ #if defined(__unix__) #if defined(_POSIX_THREADS) +#if defined(__BORLANDC__) + #pragma argsused +#endif ulong _beginthread(void( *start_address )( void * ) ,unsigned stack_size, void *arglist) { @@ -58,11 +61,14 @@ ulong _beginthread(void( *start_address )( void * ) /* set thread attributes to PTHREAD_CREATE_DETACHED which will ensure that thread resources are freed on exit() */ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED); - if(pthread_create(&thread +#if defined(__BORLANDC__) /* a (hopefully temporary) work-around */ + ,NULL +#else ,&attr /* default attributes */ +#endif /* POSIX defines this arg as "void *(*start_address)" */ - ,(void *) start_address + ,(void * (*)(void *)) start_address ,arglist)==0) return((int) thread /* thread handle */); -- GitLab