From 849810109eb18006a65859a492cc88d8116af4ef Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Thu, 27 Jul 2006 22:21:50 +0000 Subject: [PATCH] 2006-07-28 00:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/include/hbdefs.h * use extern "C" as default for HB_FUNC() declaration in C++ mode. I know that this modification will interact with binary compatibility but current state is worser because we were not binary compatible between C and C++ mode. Now the problem should gone with some reasonable for me cost. If your compiler uses the same ABI for C and C++ mode then the backward binary compatibility problem can be resolved by small tools which can strip C++ decoration from binary libraries or maybe even linker has necessary switches to ignore them. * harbour/include/hbexprb.c * cleaned BCC warning * harbour/source/rdd/nulsys/nulsys.c + added missing hb_rddGetAliasNumber(), thanks to Ron. --- harbour/ChangeLog | 17 +++++++++++++++++ harbour/include/hbdefs.h | 2 +- harbour/include/hbexprb.c | 1 - harbour/source/rdd/nulsys/nulsys.c | 8 ++++++++ 4 files changed, 26 insertions(+), 2 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 05839f8164..9ae93a4786 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,23 @@ 2002-12-01 13:30 UTC+0100 Foo Bar */ +2006-07-28 00:10 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/include/hbdefs.h + * use extern "C" as default for HB_FUNC() declaration in C++ mode. + I know that this modification will interact with binary compatibility + but current state is worser because we were not binary compatible + between C and C++ mode. Now the problem should go away with some + reasonable for me cost. If compiler uses the same ABI for C and C++ + mode then the backward binary compatibility problem can be resolved + by small tools which can strip C++ decoration from binary libraries. + Sometimes also linkers have necessary switches to ignore them. + + * harbour/include/hbexprb.c + * cleaned BCC warning + + * harbour/source/rdd/nulsys/nulsys.c + + added missing hb_rddGetAliasNumber(), thanks to Ron. + 2006-07-27 15:10 UTC+0100 Ryszard Glab * source/compiler/genc.c * source/compiler/gencli.c diff --git a/harbour/include/hbdefs.h b/harbour/include/hbdefs.h index 4ee7853db5..eabc9d7805 100644 --- a/harbour/include/hbdefs.h +++ b/harbour/include/hbdefs.h @@ -1122,7 +1122,7 @@ typedef PHB_FUNC HB_FUNC_PTR; #define HB_EXIT_FUNCNAME( funcname ) HB_FUN_exit_##funcname #define HB_INITSTATICS_FUNCNAME() hb_INITSTATICS -#if defined( __cplusplus ) && defined( HB_FUNC_NO_DECORATION ) +#if defined( __cplusplus ) && !defined( HB_FUNC_USE_DECORATION ) #define HB_EXTERN_C_ extern "C" #define HB_EXTERN_ #else diff --git a/harbour/include/hbexprb.c b/harbour/include/hbexprb.c index f71b45cf81..c47a854aff 100644 --- a/harbour/include/hbexprb.c +++ b/harbour/include/hbexprb.c @@ -1254,7 +1254,6 @@ static HB_EXPR_FUNC( hb_compExprUseMacroArgList ) if( usItems ) { HB_EXPR_PCODE1( hb_compGenPushLong, usItems ); - ++usGroups; } } break; diff --git a/harbour/source/rdd/nulsys/nulsys.c b/harbour/source/rdd/nulsys/nulsys.c index 7d243f5e4c..e9e893172f 100644 --- a/harbour/source/rdd/nulsys/nulsys.c +++ b/harbour/source/rdd/nulsys/nulsys.c @@ -112,6 +112,14 @@ HB_EXPORT ERRCODE hb_rddPutFieldValue( HB_ITEM_PTR pItem, PHB_SYMB pFieldSymbol return FAILURE; } +HB_EXPORT ERRCODE hb_rddGetAliasNumber( char * szAlias, int * iArea ) +{ + HB_SYMBOL_UNUSED( szAlias ); + HB_SYMBOL_UNUSED( iArea ); + + return FAILURE; +} + HB_EXPORT void hb_rddShutDown( void ) {}