[kaffe] CVS kaffe (guilhem): C++ compilation fix.

Kaffe CVS cvs-commits at kaffe.org
Tue Jul 6 12:46:00 PDT 2004


PatchSet 4897 
Date: 2004/07/06 16:56:58
Author: guilhem
Branch: HEAD
Tag: (none) 
Log:
C++ compilation fix.

        * include/jni.h: Fixed compilation for C++.

Members: 
	ChangeLog:1.2463->1.2464 
	include/jni.h:1.30->1.31 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2463 kaffe/ChangeLog:1.2464
--- kaffe/ChangeLog:1.2463	Tue Jul  6 16:38:15 2004
+++ kaffe/ChangeLog	Tue Jul  6 16:56:58 2004
@@ -1,5 +1,9 @@
 2004-07-06  Guilhem Lavaux <guilhem at kaffe.org>
 
+	* include/jni.h: Fixed compilation for C++.
+
+2004-07-06  Guilhem Lavaux <guilhem at kaffe.org>
+
 	* configure.ac: Added missing 'esac'.
 
 	* configure: Regenerated.
Index: kaffe/include/jni.h
diff -u kaffe/include/jni.h:1.30 kaffe/include/jni.h:1.31
--- kaffe/include/jni.h:1.30	Mon Jul  5 16:40:10 2004
+++ kaffe/include/jni.h	Tue Jul  6 16:57:16 2004
@@ -54,7 +54,26 @@
 #ifdef __cplusplus
 }
 #endif
-  
+
+/* 
+ * Before jni.h is #included within a typical JVM, the source code should 
+ * #define _JNI_VM_INTERNAL_TYPES_DEFINED and provide the real declarations
+ * for 'jobject', 'jfieldID', 'jMethodID' and other implementation types.
+ * If _JNI_VM_INTERNAL_TYPES_DEFINED is not defined, the following 
+ * declares the old versions of the types.
+ */
+#ifndef _JNI_VM_INTERNAL_TYPES_DEFINED
+/*
+typedef void *jobject;
+typedef void *jfieldID;
+typedef void *jmethodID;
+*/
+struct _jfieldID;
+struct _jmethodID;
+typedef struct _jfieldID *jfieldID;
+typedef struct _jmethodID *jmethodID;
+#endif 
+   
 #ifdef __cplusplus
   
 class _jobject {};
@@ -92,25 +111,7 @@
 
 #else /* __cplusplus */
 
-/* 
- * Before jni.h is #included within a typical JVM, the source code should 
- * #define _JNI_VM_INTERNAL_TYPES_DEFINED and provide the real declarations
- * for 'jobject', 'jfieldID', 'jMethodID' and other implementation types.
- * If _JNI_VM_INTERNAL_TYPES_DEFINED is not defined, the following 
- * declares the old versions of the types.
- */
-#ifndef _JNI_VM_INTERNAL_TYPES_DEFINED
-/*
-typedef void *jobject;
-typedef void *jfieldID;
-typedef void *jmethodID;
-*/
-struct _jfieldID;
-struct _jmethodID;
-typedef struct _jfieldID *jfieldID;
-typedef struct _jmethodID *jmethodID;
-#endif 
-  
+ 
 typedef void *jobject;
 typedef jobject jclass;
 typedef jobject jstring;
@@ -467,6 +468,7 @@
 };
 
 #ifdef __cplusplus
+} /* Extern "C" */
 
 struct _Jv_JNIEnv
 {




More information about the kaffe mailing list