summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-11-18 18:39:08 +0100
committerobo <obo@openoffice.org>2010-11-18 18:39:08 +0100
commitbc0642f969a89dc6e800f3351374f6c116e0ffaf (patch)
treec97045b4701cf7e6d5e5661708449fe8b5049f42
parent9a29bc269126e8f37fcbdd5cbcffc359d536df78 (diff)
parent697265b8e2ebd60b74747b4e451fdfffde243776 (diff)
CWS-TOOLING: integrate CWS sb136
-rw-r--r--solenv/bin/addsym.awk23
1 files changed, 18 insertions, 5 deletions
diff --git a/solenv/bin/addsym.awk b/solenv/bin/addsym.awk
index 52efcb4ab740..621ca2e4bc42 100644
--- a/solenv/bin/addsym.awk
+++ b/solenv/bin/addsym.awk
@@ -26,16 +26,29 @@
#*************************************************************************
# Add certain symbol patterns to the first global section.
+#
+# The below code fails with 'perverted' mapfiles (using a strange line layout,
+# or containing version UDK_3_0_0 without a global section, ...).
BEGIN { state = 0 }
-/\{/ && state == 1 { exit 1 } #TODO: print error explanation to stderr?
-/^[\t ]*UDK_3_0_0[\t ]*\{/ && state == 0 { state = 1 }
-/^[\t ]*global[\t ]*:/ && state == 1 { state = 2 }
-{ print }
+END {
+ if (state == 0) {
+ print "# Weak RTTI symbols for C++ exceptions:"
+ print "UDK_3_0_0 {"
+ print "global:"
+ print "_ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions"
+ if (ENVIRON["USE_SYSTEM_STL"] != "YES")
+ print "_ZN4_STL7num_put*; # for STLport"
+ print "};"
+ }
+}
state == 2 {
print "_ZTI*; _ZTS*; # weak RTTI symbols for C++ exceptions"
if (ENVIRON["USE_SYSTEM_STL"] != "YES")
print "_ZN4_STL7num_put*; # for STLport"
state = 3
}
-END { if (state != 3) exit 1 } #TODO: print error explanation to stderr?
+# #i66636# - ???
+/^[\t ]*UDK_3_0_0[\t ]*\{/ { state = 1 }
+/^[\t ]*global[\t ]*:/ && state == 1 { state = 2 }
+{ print }