summaryrefslogtreecommitdiffstats
path: root/resources/stubs_includes/jvm
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2009-10-12 18:05:21 +0200
committerMichael Bien <[email protected]>2009-10-12 18:05:21 +0200
commit2b05a67d30bde1419c2b0f1b5b427d65b8415eb7 (patch)
tree15ae414e82e515d5255428d32ecdf5ed38a51ea5 /resources/stubs_includes/jvm
parentbe4e9559f16e3ac5a5d109b26fbb9d579345f25c (diff)
cleaned up resources folder structure and build.
Diffstat (limited to 'resources/stubs_includes/jvm')
-rw-r--r--resources/stubs_includes/jvm/jni.h78
-rw-r--r--resources/stubs_includes/jvm/jni_md.h15
2 files changed, 93 insertions, 0 deletions
diff --git a/resources/stubs_includes/jvm/jni.h b/resources/stubs_includes/jvm/jni.h
new file mode 100644
index 00000000..be01d018
--- /dev/null
+++ b/resources/stubs_includes/jvm/jni.h
@@ -0,0 +1,78 @@
+/* Stub header for JNI which provides needed declarations without more
+ complicated and unnecessary constructs */
+
+/*
+ * JNI Types
+ */
+
+#include "jni_md.h"
+
+typedef unsigned char jboolean;
+typedef unsigned short jchar;
+typedef short jshort;
+typedef float jfloat;
+typedef double jdouble;
+
+typedef jint jsize;
+
+struct _jobject;
+
+typedef struct _jobject *jobject;
+typedef jobject jclass;
+typedef jobject jthrowable;
+typedef jobject jstring;
+typedef jobject jarray;
+typedef jarray jbooleanArray;
+typedef jarray jbyteArray;
+typedef jarray jcharArray;
+typedef jarray jshortArray;
+typedef jarray jintArray;
+typedef jarray jlongArray;
+typedef jarray jfloatArray;
+typedef jarray jdoubleArray;
+typedef jarray jobjectArray;
+typedef jobject jweak;
+
+typedef union jvalue {
+ jboolean z;
+ jbyte b;
+ jchar c;
+ jshort s;
+ jint i;
+ jlong j;
+ jfloat f;
+ jdouble d;
+ jobject l;
+} jvalue;
+
+struct _jfieldID;
+typedef struct _jfieldID *jfieldID;
+
+struct _jmethodID;
+typedef struct _jmethodID *jmethodID;
+
+/*
+ * jboolean constants
+ */
+
+#define JNI_FALSE 0
+#define JNI_TRUE 1
+
+/*
+ * possible return values for JNI functions.
+ */
+
+#define JNI_OK 0 /* success */
+#define JNI_ERR (-1) /* unknown error */
+#define JNI_EDETACHED (-2) /* thread detached from the VM */
+#define JNI_EVERSION (-3) /* JNI version error */
+#define JNI_ENOMEM (-4) /* not enough memory */
+#define JNI_EEXIST (-5) /* VM already created */
+#define JNI_EINVAL (-6) /* invalid arguments */
+
+/*
+ * used in ReleaseScalarArrayElements
+ */
+
+#define JNI_COMMIT 1
+#define JNI_ABORT 2
diff --git a/resources/stubs_includes/jvm/jni_md.h b/resources/stubs_includes/jvm/jni_md.h
new file mode 100644
index 00000000..44978627
--- /dev/null
+++ b/resources/stubs_includes/jvm/jni_md.h
@@ -0,0 +1,15 @@
+#define _JNI_IMPORT_OR_EXPORT_
+#define JNIEXPORT
+#define JNIIMPORT
+#define JNICALL
+
+typedef int jint;
+#ifdef _LP64 /* 64-bit Solaris */
+typedef long jlong;
+#else
+typedef long long jlong;
+#endif
+
+typedef signed char jbyte;
+
+typedef long JNIEnv;