From a54b49f5a8858ae6603d0db56019adc3ce0dff90 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Wed, 5 Dec 2012 07:37:17 +0100 Subject: windows compatibility changes * respect executable extensions * do not use weak symbols which appear to be broken on MinGW. Instead, the generated symbol constants contain constructor functions initializing the corresponding objects. Constructor priorities are used to ensure that the initialization takes place after the dummy (NULL) initialization. * do not change the working dir (causes trouble when sciteco gets passed relative paths but the exe is not in the current dir) instead look for teco.ini in program's directory --- src/symbols-extract.tes | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/symbols-extract.tes') diff --git a/src/symbols-extract.tes b/src/symbols-extract.tes index 6497324..841530c 100755 --- a/src/symbols-extract.tes +++ b/src/symbols-extract.tes @@ -69,8 +69,13 @@ static const SymbolList::Entry entries[] = { .-Z;> I}; -/* overwrites weak object in symbols.cpp */ -SymbolList Symbols::Qn(entries, G_N_ELEMENTS(entries)); +__attribute__((constructor(2000))) +static void +initialize(void) +{ + Symbols::Qn.entries = entries; + Symbols::Qn.size = G_N_ELEMENTS(entries); +}  ! write output file ! -- cgit v1.2.3