aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/symbols-extract.tes
diff options
context:
space:
mode:
authorRobin Haberkorn <robin.haberkorn@googlemail.com>2012-12-05 07:37:17 +0100
committerRobin Haberkorn <robin.haberkorn@googlemail.com>2012-12-05 07:37:17 +0100
commita54b49f5a8858ae6603d0db56019adc3ce0dff90 (patch)
tree40894af980f74648a43d5c322e4501b3a400c4cd /src/symbols-extract.tes
parent29d54a4b19caf94b2efd2bd537e8c24f70e9520b (diff)
downloadsciteco-a54b49f5a8858ae6603d0db56019adc3ce0dff90.tar.gz
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
Diffstat (limited to 'src/symbols-extract.tes')
-rwxr-xr-xsrc/symbols-extract.tes9
1 files changed, 7 insertions, 2 deletions
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 !