summaryrefslogtreecommitdiff
path: root/native/jni/java-net
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>
* PR classpath/42823: Remove memory leaks in native code of ↵Andrew John Hughes2011-03-311-0/+2
| | | | | | | | | | | | | java.net.VMInetAddress. 2011-03-30 Gert Brettlecker <gert.brettlecker@ergon.ch> PR classpath/42823 * native/jni/java-net/java_net_VMInetAddress.c, (Java_VMInetAddress_getHostByAddr(JNIEnv*,jclass,jarray)): Free address structure after use. (Java_java_net_VMInetAddress_aton(JNIEnv*,jclass,jstring)): Release UTF string after use.
* 2008-08-12 Robert Schuster <robertschuster@fsfe.org>Robert Schuster2008-08-121-11/+2
| | | | | | * native/jni/java-net/local.c (local_bind): Removed fprintf call, fixed access outside of array bounds.
* 2008-07-07 Christian Thalinger <twisti@complang.tuwien.ac.at>Christian Thalinger2008-07-071-0/+6
| | | | | | | | | * configure.ac (AC_CHECK_HEADERS): Added sys/sockio.h, required for Solaris. (AC_CHECK_LIB): Check for socket. * native/jni/java-net/java_net_VMNetworkInterface.c (unistd.h): Added. [HAVE_SYS_SOCKIO_H] (sys/sockio.h): Likewise.
* 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.
* 2008-05-15 Robert Schuster <robertschuster@fsfe.org>Robert Schuster2008-05-151-1/+140
| | | | | | | | | | | | | | | | | | * java/net/NetworkInterface.java: (isUp): New method. (isPointToPoint): Dito. (isLoopback): Dito. (supportsMulticast): Dito. * vm/reference/java/net/VMNetworkInterface.java: (isUp): New method. (isPointToPoint): Dito. (isLoopback): Dito. (supportsMulticast): Dito. * native/jni/java-net/java_net_VMNetworkInterface.c: (isUp): New method. (isPointToPoint): Dito. (isLoopback): Dito. (supportsMulticast): Dito.
* 2008-01-09 Stefan Huehner <stefan@huehner.org>Andrew John Hughes2008-01-111-1/+1
| | | | | | | | * native/jni/java-io/java_io_VMObjectStreamClass.c, * native/jni/java-lang/java_lang_VMDouble.c, * native/jni/java-net/java_net_VMInetAddress.c: Don't discard const by casting (const char *) to (char *) when it's not needed.
* build fixes for arm-winceDalibor Topic2007-12-281-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-09-12 Robert Schuster <robertschuster@fsfe.org>Robert Schuster2007-09-121-1/+2
| | | | | * native/jni/java-net/gnu_java_net_local_LocalSocketImpl.c: Add #ifndef guard around definition of _GNU_SOURCE.
* 2007-06-25 Dalibor Topic <robilad@kaffe.org>Dalibor Topic2007-06-253-23/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c (THROW_NO_IPV6): New macro. (Java_gnu_java_net_VMPlainSocketImpl_bind6) Conditionally build code if IPv6 facilities are available, otherwise throw an error. (Java_gnu_java_net_VMPlainSocketImpl_setMulticastInterface6, Java_gnu_java_net_VMPlainSocketImpl_join6, Java_gnu_java_net_VMPlainSocketImpl_leave6, Java_gnu_java_net_VMPlainSocketImpl_joinGroup6, Java_gnu_java_net_VMPlainSocketImpl_leaveGroup6) Use THROW_NO_IPV6. * native/jni/java-net/java_net_VMInetAddress.c (Java_java_net_VMInetAddress_getHostByAddr, Java_java_net_VMInetAddress_getHostByName, Java_java_net_VMInetAddress_aton) Build IPv6 dependant code conditionally on IPv6 facilities being available. Switched if-else blocks where necessary to allow that. * native/jni/java-net/javanet.c (_javanet_get_ip_netaddr) Build IPv6 dependant code conditionally on IPv6 facilities being available. * native/jni/native-lib/cpnet.c (cpnet_getHostByName, cpnet_getHostByAddr) Build IPv6 dependant code conditionally on IPv6 facilities being available. (cpnet_aton) Moved variable declaration of inet6_addr to the scope of its use. Build IPv6 dependant code conditionally on IPv6 facilities being available. * native/jni/native-lib/cpnet.h (cpnet_newIPV6Address, cpnet_isIPV6Address, cpnet_IPV6AddressToBytes, cpnet_bytesToIPV6Address): Make IPv6 dependant utility functions available conditionally on IPv6 facilities being available.
* 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-05 Christian Thalinger <twisti@complang.tuwien.ac.at>Christian Thalinger2007-04-051-2/+5
| | | | | | | * native/jni/java-net/java_net_VMNetworkInterface.c [HAVE_IFADDRS_H && HAVE_GETIFADDRS] (free_netif_list): Added #ifdef. (getVMInterfaces): Added UNUSED argument attribute.
* 2006-11-26 Tom Tromey <tromey@redhat.com>Mark Wielaard2006-11-262-4/+8
| | | | | | | | | | | | * native/jni/java-net/java_net_VMNetworkInterface.c: Conditionally include ifaddrs.h. (Java_java_net_VMNetworkInterface_getVMInterfaces): Updated conditional. * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c: Conditionally include ifaddrs.h. (getif_address): Updated conditional. (getif_index): Likewise. * configure.ac: Check for ifaddrs.h.
* * include/gnu_java_net_VMPlainDatagramSocketImpl.h: Removed.Mark Wielaard2006-11-061-406/+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.
* 2006-10-25 Robert Schuster <robertschuster@fsfe.org>Robert Schuster2006-10-252-1/+2
| | | | | | | * native/jni/java-net/javanet.h: Added declaration for _javanet_create_inetaddress. * native/jni/java-net/javanet.c: (_javanet_create_inetaddress): Removed static keyword.
* Lots of changes.Robert Schuster2006-10-252-14/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-09 Robert Schuster <robertschuster@fsfe.org>Robert Schuster2006-10-091-8/+25
| | | | | | | | | | | * native/jni/java-net/gnu_java_net/VMPlainSocketImpl.c: (Java_gnu_java_net_VMPlainSocketImpl_joinGroup): Properly convert jstring into char *. (Java_gnu_java_net_VMPlainSocketImpl_joinGroup6): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup6): Dito. (getif_address): Added const modifier to second argument. (getif_index): Dito.
* Reversing the patch below:Robert Schuster2006-10-091-21/+4
| | | | | | | | | | | 2006-10-09 Robert Schuster <robertschuster@fsfe.org> * native/jni/java-net/gnu_java_net/VMPlainSocketImpl.c: (Java_gnu_java_net_VMPlainSocketImpl_joinGroup): Properly convert jstring into char *. (Java_gnu_java_net_VMPlainSocketImpl_joinGroup6): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup6): Dito.
* 2006-10-09 Robert Schuster <robertschuster@fsfe.org>Robert Schuster2006-10-091-4/+21
| | | | | | | | | * native/jni/java-net/gnu_java_net/VMPlainSocketImpl.c: (Java_gnu_java_net_VMPlainSocketImpl_joinGroup): Properly convert jstring into char *. (Java_gnu_java_net_VMPlainSocketImpl_joinGroup6): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup): Dito. (Java_gnu_java_net_VMPlainSocketImpl_leaveGroup6): Dito.
* 2006-09-18 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-191-1/+0
| | | | | * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c (Java_gnu_java_net_VMPlainSocketImpl_listen): remove debug printf.
* 2006-09-16 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-172-180/+900
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-08 Gary Benson <gbenson@redhat.com>Gary Benson2006-09-081-0/+87
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * java/net/InetAddress.java (inaddr_any): Removed. (ANY_IF, LOCALHOST): Create using getByAddress. (<init>): Updated javadoc. (getHostName): Cache hostname even if the lookup failed. (getByAddress): Create Inet4Address objects when passed IPv4-mapped IPv6 addresses. (aton): Removed. (getAllByName): Create address objects using getByAddress. Do not perform security checks unless actually required. Do not strip whitespace from the hostname. (getInaddrAny): Removed. (getLocalHost): Return the loopback address if getByName throws a SecurityException. (readResolve): Updated javadoc. * vm/reference/java/net/VMInetAddress.java (aton): Declared. * include/java_net_VMInetAddress.h (Java_java_net_VMInetAddress_aton): Likewise. * native/jni/java-net/java_net_VMInetAddress.c (Java_java_net_VMInetAddress_aton): New method. * native/jni/native-lib/cpnet.h (cpnet_aton): Declared. * native/jni/native-lib/cpnet.c (cpnet_aton): New method. * configure.ac (AC_CHECK_FUNCS): Checks for cpnet_aton. * java/net/Inet4Address.java (writeReplace): Updated javadoc. * NEWS: Added note about updated VM interface.
* Merge NATIVE_LAYER branch.Mark Wielaard2006-08-216-399/+397
|
* 2006-08-21 Roman Kennke <kennke@aicas.com>Roman Kennke2006-08-212-4/+0
| | | | | | | | | * gnu/java/net/local/LocalSocketImpl.java Only load native lib if this is supported by runtime. * native/jni/java-net/local.c Include config.h unconditionally. * native/jni/java-net/gnu_java_net_local_LocalSocketImpl.c Include config.h unconditionally.
* 2006-07-11 Roman Kennke <kennke@aicas.com>Roman Kennke2006-07-111-0/+2
| | | | | | | * native/jni/java-net/gnu_java_net_local_LocalSocketImpl.c (read): Use fd when local sockets are disabled to make the compiler quite. (write): Likewise.
* 2006-07-11 Roman Kennke <kennke@aicas.com>Roman Kennke2006-07-111-32/+10
| | | | | | | | | | | | | | | * native/jni/java-net/gnu_java_net_local_LocalSocketImpl.c (available): Pass fd as argument and avoid JNI class/field lookup. (read): Likewise. (write): Likewise. * include/gnu_java_net_local_LocalSocketImpl.h: Regenerated. * gnu/java/net/local/LocalSocketImpl.h (available): Pass fd as argument and avoid JNI class/field lookup. (read): Likewise. (write): Likewise.
* 2006-05-26 Andrew John Hughes <gnu_andrew@member.fsf.org>Andrew John Hughes2006-05-271-3/+15
| | | | | | | * native/jni/java-net/java_net_VMURLConnection.c: Fix function declarations to specify unused parameters. * scripts/check_jni_methods.sh: Remove copies of the same function using uniq.
* * configure.ac: Check for magic.h and -lmagic.Tom Tromey2006-05-272-1/+92
| | | | | | | | | | | * vm/reference/java/net/VMURLConnection.java: New file. * include/java_net_VMURLConnection.h: New file. * include/Makefile.am (H_FILES): Add VMURLConnection.h. ($(top_srcdir)/include/java_net_VMURLConnection.h): New target. * native/jni/java-net/Makefile.am (libjavanet_la_SOURCES): Mention new file. (libjavanet_la_LIBADD): Add $(LIBMAGIC). * native/jni/java-net/java_net_VMURLConnection.c: New file.
* * native/jni/java-net/javanet.c (_javanet_accept): Don't use C++Mark Wielaard2006-05-141-1/+1
| | | | comments.
* PR 27459Mark Wielaard2006-05-141-0/+3
| | | | | * native/jni/java-net/javanet.c (_javanet_accept): Reset the inherited timeout on socket.
* 2006-04-19 Roman Kennke <kennke@aicas.com>Roman Kennke2006-04-191-3/+14
| | | | | | * native/jni/java-net/local.c (local_read): Handle EINTR correctly. (local_write): Likewise.
* * native/jni/java-net/Makefile.am (AM_CFLAGS): Removed --save-temps.Tom Tromey2006-04-171-1/+1
|
* 2005-04-16 Casey Marshall <csm@gnu.org>Casey Marshall2006-04-164-2/+759
| | | | | | | | | | | | | | | * configure.ac (--enable-local-sockets): new enable argument. (ENABLE_LOCAL_SOCKETS): new define. * native/jni/java-net/Makefile.am (local_sources): new variable. (lib_javanet_la_SOURCES): append `local_sources.' * native/jni/java-net/gnu_java_net_local_LocalSocketImpl.c, * native/jni/java-net/local.c, * native/jni/java-net/local.h, * include/gnu_java_net_local_LocalSocketImpl.h, * gnu/java/net/local/LocalServerSocket.java, * gnu/java/net/local/LocalSocket.java, * gnu/java/net/local/LocalSocketAddress.java, * gnu/java/net/local/LocalSocketImpl.java: new files.
* fixed pscan warningsDalibor Topic2006-04-031-13/+1
| | | | | | | | | | | | | | | | 2006-04-03 Dalibor Topic <robilad@kaffe.org> Fixed all pscan warnings. * native/jni/classpath/jcl.c (JCL_ThrowException), native/jni/classpath/jcl.h (DBG), native/target/generic/target_generic.h (TARGET_NATIVE_LAST_ERROR_STRING_FORMAT), native/target/generic/target_generic_misc.h (TARGET_NATIVE_MISC_FORMAT_STRING0): Use %s format in fprintf and snprintf explicitely when printing a single string to prevent format string exploits. * native/jni/java-net/javanet.h (DBG): Removed duplicate definition. Included jcl.h instead.
* 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-03-02 Andrew John Hughes <gnu_andrew@member.fsf.org>Andrew John Hughes2006-03-021-0/+1
| | | | | | * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c: Fix regression caused by move to VM variant. PR classpath/22926.
* 2006-02-06 Wolfgang Baer <WBaer@gmx.de>Wolfgang Baer2006-02-062-1/+2
| | | | | | | * native/jni/java-net/javanet.c (_javanet_connect): Throw ConnectException instead of IOException if connection failed. * native/jni/java-net/javanet.h: Add a define for java.net.ConnectException.
* 2006-01-25 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-254-91/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-181-4/+4
| | | | | | * native/jni/java-net/java_net_VMInetAddress.c (Java_java_net_VMInetAddress_lookupInaddrAny): Use target native macro for INADDR_ANY.
* 2006-01-17 Christian Thalinger <twisti@complang.tuwien.ac.at>Christian Thalinger2006-01-171-8/+11
| | | | | | | | | | | | | * 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-172-35/+69
| | | | | | | | | | | | | | | | | | | | | * native/jni/java-net/javanet.c: (_javanet_connect): Changed type of some local variables to jint. Fixed error handling to throw a SocketTimeoutException if the connection attempt times out. (_javanet_bind): Changed type of some local variables to jint. (_javanet_accept): Likewise. (_javanet_recvfrom): Likewise. (_javanet_sendto): Fixed error handling to throw a PortUnreachableException when connection is refused. (_javanet_get_option): Changed type of some local variables to jint. Implemented SOCKOPT_SO_BROADCAST. (_javanet_shutdownInput): Replaced shutdown call with corresponding target native macro. (_javanet_shutdownOutput): Replaced shutdown call with corresponding target native macro. * native/jni/java-net/javanet.h: Defined SOCKET_TIMEOUT_EXCEPTION, PORT_UNREACHABLE_EXCEPTION and SOCKOPT_SO_BROADCAST.
* 2006-01-17 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-172-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* * vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java (receive):Mark Wielaard2006-01-121-0/+6
| | | | | | Use packet.getLength(). * native/jni/java-net/gnu_java_net_VMPlainDatagramSocketImpl.c (nativeReceive): Check whether the receiver wants zero bytes.
* * native/jni/java-net/javanet.c (_javanet_recvfrom): Return -1 whenMark Wielaard2006-01-121-0/+5
| | | | | | | other side orderly closed connection. * vm/reference/gnu/java/net/VMPlainSocketImpl.java (read(PlainSocketImpl)): Mask byte to return unsigned int. Return -1 when end of stream reached.
* * native/jni/java-net/gnu_java_net_VMPlainDatagramSocketImpl.c:Mark Wielaard2006-01-125-151/+5
| | | | | | | | Remove asserts. * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c: Likewise. * native/jni/java-net/java_net_VMInetAddress.c: Likewise. * native/jni/java-net/java_net_VMNetworkInterface.c: Likewise. * native/jni/java-net/javanet.c: Likewise.
* 2006-01-10 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-101-2/+4
| | | | | | | | * native/jni/java-net/javanet.c (_javanet_shutdownOutput): Replaced strerror() with TARGET_NATIVE_LAST_ERROR_STRING() for portability. (_javanet_shutdownInput): Replaced strerror() with TARGET_NATIVE_LAST_ERROR_STRING() for portability.
* 2006-01-09 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-094-32/+46
| | | | | | | | | | | | | | | | | * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c (connect): Added stream parameter to _connect() call. * native/jni/java-net/gnu_java_net_VMPlainDatagramSocketImpl.c (connect): Added stream parameter to _connect() call. * native/jni/java-net/javanet.c (_javanet_create_localfd): Added stream parameter. Look up fd field based on the stream parameter either in SocketImpl or in DatagramSocketImpl. (_javanet_connect): Added stream parameter. Call create_localfd using this stream parameter. Set localPort field either in SocketImpl or in DatagramSocketImpl, depending on the stream flag. * native/jni/java-net/javanet.c (_javanet_connect): Added stream parameter.
* 2006-01-04 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-042-33/+78
| | | | | | * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c, * native/jni/java-net/gnu_java_net_VMPlainDatagramSocketImpl.c: Added __attribute__((__unused__)) macros to avoid gcc warnings.
* 2006-01-04 Roman Kennke <kennke@aicas.com>Roman Kennke2006-01-044-531/+476
| | | | | | | | | | | | | | | | | | | * vm/reference/gnu/java/net/VMPlainSocketImpl.java: New VM class. * vm/reference/gnu/java/net/VMPlainDatagramSocketImpl.java: New VM class. * native/jni/java-net/gnu_java_net_VMPlainSocketImpl.c: New file. * native/jni/java-net/gnu_java_net_VMPlainDatagramSocketImpl.c: New file. * native/jni/java-net/gnu_java_net_PlainDatagramSocketImpl.c: Removed. * native/jni/java-net/gnu_java_net_PlainSocketImpl.c: Removed. * native/jni/java-net/Makefile.am: Adjusted for new source files. * gnu/java/net/PlainDatagramSocketImpl.java: Use new VM interface. * gnu/java/net/PlainSocketImpl.java: Use new VM interface. * include/gnu_java_net_PlainDatagramSocketImpl.h: Removed. * include/gnu_java_net_PlainSocketImpl.h: Removed. * include/gnu_java_net_VMPlainDatagramSocketImpl.h: New header file. * include/gnu_java_net_VMPlainSocketImpl.h: New header file.