From 9440cf8e4c506dbc124d3b50dc12ceb4deee75da Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Tue, 23 Sep 2008 19:43:34 +0000 Subject: [PATCH] 2008-09-23 21:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/bin/hb-func.sh * use HB_IMPORT instead of hardcoded attributes in hb* scripts * harbour/source/common/hbver.c * generate different info for POCC and XCC compilers * harbour/source/rdd/dbfcdx/dbfcdx1.c * reduce header validation to not report clipper indexes as corrupted --- harbour/ChangeLog | 10 ++++++++++ harbour/bin/hb-func.sh | 6 ++---- harbour/source/common/hbver.c | 2 +- harbour/source/rdd/dbfcdx/dbfcdx1.c | 4 ++-- 4 files changed, 15 insertions(+), 7 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 320d7cc5e0..ad87fd74bf 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,16 @@ 2008-12-31 13:59 UTC+0100 Foo Bar (foo.bar foobar.org) */ +2008-09-23 21:42 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/bin/hb-func.sh + * use HB_IMPORT instead of hardcoded attributes in hb* scripts + + * harbour/source/common/hbver.c + * generate different info for POCC and XCC compilers + + * harbour/source/rdd/dbfcdx/dbfcdx1.c + * reduce header validation to not report clipper indexes as corrupted + 2008-09-23 20:41 UTC+0200 Viktor Szakats (harbour.01 syenar hu) * source/vm/extrap.c ! Fixed to close .log file before showing MessageBox(). diff --git a/harbour/bin/hb-func.sh b/harbour/bin/hb-func.sh index a75250dd3e..6502e865be 100755 --- a/harbour/bin/hb-func.sh +++ b/harbour/bin/hb-func.sh @@ -428,7 +428,6 @@ for gt in \${HB_GT_REQ}; do done [ -n "\${HB_FM_REQ}" ] && HB_LNK_REQ="\${HB_LNK_REQ} HB_FM_\${HB_FM_REQ}" -HB_LNK_ATTR="" HARBOUR_LIBS="" if [ "\${HB_STATIC}" = "yes" ]; then libs="${hb_libs} ${hb_libsc}" @@ -441,7 +440,6 @@ else elif [ "\${HB_ARCHITECTURE}" = "w32" ]; then pref="" ext=".dll" - HB_LNK_ATTR="__attribute__ ((dllimport))" elif [ "\${HB_ARCHITECTURE}" = "hpux" ]; then pref="lib" ext=".sl" @@ -596,8 +594,8 @@ hb_lnk_request() if [ -n "\$gt" ] || [ -n "\${HB_MAIN_FUNC}" ]; then echo "#include \\"hbinit.h\\"" echo "HB_EXTERN_BEGIN" - echo "extern \${HB_LNK_ATTR} const char * hb_gt_szNameDefault;" - echo "extern \${HB_LNK_ATTR} const char * hb_vm_pszLinkedMain;" + echo "extern HB_IMPORT const char * hb_gt_szNameDefault;" + echo "extern HB_IMPORT const char * hb_vm_pszLinkedMain;" echo "HB_EXTERN_END" echo "HB_CALL_ON_STARTUP_BEGIN( hb_lnk_SetDefault_build )" if [ -n "\$gt" ]; then diff --git a/harbour/source/common/hbver.c b/harbour/source/common/hbver.c index 64881ae861..c95779bb5c 100644 --- a/harbour/source/common/hbver.c +++ b/harbour/source/common/hbver.c @@ -383,7 +383,7 @@ char * hb_verCompiler( void ) #elif defined(__XCC__) - pszName = "Pelles ISO C Compiler"; + pszName = "Pelles ISO C Compiler (XCC)"; iVerMajor = __XCC__ / 100; iVerMinor = __XCC__ % 100; iVerPatch = 0; diff --git a/harbour/source/rdd/dbfcdx/dbfcdx1.c b/harbour/source/rdd/dbfcdx/dbfcdx1.c index 23656247e5..f2b7c21dea 100644 --- a/harbour/source/rdd/dbfcdx/dbfcdx1.c +++ b/harbour/source/rdd/dbfcdx/dbfcdx1.c @@ -3502,8 +3502,8 @@ static void hb_cdxTagLoad( LPCDXTAG pTag ) HB_GET_LE_UINT16( tagHeader.keySize ) > CDX_MAXKEY || uiForPos + uiForLen > CDX_HEADEREXPLEN || uiKeyPos + uiKeyLen > CDX_HEADEREXPLEN || - ( uiKeyPos < uiForPos ? ( uiKeyPos + uiKeyLen > uiForPos ) : - ( uiForPos + uiForLen > uiKeyPos ) ) ) + ( uiKeyPos < uiForPos ? ( uiKeyPos + uiKeyLen > uiForPos && tagHeader.keyExpPool[ uiForPos ] ) : + ( uiForPos + uiForLen > uiKeyPos && tagHeader.keyExpPool[ uiForPos ] ) ) ) { pTag->RootBlock = 0; /* To force RT error - index corrupted */ return;