summaryrefslogtreecommitdiff
path: root/native/jni/java-nio
Commit message (Collapse)AuthorAgeFilesLines
* Replace all .cvsignore files with .gitignoreIvan Maidanski2012-10-151-0/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2012-06-10 Ivan Maidanski <ivmai@mail.ru> * compat/.gitignore, * compat/java.net/.gitignore, * doc/.gitignore, * doc/api/.gitignore, * doc/www.gnu.org/.gitignore, * doc/www.gnu.org/announce/.gitignore, * doc/www.gnu.org/cp-tools/.gitignore, * doc/www.gnu.org/docs/.gitignore, * doc/www.gnu.org/downloads/.gitignore, * doc/www.gnu.org/events/.gitignore, * doc/www.gnu.org/faq/.gitignore, * examples/.gitignore, * external/.gitignore, * external/jsr166/.gitignore, * external/relaxngDatatype/.gitignore, * external/sax/.gitignore, * external/w3c_dom/.gitignore, * gnu/classpath/.gitignore, * gnu/java/locale/.gitignore, * gnu/java/security/.gitignore, * gnu/test/.gitignore, * include/.gitignore, * java/util/.gitignore, * lib/.gitignore, * native/.gitignore, * native/fdlibm/.gitignore, * native/jawt/.gitignore, * native/jni/.gitignore, * native/jni/classpath/.gitignore, * native/jni/gconf-peer/.gitignore, * native/jni/gstreamer-peer/.gitignore, * native/jni/gtk-peer/.gitignore, * native/jni/java-io/.gitignore, * native/jni/java-lang/.gitignore, * native/jni/java-math/.gitignore, * native/jni/java-net/.gitignore, * native/jni/java-nio/.gitignore, * native/jni/java-util/.gitignore, * native/jni/midi-alsa/.gitignore, * native/jni/midi-dssi/.gitignore, * native/jni/native-lib/.gitignore, * native/jni/qt-peer/.gitignore, * native/jni/xmlj/.gitignore, * native/plugin/.gitignore, * native/testsuite/.gitignore, * native/vmi/.gitignore, * resource/.gitignore, * resource/META-INF/services/.gitignore, * scripts/.gitignore, * test/.gitignore, * test/gnu.java.lang.reflect/.gitignore, * test/java.io/.gitignore, * test/java.lang.reflect/.gitignore, * test/java.net/.gitignore, * test/java.util/.gitignore, * tools/.gitignore, * tools/gnu/classpath/tools/doclets/.gitignore, * tools/gnu/classpath/tools/doclets/debugdoclet/.gitignore, * tools/gnu/classpath/tools/doclets/htmldoclet/.gitignore, * tools/gnu/classpath/tools/doclets/xmldoclet/.gitignore, * tools/gnu/classpath/tools/doclets/xmldoclet/doctranslet/.gitignore, * tools/gnu/classpath/tools/gjdoc/.gitignore, * tools/gnu/classpath/tools/gjdoc/expr/.gitignore, * tools/gnu/classpath/tools/java2xhtml/.gitignore, * tools/gnu/classpath/tools/taglets/.gitignore, * vm/.gitignore, * vm/reference/.gitignore: Renamed from .cvsignore. Signed-off-by: Pekka Enberg <penberg@kernel.org>
* Fix Java_java_nio_VMDirectByteBuffer_allocate() for negative capacityPekka Enberg2011-03-171-0/+7
| | | | | | | | | | | JavaDocs clearly state that ByteBuffer.allocateDirect() must throw IllegalArgumentException if capacity is negative. 2011-03-17 Pekka Enberg <penberg@kernel.org> * native/jni/java-nio/java_nio_VMDirectByteBuffer.c: (Java_java_nio_VMDirectByteBuffer_allocate): Check for negative capacity.
* 2008-06-23 Andrew Haley <aph@redhat.com>Andrew Haley2008-06-231-1/+2
| | | | | | | | | | | | | | | | | | | | | * native/jawt/Makefile.am, native/fdlibm/Makefile.am, native/jni/java-util/Makefile.am, native/jni/gstreamer-peer/Makefile.am, native/jni/native-lib/Makefile.am, native/jni/gconf-peer/Makefile.am, native/jni/gtk-peer/Makefile.am, native/jni/xmlj/Makefile.am, native/jni/midi-alsa/Makefile.am, native/jni/java-nio/Makefile.am, native/jni/midi-dssi/Makefile.am, native/jni/classpath/Makefile.am, native/jni/java-io/Makefile.am, native/jni/java-lang/Makefile.am, native/jni/java-net/Makefile.am (AM_CFLAGS): Add @EXTRA_CFLAGS@. * configure.ac (EXTRA_CFLAGS): New macro. * lib/Makefile.am (resources): Add .svn.
* build fixes for arm-winceDalibor Topic2007-12-284-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2007-12-28 Dalibor Topic <robilad@kaffe.org> * configure.ac (AC_CHECK_HEADERS): Check for netinet/in_systm.h, netinet/ip.h and net/if.h for Windows CE. * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c: Guard net/if.h include statement. Use unsigned int instead of u_int. * native/jni/java-nio/gnu_java_nio_VMChannel.c: Guard sys/mman.h include statement. * native/jni/java-nio/gnu_java_nio_VMSelector.c: Guard sys/select.h include statement. * native/jni/java-nio/javanio.c: Guard sys/select.h include statement. * native/jni/java-nio/javanio.h: Include sys/time.h. * native/jni/native-lib/cpio.c: Guard chmod call by S_IWRITE, since it's not defined in the arm-wince toolchain. * native/jni/native-lib/cpnet.h: Guard netinet/in_systm.h and netinet/ip.h include statements.
* 2007-10-22 Dalibor Topic <robilad@kaffe.org>Dalibor Topic2007-10-221-0/+2
| | | | | * native/jni/java-nio/gnu_java_nio_EpollSelectorImpl.c: Include config-int.h for uint32_t.
* 2007-06-25 Dalibor Topic <robilad@kaffe.org>Dalibor Topic2007-06-241-0/+4
| | | | | | | | | * configure.ac: Check for MSG_WAITALL, since it does not exist on Cygwin. * native/jni/java-nio/gnu_java_nio_VMChannel.c (Java_gnu_java_nio_VMChannel_receive): Define MSG_WAITALL as 0 if it does not exist.
* 2007-06-24 Ito Kazumitsu <kaz@maczuka.gcd.org>Ito Kazumitsu2007-06-241-1/+22
| | | | | | | Fixes bug #30377 * native/jni/java-nio/gnu_java_nio_VMChannel.c (Java_gnu_java_nio_VMChannel_available): Retry using fstat if ioctl fails with ENOTTY.
* 2007-05-30 Mark Wielaard <mark@klomp.org>Mark Wielaard2007-05-301-1/+1
| | | | | | | Fixes bug #32030 reported by Steve.Blackburn@anu.edu.au * native/jni/java-nio/gnu_java_nio_VMChannel.c (Java_gnu_java_nio_VMChannel_open): Only set O_TRUNC on CPNIO_APPEND and O_WRONLY.
* 2007-05-24 Ito Kazumitsu <kaz@maczuka.gcd.org>Ito Kazumitsu2007-05-241-0/+49
| | | | | | | * native/jni/java-nio/gnu_java_nio_VMChannel.c (Java_gnu_java_nio_VMChannel_available): Use fstat or select as an alternative to ioctl. * native/jni/native-lib/cpio.c(cpio_availableBytes): Corrected typo.
* 2007-04-17 Andrew John Hughes <gnu_andrew@member.fsf.org>Andrew John Hughes2007-04-171-1/+8
| | | | | | | | * native/jni/java-net/local.c: Fix import of FIONREAD. * native/jni/java-nio/gnu_java_nio_VMChannel.c, * native/jni/native-lib/cpnet.c: Likewise.
* 2007-04-11 Christian Thalinger <twisti@complang.tuwien.ac.at>Christian Thalinger2007-04-111-2/+2
| | | | | * native/jni/java-nio/javanio.c: Include fcntl.h instead of sys/fcntl.h.
* 2007-04-05 Christian Thalinger <twisti@complang.tuwien.ac.at>Christian Thalinger2007-04-052-22/+36
| | | | | | | | | | | * native/jni/java-nio/gnu_java_nio_charset_iconv_IconvDecoder.c, native/jni/java-nio/gnu_java_nio_charset_iconv_IconvEncoder.c [HAVE_ICONV] (createRawData, getData, infid, outfid): Added #ifdef. (openIconv): Added UNUSED argument attribute, so we can build with -Werror. (decode): Likewise. (closeIconv): Likewise.
* * native/jni/java-nio/Makefile.am (LIBADD): Add libclasspathnative.Mark Wielaard2007-03-291-0/+1
|
* * native/jni/java-nio/Makefile.am (LIBADD): Don't addMark Wielaard2007-03-282-5/+2
| | | | | | libclasspathnative. * native/jni/java-nio/gnu_java_nio_VMChannel.c (Java_gnu_java_nio_VMChannel_open): Don't set and reset umask.
* 2007-01-25 Ito Kazumitsu <kaz@maczuka.gcd.org>Ito Kazumitsu2007-01-282-0/+24
| | | | | | | | * native/jni/java-nio/gnu_java_nio_VMChannel.c (Java_gnu_java_nio_VMChannel_accept): Throw SocketTimeoutException in case of timeout. * native/jni/java-nio/javanio.c(cpnio_accept): Call select() if SO_RCVTIMEO is set.
* * native/jni/java-nio/gnu_java_nio_VMChannel.c (is_non_blocking_fd):David Daney2006-12-091-2/+1
| | | | Fix comment.
* * native/jni/java-nio/gnu_java_nio_VMChannel.c (is_non_blocking_fd):David Daney2006-12-081-5/+57
| | | | | | | | | | New method. (Java_gnu_java_nio_VMChannel_read__ILjava_nio_ByteBuffer_2): Throw SocketTimeoutException if a blocking socket timesout. (Java_gnu_java_nio_VMChannel_readScattering): Same. (Java_gnu_java_nio_VMChannel_read__I): Same. (Java_gnu_java_nio_VMChannel_connect): Initialize the fd set. (Java_gnu_java_nio_VMChannel_connect6): Same.
* 2006-12-04 Roman Kennke <kennke@aicas.com>Roman Kennke2006-12-041-2/+9
| | | | | * native/jni/java-nio/gnu_java_nio_VMChannel.c (Java_gnu_java_nio_VMChannel_connect): Retry on EINTR.
* * native/jni/java-nio/gnu_java_nio_VMChannel.cMark Wielaard2006-12-041-2/+2
| | | | (JCL_thread_interrupted): Use CallStaticBooleanMethod.
* * vm/reference/gnu/java/nio/VMChannel.java (isThreadInterrupted):Mark Wielaard2006-12-041-12/+62
| | | | | | | | | | Make static. * native/jni/java-nio/gnu_java_nio_VMChannel.c (JCL_thread_interrupted): Only take JNIEnv. (vm_channel_class): New static variable. (initID): Set vm_channel_class. Wrap all reads() and writes() in do-while blocks that check interrupted status.
* Fix for bug #29133.Dalibor Topic2006-11-261-3/+9
| | | | | | | | | | | | | 2006-11-26 Dalibor Topic <robilad@kaffe.org> Fixes bug #29133. * libraries/clib/nio/gnu_java_nio_VMSelector.c (Java_gnu_java_nio_VMSelector_select): Use strerror if strerror_r is not available. Reported by: Michael Franz <mvfranz <at> gmail.com>, Riccardo Mottola <zuse <at> libero.it>
* 2006-11-09 Robert Schuster <robertschuster@fsfe.org>Robert Schuster2006-11-091-1/+1
| | | | | * native/jni/java-nio/gnu_java_nio_VMChannel.c: (getpeername): Added 16 byte offset to memcpy operation.
* 2006-11-09 Robert Schuster <robertschuster@fsfe.org>Robert Schuster2006-11-091-1/+1
| | | | | * native/jni/java-nio/gnu_java_nio_VMChannel.c: (getsockname): Added 16 byte offset to memcpy operation.
* * include/gnu_java_net_VMPlainDatagramSocketImpl.h: Removed.Mark Wielaard2006-11-062-774/+0
| | | | | | | | | | * include/gnu_java_nio_channels_FileChannelImpl.h: Removed. * native/jni/java-net/gnu_java_net_VMPlainDatagramSocketImpl.c: Removed. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c: Removed. * native/jni/java-nio/Makefile.am (libjavanio_la_SOURCES): Remove gnu_java_nio_channels_FileChannelImpl.c.
* Lots of changes.Robert Schuster2006-10-251-28/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 2006-10-25 Robert Schuster <robertschuster@fsfe.org> * gnu/java/net/PlainDatagramSocketImpl.java: (connect): Use VMChannel instance for connect call. (getTimeToLive): Call VMPlainSocketImpl.getTimeToLive. (setTimeToLive): Call VMPlainSocketImpl.setTimeToLive. (setOption): Handle multicast options. (getOption): Handle multicast options. * gnu/java/net/PlainSocketImpl.java: (getTimeToLive): Call VMPlainSocketImpl.getTimeToLive. (setTimeToLive): Call VMPlainSocketImpl.setTimeToLive. (setOption): Filter unappropriate options. (getOption): Filter unappropriate options. (connect): Use given SocketAddress. (close): Reset address and port. (getInetAddress): * include/Makefile.am: Removed all occurences of gnu_java_net_VMPlainDatagramSocketImpl.h. * include/gnu_java_net_VMPlainDatagramSocketImpl.h: Removed. * native/jni/java-net/Makefile.am: Removed gnu_java_net_VMPlainDatagramSocketImpl.c from sources. * native/jni/java-net/gnu_java_net_VMPlainDatagramSocketImpl.c: Removed. as SocketException, declare to throw SocketException. * native/jni/java-nio/gnu_java_nio_VMChannel.c: Added definitions for SocketException and ConnectException. (Java_gnu_java_nio_VMChannel_connect): Throw SocketException instead of IOException. (Java_gnu_java_nio_VMChannel_connect6): Throw SocketException instead of IOException. (Java_gnu_java_nio_VMChannel_accept): Rewritten. (JCL_thread_interrupted): New function. (initIDs): Added initialisation for isThreadInterrupted method id. * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c: Added CPNET_IP_TTL to java_sockopt enum. (Java_gnu_java_net_VMPlainSocketImpl_setOption): Handle CPNET_IP_TTL case, handle SO_LINGER case properly. (Java_gnu_java_net_VMPlainSocketImpl_getOption): Handle CPNET_IP_TTL case, handle SO_LINGER case properly. (Java_gnu_java_net_VMPlainSocketImpl_getMulticastInterface): New function. (Java_gnu_java_net_VMPlainSocketImpl_setMulticastInterface): New function. (Java_gnu_java_net_VMPlainSocketImpl_setMulticastInterface6): New function. (Java_gnu_java_net_VMPlainSocketImpl_leave6): Fixed constant to be IPV6_LEAVE_GROUP. * vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java: Removed. * vm/reference/gnu/java/nio/VMChannel.java: (connect(int, byte[], int, int)): Declare to throw SocketException. (connect6): Declare to throw SocketException. (connect(InetSocketAddress, int)): Catch IOException and rethrow (isThreadInterrupted): New method. * vm/reference/gnu/java/net/VMPlainSocketImpl.java: Added CP_IP_TTL field. (setTimeToLive): New method. (getTimeToLive): New method. (setMulticastInterface(int, InetAddress)): New method. (setMulticastInterface(int, int, Inet4Address): New method. (setMulticastInterface6(int, int, Inet6Address): New method. (setOptions): Handle SO_LINGER case. (getOptions): Add missing SO_REUSEADDR case. * java/net/Socket.java: (Socket(InetAddress, int, InetAddress, int, boolean)): Close socket when exception was thrown out of connect(). (setSoLinger): Replaced instantiations with valueOf calls, replaced Boolean.FALSE with Integer.valueOf(-1). * native/jni/native-lib/cpio.h: Added cpio_closeOnExec declaration. * native/jni/native-lib/cpio.c: Added cpio_closeOnExec implementation. * NEWS: Documented VM interface changes.
* 2006-10-22 Christian Thalinger <twisti@complang.tuwien.ac.at>Christian Thalinger2006-10-221-0/+2
| | | | | | | * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c (config-int.h): Added include. * native/jni/java-nio/gnu_java_nio_VMChannel.c (config-int.h): Likewise.
* 2006-10-11 Edwin Steiner <edwin.steiner@gmx.net>Tom Tromey2006-10-111-1/+5
| | | | | * native/jni/java-nio/gnu_java_nio_VMChannel.c (Java_gnu_java_nio_VMChannel_lock): Special case Long.MAX_VALUE.
* 2006-10-04 Christian Thalinger <twisti@complang.tuwien.ac.at>Christian Thalinger2006-10-042-12/+12
| | | | | | | | | | * native/jni/java-nio/javanio.c (cpnio_read, cpnio_readv) (cpnio_write, cpnio_writev, cpnio_socket, cpnio_connect) (cpnio_accept, cpnio_sendto, cpnio_recvfrom, cpnio_fcntl) (cpnio_select): Use CPNIO_EXPORT. * native/jni/java-nio/javanio.h (CPNIO_EXPORT): Define to static inline instead of extern inline, as newer GCCs changed their behavior.
* 2006-09-27 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-271-30/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gnu/java/nio/KqueueSelectionKeyImpl.java: extend AbstractSelectionKey. (nstate, valid, readEverEnabled, writeEverEnabled): removed. (activeOps, fd): new fields. (cancel): removed. (interestOps): just call `selector.setInterestOps.' (isValid): removed. (toString): include native fd in output. (hashCode, equals, isReadActive, isReadInterested, isWriteActive, isWriteInterested, needCommitRead, needCommitWrite): new methods. * gnu/java/nio/KqueueSelectorImpl.java (MAX_DOUBLING_CAPACITY, CAP_INCREMENT, INITIAL_CAPACITY): new constants. (cancelled): removed. (events): new field. (OP_ACCEPT, OP_CONNECT, OP_READ, OP_WRITE): new constants. (toString, equals): new methods. (doSelect): get cancelled keys from superclass; fix synchronization; initialize events that need to be added/deleted only when selecting; ignore keys attached to closed channels. (register): fix key initialization; synchronize adding keys. (setInterestOps): new method. (updateOps, updateOps): removed. (reallocateBuffer): new method. (doCancel): removed. (kevent_set): add index, active ops parameters; remove delete parameter. (kevent): add output space size parameter. * include/gnu_java_nio_KqueueSelectorImpl.h: regenerated. * native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c (Java_gnu_java_nio_KqueueSelectorImpl_kevent_1set): only fill in one filter, at the given index. (Java_gnu_java_nio_KqueueSelectorImpl_kevent): separate incoming event count and outgoing event count.
* 2006-09-22 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-231-8/+15
| | | | | | | | | | | * gnu/java/nio/EpollSelectorImpl.java (doSelect): remove keys after we delete them. (selectedKeys): return an empty set if nothing's been selected. * native/jni/java-nio/gnu_java_nio_EpollSelectorImpl.c (Java_gnu_java_nio_EpollSelectorImpl_epoll_1delete): don't throw an exception on EBADF. (Java_gnu_java_nio_EpollSelectorImpl_epoll_1wait): don't throw exception on EINTR, just return 0.
* 2006-09-20 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-201-0/+2
| | | | | * native/jni/java-nio/gnu_java_nio_EpollSelectorImpl.c (Java_gnu_java_nio_EpollSelectorImpl_epoll_1delete): ignore ENOENT.
* 2006-09-20 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-202-0/+406
| | | | | | | | | | | | | | | | * configure.ac (AC_CHECK_HEADERS): check for `sys/epoll.h.' (AC_CHECK_FUNCS): check for `epoll_create.' * gnu/java/nio/EpollSelectionKeyImpl.java: new file. * gnu/java/nio/EpollSelectorImpl.java: new file. * gnu/java/nio/SelectorProviderImpl.java (epoll_failed): new class field. (openSelector): return epoll selector if requested and available. * include/Makefile.am (H_FILES): add gnu_java_nio_EpollSelectorImpl.h. (gnu_java_nio_EpollSelectorImpl.h): new target. * include/gnu_java_nio_EpollSelectorImpl.h: new file. * native/jni/java-nio/Makefile.am (libjavanio_la_SOURCES): add gnu_java_nio_EpollSelectorImpl.c. * native/jni/java-nio/gnu_java_nio_EpollSelectorImpl.c: new file.
* * native/jni/java-nio/Makefile.am (libjavanio_la_SOURCES):Mark Wielaard2006-09-201-1/+6
| | | | | Add gnu_java_nio_channels_FileChannelImpl.c and javanio.h. (EXTRA_DIST): Include javanio.c.
* * native/jni/java-nio/javanio.c (cpnio_fcntl): Last argument is long.Mark Wielaard2006-09-173-4/+4
| | | | | | | * native/jni/java-nio/javanio.h (cpnio_fcntl): Likewise. * native/jni/java-nio/gnu_java_nio_VMChannel.c (Java_gnu_java_nio_VMChannel_lock): Likewise. (Java_gnu_java_nio_VMChannel_unlock): Likewise.
* 2006-09-16 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-176-46/+2159
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * NEWS: updated. * configure.ac (AC_CHECK_HEADERS): check for `sys/event.h'. (AC_CHECK_FUNCS): add checks for readv, writev, getifaddrs, kqueue, and kevent. (HAVE_INET6): define if IPv6 is supported. * gnu/java/net/PlainDatagramSocketImpl.java (channel): new field. (native_fd): removed. (impl): new field. (<init>): throw IOException; initialize fields. (finalize): removed. (getNativeFD): removed. (bind): use `PlainSocketImpl.bind.' (create): use `PlainSocketImpl.initSocket.' (disconnect): use `PlainSocketImpl.disconnect.' (getLocalPort): new method. (send): use `VMChannel.send.' (receive): use `VMChannel.receive.' (setOption): use `PlainSocketImpl.setOption.' (getOption): use `PlainSocketImpl.getOption.' (close): use `VMChannel.State.close.' (join): use `PlainSocketImpl.join.' (leave): use `PlainSocketImpl.leave.' (joinGroup, leaveGroup): implemented. * gnu/java/net/PlainSocketImpl.java: make non-final. (native_fd): removed. (impl): new field. (channel): new field. (<init>): initialize `impl.' (finalize, getNativeFD): removed. (setOption): use `PlainSocketImpl.setOption.' (getOption): use `PlainSocketImpl.getOption.' (shutdownInput): use `PlainSocketImpl.shutdownInput.' (shutdownOutput): use `PlainSocketImpl.shutdownOutput.' (create): create `channel,' initialize `impl's native state. (connect): use `connect(SocketAddress, int).' (connect): use `SocketChannelImpl.connect;' initialize `address' and `port.' (bind): use `VMPlainSocketImpl.bind.' (listen): use `VMPlainSocketImpl.listen.' (accept): use `SocketChannelImpl.accept.' (available): use `VMChannel.available.' (close): use `PlainSocketImpl.close.' (sendUrgentData): use `PlainSocketImpl.sendUrgentData.' (getVMChannel, getInetAddress, getLocalPort, getLocalAddress, getPort): new methods. (SocketInputStream.read): use `VMChannel.read.' (SocketInputStream.read): use `SocketChannel.read.' (SocketOutputStream.write): use `VMChannel.write.' (SocketOutputStream.write): use `SocketChannel.write.' * gnu/java/nio/DatagramChannelImpl.java: implement VMChannel. (channel): new field. (<init>): initialize `channel.' (implCloseSelectableChannel): use `VMChannel.close.' (implConfigureBlocking): use `VMChannel.setBlocking.' (connect): use `VMChannel.connect.' (disconnect): use `VMChannel.disconnect.' (isConnected): use `VMChannel.getPeerAddress.' (write): use `VMChannel.write.' (write): use `VMChannel.writeGathering.' (read): use `VMChannel.read.' (read): use `VMChannel.readScattering.' (receive): use `VMChannel.receive.' (send): use `VMChannel.send.' (getVMChannel): new method. * gnu/java/nio/DatagramChannelSelectionKey.java (getNativeFD): access native FD through VMChannel.State. * gnu/java/nio/FileChannelImpl.java: moved from gnu/java/nio/channels/FileChannelImpl.java. * gnu/java/nio/FileLockImpl.java: fix imports. * gnu/java/nio/KqueueSelectionKeyImpl.java: new file. * gnu/java/nio/KqueueSelectorImpl.java: new file. * gnu/java/nio/NIOSocket.java (impl): removed. (channel): new field. (<init>): init superclass with a `NIOSocketImpl;' init `channel.' (getPlainSocketImpl, setChannel): removed. (isConnected): new method. * gnu/java/nio/NIOSocketImpl.java: new file. * gnu/java/nio/PipeImpl.java (SourceChannelImpl): implement `VMChannelOwner.' (SourceChannelImpl.native_fd): removed. (SourceChannelImpl.<init>): init with a `VMChannel.' (SourceChannelImpl.getNativeFD): removed. (SourceChannelImpl.getVMChannel): new method. (SourceChannelImpl.implCloseSelectableChannel): implement. (SinkChannelImpl): implement `VMChannelOwner.' (SinkChannelImpl.native_fd): removed. (SinkChannelImpl.<init>): init with a `VMChannel.' (SinkChannelImpl.implCloseSelectableChannel): implement. (SinkChannelImpl.getNativeFD): removed. (SinkChannelImpl.getVMChannel): new method. * gnu/java/nio/SelectionKeyImpl.java (getNativeFD): mark deprecated. * gnu/java/nio/SelectorProviderImpl.java (SELECTOR_IMPL_KQUEUE, SELECTOR_IMPL_EPOLL, SELECTOR_IMPL): new constants. (openSelector): return kqueue selector if available. * gnu/java/nio/ServerSocketChannelImpl.java: implement `VMChannelOwner.' (channel): new field. (<init>): init `channel.' (finalizer): check if the `VMChannel.State' is valid. (implCloseSelectableChannel): use `VMChannel.close.' (implConfigureBlocking): use `VMChannel.setBlocking.' (accept): use `VMChannel.accept.' (getVMChannel): new method. * gnu/java/nio/ServerSocketChannelSelectionKey.java (getNativeFD): access native FD through `VMChannel.State.' * gnu/java/nio/SocketChannelImpl.java: implement `VMChannelOwner.' (impl): removed. (channel, connected, connectAddress): new field. (<init>): new constructors. (getPlainSocketImpl): removed. (implCloseSelectableChannel): use `VMChannel.close.' (implConfigureBlocking): use `VMChannel.setBlocking.' (connect): use `connect(SocketAddress,int).' (connect): use `VMChannel.connect.' (finishConnect): don't use a selector. (isConnected): use `VMChannel.getPeerAddress.' (read): use `VMChannel.read.' (read): use `VMChannel.readScattering.' (write): use `VMChannel.write.' (write): use `VMChannel.writeGathering.' (getVMChannel): new method. * gnu/java/nio/SocketChannelSelectionKey.java (getNativeFD): get native FD from `VMChannel.State.' * gnu/java/nio/SocketChannelSelectionKeyImpl.java (getNativeFD): get native FD from `VMChannel.State.' * gnu/java/nio/VMChannelOwner.java: new file. * gnu/java/nio/channels/FileChannelImpl.java: removed. * include/Makefile.am: generate `gnu_java_nio_FileChannelImpl.h' and `gnu_java_nio_KqueueSelectorImpl.h;' don't generate `gnu_java_nio_channels_FileChannelImpl.h.' * include/gnu_java_net_VMPlainSocketImpl.h: regenerated. * include/gnu_java_nio_FileChannelImpl.h: new file. * include/gnu_java_nio_KqueueSelectorImpl.h: new file. * include/gnu_java_nio_VMChannel.h: regenerated. * include/gnu_java_nio_VMPipe.h: regenerated. * include/java_net_VMNetworkInterface.h: regenerated. * java/io/FileDescriptor.java: fix imports. * java/io/FileInputStream.java (<init>): handle exceptions. (read): wrap the destination arary. * java/io/FileOutputStream.java (<init>): handle exceptions. (write): wrap the source array. * java/io/RandomAccessFile.java (<init>): handle exceptions. * java/net/DatagramSocket.java (<init>): handle exceptions. (receive): handle length/port setting. (connect): bind to any address/port if the argument is null. * java/net/NetworkInterface.java (name, inetAddress): removed. (netif): new field. (<init>): make private. (getName): return `netif.name.' (getInetAddresses): access `netif.addresses.' (getDisplayName): return `netif.name.' (getByName, getByAddress): handle changes to `VMNetworkInterface.' (condense): removed. (getNetworkInterfaces): handle changes to `VMNetworkInterface.' (equals): compare `netif' fields. (hashCode): get hash codes from `netif.' (toString): use a StringBuffer. * java/net/ServerSocket.java (close): don't set `impl' to null. (isClosed): use `VMChannel.State.isClosed.' * java/net/Socket.java (getLocalAddress): don't use `getOption' if the `SocketImpl' is a `PlainSocketImpl.' (close): just close the `impl.' (toString): use `super.toString' in the value we return. (isConnected): just access `impl,' not `getImpl.' (isBound): use `PlainSocketImpl' methods if we can. (isClosed): look at `VMChannel.State.' * native/jni/classpath/jcl.c (JNI_OnLoad): new function. (JCL_NewRawDataObject): don't initialize cached fields here; throw an exception if they were not. (JCL_GetRawData): throw an exception if cached fields weren't created. * native/jni/java-lang/java_lang_VMProcess.c: handle FileChannelImpl move. * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c (IO_EXCEPTION, SOCKET_EXCEPTION, BIND_EXCEPTION, THROW_NO_NETWORK): new macros. (Java_gnu_java_net_VMPlainSocketImpl_bind): reipmlemented. (Java_gnu_java_net_VMPlainSocketImpl_bind6): new function. (Java_gnu_java_net_VMPlainSocketImpl_listen): reimplemented. (java_sockopt): new enum. (Java_gnu_java_net_VMPlainSocketImpl_setOption): reimplemented. (Java_gnu_java_net_VMPlainSocketImpl_getOption): reimplemented. (Java_gnu_java_net_VMPlainSocketImpl_shutdownInput): reimplemented. (Java_gnu_java_net_VMPlainSocketImpl_shutdownOutput): reimplemented. (Java_gnu_java_net_VMPlainSocketImpl_sendUrgentData): new function. (Java_gnu_java_net_VMPlainSocketImpl_join): new function. (Java_gnu_java_net_VMPlainSocketImpl_join6): new function. (Java_gnu_java_net_VMPlainSocketImpl_read): removed. (Java_gnu_java_net_VMPlainSocketImpl_leave): new function. (Java_gnu_java_net_VMPlainSocketImpl_leave6): new function. (Java_gnu_java_net_VMPlainSocketImpl_joinGroup): new function. (Java_gnu_java_net_VMPlainSocketImpl_write): removed. (Java_gnu_java_net_VMPlainSocketImpl_joinGroup6): new function. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup): new function. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup6): new function. (getif_address): new function. (getif_index): new function. * native/jni/java-net/java_net_VMNetworkInterface.c (java_net_VMNetworkInterface_init, java_net_VMNetworkInterface_addAddress): new file-scope globals. (Java_java_net_VMNetworkInterface_initIds): new function. (struct netif_entry): new struct. (free_netif_list): new function. (Java_java_net_VMNetworkInterface_getInterfaces): removed. (Java_java_net_VMNetworkInterface_getVMInterfaces): new function. * native/jni/java-nio/Makefile.am (libjavanio_la_SOURCES): remove gnu_java_nio_channels_FileChannelImpl.c, add gnu_java_nio_KqueueSelectorImpl.c. * native/jni/java-nio/gnu_java_nio_KqueueSelectorImpl.c: new file. * native/jni/java-nio/gnu_java_nio_VMChannel.c (INTERRUPTED_IO_EXCEPTION, SOCKET_TIMEOUT_EXCEPTION, ALIGN_UP, ALIGN_DOWN): new macros. (JCL_init_buffer): get the address through GetDirectBufferAddress if possible. (Java_gnu_java_nio_VMChannel_stdin_1fd, Java_gnu_java_nio_VMChannel_stdout_1fd, Java_gnu_java_nio_VMChannel_stderr_1fd): new functions. (Java_gnu_java_nio_VMChannel_setBlocking): fix setting blocking value. (Java_gnu_java_nio_VMChannel_read): renamed... (Java_gnu_java_nio_VMChannel_read__ILjava_nio_ByteBuffer_2): to this; handle interrupted IO; add HAVE_READ check. (Java_gnu_java_nio_VMChannel_write): renamed... (Java_gnu_java_nio_VMChannel_write__ILjava_nio_ByteBuffer_2): to this; handle zero-length write; add HAVE_WRITE check. (Java_gnu_java_nio_VMChannel_receive): new function. (Java_gnu_java_nio_VMChannel_send): new function. (Java_gnu_java_nio_VMChannel_send6): new function. (Java_gnu_java_nio_VMChannel_read__I): new function. (Java_gnu_java_nio_VMChannel_write__II): new function. (Java_gnu_java_nio_VMChannel_socket): new function. (Java_gnu_java_nio_VMChannel_connect): new function. (Java_gnu_java_nio_VMChannel_connect6): new function. (Java_gnu_java_nio_VMChannel_getsockname): new function. (Java_gnu_java_nio_VMChannel_getpeername): new function. (Java_gnu_java_nio_VMChannel_accept): new function. (Java_gnu_java_nio_VMChannel_disconnect): new function. (Java_gnu_java_nio_VMChannel_close): new function. (Java_gnu_java_nio_VMChannel_available): new function. (FileChannel_mode): new enum. (Java_gnu_java_nio_VMChannel_open): new function. (Java_gnu_java_nio_VMChannel_position): new function. (Java_gnu_java_nio_VMChannel_seek): new function. (Java_gnu_java_nio_VMChannel_truncate): new funciton. (Java_gnu_java_nio_VMChannel_lock): new function. (Java_gnu_java_nio_VMChannel_unlock): new function. (Java_gnu_java_nio_VMChannel_size): new function. (Java_gnu_java_nio_VMChannel_map): new function. (Java_gnu_java_nio_VMChannel_flush): new function. * native/jni/java-nio/gnu_java_nio_VMPipe.c (Java_gnu_java_nio_VMPipe_init): removed. (Java_gnu_java_nio_VMPipe_pipe0): new function. * native/jni/java-nio/javanio.c: new file. * native/jni/java-nio/javanio.h: new file. * native/jni/native-lib/cpnet.c (cpnet_getHostByName): fix for systems without `gethostbyname_r.' * vm/reference/gnu/java/net/VMPlainSocketImpl.java (nfd): new field. (<init>, <init>): new constructors. (setOption, getOption): make instance methods; defer to native implementation. (connect): removed. (bind): make an instance method; defer to native methods. (accept): removed. (available): removed. (listen): make an instance method; defer to native method. (read): removed. (join, leave): new methods. (write): removed. (joinGroup, leaveGroup): new methods. (shutdownInput, shutdownOutput): make instance methods. (sendUrgentData): removed. (State): new class. * vm/reference/gnu/java/nio/VMChannel.java: make final. (fd): removed. (nfd): new field. (<init>): new, public constructors. (getVMChannel): methods removed. (getState, getStdin, getStdout, getStderr, stdin_fd, stdout_fd, stderr_fd): new methods. (setBlocking): make an instance method. (available): new method. (read): get native fd from `nfd.' (read): new single-byte read method. (readScattering): get native fd from `nfd.' (receive): new method. (write, writeGathering): get native fd from `nfd.' (send): new method. (write): new single-byte write method. (initSocket): new method. (connect): new method. (disconnect): new method. (getLocalAddress): new method. (getPeerAddress): new method. (accept): new method. (openFile): new method. (position): new method. (seek): new method. (truncate): new method. (lock): new method. (unlock): new method. (size): new method. (map): new method. (flush): new method. (close): new method. (State): new class. (Kind): new class. * vm/reference/gnu/java/nio/VMPipe.java (init): removed. (pipe, pipe0): new method. * vm/reference/java/net/VMNetworkInterface.java (name, addresses): new fields. (<clinit>): call `initIds.' (initIds): new method. (getInterfaces): removed. (getVMInterfaces): new method. (addAddress): new method. * vm/reference/java/nio/channels/VMChannels.java: fix imports.
* 2006-09-05 Andreas Tobler <a.tobler@schweiz.ch>Andreas Tobler2006-09-051-3/+2
| | | | | | | | * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GtkVolatileImage.c: Adjust __attribute to __attribute__. * native/jni/java-nio/java_nio_MappedByteBufferImpl.c: Remove duplicate header include.
* Merge NATIVE_LAYER branch.Mark Wielaard2006-08-212-213/+85
|
* 2006-08-06 C. Scott Marshall <csm@gnu.org>Casey Marshall2006-08-061-0/+2
| | | | | | | | | Fixes PR 28608. * java/nio/DirectByteBufferImpl.java (duplicate): only reset if the mark has been set. * native/jni/java-nio/java_nio_VMDirectByteBuffer.c (Java_java_nio_VMDirectByteBuffer_allocate): zero out the allocated data.
* 2006-05-20 Andrew John Hughes <gnu_andrew@member.fsf.org>generics-merge-20060520Andrew John Hughes2006-05-201-1/+1
| | | | | | * native/jni/java-nio/gnu_java_nio_VMChannel.c: (JCL_print_buffer): Fix to work with -Werror on 64-bit platforms.
* 2006-05-13 Casey Marshall <csm@gnu.org>Casey Marshall2006-05-142-0/+526
| | | | | | | | | | | | | | | | | Patch by Michael Barker <mike@middlesoft.co.uk>. * gnu/java/nio/PipeImpl.java: Retrofitted to use VMChannel. * gnu/java/nio/SelectorImpl.java (register): Added condition for gnu.java.nio.SocketChannelSelectionKeyImpl. * gnu/java/nio/SocketChannelSelectionKeyImpl.java: new file. * gnu/java/nio/channels/FileChannelImpl.java: retrofitted to use VMChannel. * include/gnu_java_nio_VMChannel.h: new file. * java/nio/FileChannel.java (read,write): changed to call abstract method. * native/jni/java-nio/gnu_java_nio_VMChannel.c: new file. * native/jni/java-nio/Makefile.am (libjavanio_SOURCES): add `gnu_java_nio_VMChannel.c.' * vm/reference/gnu/java/nio/VMChannel.java: new file.
* PR classpath/26623:Tom Tromey2006-03-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | * native/jni/qt-peer/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * native/jni/midi-alsa/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * native/jni/java-net/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * native/jni/java-lang/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * native/jni/xmlj/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * native/jni/gtk-peer/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * native/jni/midi-dssi/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * native/jni/java-io/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * native/jni/java-nio/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * native/jni/java-util/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * native/jawt/Makefile.am (nativeexeclib_LTLIBRARIES): Renamed. * configure.ac (nativeexeclibdir): Renamed from nativelibdir.
* 2006-01-25 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-256-269/+109
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * configure.ac * native/Makefile.am * native/jni/classpath/Makefile.am * native/jni/classpath/jcl.c * native/jni/classpath/jcl.h * native/jni/classpath/native_state.c * native/jni/gtk-peer/Makefile.am * native/jni/java-io/Makefile.am * native/jni/java-io/java_io_VMFile.c * native/jni/java-io/java_io_VMObjectStreamClass.c * native/jni/java-lang/Makefile.am * native/jni/java-net/Makefile.am * native/jni/java-net/java_net_VMInetAddress.c * native/jni/java-net/javanet.c * native/jni/java-net/javanet.h * native/jni/java-nio/Makefile.am * native/jni/java-nio/gnu_java_nio_VMPipe.c * native/jni/java-nio/gnu_java_nio_VMSelector.c * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c * native/jni/java-nio/java_nio_MappedByteBufferImpl.c * native/jni/java-nio/java_nio_VMDirectByteBuffer.c * native/jni/java-util/Makefile.am * native/jni/java-util/java_util_VMTimeZone.c * native/jni/midi-dssi/Makefile.am * native/jni/xmlj/Makefile.am * native/target/Makefile.am * native/target/Linux/target_native_math.h * native/target/Linux/target_native_memory.h * native/target/Linux/Makefile.am * native/target/Linux/target_native_io.h * native/target/Linux/target_native_math_float.h * native/target/Linux/target_native_math_int.h * native/target/generic/target_generic.c * native/target/generic/target_generic_io.c * native/target/generic/target_generic_math.h * native/target/generic/target_generic_memory.h * native/target/generic/target_generic_misc.c * native/target/generic/target_generic_network.c * native/target/generic/Makefile.am * native/target/generic/target_generic.h * native/target/generic/target_generic_file.h * native/target/generic/target_generic_io.h * native/target/generic/target_generic_math_float.h * native/target/generic/target_generic_math_int.h * native/target/generic/target_generic_misc.h * native/target/generic/target_generic_network.h: Reverted target native related changes back to the state of the 0.20 release. * native/target/MinGW/.cvsignore * native/target/MinGW/Makefile.am * native/target/MinGW/target_native.h * native/target/MinGW/target_native_file.h * native/target/MinGW/target_native_io.h * native/target/MinGW/target_native_math.h * native/target/MinGW/target_native_memory.h * native/target/MinGW/target_native_misc.h * native/target/MinGW/target_native_network.h * native/target/RTEMS/.cvsignore * native/target/RTEMS/Makefile.am * native/target/RTEMS/target_native.h * native/target/RTEMS/target_native_file.h * native/target/RTEMS/target_native_io.h * native/target/RTEMS/target_native_math.h * native/target/RTEMS/target_native_memory.h * native/target/RTEMS/target_native_misc.h * native/target/RTEMS/target_native_network.h * native/target/SunOS/.cvsignore * native/target/SunOS/Makefile.am * native/target/SunOS/target_native.h * native/target/SunOS/target_native_file.h * native/target/SunOS/target_native_io.h * native/target/SunOS/target_native_math.h * native/target/SunOS/target_native_memory.h * native/target/SunOS/target_native_misc.h * native/target/SunOS/target_native_network.h * native/target/embOS/.cvsignore * native/target/embOS/Makefile.am * native/target/embOS/target_native.h * native/target/embOS/target_native_file.h * native/target/embOS/target_native_io.c * native/target/embOS/target_native_io.h * native/target/embOS/target_native_math.h * native/target/embOS/target_native_memory.h * native/target/embOS/target_native_misc.h * native/target/embOS/target_native_network.h * native/target/posix/.cvsignore * native/target/posix/Makefile.am * native/target/posix/target_posix.c * native/target/posix/target_posix.h * native/target/posix/target_posix_file.c * native/target/posix/target_posix_file.h * native/target/posix/target_posix_io.c * native/target/posix/target_posix_io.h * native/target/posix/target_posix_math.c * native/target/posix/target_posix_math.h * native/target/posix/target_posix_memory.c * native/target/posix/target_posix_memory.h * native/target/posix/target_posix_misc.c * native/target/posix/target_posix_misc.h * native/target/posix/target_posix_network.c * native/target/posix/target_posix_network.h: Removed.
* 2006-01-18 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-184-31/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * native/jni/java-nio/gnu_java_nio_VMPipe.c: Removed unnecessary include. * native/jni/java-nio/gnu_java_nio_VMSelector.c: Reorganized includes to only include sys/* headers when available. * native/jni/java-nio/java_nio_MappedByteBufferImpl.c: (get_pagesize): Return 0 when nothing else works. (Java_java_nio_MappedByteBufferImpl_unmapImpl): Replaced munmap() and strerror() with corresponding target macros. (Java_java_nio_MappedByteBufferImpl_isLoadedImpl): Replaced strerror() with corresponding target macro. (Java_java_nio_MappedByteBufferImpl_forceImpl): Replaced strerror() with corresponding target macro. * native/jni/java-nio/java_nio_VMDirectByteBuffer.c: (Java_java_nio_VMDirectByteBuffer_allocate): Replaced malloc() with the corresponding target macro. (Java_java_nio_VMDirectByteBuffer_free): Replaced free() with the corresponding target macro. (Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_Pointer_2IB): Add index to pointer when assigning the value. (Java_java_nio_VMDirectByteBuffer_get__Lgnu_classpath_Pointer_2I_3BII): Replaced memcpy with corresponding target macro. Add index when doing the memcpy, not when fetching the pointer. (Java_java_nio_VMDirectByteBuffer_put__Lgnu_classpath_Pointer_2I_3BII): Replaced memcpy with corresponding target macro. (Java_java_nio_VMDirectByteBuffer_shiftDown): Replaced memmove with the corresponding target macro.
* 2006-01-17 Christian Thalinger <twisti@complang.tuwien.ac.at>Christian Thalinger2006-01-171-10/+13
| | | | | | | | | | | | | * configure.ac: Set TARGET. * native/Makefile.am, native/jni/classpath/Makefile.am, native/jni/gtk-peer/Makefile.am, native/jni/java-io/Makefile.am, native/jni/java-lang/Makefile.am, native/jni/java-net/Makefile.am, native/jni/java-nio/Makefile.am, native/jni/midi-dssi/Makefile.am, native/jni/xmlj/Makefile.am, native/target/Makefile.am, native/target/Linux/Makefile.am, native/target/generic/Makefile.am, native/target/posix/Makefile.am: Build libclasspath.so with jcl and target stuff linked in and link it against lib*.so libraries.
* 2006-01-17 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-171-66/+219
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c: (Java_gnu_java_nio_channels_FileChannelImpl_init): Improved exception messages a little. (Java_gnu_java_nio_channels_FileChannelImpl_open): Provided alternative implementation for systems without filesystems. Replaced snprintf with the corresponding target native macro. (Java_gnu_java_nio_channels_FileChannelImpl_implCloseChannel): Only do something when we have a filesystem. (Java_gnu_java_nio_channels_FileChannelImpl_available): Provided alternative implementation for systems without filesystems. (Java_gnu_java_nio_channels_FileChannelImpl_size): Provided alternative implementation for systems without filesystems. (Java_gnu_java_nio_channels_FileChannelImpl_implPosition): Provided alternative implementation for systems without filesystems. (Java_gnu_java_nio_channels_FileChannelImpl_seek): Only do something when we have a filesystem. (Java_gnu_java_nio_channels_FileChannelImpl_implTruncate): Only do something when we have a filesystem. (Java_gnu_java_nio_channels_FileChannelImpl_mapImpl): Provided alternative implementation for systems without filesystems. (Java_gnu_java_nio_channels_FileChannelImpl_read__): Replaced ssize_t variables with jint. Provided alternative implementation for systems without filesystems. (Java_gnu_java_nio_channels_FileChannelImpl_read___3BII): Replaced ssize_t variables with jint. Provided alternative implementation for systems without filesystems. (Java_gnu_java_nio_channels_FileChannelImpl_write__I): Replaced ssize_t variables with jint. Provided alternative implementation for systems without filesystems. (Java_gnu_java_nio_channels_FileChannelImpl_force): Only do something when we have a filesystem. (Java_gnu_java_nio_channels_FileChannelImpl_write___3BII): Replaced ssize_t variables with jint. Provided alternative implementation for systems without filesystems. (Java_gnu_java_nio_channels_FileChannelImpl_lock): Reimplemented to use the corresponding target native macro. (Java_gnu_java_nio_channels_FileChannelImpl_unlock): Reimplemented to use the corresponding target native macro.
* 2006-01-17 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * native/jni/classpath/jcl.c: Added missing imports. (JCL_realloc): Fixed signature to include oldsize. This is needed for some targets. Make this function use the MEMORY_REALLOC macro for portability. * native/jni/classpath/jcl.h (JCL_realloc): Adjusted signature. * native/jni/java-io/java_io_VMFile.c: (Java_java_io_VMFile_create): Use target layer macro for handling errno, for portability. (Java_java_io_VMFile_length): Release filename string in error cases before returning. (Java_java_io_VMFile_list): Initialize filename variable. Use new version of JCL_realloc. * native/jni/java-net/java_net_VMInetAddress.c: (Java_java_net_VMInetAddress_getHostByName): Use renamed macro TARGET_NATIVE_NETWORK_GET_HOSTADDRESS_BY_NAME. * native/jni/java-net/javanet.c: (_javanet_bind): Make errorstr variable const to avoid compiler warning. (_javanet_set_option): Fixed typo. (_javanet_get_option): Fixed typo. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c: (Java_gnu_java_nio_channels_FileChannelImpl_open): Made error_string variable const to avoid compiler warning. * native/target/generic/target_generic_file.h: Replaced // comments with /* */ comments to avoid compiler warnings. Added some spaces to make code better readable. * native/target/generic/target_generic_memory.h: Replaced // comments with /* */ comments to avoid compiler warnings. * native/target/generic/target_generic_misc.c: Removed unused TARGET_NATIVE_MISC_FORMAT_STRING macro. This caused compiler warnings due to use of varargs. * native/target/generic/target_generic_misc.h: Removed unused TARGET_NATIVE_MISC_FORMAT_STRING macro. This caused compiler warnings due to use of varargs. * native/target/generic/target_generic_network.h: Replaced // comments with /* */ comments to avoid compiler warnings. (targetGenericNetwork_receive): Fixed signature to use signed chars for buffer parameter to avoid warning when passing a jbyte to the function.
* 2006-01-16 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | * native/target/generic/target_generic_math_float.h: Removed. This file has been replaced by target_generic_math.h. * native/target/generic/target_generic_math_int.h: Removed. This file has been replaced by target_generic_math.h. * native/target/generic/target_generic_math.h: New file. Replaces the old _int and _float versions. * native/target/Linux/target_native_math_float.h: Removed. This file has been replaced by target_native_math.h. * native/target/Linux/target_native_math_int.h: Removed. This file has been replaced by target_native_math.h. * native/target/Linux/target_native_math.h: New file. Replaces the old _int and _float versions. * native/target/Linux/Makefile.am: Adjusted for the changed filenames. * native/jni/java-io/java_io_VMFile.c: Include target_native_math.h instead of target_native_math_int.h. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c: Likewise. * native/target/generic/target_generic_file.h: Likewise.
* 2006-01-10 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-101-5/+5
| | | | | | | * native/jni/java-nio/java_nio_VMDirectByteBuffer.c (get): Release the array with the correct pointer. (put): Release the array with the correct pointer. Copy the array around _before_ releasing it.
* * gnu/java/nio/channels/FileChannelImpl.java (map): Throw correctMark Wielaard2006-01-091-4/+20
| | | | | | | exception when channel is not readable or writable. * native/jni/java-nio/gnu_java_nio_channels_FileChannelImpl.c (mapImpl): Add PROT_WRITE when mode == 'c' (MAP_PRIVATE). Make sure there is enough space to mmap().
* 2005-12-16 Roman Kennke <kennke@aicas.com>Roman Kennke2005-12-161-326/+0
| | | | | * native/jni/java-nio/java_nio.c Removed obsolete file.