summaryrefslogtreecommitdiff
path: root/native/jni/native-lib
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>
* 2009-10-22 Andrew Haley <aph@redhat.com>Andrew Haley2009-10-221-2/+4
| | | | | | | | | | | | * native/jni/native-lib/cpnet.c (cpnet_addMembership): Fix aliasing warning. (cpnet_dropMembership): Likewise. 2009-10-21 Richard Guenther <rguenther@suse.de> PR cp-tools/39177 * tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries): Do not use uninitialized manifest.
* Revert the return on chdir == -1.Andrew John Hughes2009-02-041-2/+1
| | | | | | | | | 2009-02-04 Andrew John Hughes <ahughes@redhat.com> * native/jni/native-lib/cpproc.c: (cpproc_forkAndExec): Don't return on a -1 result from chdir as this may be valid in some cases. A better fix is needed.
* Fix build errors on gcc 4.3.3 with -Werror.Andrew John Hughes2009-02-041-1/+3
| | | | | | | | 2009-02-03 Andrew John Hughes <ahughes@redhat.com> * native/jni/native-lib/cpproc.c: (cpproc_forkAndExec): Handle return of chdir.
* 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-02-22 Andrew John Hughes <gnu_andrew@member.fsf.org>Andrew John Hughes2008-02-221-8/+2
| | | | | | | | | | | | PR classpath/33751: * configure.ac: Don't check for readdir_r. * native/jni/native-lib/cpio.c: (cpio_readDir): Remove use of readdir_r, zero errno before starting and always leave a \0 at the end after strncpy. * vm/reference/java/io/VMFile.java: (list(String)): Make synchronized.
* build fixes for arm-winceDalibor Topic2007-12-282-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-12-10 Robert Schuster <robertschuster@fsfe.org>Robert Schuster2007-12-101-1/+2
| | | | | * native/jni/native-lib/cpio.c: (cpio_df): Mark arguments as possibly unused.
* 2007-11-06 Mario Torre <neugens@limasoftware.net>Mario Torre2007-11-062-1/+50
| | | | | | | | | | | | | | | | | | | * vm/reference/java/io/VMFile.java: (getTotalSpace): new method. (getUsableSpace): likewise. (getFreeSpace): likewise. * java/io/File.java: (getTotalSpace): new method. (getUsableSpace): likewise. (getFreeSpace): likewise. * native/jni/java-io/java_io_VMFile.c: (Java_java_io_VMFile_getTotalSpace): new function. (Java_java_io_VMFile_getFreeSpace): likewise. (Java_java_io_VMFile_getUsableSpace): likewise. * native/jni/native-lib/cpio.h: (cpio_df): new function. (CPFILE_DF_TYPE): enum type for cpio_df. * native/jni/native-lib/cpio.c: (cpio_df): new function. * include/java_io_VMFile.h: regenerated. * configure.ac: added check for statvfs.
* 2007-09-19 Dalibor Topic <robilad@kaffe.org>Dalibor Topic2007-09-191-1/+1
| | | | | * native/jni/native-lib/Makefile.am (AM_LDFLAGS) Use CLASSPATH_CONVENIENCE flags, as it is a convenience library.
* * native/jni/native-lib/cpnet.cMark Wielaard2007-06-251-2/+4
| | | | | (cpnet_aton) Moved variable declaration of inet6_addr so it is actually in the scope of its use.
* 2007-06-25 Dalibor Topic <robilad@kaffe.org>Dalibor Topic2007-06-252-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-05-24 Ito Kazumitsu <kaz@maczuka.gcd.org>Ito Kazumitsu2007-05-241-3/+3
| | | | | | | * 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-12 Christian Thalinger <twisti@complang.tuwien.ac.at>Christian Thalinger2007-04-121-0/+9
| | | | | | | | * LICENSE: Added m4/ax_func_which_gethostbyname_r.m4 license. * configure.ac: Added AX_FUNC_WHICH_GETHOSTBYNAME_R check. * m4/ax_func_which_gethostbyname_r.m4: New file. * native/jni/native-lib/cpnet.c (cpnet_getHostByName): Check for different number of arguments of gethostbyname_r.
* 2007-04-11 Christian Thalinger <twisti@complang.tuwien.ac.at>Christian Thalinger2007-04-111-0/+4
| | | | | * native/jni/native-lib/cpproc.c (cpproc_forkAndExec): Fixed warning on some compilers, e.g. MIPSpro.
* 2007-02-09 Mario Torre <neugens@limasoftware.net>Mario Torre2007-02-092-0/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * vm/reference/java/io/VMFile.java: (canExecute): new 1.6 native method. (setReadable): likewise. (setWritable): likewise. (setExecutable): likewise. * java/io/File.java: added import for gnu.classpath.NotImplementedException. (setReadOnly): new 1.6 method. (canExecute): likewise. (setReadable): likewise. (setWritable): likewise. (setExecutable): likewise. (getUsableSpace): added stub for new 1.6 method. (getFreeSpace): likewise. (getTotalSpace): likewise. (checkExec): new private method to support new 1.6 additions. * native/jni/java-io/java_io_VMFile.c: set_file_permissions: new helper function. Java_java_io_VMFile_setReadable: new native method to bakcup 1.6 methods in VMFile.java. Java_java_io_VMFile_setWritable: likewise. Java_java_io_VMFile_setExecutable: likewise. Java_java_io_VMFile_canExecute: likewise. * native/jni/native-lib/cpio.h: added new flags: CPFILE_FLAG_EXEC, CPFILE_FLAG_USR and CPFILE_FLAG_OFF. cpio_chmod: new function declaration. cpio_checkAccess: likewise. * native/jni/native-lib/cpio.c: cpio_chmod: new function definition. cpio_checkAccess: likewise.
* 2007-01-20 Ito Kazumitsu <kaz@maczuka.gcd.org>Ito Kazumitsu2007-01-201-10/+37
| | | | | | | | Fixes bug #30488 * native/jni/native-lib/cpnet.c(SOCKET_NOSIGNAL): Deleted, (setsockopt_NOSIGPIPE): New function, (cpnet_send): Corrected the option setting to send(), (cpnet_sendTo): Corrected the option setting to sendto().
* 2007-01-07 Ito Kazumitsu <kaz@maczuka.gcd.org>Ito Kazumitsu2007-01-071-0/+2
| | | | | Fixes bug #30377 * native/jni/native-lib/cpnet.h: Add some include files.
* Lots of changes.Robert Schuster2006-10-252-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-09-22 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-232-2/+2
| | | | | | | | * native/jni/java-io/java_io_VMFile.c (Java_java_io_VMFile_list): remove `const' from `filename.' * native/jni/native-lib/cpio.c (cpio_readDir): remove `const' from `filename.' * native/jni/native-lib/cpio.h (cpio_readDir): likewise.
* 2006-09-22 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-232-4/+18
| | | | | | | | | | | * configure.ac (AC_CHECK_FUNCS): check for `readdir_r.' * native/jni/java-io/java_io_VMFile.c (Java_java_io_VMFile_list): allocate `filename,' and handle changes to `cpio_readDir.' * native/jni/native-lib/cpio.c (cpio_readDir): use `readdir_r' if available; copy the filename into the destination buffer; return an error code if readdir returns NULL, but errno is 0. * native/jni/native-lib/cpio.h (cpio_readDir): change second parameter to `const char *.'
* 2006-09-16 Casey Marshall <csm@gnu.org>Casey Marshall2006-09-171-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-082-0/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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.
* 2006-09-05 Andrew John Hughes <gnu_andrew@member.fsf.org>Andrew John Hughes2006-09-052-7/+13
| | | | | | | | | | | | * native/jni/native-lib/cpprocess.c: (forkAndExec(char*,char*,int,int,pid_t,char*)): Add redirection of stdout to stderr. * native/jni/native-lib/cpprocess.h: Added redirect argument. * native/jni/java-lang/java_lang_VMProcess.c (Java_java_lang_VMProcess_nativeSpawn): Readd redirect argument. * vm/reference/java/lang/VMProcess.java: Likewise. * include/java_lang_VMProcess.h: Regenerated.
* 2006-08-31 Andreas Tobler <a.tobler@schweiz.ch>Andreas Tobler2006-08-312-2/+27
| | | | | | | | | | | | | * configure.ac: Add check for gethostbyname_r. Add check for MSG_NOSIGNAL and SO_NOSIGPIPE. * native/jni/native-lib/cpnet.c (SOCKET_NOSIGNAL): Define SOCKET_NOSIGNAL according to the configure check. (cpnet_send): Use SOCKET_NOSIGNAL. (cpnet_sendTo): Likewise. (cpnet_getHostByName): Use gethostbyname in case gethostbyname_r is not defined. * native/jni/native-lib/cpio.c: Define O_SYNC and O_DSYNC in case they are not available.
* Merge NATIVE_LAYER branch.Mark Wielaard2006-08-219-0/+1697