From 389141c5318552fd8752292c69d90201cf426589 Mon Sep 17 00:00:00 2001 From: Przemyslaw Czerpak Date: Sun, 30 Aug 2009 08:29:20 +0000 Subject: [PATCH] 2009-08-30 10:29 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) * harbour/source/pp/Makefile * harbour/source/main/Makefile ! hacked the order of linked library list to resolve problem with potential cross references between libraries on platforms which do not support library grouping * harbour/source/nortl/nortl.c ! added missing include hbmemory.ch * harbour/source/compiler/hbmain.c ! added protection against multiple init function freeing --- harbour/ChangeLog | 13 +++++++++++++ harbour/source/compiler/hbmain.c | 14 +++++++------- harbour/source/main/Makefile | 2 +- harbour/source/nortl/nortl.c | 1 + harbour/source/pp/Makefile | 2 +- 5 files changed, 23 insertions(+), 9 deletions(-) diff --git a/harbour/ChangeLog b/harbour/ChangeLog index f031b7644c..05848f3fc5 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -17,6 +17,19 @@ past entries belonging to author(s): Viktor Szakats. */ +2009-08-30 10:29 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl) + * harbour/source/pp/Makefile + * harbour/source/main/Makefile + ! hacked the order of linked library list to resolve problem with + potential cross references between libraries on platforms which do + not support library grouping + + * harbour/source/nortl/nortl.c + ! added missing include hbmemory.ch + + * harbour/source/compiler/hbmain.c + ! added protection against multiple init function freeing + 2009-08-30 08:47 UTC+0200 Viktor Szakats (harbour.01 syenar.hu) * INSTALL + Added sqlite3 and allegro package names for Ubuntu. diff --git a/harbour/source/compiler/hbmain.c b/harbour/source/compiler/hbmain.c index 808e4cf2f9..b1dce2b512 100644 --- a/harbour/source/compiler/hbmain.c +++ b/harbour/source/compiler/hbmain.c @@ -3875,6 +3875,13 @@ void hb_compCompileEnd( HB_COMP_DECL ) } HB_COMP_PARAM->functions.pLast = NULL; + if( HB_COMP_PARAM->pInitFunc && + ( HB_COMP_PARAM->pInitFunc->funFlags & FUN_ATTACHED ) == 0 ) + { + hb_compFunctionKill( HB_COMP_PARAM, HB_COMP_PARAM->pInitFunc ); + } + HB_COMP_PARAM->pInitFunc = NULL; + if( HB_COMP_PARAM->functions.pFirst ) { PFUNCTION pFunc = HB_COMP_PARAM->functions.pFirst; @@ -3884,13 +3891,6 @@ void hb_compCompileEnd( HB_COMP_DECL ) HB_COMP_PARAM->functions.pFirst = NULL; } - if( HB_COMP_PARAM->pInitFunc && - ( HB_COMP_PARAM->pInitFunc->funFlags & FUN_ATTACHED ) == 0 ) - { - hb_compFunctionKill( HB_COMP_PARAM, HB_COMP_PARAM->pInitFunc ); - HB_COMP_PARAM->pInitFunc = NULL; - } - while( HB_COMP_PARAM->funcalls.pFirst ) { PFUNCALL pFunc = HB_COMP_PARAM->funcalls.pFirst; diff --git a/harbour/source/main/Makefile b/harbour/source/main/Makefile index 1e3d0d2e55..44379e7b63 100644 --- a/harbour/source/main/Makefile +++ b/harbour/source/main/Makefile @@ -11,7 +11,7 @@ C_MAIN := harbour.c LIBS := \ hbcplr \ hbpp \ - hbcommon \ hbnortl \ + hbcommon \ include $(TOP)$(ROOT)config/bin.mk diff --git a/harbour/source/nortl/nortl.c b/harbour/source/nortl/nortl.c index 310e5a0649..714199f4ba 100644 --- a/harbour/source/nortl/nortl.c +++ b/harbour/source/nortl/nortl.c @@ -56,6 +56,7 @@ #include "hbset.h" #include "hbvm.h" #include "hbcomp.h" +#include "hbmemory.ch" /* ------------------------------------------------------------------------- */ /* FM statistic module */ diff --git a/harbour/source/pp/Makefile b/harbour/source/pp/Makefile index fa63f666c6..3945dc7b0c 100644 --- a/harbour/source/pp/Makefile +++ b/harbour/source/pp/Makefile @@ -14,8 +14,8 @@ C_SOURCES := \ LIBNAME := hbpp LIBS := \ - hbcommon \ hbnortl \ + hbcommon \ include $(TOP)$(ROOT)config/lib.mk