diff options
author | Michael Koch <konqueror@gmx.de> | 2003-07-02 09:16:52 +0000 |
---|---|---|
committer | Michael Koch <konqueror@gmx.de> | 2003-07-02 09:16:52 +0000 |
commit | 58291ebbbcddbf7a7f7fb929581cfdbc1d8b51eb (patch) | |
tree | 8a3689cd518f0696b31e9103f05e01e52759577d /native | |
parent | ac307ba2bc2152a016d71cbec20690c08c4b0530 (diff) | |
download | classpath-58291ebbbcddbf7a7f7fb929581cfdbc1d8b51eb.tar.gz |
2003-07-02 Michael Koch <konqueror@gmx.de>
* configure.in:
Added native/jni/java-nio/Makefile to AC_OUTPUT call.
* include/gnu_java_nio_FileChannelImpl.h:
Regenrated.
* include/gnu_java_nio_FileLockImpl.h,
include/java_nio_DirectByteBufferImpl.h:
New files.
* native/jni/Makefile.am
(SUBDIRS): Added new java-nio subdir.
* native/jni/java-io/Makefile.am:
Removed java_nio.c from compilation.
* native/jni/java-io/java_nio.c:
Removed.
* native/jni/java-net/java_net_NetworkInterface.c
(getRealNetworkInterfaces): Fixed arguments.
* native/jni/java-nio/.cvsignore,
native/jni/java-nio/Makefile.am,
native/jni/java-nio/java_nio.c,
native/jni/java-nio/java_nio_DirectByteBufferImpl.c,
native/jni/java-nio/java_nio_FileChannelImpl.c,
native/jni/java-nio/java_nio_FileLockImpl.c:
New files.
Diffstat (limited to 'native')
-rw-r--r-- | native/jni/Makefile.am | 4 | ||||
-rw-r--r-- | native/jni/java-io/Makefile.am | 4 | ||||
-rw-r--r-- | native/jni/java-net/java_net_NetworkInterface.c | 3 | ||||
-rw-r--r-- | native/jni/java-nio/.cvsignore | 8 | ||||
-rw-r--r-- | native/jni/java-nio/Makefile.am | 13 | ||||
-rw-r--r-- | native/jni/java-nio/java_nio.c (renamed from native/jni/java-io/java_nio.c) | 0 | ||||
-rw-r--r-- | native/jni/java-nio/java_nio_DirectByteBufferImpl.c | 73 | ||||
-rw-r--r-- | native/jni/java-nio/java_nio_FileChannelImpl.c | 89 | ||||
-rw-r--r-- | native/jni/java-nio/java_nio_FileLockImpl.c | 53 |
9 files changed, 240 insertions, 7 deletions
diff --git a/native/jni/Makefile.am b/native/jni/Makefile.am index e1bc9d3e2..b49254462 100644 --- a/native/jni/Makefile.am +++ b/native/jni/Makefile.am @@ -1,8 +1,8 @@ ## Input file for automake to generate the Makefile.in used by configure if CREATE_GTK_PEER_LIBRARIES -SUBDIRS = classpath java-io java-lang java-net java-util gtk-peer +SUBDIRS = classpath java-io java-lang java-net java-nio java-util gtk-peer else -SUBDIRS = classpath java-io java-lang java-net java-util +SUBDIRS = classpath java-io java-lang java-net java-nio java-util endif diff --git a/native/jni/java-io/Makefile.am b/native/jni/java-io/Makefile.am index 6a35d8bda..bd83ffd5f 100644 --- a/native/jni/java-io/Makefile.am +++ b/native/jni/java-io/Makefile.am @@ -4,9 +4,7 @@ libjavaio_la_SOURCES = javaio.h \ javaio.c \ java_io_File.c \ FileDescriptor.c \ - java_io_ObjectInputStream.c \ - java_nio.c - + java_io_ObjectInputStream.c libjavaio_la_LDFLAGS = -module -version-info @LIBVERSION@ diff --git a/native/jni/java-net/java_net_NetworkInterface.c b/native/jni/java-net/java_net_NetworkInterface.c index 8d1235add..e2571f424 100644 --- a/native/jni/java-net/java_net_NetworkInterface.c +++ b/native/jni/java-net/java_net_NetworkInterface.c @@ -59,8 +59,7 @@ exception statement from your version. */ * Returns all local network interfaces as vector */ JNIEXPORT jobject JNICALL -Java_java_net_NetworkInterface_getRealNetworkInterfaces (JNIEnv *env, - jobject this) +Java_java_net_NetworkInterface_getRealNetworkInterfaces (JNIEnv* env, jclass class) { JCL_ThrowException (env, IO_EXCEPTION, "java.net.NetworkInterface.getRealNetworkInterfaces(): not implemented"); return 0; diff --git a/native/jni/java-nio/.cvsignore b/native/jni/java-nio/.cvsignore new file mode 100644 index 000000000..e9f2658a6 --- /dev/null +++ b/native/jni/java-nio/.cvsignore @@ -0,0 +1,8 @@ +*.o +*.a +*.lo +*.la +.libs +.deps +Makefile +Makefile.in diff --git a/native/jni/java-nio/Makefile.am b/native/jni/java-nio/Makefile.am new file mode 100644 index 000000000..0e87083c9 --- /dev/null +++ b/native/jni/java-nio/Makefile.am @@ -0,0 +1,13 @@ +pkglib_LTLIBRARIES = libjavanio.la + +libjavanio_la_SOURCES = java_nio_DirectByteBufferImpl.c \ + java_nio_FileChannelImpl.c \ + java_nio_FileLockImpl.c + +libjavanio_la_LDFLAGS = -module -version-info @LIBVERSION@ +libjavanio_la_LIBADD = $(top_builddir)/native/jni/classpath/jcl.lo + +INCLUDES = -I. @EXTRA_INCLUDES@ \ + -I$(top_srcdir)/native/jni/classpath \ + -I$(top_srcdir)/include \ + -I$(top_builddir)/include diff --git a/native/jni/java-io/java_nio.c b/native/jni/java-nio/java_nio.c index 5bfdc38e0..5bfdc38e0 100644 --- a/native/jni/java-io/java_nio.c +++ b/native/jni/java-nio/java_nio.c diff --git a/native/jni/java-nio/java_nio_DirectByteBufferImpl.c b/native/jni/java-nio/java_nio_DirectByteBufferImpl.c new file mode 100644 index 000000000..6111a5903 --- /dev/null +++ b/native/jni/java-nio/java_nio_DirectByteBufferImpl.c @@ -0,0 +1,73 @@ +/* NetworkInterface.c - Native methods for NetworkInterface class + Copyright (C) 2003 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 <config.h> +#include <errno.h> + +#include <jni.h> +#include <jcl.h> + +#include "java_nio_DirectByteBufferImpl.h" + +#define IO_EXCEPTION "java/io/IOException" + +JNIEXPORT jobject JNICALL +Java_java_nio_DirectByteBufferImpl_allocateImpl (JNIEnv *env, jclass class, jint size) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.DirectByteBufferImpl.allocateImpl(): not implemented"); + return 0; +} + +JNIEXPORT void JNICALL +Java_java_nio_DirectByteBufferImpl_freeImpl (JNIEnv *env, jclass class, jobject address) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.DirectByteBufferImpl.freeImpl(): not implemented"); +} + +JNIEXPORT jbyte JNICALL +Java_java_nio_DirectByteBufferImpl_getImpl (JNIEnv *env, jclass class, jint index) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.DirectByteBufferImpl.getImpl(): not implemented"); + return 0; +} + +JNIEXPORT void JNICALL +Java_java_nio_DirectByteBufferImpl_putImpl (JNIEnv *env, jclass class, jint index, jbyte value) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.DirectByteBufferImpl.putImpl(): not implemented"); +} + diff --git a/native/jni/java-nio/java_nio_FileChannelImpl.c b/native/jni/java-nio/java_nio_FileChannelImpl.c new file mode 100644 index 000000000..adf7cddd2 --- /dev/null +++ b/native/jni/java-nio/java_nio_FileChannelImpl.c @@ -0,0 +1,89 @@ +/* NetworkInterface.c - Native methods for NetworkInterface class + Copyright (C) 2003 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 <config.h> +#include <errno.h> + +#include <jni.h> +#include <jcl.h> + +#include "gnu_java_nio_FileChannelImpl.h" + +#define IO_EXCEPTION "java/io/IOException" + +JNIEXPORT jlong JNICALL +Java_gnu_java_nio_FileChannelImpl_size (JNIEnv *env, jclass class) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.FileChannelImpl.(): not implemented"); + return 0; +} + +JNIEXPORT jlong JNICALL +Java_gnu_java_nio_FileChannelImpl_implPosition (JNIEnv *env, jclass class) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.FileChannelImpl.implPosition(): not implemented"); + return 0; +} + +JNIEXPORT jobject JNICALL +Java_gnu_java_nio_FileChannelImpl_implPosition__J (JNIEnv *env, jclass class, jlong newPosition) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.FileChannelImpl.implPosition(): not implemented"); + return 0; +} + +JNIEXPORT jobject JNICALL +Java_gnu_java_nio_FileChannelImpl_implTruncate (JNIEnv *env, jclass class, jlong size) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.FileChannelImpl.implTruncate(): not implemented"); + return 0; +} + +JNIEXPORT jint JNICALL +Java_gnu_java_nio_FileChannelImpl_implRead (JNIEnv *env, jclass class, jbyteArray buffer, jint offset, jint length) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.FileChannelImpl.implRead(): not implemented"); + return 0; +} + +JNIEXPORT jint JNICALL +Java_gnu_java_nio_FileChannelImpl_implWrite (JNIEnv *env, jclass class, jbyteArray buffer, jint offset, jint length) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.FileChannelImpl.implWrite(): not implemented"); + return 0; +} + diff --git a/native/jni/java-nio/java_nio_FileLockImpl.c b/native/jni/java-nio/java_nio_FileLockImpl.c new file mode 100644 index 000000000..c068be94a --- /dev/null +++ b/native/jni/java-nio/java_nio_FileLockImpl.c @@ -0,0 +1,53 @@ +/* NetworkInterface.c - Native methods for NetworkInterface class + Copyright (C) 2003 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 <config.h> +#include <errno.h> + +#include <jni.h> +#include <jcl.h> + +#include "gnu_java_nio_FileLockImpl.h" + +#define IO_EXCEPTION "java/io/IOException" + +JNIEXPORT void JNICALL +Java_gnu_java_nio_FileLockImpl_releaseImpl (JNIEnv *env, jclass class) +{ + JCL_ThrowException (env, IO_EXCEPTION, "java.nio.FileChannelImpl.(): not implemented"); +} + |