From e78cb0e549a1f6ecfa574c342e8031ddcf3f271f Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Wed, 15 Sep 2010 14:04:26 +0000 Subject: [PATCH] 2010-09-15 16:04 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbclass.ch % small modification to reduce lock time * harbour/src/common/hbdate.c ! fixed hb_timeUTCOffset() in MS-Windows builds to work in some countries/windows versions where GetTimeZoneInformation() returns TIME_ZONE_ID_INVALID but sets correct tzInfo.StandardBias field. * harbour/package/mpkg_ver.sh ! fixed to set correctly root path after moving build scripts to ./package subdirectory * harbour/utils/Makefile ! do not build executable files when HB_BUILD_PARTS is set to 'lib' --- harbour/ChangeLog | 16 ++++++++++++++++ harbour/include/hbclass.ch | 8 ++++---- harbour/package/mpkg_ver.sh | 4 ++-- harbour/src/common/hbdate.c | 18 +++++++++++++++--- harbour/utils/Makefile | 10 +++++++++- 5 files changed, 46 insertions(+), 10 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index ebd48459b9..111b516922 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,22 @@ The license applies to all entries newer than 2009-04-28. */ +2010-09-15 16:04 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbclass.ch + % small modification to reduce lock time + + * harbour/src/common/hbdate.c + ! fixed hb_timeUTCOffset() in MS-Windows builds to work in some + countries/windows versions where GetTimeZoneInformation() returns + TIME_ZONE_ID_INVALID but sets correct tzInfo.StandardBias field. + + * harbour/package/mpkg_ver.sh + ! fixed to set correctly root path after moving build scripts to + ./package subdirectory + + * harbour/utils/Makefile + ! do not build executable files when HB_BUILD_PARTS is set to 'lib' + 2010-09-14 15:15 UTC-0800 Pritpal Bedi (bedipritpal@hotmail.com) * contrib/hbqt/tests/testbrow.prg * contrib/hbqt/tests/testqaim.prg diff --git a/harbour/include/hbclass.ch b/harbour/include/hbclass.ch index 0b81b555c7..5ee7a2a9e9 100644 --- a/harbour/include/hbclass.ch +++ b/harbour/include/hbclass.ch @@ -279,13 +279,13 @@ DECLARE HBClass ; #xcommand ENDCLASS [] => ; oClass:Create() ; [<-lck-> __clsLock( oClass:hClass ) ] ;; - oInstance := oClass:Instance() ;; - if __ObjHasMsg( oInstance, "InitClass" ) ;; - oInstance:InitClass( HB_CLS_PARAM_LIST ) ;; - end ;; always ;; __clsUnlockDef( @s_oClass, oClass ) ;; end sequence ;; + oInstance := oClass:Instance() ;; + if __ObjHasMsg( oInstance, "InitClass" ) ;; + oInstance:InitClass( HB_CLS_PARAM_LIST ) ;; + end ;; return oInstance ;; end ;; return s_oClass:Instance() AS CLASS _CLASS_NAME_ ;; diff --git a/harbour/package/mpkg_ver.sh b/harbour/package/mpkg_ver.sh index a8ca65c97b..0507088c98 100755 --- a/harbour/package/mpkg_ver.sh +++ b/harbour/package/mpkg_ver.sh @@ -13,7 +13,7 @@ get_hbver() { - hb_rootdir="${1-.}" + hb_rootdir="${1-..}" FVER="${hb_rootdir}/include/hbver.h" MAJOR=`sed -e '/HB_VER_MAJOR/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}"` MINOR=`sed -e '/HB_VER_MINOR/ !d' -e 's/[^0-9]*\([^ ]*\).*/\1/g' "${FVER}"` @@ -23,7 +23,7 @@ get_hbver() get_hbverstat() { - hb_rootdir="${1-.}" + hb_rootdir="${1-..}" FVER="${hb_rootdir}/include/hbver.h" VERSTAT=`sed -e '/HB_VER_STATUS/ !d' -e 's/[^\"]*\"\([^\"]*\).*/\1/g' "${FVER}"` echo "${VERSTAT}" diff --git a/harbour/src/common/hbdate.c b/harbour/src/common/hbdate.c index 67f480c7fa..9fcc661721 100644 --- a/harbour/src/common/hbdate.c +++ b/harbour/src/common/hbdate.c @@ -903,12 +903,24 @@ long hb_timeUTCOffset( void ) /* in seconds */ #if defined( HB_OS_WIN ) { TIME_ZONE_INFORMATION tzInfo; - DWORD retval = GetTimeZoneInformation( &tzInfo ); + DWORD retval; + memset( &tzInfo, 0, sizeof( tzInfo ) ); + retval = GetTimeZoneInformation( &tzInfo ); + + /* disabled because users reported that in some + * countries/windows versions GetTimeZoneInformation() + * returns TIME_ZONE_ID_INVALID but sets correct + * tzInfo.StandardBias field. + */ +#if 0 if( retval == TIME_ZONE_ID_INVALID ) return 0; - else - return -( tzInfo.Bias + ( retval == TIME_ZONE_ID_STANDARD ? tzInfo.StandardBias : tzInfo.DaylightBias ) ) * 60; +#endif + + return -( tzInfo.Bias + + ( retval == TIME_ZONE_ID_DAYLIGHT ? tzInfo.DaylightBias : + /*TIME_ZONE_ID_STANDARD*/ tzInfo.StandardBias ) ) * 60; } #else { diff --git a/harbour/utils/Makefile b/harbour/utils/Makefile index aac9d411b4..0c408fbfa4 100644 --- a/harbour/utils/Makefile +++ b/harbour/utils/Makefile @@ -4,6 +4,8 @@ ROOT := ../ +ifneq ($(HB_BUILD_PARTS),lib) + DIRS := \ hbrun \ hbmk2 \ @@ -17,4 +19,10 @@ ifneq ($(HB_BUILD_PARTS),compiler) endif -include $(ROOT)config/dir.mk +endif + +ifneq ($(DIRS),) + include $(ROOT)config/dir.mk +else + include $(ROOT)config/none.mk +endif