From 09f8c18f31735643c610a98b987faa0f3fb37f9b Mon Sep 17 00:00:00 2001
From: bdemsky <bdemsky>
Date: Sat, 16 Apr 2011 05:30:13 +0000
Subject: [PATCH] more bug fixes

---
 Robust/src/Runtime/jni/jni-private.h | 29 ++++++++++++++--------------
 Robust/src/buildscript               |  2 +-
 2 files changed, 16 insertions(+), 15 deletions(-)

diff --git a/Robust/src/Runtime/jni/jni-private.h b/Robust/src/Runtime/jni/jni-private.h
index 41645d8d..bd12d6c7 100644
--- a/Robust/src/Runtime/jni/jni-private.h
+++ b/Robust/src/Runtime/jni/jni-private.h
@@ -1,20 +1,12 @@
 #ifndef JNI_PRIVATE_H
 #define JNI_PRIVATE_H
-struct c_class {
-  int type;
-  char * packagename;
-  char * classname;
-  int numMethods;
-  jmethodID * methods;
-  int numFields;
-  jfieldID *fields;
-};
+#include "jni.h"
 
-struct jmethodID {
+struct _jmethodID {
   char *methodname;
 };
 
-struct jfieldID {
+struct _jfieldID {
   char *fieldname;
 };
 
@@ -22,10 +14,20 @@ struct _jobject {
   void * ref;
 };
 
+struct c_class {
+  int type;
+  char * packagename;
+  char * classname;
+  int numMethods;
+  struct _jmethodID * methods;
+  int numFields;
+  struct _jfieldID *fields;
+};
+
 #define MAXJNIREFS 2048
 struct jnireferences {
   struct jnireferences * next;
-  int index
+  int index;
   struct _jobject array[MAXJNIREFS];
 };
 
@@ -33,7 +35,6 @@ struct jnireferences {
 struct _jobject * getwrapped(void * objptr);
 void jnipushframe();
 void jnipopframe();
-
 extern __thread struct jnireferences * jnirefs;
 #define JNIUNWRAP(x) ((x==NULL)?NULL:x->ref)
 #define JNIWRAP(x) getwrapper(x);
@@ -41,7 +42,7 @@ extern __thread struct jnireferences * jnirefs;
 #define JNIPOPFRAME() jnipopframe();
 #endif
 
-jint RC_GetVersion(JNIEnv *);
+jint RC_GetVersion(JNIEnv * env);
 jclass RC_DefineClass(JNIEnv * env, const char * c, jobject loader, const jbyte * buf, jsize bufLen);
 jclass RC_FindClass(JNIEnv * env, const char *classname);
 jmethodID RC_FromReflectedMethod(JNIEnv * env, jobject mthdobj);
diff --git a/Robust/src/buildscript b/Robust/src/buildscript
index f7eb7ec4..24a97403 100755
--- a/Robust/src/buildscript
+++ b/Robust/src/buildscript
@@ -258,7 +258,7 @@ elif [[ $1 = '-jni' ]]
 then
 JNI=true
 JAVAOPTS="$JAVAOPTS -jni"
-EXTRAOPTIONS="$EXTRAOPTIONS -DJNI"
+EXTRAOPTIONS="$EXTRAOPTIONS -DJNI -I$ROBUSTROOT/Runtime/jni"
 elif [[ $1 = '-justanalyze' ]]
 then
 EXITAFTERANALYSIS=true
-- 
2.34.1