summaryrefslogtreecommitdiff
path: root/editors/openoffice-3-devel/files/patch-jvmaccess+source+sunversion.cxx
diff options
context:
space:
mode:
authorMartin Blapp <mbr@FreeBSD.org>2003-03-30 00:40:13 +0000
committerMartin Blapp <mbr@FreeBSD.org>2003-03-30 00:40:13 +0000
commit7eb0e80874157a0ec74a8998c5aa3c74fef1b740 (patch)
treee1e4013a624da67eadb11efc41b1caaf1215930a /editors/openoffice-3-devel/files/patch-jvmaccess+source+sunversion.cxx
parentMake this port build on 5-CURRENT. (diff)
Work around the issue that our jdk has no version number like 1.4.1_02.
It reports itself as release candidat: 1.4.1-p3. This makes the jdk detection working. Problem reported by: David Booth <wbooth@austin.rr.com>
Notes
Notes: svn path=/head/; revision=77707
Diffstat (limited to 'editors/openoffice-3-devel/files/patch-jvmaccess+source+sunversion.cxx')
-rw-r--r--editors/openoffice-3-devel/files/patch-jvmaccess+source+sunversion.cxx50
1 files changed, 50 insertions, 0 deletions
diff --git a/editors/openoffice-3-devel/files/patch-jvmaccess+source+sunversion.cxx b/editors/openoffice-3-devel/files/patch-jvmaccess+source+sunversion.cxx
new file mode 100644
index 000000000000..67e014595219
--- /dev/null
+++ b/editors/openoffice-3-devel/files/patch-jvmaccess+source+sunversion.cxx
@@ -0,0 +1,50 @@
+--- ../jvmaccess/source/sunversion.cxx.orig Sun Mar 30 00:40:02 2003
++++ ../jvmaccess/source/sunversion.cxx Sun Mar 30 01:31:48 2003
+@@ -102,6 +102,7 @@
+ {
+ //token can be "1", or "2_02"
+ char* pUnderscore= strpbrk(tok,"_");
++ char* pLine= strpbrk(tok,"-");
+ if( pUnderscore != NULL)
+ {
+ // get the value before and after the underscore
+@@ -115,6 +116,19 @@
+ // now get the part after "_"
+ m_nMinor= atoi( pUnderscore + 1);
+ }
++ else if (pLine != NULL)
++ {
++ // get the value before and after the underscore
++ int len= pLine - tok;
++ char* pre= new char[len + 1];
++ strncpy( pre, tok, len);
++ pre[len]= 0;
++ // convert the value before the "_" into a numeric value
++ arTokens[index]= atoi(pre);
++ delete[] pre;
++ // now get the part after "-"
++ m_nMinor= atoi( pLine + 1);
++ }
+ else
+ {
+ arTokens[index]= atoi(tok);
+@@ -172,6 +186,19 @@
+ continue;
+ }
+ }
++ if(cCur == '-')
++ {
++ //check previous char
++ if(cLast >= 48 && cLast <= 57)
++ {
++ if(cNext == 'p')
++ continue;
++ }
++ }
++ if(cCur == 'p')
++ {
++ continue;
++ }
+ //If we get here then the current character is not a number (0..9),'.','_'
+ ret= false;
+ break;