summaryrefslogtreecommitdiff
path: root/editors/openoffice.org-1.0/files/patch-solenv::bin::getcompver.awk
diff options
context:
space:
mode:
Diffstat (limited to 'editors/openoffice.org-1.0/files/patch-solenv::bin::getcompver.awk')
-rw-r--r--editors/openoffice.org-1.0/files/patch-solenv::bin::getcompver.awk44
1 files changed, 44 insertions, 0 deletions
diff --git a/editors/openoffice.org-1.0/files/patch-solenv::bin::getcompver.awk b/editors/openoffice.org-1.0/files/patch-solenv::bin::getcompver.awk
new file mode 100644
index 000000000000..62786af61ad5
--- /dev/null
+++ b/editors/openoffice.org-1.0/files/patch-solenv::bin::getcompver.awk
@@ -0,0 +1,44 @@
+--- ../solenv/bin/getcompver.awk.orig Tue May 28 13:09:01 2002
++++ ../solenv/bin/getcompver.awk Tue May 28 13:08:14 2002
+@@ -61,9 +61,11 @@
+ #*************************************************************************
+ BEGIN {
+ CCversion = 0
++ compiler_matched = 0
+ }
+ # Sun c++ compiler
+ /Sun WorkShop/ {
++ compiler_matched = 1
+ # version number right after "C++"
+ x = match( $0, /C\+\+ .*/ )
+ btwn = substr( $0, RSTART, RLENGTH)
+@@ -73,12 +75,28 @@
+ }
+ # Microsoft c++ compiler
+ /Microsoft.*..\...\...../ {
++ compiler_matched = 1
+ # match on the format of the ms versions ( dd.dd.dddd )
+ x = match( $0, /..\...\...../ )
+ CCversion = substr( $0, RSTART, RLENGTH)
+ }
++# Java
++/java version/ {
++ compiler_matched = 1
++ # match on the format of the java versions ( d[d].d[d].d[d] )
++ x = match( $0, /".*\..*\..*"/ )
++ CCversion = substr( $0, RSTART+1, RLENGTH-2)
++}
++/^[0-9]*[.][0-9]*$/ {
++ if ( compiler_matched == 0 ) {
++# need to blow to x.xx.xx for comparing
++ CCversion = $0 ".0"
++ }
++}
+ /^[0-9]*[.][0-9]*[.][0-9]*$/ {
+- CCversion = $0
++ if ( compiler_matched == 0 ) {
++ CCversion = $0
++ }
+ }
+ END {
+ if ( num == "true" ) {