summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--include/Makefile.am3
-rw-r--r--include/java_io_VMObjectStreamClass.h19
-rw-r--r--native/jni/java-io/Makefile.am3
-rw-r--r--native/jni/java-io/java_io_VMObjectStreamClass.c61
5 files changed, 92 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index ab4d4f8ba..b25ce823a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2004-03-15 Mark Wielaard <mark@klomp.org>
+
+ * include/Makefile.am: Add java_io_VMObjectStreamClass.h generation.
+ * include/java_io_VMObjectStreamClass.h: New file.
+ * native/jni/java-io/Makefile.am (SOURCES): Add new file.
+ * native/jni/java-io/java_io_VMObjectStreamClass.c: New file.
+
2004-03-15 Patrik Reali <reali@acm.org>
* doc/hacking.texinfo doc/www.gnu.org/benchmarks.wml: link to japitools
fixed
diff --git a/include/Makefile.am b/include/Makefile.am
index ea608c8c9..04ba119a9 100644
--- a/include/Makefile.am
+++ b/include/Makefile.am
@@ -42,6 +42,7 @@ $(top_srcdir)/include/gnu_java_nio_NIOServerSocket.h \
$(top_srcdir)/include/java_io_FileDescriptor.h \
$(top_srcdir)/include/java_io_File.h \
$(top_srcdir)/include/java_io_ObjectInputStream.h \
+$(top_srcdir)/include/java_io_VMObjectStreamClass.h \
$(top_srcdir)/include/java_lang_Double.h \
$(top_srcdir)/include/java_lang_Math.h \
$(top_srcdir)/include/java_lang_Object.h \
@@ -138,6 +139,8 @@ $(top_srcdir)/include/java_io_File.h: $(top_srcdir)/java/io/File.java
$(JAVAH) -o $@ java.io.File
$(top_srcdir)/include/java_io_ObjectInputStream.h: $(top_srcdir)/java/io/ObjectInputStream.java
$(JAVAH) -o $@ java.io.ObjectInputStream
+$(top_srcdir)/include/java_io_VMObjectStreamClass.h: ../vm/current/java/io/VMObjectStreamClass.java
+ $(JAVAH) -o $@ java.io.VMObjectStreamClass
$(top_srcdir)/include/java_lang_Double.h: $(top_srcdir)/java/lang/Double.java
$(JAVAH) -o $@ java.lang.Double
$(top_srcdir)/include/java_lang_Math.h: $(top_srcdir)/java/lang/Math.java
diff --git a/include/java_io_VMObjectStreamClass.h b/include/java_io_VMObjectStreamClass.h
new file mode 100644
index 000000000..e249d67e3
--- /dev/null
+++ b/include/java_io_VMObjectStreamClass.h
@@ -0,0 +1,19 @@
+/* DO NOT EDIT THIS FILE - it is machine generated */
+
+#ifndef __java_io_VMObjectStreamClass__
+#define __java_io_VMObjectStreamClass__
+
+#include <jni.h>
+
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
+extern JNIEXPORT jboolean JNICALL Java_java_io_VMObjectStreamClass_hasClassInitializer (JNIEnv *env, jclass, jclass);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __java_io_VMObjectStreamClass__ */
diff --git a/native/jni/java-io/Makefile.am b/native/jni/java-io/Makefile.am
index bd83ffd5f..35c4a1895 100644
--- a/native/jni/java-io/Makefile.am
+++ b/native/jni/java-io/Makefile.am
@@ -4,7 +4,8 @@ libjavaio_la_SOURCES = javaio.h \
javaio.c \
java_io_File.c \
FileDescriptor.c \
- java_io_ObjectInputStream.c
+ java_io_ObjectInputStream.c \
+ java_io_VMObjectStreamClass.c
libjavaio_la_LDFLAGS = -module -version-info @LIBVERSION@
diff --git a/native/jni/java-io/java_io_VMObjectStreamClass.c b/native/jni/java-io/java_io_VMObjectStreamClass.c
new file mode 100644
index 000000000..cb24d9f2a
--- /dev/null
+++ b/native/jni/java-io/java_io_VMObjectStreamClass.c
@@ -0,0 +1,61 @@
+/* java_io_VMObjectStreamClass.c -- Native methods for VMObjectStreamClass.java
+ Copyright (C) 2003, 2004 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath is distributed in the hope that it will be useful, but
+WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING. If not, write to the
+Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+02111-1307 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library. Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module. An independent module is a module which is not derived from
+or based on this library. If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so. If you do not wish to do so, delete this
+exception statement from your version. */
+
+
+#include <jni.h>
+#include <jcl.h>
+
+#include "java_io_VMObjectStreamClass.h"
+
+/*
+ * Class: java_io_VMObjectOutputStream
+ * Method: hasClassInitializer
+ * Signature: (Ljava/lang/Class;)Z
+ */
+JNIEXPORT jboolean JNICALL
+Java_java_io_VMObjectStreamClass_hasClassInitializer( JNIEnv * env,
+ jclass vmosklass,
+ jclass klass )
+{
+ jmethodID mid = (*env)->GetStaticMethodID(env, klass, "<clinit>", "()V");
+ if (mid == NULL)
+ {
+ (*env)->ExceptionClear(env);
+ return JNI_FALSE;
+ }
+ return JNI_TRUE;
+}