diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 58e321e1a2..96f0b16a08 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,19 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2007-04-16 22:45 UTC+0100 Viktor Szakats (harbour.01 syenar.hu) + * harbour/source/rtl/hbinet.c + ! Warnings fixed for Darwin (gcc 4.0.1 OSX 10.4.9 PPC) + + * harbour/source/rtl/idle.c + ! Fixed releasing idle CPU cycles. (thanks Przemek) + The committed method was tested against usleep( 1 ) + and usleep( 100 ) and found to work perfect as + opposed to the usleep() calls. + + * harbour/source/rtl/tget.prg + ! Adjusted my old TOFIX note. + 2007-04-16 21:30 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbcompat.ch * always translate hash H*() function to HB_H*() ones even if diff --git a/harbour/source/rtl/hbinet.c b/harbour/source/rtl/hbinet.c index 4a1840052d..b5bbb5b68f 100644 --- a/harbour/source/rtl/hbinet.c +++ b/harbour/source/rtl/hbinet.c @@ -96,11 +96,6 @@ extern int h_errno; #define HB_INET_CLOSE( x ) close( x ) - #ifdef HB_OS_DARWIN - #ifndef socklen_t - #define socklen_t int - #endif - #endif #include #endif diff --git a/harbour/source/rtl/idle.c b/harbour/source/rtl/idle.c index 57cd0a62ba..13c7634c39 100644 --- a/harbour/source/rtl/idle.c +++ b/harbour/source/rtl/idle.c @@ -139,7 +139,10 @@ void hb_releaseCPU( void ) #if defined(HB_OS_DARWIN) { - usleep( 1 ); + struct timeval tv; + tv.tv_sec = 0; + tv.tv_usec = 1000; + select( 0, NULL, NULL, NULL, &tv ); } #else { diff --git a/harbour/source/rtl/tget.prg b/harbour/source/rtl/tget.prg index 8a5b719f16..7bc8f3381a 100644 --- a/harbour/source/rtl/tget.prg +++ b/harbour/source/rtl/tget.prg @@ -392,14 +392,15 @@ METHOD Display( lForced ) CLASS Get // ; TOFIX: VarGet() has to be called everytime here to stay // CA-Cl*pper compatible. // Currently the caller needs to set :buffer to NIL - // to force that in Harbour. [vszakats] + // to force that in Harbour. + // Update: Not everytime actually, but the logic is yet + // to be found out. + // [vszakats] if ::buffer == nil ::Original := ::xVarGet ::cType := ValType( ::Original ) ::picture := ::cPicture //this sets also ::buffer -// else -// xBuffer := ::VarGet() // ; Dummy call, to be CA-Cl*pper compatible. It doesn't work though for some reason. [vszakats] endif xBuffer := ::buffer //::PutMask( ::VarGet(), .f. ) @@ -524,9 +525,9 @@ METHOD SetFocus() CLASS Get ::pos := ::FirstEditable() - if ::pos = 0 - ::TypeOut = .t. - endif + if ::pos = 0 + ::TypeOut = .t. + endif if ::cType == "N" ::decpos := At( iif( ::lDecRev .or. "E" $ ::cPicFunc, ",", "." ), ::buffer )