[cp-patches] Patch: FYI: add 1.1 JNI structs

Tom Tromey tromey at redhat.com
Tue Jun 6 19:07:05 UTC 2006


I'm checking this in.

David Walluck pointed out that our jni.h didn't define the 1.1 JNI
structs.  These were needed by some app he's trying to compile.

VMs will need additional code if they want to support this.  Consult
the JNI spec for the meaning of the various fields.

Tom

Index: ChangeLog
from  Tom Tromey  <tromey at redhat.com>
	* include/jni.h (JDK1_1InitArgs): New struct.
	(JDK1_1AttachArgs): Likewise.

Index: include/jni.h
===================================================================
RCS file: /cvsroot/classpath/classpath/include/jni.h,v
retrieving revision 1.6
diff -u -r1.6 jni.h
--- include/jni.h 2 Jul 2005 20:32:22 -0000 1.6
+++ include/jni.h 6 Jun 2006 19:06:48 -0000
@@ -1,5 +1,5 @@
 /* jni.h
-   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005  Free Software Foundation
+   Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006  Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -1584,6 +1584,45 @@
   jboolean ignoreUnrecognized;
 } JavaVMInitArgs;
 
+typedef struct JDK1_1InitArgs
+{
+  /* VM version.  Should be JNI_VERSION_1_1.  Note that before JDK
+     1.1.2, this field was named 'reserved0'.  (I don't know what the
+     current 'reserved0' field was named then.)  */
+  jint version;
+
+  /* A null-terminated array of environment strings, each of the form
+     "KEY=VALUE".  This is used to set system properties.  Note that
+     before JDK 1.1.2, this field was named 'reserved1'.  */
+  char **properties;
+
+  jint checkSource;
+  jint nativeStackSize;
+  jint javaStackSize;
+  jint minHeapSize;
+  jint maxHeapSize;
+  jint verifyMode;
+  const char *classpath;
+
+  jint (*vfprintf) (FILE *file, const char *fmt, va_list args);
+  void (*exit) (jint value);
+  void (*abort) ();
+
+  jint enableClassGC;
+  jint enableVerboseGC;
+  jint disableAsyncGC;
+
+  jint reserved0;
+  jint reserved1;
+  jint reserved2;
+} JDK1_1InitArgs;
+
+typedef struct JDK1_1AttachArgs
+{
+  /* Dummy field since C cannot have empty structs.  The name and type
+     are chosen to comply with the spec.  */
+  void *__padding;
+} JDK1_1AttachArgs;
 
 
 /* Keep c-font-lock-extra-types in alphabetical order. */



More information about the Classpath-patches mailing list