diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8b9980c716..e9dce905d9 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,15 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-11-04 02:08 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/vm/thread.c + * removed casting to void* thread startup function passed + as _beginthread() parameter in OS2 builds. It should be checked if + it does not breaks GCC builds. + + * harbour/source/rtl/seconds.c + * use getpid() instead of _getpid() in non GCC OS2 builds + 2008-11-04 01:04 UTC+0100 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbthread.h ! fixed typo diff --git a/harbour/source/rtl/seconds.c b/harbour/source/rtl/seconds.c index c83ebbdaa3..75414452b2 100644 --- a/harbour/source/rtl/seconds.c +++ b/harbour/source/rtl/seconds.c @@ -314,11 +314,15 @@ HB_EXPORT double hb_secondsCPU( int n ) if( s_timer_interval == 0 ) DosQuerySysInfo( QSV_TIMER_INTERVAL, QSV_TIMER_INTERVAL, ( PVOID ) &s_timer_interval, sizeof( ULONG ) ); - pBuf = hb_xalloc( BUFSIZE ); + pBuf = ( QSGREC ** ) hb_xalloc( BUFSIZE ); if( pBuf ) { +#if defined( __GNUC__ ) APIRET rc = DosQuerySysState( QS_PROCESS, 0L, _getpid(), 0L, pBuf, BUFSIZE ); +#else + APIRET rc = DosQuerySysState( QS_PROCESS, 0L, getpid(), 0L, pBuf, BUFSIZE ); +#endif if( rc == NO_ERROR ) { diff --git a/harbour/source/vm/thread.c b/harbour/source/vm/thread.c index 7ae993726c..2e4be61060 100644 --- a/harbour/source/vm/thread.c +++ b/harbour/source/vm/thread.c @@ -399,7 +399,7 @@ HB_THREAD_HANDLE hb_threadCreate( HB_THREAD_ID * th_id, PHB_THREAD_STARTFUNC sta if( !th_h ) *th_id = ( HB_THREAD_ID ) 0; #elif defined( HB_OS_OS2 ) - *th_id = _beginthread( ( void * ) start_func, NULL, 128 * 1024, Cargo ); + *th_id = _beginthread( start_func, NULL, 128 * 1024, Cargo ); th_h = *th_id; #else { int TODO_MT; }