From 4ea7527ca54d7c96839bfdf568b722e64f7f8599 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Thu, 16 Apr 2009 01:16:07 +0100 Subject: [PATCH] Windows fixes. Remove unused Java/JNI 1.1 data structures. --- include/jni.h | 57 +++++++++++---------------------------------------- 1 file changed, 12 insertions(+), 45 deletions(-) diff --git a/include/jni.h b/include/jni.h index f8b34fe4a..6232f05be 100755 --- a/include/jni.h +++ b/include/jni.h @@ -19,9 +19,15 @@ #include /* For 1.1 version of args (i.e., vfprintf) */ #include /* For va_list */ +#ifndef _WIN32 #define JNIEXPORT +#define JNIIMPORT #define JNICALL - +#else +#define JNIEXPORT __declspec(dllexport) +#define JNIIMPORT __declspec(dllimport) +#define JNICALL __stdcall +#endif #ifdef __cplusplus extern "C" { #endif @@ -661,57 +667,19 @@ struct JNIEnv_ { #endif }; -/****** - * Arguments for RVM (Java 1.1 version) - * Default values set by calling JNI_GetDefaultJavaVMInitArgs(JDK1_1InitArgs *) - */ -typedef struct JDK1_1InitArgs { - jint version; - char **properties; - jint checkSource; - jint nativeStackSize; - jint javaStackSize; - jint minHeapSize; - jint maxHeapSize; - jint verifyMode; - char *classpath; - jint (PJNICALL vfprintf)(FILE *fp, const char *format, va_list args); - void (PJNICALL exit)(jint code); - void (PJNICALL abort)(void); - jint enableClassGC; - jint enableVerboseGC; - jint disableAsyncGC; - - /* The following are RVM specific */ - jint verbose; - unsigned smallHeapSize; /* specify with option "-h" */ - unsigned largeHeapSize; /* specify with option "-lh" */ - unsigned nurserySize; /* specify with option "-nh" */ - unsigned permanentHeapSize; /* specify with option "-ph" */ - char* sysLogFile; /* specify with option "-sysLogFile" */ - char* bootFilename; /* boot image, specify with option "-i" */ - char** JavaArgs; /* command line arguments to pass to the VM */ - -} JDK1_1InitArgs; - - -typedef struct JDK1_1AttachArgs { - void * __padding; /* C compilers don't allow empty structures. */ -} JDK1_1AttachArgs; - - /* 1.2 args */ typedef struct JavaVMOption { char *optionString; void *extraInfo; } JavaVMOption; + typedef struct JavaVMInitArgs { jint version; - jint nOptions; JavaVMOption *options; jboolean ignoreUnrecognized; } JavaVMInitArgs; + typedef struct { jint version; char *name; @@ -745,10 +713,9 @@ struct JavaVM_ { #endif }; -/* Jikes RVM needs to implement these: */ -jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *); -jint JNICALL JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *); -jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); +JNIEXPORT jint JNICALL JNI_GetDefaultJavaVMInitArgs(void *); +JNIEXPORT jint JNICALL JNI_CreateJavaVM(JavaVM **, JNIEnv **, void *); +JNIEXPORT jint JNICALL JNI_GetCreatedJavaVMs(JavaVM **, jsize, jsize *); #ifdef __cplusplus }