Here is the long awaited upgrade of the wrapper.

The aging v3.1.x of the java wrapper is being replaced in this
checkin with the latest (current) stable release, 3.5.9.

There is now only one copy of wrapper.jar, located in wrapper/all.
The build.xml scripts have been changed to reflect this new path.

All binaries--with the exception of solaris (I don't have 
SPARC hardware)--have been stripped.

FreeBSD x64 is being included in this release.

I have only included the x86 macosx wrapper due to not having a
system to test the x64 code on. On the plus side, the wrapper is 
universal (a FAT powerpc & Intel Mac) binary. No more prompting
to install Rosetta!
This commit is contained in:
kytv
2011-06-07 14:53:10 +00:00
parent 57fc896e59
commit b2e8d3cedf
24 changed files with 34 additions and 170 deletions

Binary file not shown.

View File

@ -1,6 +0,0 @@
The wrapper in here is built with an osx patch, backported from
the 3.1.2 per
http://sourceforge.net/tracker/index.php?func=detail&
aid=1262323&
group_id=39428&
atid=425187

View File

@ -1,78 +0,0 @@
--- wrapper_3.1.1_src/src/c/wrapper.c Fri Jul 16 10:29:10 2004
+++ wrapper_3.1.1_src_modified/src/c/wrapper.c Fri Sep 16 14:55:23 2005
@@ -312,7 +312,13 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
+
+#ifdef MACOSX
+#include <sys/time.h>
+#else
#include <sys/timeb.h>
+#endif
+
#include <sys/stat.h>
#include "wrapperinfo.h"
#include "wrapper.h"
@@ -760,16 +766,28 @@
int len;
int pos;
int err;
+
+ #ifdef MACOSX
+ struct timeval timeBuffer;
+ #else
struct timeb timeBuffer;
+ #endif
+
long startTime;
int startTimeMillis;
long now;
int nowMillis;
long durr;
+#ifdef MACOSX
+ gettimeofday(&timeBuffer, NULL);
+ startTime = now = timeBuffer.tv_sec;
+ startTimeMillis = nowMillis = timeBuffer.tv_usec / 1000;
+#else
ftime( &timeBuffer );
startTime = now = timeBuffer.time;
startTimeMillis = nowMillis = timeBuffer.millitm;
+#endif
/*
log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, "now=%ld, nowMillis=%d", now, nowMillis);
@@ -900,9 +918,15 @@
}
/* Get the time again */
+#ifdef MACOSX
+ gettimeofday(&timeBuffer, NULL);
+ now = timeBuffer.tv_sec;
+ nowMillis = timeBuffer.tv_usec / 1000;
+#else
ftime( &timeBuffer );
now = timeBuffer.time;
nowMillis = timeBuffer.millitm;
+#endif
}
/*
log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, "done durr=%ld", durr);
@@ -2250,10 +2274,15 @@
* Calculates a tick count using the system time.
*/
DWORD wrapperGetSystemTicks() {
+#ifdef MACOSX
+ struct timeval timeBuffer;
+ gettimeofday(&timeBuffer, NULL);
+ return (timeBuffer.tv_sec * 1000 + timeBuffer.tv_usec/1000) / WRAPPER_TICK_MS;
+#else
struct timeb timeBuffer;
-
ftime( &timeBuffer );
return (timeBuffer.time * 1000 + timeBuffer.millitm) / WRAPPER_TICK_MS;
+#endif
}
/**

View File

@ -1,60 +0,0 @@
--- wrapper_3.1.1_src/src/c/wrapper_unix.c Fri Jul 16 10:29:10 2004
+++ wrapper_3.1.1_src_modified/src/c/wrapper_unix.c Fri Sep 16 14:45:48 2005
@@ -309,7 +309,13 @@
#include <limits.h>
#include <pthread.h>
#include <pwd.h>
+
+#ifdef MACOSX
+#include <sys/time.h>
+#else
#include <sys/timeb.h>
+#endif
+
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/wait.h>
@@ -1056,7 +1062,11 @@
ssize_t bytesRead;
char readBuf [1025];
int readBufPos, childOutputBufferPos;
+#ifdef MACOSX
+ struct timeval timeBuffer;
+#else
struct timeb timeBuffer;
+#endif
long startTime;
int startTimeMillis;
long now;
@@ -1064,9 +1074,15 @@
long durr;
if (jvmOut != -1) {
+#ifdef MACOSX
+ gettimeofday(&timeBuffer, NULL);
+ startTime = now = timeBuffer.tv_sec;
+ startTimeMillis = nowMillis = timeBuffer.tv_usec / 1000;
+#else
ftime( &timeBuffer );
startTime = now = timeBuffer.time;
startTimeMillis = nowMillis = timeBuffer.millitm;
+#endif
/*
log_printf(WRAPPER_SOURCE_WRAPPER, LEVEL_DEBUG, "now=%ld, nowMillis=%d", now, nowMillis);
@@ -1159,9 +1175,15 @@
}
/* Get the time again */
+#ifdef MACOSX
+ gettimeofday(&timeBuffer, NULL);
+ now = timeBuffer.tv_sec;
+ nowMillis = timeBuffer.tv_usec / 1000;
+#else
ftime( &timeBuffer );
now = timeBuffer.time;
nowMillis = timeBuffer.millitm;
+#endif
}
}