Re: [cp-patches] RFC: Scrollbar fixes
Hey, On Fri, 2006-10-20 at 18:07 -0400, Thomas Fitzsimmons wrote: 4. I removed the two bigger if-clauses that deals with the range because (a) it will never happen that the range = 0 because we know that maximum will never equal minimum) and (b) it doesn't matter if lineIncrement is the range - it won't effect the value of lineIncrement. The same applies for pageIncrement. Are you saying that if, in setValues, lineIncrement range, then the reference implementation doesn't clamp it to range? Does Intel test for this explicitly? Likewise for the unit and block increments? That seems strange, but if it's the case, then this patch is OK. Yes, it does seem strange, but it looks like that is the case. I have committed a mauve test that explicitly tests this. I will be committing this patch. Thanks Tom, Tania
[cp-patches] HTMLWriter
Hi Mark, Just finished javax.swing.text.html.HTMLWriter, can you commit it for me? Thanks! ;) David Fu./* HTMLWriter.java -- Copyright (C) 2006 Free Software Foundation, Inc. This file is part of GNU Classpath. GNU Classpath is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU Classpath is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU Classpath; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination. As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module, the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of the library, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ package javax.swing.text.html; import java.io.IOException; import java.io.Writer; import java.util.Enumeration; import java.util.HashSet; import javax.swing.ComboBoxModel; import javax.swing.text.AbstractWriter; import javax.swing.text.AttributeSet; import javax.swing.text.BadLocationException; import javax.swing.text.Document; import javax.swing.text.Element; import javax.swing.text.ElementIterator; import javax.swing.text.StyleConstants; import javax.swing.text.html.HTML; import javax.swing.text.html.HTMLDocument; import javax.swing.text.html.Option; /** * HTMLWriter, * A Writer for HTMLDocuments. * * @author David Fu (fchoong at netbeans.jp) */ public class HTMLWriter extends AbstractWriter { private Writer outWriter = null; private HTMLDocument html_doc = null; private HashSet storeContentAttr = null; private String new_line_str = + NEWLINE; private char[] html_entity_char_arr = {'','','', ''}; private String[] html_entity_escape_str_arr = {lt;, gt;, amp;, quot;}; public HTMLWriter(Writer writer, HTMLDocument doc) { super(writer, doc); outWriter = writer; html_doc = doc; storeContentAttr = new HashSet(); } // public HTMLWriter(Writer writer, HTMLDocument doc) public HTMLWriter(Writer writer, HTMLDocument doc, int pos, int len) { super(writer, doc, pos, len); outWriter = writer; html_doc = doc; storeContentAttr = new HashSet(); } // public HTMLWriter(Writer writer, HTMLDocument doc, int pos, int len) /** Call this method to start outputing HTML. */ public void write() throws IOException, BadLocationException { Element rootElem = html_doc.getDefaultRootElement(); traverse(rootElem); // NOTE: Close out remaining embeded tags. Object[] tag_arr = storeContentAttr.toArray(); for(int i = 0; i tag_arr.length; i++) { writeRaw(/ + tag_arr[i].toString() + ); } // for(int i = 0; i tag_arr.length; i++) } // public void write() throws IOException, BadLocationException private void traverse(Element paramElem) throws IOException, BadLocationException { Element currElem = paramElem; AttributeSet attrSet = currElem.getAttributes(); closeOutUnwantedEmbeddedTags(attrSet); if(synthesizedElement(paramElem)) { if(matchNameAttribute(attrSet, HTML.Tag.CONTENT)) { writeEmbeddedTags(attrSet); text(currElem); } // if(matchNameAttribute(attrSet, HTML.Tag.CONTENT)) else if(matchNameAttribute(attrSet, HTML.Tag.COMMENT)) { comment(currElem); } // else if(matchNameAttribute(attrSet, HTML.Tag.COMMENT)) else if(matchNameAttribute(attrSet, HTML.Tag.IMPLIED)) { int child_elem_count = currElem.getElementCount();
Re: [cp-patches] HTMLWriter
Hi Fu, Hi Mark, Just finished javax.swing.text.html.HTMLWriter, can you commit it for me? Thanks! ;) The code looks good. Maybe you could fix the following points, then it would be even better: - Add (extensive ;-) ) comments to the class and to each method/field etc. This makes the code more readable and allows others to better understand what's going on, just in case somebody else needs to fix something in there. For API comments follow these guidelines: http://java.sun.com/products/jdk/javadoc/writingdoccomments.html - For instance, this: /** Writes all the attributes in the attrSet, except for attrbutes with keys of HTML.Tag, StyleConstants or HTML.Attribute.ENDTAG. */ protected void writeAttributes(AttributeSet attrSet) throws IOException should be written like this: /** * Writes all the attributes in the attrSet, except for attrbutes * with keys of HTML.Tag, StyleConstants or HTML.Attribute.ENDTAG. * * @param attrSet description of param * * @throws IOException condition for exception */ - Format your code to break lines after 79 chars - Generally, you should follow the GNU coding style: if (condition) { // --- 2 spaces indent. bla(); // -- 2 more spaces indent. } etc. Refer to http://www.gnu.org/software/classpath/docs/hacking.html#SEC6 for more details. That said, I haven't yet tried out the actual code. Have you used test programs during your development? Maybe they could be added as Mauve tests or added as a small demo (as part of our Swing demo) that demonstrates that this class works? Thank you, Roman
Re: [cp-patches] HTMLWriter
Ho, David! Congratulations, we were waiting for this class for a long time! The most important is now to have a little bit of tests for the new class. It may be that your tests only pass with Sun's jre and not with ours - does not matter anyway, just convert into testlets (a piece of cake to do) and commit them to Mauve. Best regards Audrius
[cp-patches] FYI: add asm handling to toolwrapper.c
Hi, I committed this patch, which adds asm-awareness to toolwrapper.c. Tom 2006-10-24 Thomas Fitzsimmons [EMAIL PROTECTED] * tools/Makefile.am: Add ASM_JAR define to each tool's CFLAGS. * tools/toolwrapper.c (main): Set bootclasspath, not classpath. Add ASM_JAR to bootclasspath. Index: tools/Makefile.am === RCS file: /sources/classpath/classpath/tools/Makefile.am,v retrieving revision 1.24 diff -u -r1.24 Makefile.am --- tools/Makefile.am 22 Sep 2006 22:53:16 - 1.24 +++ tools/Makefile.am 24 Oct 2006 17:58:41 - @@ -40,63 +40,75 @@ gappletviewer_SOURCES = toolwrapper.c gappletviewer_CFLAGS = \ -DTOOLPACKAGE=\appletviewer\ \ - -DTOOLNAME=\gappletviewer\ + -DTOOLNAME=\gappletviewer\ \ + -DASM_JAR= gjarsigner_SOURCES = toolwrapper.c gjarsigner_CFLAGS = \ -DTOOLPACKAGE=\jarsigner\ \ - -DTOOLNAME=\gjarsigner\ + -DTOOLNAME=\gjarsigner\ \ + -DASM_JAR= gkeytool_SOURCES = toolwrapper.c gkeytool_CFLAGS = \ -DTOOLPACKAGE=\keytool\ \ - -DTOOLNAME=\gkeytool\ + -DTOOLNAME=\gkeytool\ \ + -DASM_JAR= gjar_SOURCES = toolwrapper.c gjar_CFLAGS = \ -DTOOLPACKAGE=\jar\ \ - -DTOOLNAME=\gjar\ + -DTOOLNAME=\gjar\ \ + -DASM_JAR= gnative2ascii_SOURCES = toolwrapper.c gnative2ascii_CFLAGS = \ -DTOOLPACKAGE=\native2ascii\ \ - -DTOOLNAME=\gnative2ascii\ + -DTOOLNAME=\gnative2ascii\ \ + -DASM_JAR= gserialver_SOURCES = toolwrapper.c gserialver_CFLAGS = \ -DTOOLPACKAGE=\serialver\ \ - -DTOOLNAME=\gserialver\ + -DTOOLNAME=\gserialver\ \ + -DASM_JAR= grmiregistry_SOURCES = toolwrapper.c grmiregistry_CFLAGS = \ -DTOOLPACKAGE=\rmiregistry\ \ - -DTOOLNAME=\grmiregistry\ + -DTOOLNAME=\grmiregistry\ \ + -DASM_JAR= gtnameserv_SOURCES = toolwrapper.c gtnameserv_CFLAGS = \ -DTOOLPACKAGE=\tnameserv\ \ - -DTOOLNAME=\gtnameserv\ + -DTOOLNAME=\gtnameserv\ \ + -DASM_JAR= gorbd_SOURCES = toolwrapper.c gorbd_CFLAGS = \ -DTOOLPACKAGE=\orbd\ \ - -DTOOLNAME=\gorbd\ + -DTOOLNAME=\gorbd\ \ + -DASM_JAR= grmid_SOURCES = toolwrapper.c grmid_CFLAGS = \ -DTOOLPACKAGE=\rmid\ \ - -DTOOLNAME=\grmid\ + -DTOOLNAME=\grmid\ \ + -DASM_JAR= if USE_ASM gjavah_SOURCES = toolwrapper.c gjavah_CFLAGS = \ -DTOOLPACKAGE=\javah\ \ - -DTOOLNAME=\gjavah\ + -DTOOLNAME=\gjavah\ \ + -DASM_JAR=\:$(PATH_TO_ASM)\ grmic_SOURCES = toolwrapper.c grmic_CFLAGS = \ -DTOOLPACKAGE=\rmic\ \ - -DTOOLNAME=\grmic\ + -DTOOLNAME=\grmic\ \ + -DASM_JAR=\:$(PATH_TO_ASM)\ endif else Index: tools/toolwrapper.c === RCS file: /sources/classpath/classpath/tools/toolwrapper.c,v retrieving revision 1.3 diff -u -r1.3 toolwrapper.c --- tools/toolwrapper.c 18 Aug 2006 19:41:07 - 1.3 +++ tools/toolwrapper.c 24 Oct 2006 17:58:41 - @@ -136,7 +136,7 @@ goto destroy; } - vm_args.options[vm_args.nOptions++].optionString = -Djava.class.path= TOOLS_ZIP; + vm_args.options[vm_args.nOptions++].optionString = -Xbootclasspath/p: TOOLS_ZIP ASM_JAR; } /* Terminate vm_args.options with a NULL element. */
[cp-patches] FYI: Fix for PR29576
Hi, the attached patch partly fixes PR29576. Without redesigning VMNetworkInterface I just added a constructor which sets the field name to null and adds the ANY_ADDR to the address list. NetworkInterface got a new package private method which is to be called by MulticastSocket. Some other methods learned to deal with the field name of an VMNetworkInterface instance being null. ChangeLog: 2006-10-25 Robert Schuster [EMAIL PROTECTED] Fixes PR29576 * java/net/NetworkInterface.java: (createAnyInterface): New method. (equals): Added if-statement to handle case where netif.name is null. * vm/reference/java/net/VMNetworkInterface.java: (hashCode): Rewritten. (VMNetworkInterface): New constructor. cya Robert Index: java/net/NetworkInterface.java === RCS file: /cvsroot/classpath/classpath/java/net/NetworkInterface.java,v retrieving revision 1.20 diff -u -r1.20 NetworkInterface.java --- java/net/NetworkInterface.java 17 Sep 2006 07:31:42 - 1.20 +++ java/net/NetworkInterface.java 24 Oct 2006 23:17:23 - @@ -67,6 +67,16 @@ this.netif = netif; } + /** Creates an NetworkInterface instance which + * represents any interface in the system. Its only + * address is code0.0.0.0/0.0.0.0/code. This + * method is needed by [EMAIL PROTECTED] MulticastSocket#getNetworkInterface} + */ + static NetworkInterface createAnyInterface() + { +return new NetworkInterface(new VMNetworkInterface()); + } + /** * Returns the name of the network interface * @@ -206,6 +216,9 @@ return false; NetworkInterface tmp = (NetworkInterface) obj; + +if (netif.name == null) + return tmp.netif.name == null; return (netif.name.equals(tmp.netif.name) (netif.addresses.equals(tmp.netif.addresses))); @@ -219,7 +232,12 @@ public int hashCode() { // FIXME: hash correctly -return netif.name.hashCode() + netif.addresses.hashCode(); +int hc = netif.addresses.hashCode(); + +if (netif.name != null) + hc += netif.name.hashCode(); + +return hc; } /** Index: vm/reference/java/net/VMNetworkInterface.java === RCS file: /cvsroot/classpath/classpath/vm/reference/java/net/VMNetworkInterface.java,v retrieving revision 1.5 diff -u -r1.5 VMNetworkInterface.java --- vm/reference/java/net/VMNetworkInterface.java 17 Sep 2006 07:31:43 - 1.5 +++ vm/reference/java/net/VMNetworkInterface.java 24 Oct 2006 23:17:23 - @@ -66,6 +66,23 @@ addresses = new HashSet(); } + /** + * Creates a dummy instance which represents any network + * interface. + */ + public VMNetworkInterface() + { +addresses = new HashSet(); +try + { +addresses.add(InetAddress.getByName(0.0.0.0)); + } +catch (UnknownHostException _) + { +// Cannot happen. + } + } + static { if (Configuration.INIT_LOAD_LIBRARY) signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: final fix for PR29576
Hi, with this small change to MulticastSocket a proper instance is returned when the socket's multicast interface results to any. I know: Test would be nice. I am working on it. :) ChangeLog: 2006-10-25 Robert Schuster [EMAIL PROTECTED] Fixes PR29576 * java/net/MulticastSocket.java: (getNetworkInterface): Return a special NetworkInterface instance if the socket's multicast interface is set to any. cya Robert signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: Inet6Address fix
Hi, byte value comparisons in Java are evil. Adding a cast to a byte of the right value fixes the Inet6Address.isMulticastAddress method. ChangeLog: 2006-10-25 Robert Schuster [EMAIL PROTECTED] * java/net/Inet6Address.java: (isMulticastAddress): Fixed check. cya Robert Index: java/net/Inet6Address.java === RCS file: /cvsroot/classpath/classpath/java/net/Inet6Address.java,v retrieving revision 1.16 diff -u -r1.16 Inet6Address.java --- java/net/Inet6Address.java 11 Sep 2006 11:44:24 - 1.16 +++ java/net/Inet6Address.java 24 Oct 2006 23:45:19 - @@ -121,7 +121,7 @@ */ public boolean isMulticastAddress() { -return ipaddress[0] == 0xFF; +return ipaddress[0] == (byte) 0xFF; } /** signature.asc Description: OpenPGP digital signature
Re: [cp-patches] FYI: final fix for PR29576
Ahem, and here is the patch. Robert Schuster wrote: Hi, with this small change to MulticastSocket a proper instance is returned when the socket's multicast interface results to any. I know: Test would be nice. I am working on it. :) ChangeLog: 2006-10-25 Robert Schuster [EMAIL PROTECTED] Fixes PR29576 * java/net/MulticastSocket.java: (getNetworkInterface): Return a special NetworkInterface instance if the socket's multicast interface is set to any. cya Robert Index: java/net/MulticastSocket.java === RCS file: /cvsroot/classpath/classpath/java/net/MulticastSocket.java,v retrieving revision 1.26 diff -u -r1.26 MulticastSocket.java --- java/net/MulticastSocket.java 2 Jul 2005 20:32:39 - 1.26 +++ java/net/MulticastSocket.java 24 Oct 2006 23:28:09 - @@ -230,6 +258,10 @@ InetAddress address = (InetAddress) getImpl().getOption(SocketOptions.IP_MULTICAST_IF); + +if (address.isAnyLocalAddress()) + return NetworkInterface.createAnyInterface(); + NetworkInterface netIf = NetworkInterface.getByInetAddress(address); return netIf; signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: Java NIO/NET/Socket fixes
Hi, this patch contains the bulk of my recent work on java.nio/java.net, the respective VM classes and their native counterparts. It consists of: - adding multicast stuff - fixing exception classes (IOException - SocketException) - removing the need for VMPlainDatagramSocketImpl and the removal of that class - a missing case in getOptions (SO_REUSEADDR) - a wrong constant in leave6 - a rework of accept along with a new method isThreadInterrupted() - filtering of unwanted options for TCP in PlainSocketImpl - using the user-given address of a remote host instead of the one provided by a DNS lookup - correctly handling SO_LINGER on the Java and the native side - automatically closing of Socket whose connect() inside the constructor fails. - documentation of the VM interface changes - using 'Integer.valueOf()' instead of 'new Integer()' I got positive feedback for the bigger changes and think that the minor fixes are just ok. ChangeLog: 2006-10-25 Robert Schuster [EMAIL PROTECTED] * 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. That was a big one. :) cya Robert Index: gnu/java/net/PlainSocketImpl.java === RCS file: /cvsroot/classpath/classpath/gnu/java/net/PlainSocketImpl.java,v retrieving revision 1.14 diff -u -r1.14
[cp-patches] FYI: make _javanet_create_inetaddress accessable
Hi, my last patch need _javanet_create_inetaddress from javanet.c to be accessable from another compilation unit. This patch does that. ChangeLog: 2006-10-25 Robert Schuster [EMAIL PROTECTED] * native/jni/java-net/javanet.h: Added declaration for _javanet_create_inetaddress. * native/jni/java-net/javanet.c: (_javanet_create_inetaddress): Removed static keyword. cya Robert Index: native/jni/java-net/javanet.c === RCS file: /cvsroot/classpath/classpath/native/jni/java-net/javanet.c,v retrieving revision 1.36 diff -u -r1.36 javanet.c --- native/jni/java-net/javanet.c 21 Aug 2006 23:34:45 - 1.36 +++ native/jni/java-net/javanet.c 25 Oct 2006 00:36:06 - @@ -232,7 +232,7 @@ /* * Builds an InetAddress object from a 32 bit address in host byte order */ -static jobject +jobject _javanet_create_inetaddress (JNIEnv * env, cpnet_address *netaddr) { #ifndef WITHOUT_NETWORK Index: native/jni/java-net/javanet.h === RCS file: /cvsroot/classpath/classpath/native/jni/java-net/javanet.h,v retrieving revision 1.15 diff -u -r1.15 javanet.h --- native/jni/java-net/javanet.h 21 Aug 2006 23:34:46 - 1.15 +++ native/jni/java-net/javanet.h 25 Oct 2006 00:36:06 - @@ -81,6 +81,7 @@ extern int _javanet_get_int_field(JNIEnv *, jobject, const char *); extern cpnet_address *_javanet_get_ip_netaddr(JNIEnv *, jobject); +extern jobject _javanet_create_inetaddress (JNIEnv *, cpnet_address *); extern void _javanet_create(JNIEnv *, jobject, jboolean); extern void _javanet_close(JNIEnv *, jobject, int); extern void _javanet_connect(JNIEnv *, jobject, jobject, jint, jboolean); signature.asc Description: OpenPGP digital signature
[cp-patches] FYI: MulticastSocket.setNetworkInterface fix
Hi, I partly rewrote this method because it failed to set an IPv4 address on a Socket connected to an IPv4 multicast group. This happened because on my system the interface's IPv6 address seems to come before its IPv4 address and the method took the first one in the old implementation. While this doesn't fix the problems with MulticastSockets which should deal with IPv6 multicast groups (see my mail to classpath@gnu.org) it makes at least the IPv4 case working completely. However the patch shows what kind of unelegant code is needed to get stuff working at all in an environment with mixed IP versions. ChangeLog: 2006-10-25 Robert Schuster [EMAIL PROTECTED] * java/net/MulticastSocket.java: (setNetworkInterface): Rewritten. cya Robert Index: java/net/MulticastSocket.java === RCS file: /cvsroot/classpath/classpath/java/net/MulticastSocket.java,v retrieving revision 1.27 diff -u -r1.27 MulticastSocket.java --- java/net/MulticastSocket.java 24 Oct 2006 23:32:25 - 1.27 +++ java/net/MulticastSocket.java 25 Oct 2006 00:42:42 - @@ -202,13 +202,41 @@ { if (isClosed()) throw new SocketException(socket is closed); - -Enumeration e = netIf.getInetAddresses(); - -if (! e.hasMoreElements()) - throw new SocketException(no network devices found); - -InetAddress address = (InetAddress) e.nextElement(); + +InetAddress address; +if (netIf != null) + out: + { +Enumeration e = netIf.getInetAddresses(); +if (getLocalAddress() instanceof Inet4Address) + { +// Search for a IPv4 address. +while (e.hasMoreElements()) + { +address = (InetAddress) e.nextElement(); +if (address instanceof Inet4Address) + break out; + } +throw new SocketException(interface + netIf.getName() + has no IPv6 address); + } +else if (getLocalAddress() instanceof Inet6Address) + { +// Search for a IPv6 address. +while (e.hasMoreElements()) + { +address = (InetAddress) e.nextElement(); +if (address instanceof Inet6Address) + break out; + } +throw new SocketException(interface + netIf.getName() + has no IPv6 address); + } +else + throw new SocketException(interface + netIf.getName() + has no suitable IP address); + } +else + address = InetAddress.ANY_IF; + + getImpl().setOption(SocketOptions.IP_MULTICAST_IF, address); } signature.asc Description: OpenPGP digital signature
[cp-testresults] FAIL: generics classpath build on Tue Oct 24 09:00:29 UTC 2006
6263. WARNING in ../../classpath/vm/reference/sun/misc/Unsafe.java (at line 297) public native int arrayIndexScale(Class arrayClass); ^ Class is a raw type. References to generic type ClassT should be parameterized -- -- 6264. WARNING in ../../classpath/vm/reference/sun/reflect/misc/ReflectUtil.java (at line 54) public static void checkPackageAccess(Class declaringClass) ^ Class is a raw type. References to generic type ClassT should be parameterized -- 6265. WARNING in ../../classpath/vm/reference/sun/reflect/misc/ReflectUtil.java (at line 69) public static void ensureMemberAccess(Class caller, ^ Class is a raw type. References to generic type ClassT should be parameterized -- 6266. WARNING in ../../classpath/vm/reference/sun/reflect/misc/ReflectUtil.java (at line 70) Class declarer, ^ Class is a raw type. References to generic type ClassT should be parameterized -- -- 6267. WARNING in ../../classpath/vm/reference/sun/reflect/Reflection.java (at line 47) public static Class getCallerClass(int depth) ^ Class is a raw type. References to generic type ClassT should be parameterized -- 6267 problems (1 error, 6266 warnings)make[1]: *** [compile-classes] Error 255 make[1]: Leaving directory `/home/cpdev/Nightly/generics/build/lib' make: *** [all-recursive] Error 1 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: japi build on Tue Oct 24 09:01:46 UTC 2006
114. DirectoryScanner scanner = dirs.getDirectoryScanner(getProject()); ^--^ *** Semantic Error: No accessible method with signature getProject() was found in type net.wuffies.japi.JapiantTask. 122. throw new BuildException(Not a file: + f); ^^ *** Semantic Error: Type BuildException was not found. 129. throw new BuildException(No jars or dirs found); ^^ *** Semantic Error: Type BuildException was not found. 146. throw new BuildException(Unknown package: + pkg); ^^ *** Semantic Error: Type BuildException was not found. 151. log(Running japize with: + args); ^-^ *** Semantic Error: No accessible method with signature log(java.lang.String) was found in type net.wuffies.japi.JapiantTask. 155. throw new BuildException(ex); ^^ *** Semantic Error: Type BuildException was not found. make: *** [classes] Error 1 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: regressions for mauve-cacao on Tue Oct 24 10:51:54 UTC 2006
Baseline from: Fri Sep 29 17:47:30 UTC 2006 Regressions: FAIL: java.awt.ColorClass.brighter FAIL: java.awt.image.LookupOp.filterImage FAIL: java.util.zip.Deflater.PR27435 FAIL: javax.swing.JComboBox.ComboRobot FAIL: javax.swing.JTable.TableRobot Improvements: PASS: gnu.javax.crypto.key.srp6.TestOfSRPKeyGeneration PASS: java.awt.event.MouseEvent.modifiers PASS: java.awt.event.MouseEvent.modifiersEx PASS: java.awt.image.AffineTransformOp.createCompatibleDestImage PASS: java.beans.EventHandler.check PASS: java.beans.EventHandler.check14 PASS: java.beans.EventHandler.check14b PASS: java.beans.EventHandler.check14c PASS: java.io.ObjectInputOutput.ProxySerializationTest PASS: java.lang.reflect.Proxy.DeclaringClass PASS: java.lang.reflect.Proxy.ExceptionRaising PASS: java.lang.reflect.Proxy.ToString PASS: java.lang.reflect.Proxy.check13 PASS: java.net.ServerSocket.ReturnOnClose PASS: java.net.ServerSocket.ServerSocketTest New fails: FAIL: java.awt.Graphics.clearRect FAIL: java.awt.Scrollbar.testSetBlockIncrement FAIL: java.awt.Scrollbar.testSetUnitIncrement FAIL: java.awt.Scrollbar.testSetValues FAIL: java.awt.image.BufferedImage.getSetRgb1Pixel FAIL: java.net.Socket.security FAIL: java.text.DecimalFormat.PR23996 Totals: PASS: 2825 XPASS: 0 FAIL: 212 XFAIL: 0 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: japi build on Tue Oct 24 15:44:11 UTC 2006
114. DirectoryScanner scanner = dirs.getDirectoryScanner(getProject()); ^--^ *** Semantic Error: No accessible method with signature getProject() was found in type net.wuffies.japi.JapiantTask. 122. throw new BuildException(Not a file: + f); ^^ *** Semantic Error: Type BuildException was not found. 129. throw new BuildException(No jars or dirs found); ^^ *** Semantic Error: Type BuildException was not found. 146. throw new BuildException(Unknown package: + pkg); ^^ *** Semantic Error: Type BuildException was not found. 151. log(Running japize with: + args); ^-^ *** Semantic Error: No accessible method with signature log(java.lang.String) was found in type net.wuffies.japi.JapiantTask. 155. throw new BuildException(ex); ^^ *** Semantic Error: Type BuildException was not found. make: *** [classes] Error 1 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: regressions for mauve-cacao on Tue Oct 24 17:31:22 UTC 2006
Baseline from: Fri Sep 29 17:47:30 UTC 2006 Regressions: FAIL: java.awt.ColorClass.brighter FAIL: java.awt.image.LookupOp.filterImage FAIL: java.util.zip.Deflater.PR27435 FAIL: javax.swing.JComboBox.ComboRobot FAIL: javax.swing.JTable.TableRobot FAIL: javax.swing.text.html.HTML.ElementTagAttributeTest Improvements: PASS: java.awt.Scrollbar.ScrollbarPaintTest PASS: java.awt.event.MouseEvent.modifiers PASS: java.awt.event.MouseEvent.modifiersEx PASS: java.awt.image.AffineTransformOp.createCompatibleDestImage PASS: java.beans.EventHandler.check PASS: java.beans.EventHandler.check14 PASS: java.beans.EventHandler.check14b PASS: java.beans.EventHandler.check14c PASS: java.io.ObjectInputOutput.ProxySerializationTest PASS: java.lang.reflect.Proxy.DeclaringClass PASS: java.lang.reflect.Proxy.ExceptionRaising PASS: java.lang.reflect.Proxy.ToString PASS: java.lang.reflect.Proxy.check13 PASS: java.net.ServerSocket.ReturnOnClose PASS: java.net.ServerSocket.ServerSocketTest New fails: FAIL: java.awt.Graphics.clearRect FAIL: java.awt.Scrollbar.testSetBlockIncrement FAIL: java.awt.Scrollbar.testSetUnitIncrement FAIL: java.awt.Scrollbar.testSetValues FAIL: java.awt.image.BufferedImage.getSetRgb1Pixel FAIL: java.net.Socket.security FAIL: java.text.DecimalFormat.PR23996 Totals: PASS: 2824 XPASS: 0 FAIL: 213 XFAIL: 0 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: generics classpath build on Tue Oct 24 22:22:28 UTC 2006
6263. WARNING in ../../classpath/vm/reference/sun/misc/Unsafe.java (at line 297) public native int arrayIndexScale(Class arrayClass); ^ Class is a raw type. References to generic type ClassT should be parameterized -- -- 6264. WARNING in ../../classpath/vm/reference/sun/reflect/misc/ReflectUtil.java (at line 54) public static void checkPackageAccess(Class declaringClass) ^ Class is a raw type. References to generic type ClassT should be parameterized -- 6265. WARNING in ../../classpath/vm/reference/sun/reflect/misc/ReflectUtil.java (at line 69) public static void ensureMemberAccess(Class caller, ^ Class is a raw type. References to generic type ClassT should be parameterized -- 6266. WARNING in ../../classpath/vm/reference/sun/reflect/misc/ReflectUtil.java (at line 70) Class declarer, ^ Class is a raw type. References to generic type ClassT should be parameterized -- -- 6267. WARNING in ../../classpath/vm/reference/sun/reflect/Reflection.java (at line 47) public static Class getCallerClass(int depth) ^ Class is a raw type. References to generic type ClassT should be parameterized -- 6267 problems (1 error, 6266 warnings)make[1]: *** [compile-classes] Error 255 make[1]: Leaving directory `/home/cpdev/Nightly/generics/build/lib' make: *** [all-recursive] Error 1 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: japi build on Tue Oct 24 22:23:29 UTC 2006
114. DirectoryScanner scanner = dirs.getDirectoryScanner(getProject()); ^--^ *** Semantic Error: No accessible method with signature getProject() was found in type net.wuffies.japi.JapiantTask. 122. throw new BuildException(Not a file: + f); ^^ *** Semantic Error: Type BuildException was not found. 129. throw new BuildException(No jars or dirs found); ^^ *** Semantic Error: Type BuildException was not found. 146. throw new BuildException(Unknown package: + pkg); ^^ *** Semantic Error: Type BuildException was not found. 151. log(Running japize with: + args); ^-^ *** Semantic Error: No accessible method with signature log(java.lang.String) was found in type net.wuffies.japi.JapiantTask. 155. throw new BuildException(ex); ^^ *** Semantic Error: Type BuildException was not found. make: *** [classes] Error 1 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: regressions for mauve-cacao on Wed Oct 25 00:11:11 UTC 2006
Baseline from: Fri Sep 29 17:47:30 UTC 2006 Regressions: FAIL: java.awt.ColorClass.brighter FAIL: java.awt.image.LookupOp.filterImage FAIL: java.net.HttpURLConnection.postHeaders FAIL: java.util.zip.Deflater.PR27435 FAIL: javax.swing.JComboBox.ComboRobot FAIL: javax.swing.JTable.TableRobot Improvements: PASS: gnu.javax.crypto.key.srp6.TestOfSRPKeyGeneration PASS: java.awt.Scrollbar.ScrollbarPaintTest PASS: java.awt.event.MouseEvent.modifiers PASS: java.awt.event.MouseEvent.modifiersEx PASS: java.awt.image.AffineTransformOp.createCompatibleDestImage PASS: java.beans.EventHandler.check PASS: java.beans.EventHandler.check14 PASS: java.beans.EventHandler.check14b PASS: java.beans.EventHandler.check14c PASS: java.io.ObjectInputOutput.ProxySerializationTest PASS: java.lang.reflect.Proxy.DeclaringClass PASS: java.lang.reflect.Proxy.ExceptionRaising PASS: java.lang.reflect.Proxy.ToString PASS: java.lang.reflect.Proxy.check13 PASS: java.net.ServerSocket.ReturnOnClose PASS: java.net.ServerSocket.ServerSocketTest New fails: FAIL: java.awt.Graphics.clearRect FAIL: java.awt.Scrollbar.testSetValues FAIL: java.awt.image.BufferedImage.getSetRgb1Pixel FAIL: java.net.Socket.security FAIL: java.text.DecimalFormat.PR23996 Totals: PASS: 2827 XPASS: 0 FAIL: 210 XFAIL: 0 ___ Classpath-testresults mailing list Classpath-testresults@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-testresults
[cp-testresults] FAIL: classpath build with gcj (4.1) on Wed Oct 25 04:17:54 UTC 2006
make[3]: Leaving directory `/home/cpdev/Nightly/classpath/build/native/jni/java-lang' Making all in java-net make[3]: Entering directory `/home/cpdev/Nightly/classpath/build/native/jni/java-net' if /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../../classpath/native/jni/java-net -I../../../include -I../../../../classpath/include -I../../../../classpath/native/jni/classpath -I../../../../classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -Werror -g -O2 -MT javanet.lo -MD -MP -MF .deps/javanet.Tpo -c -o javanet.lo ../../../../classpath/native/jni/java-net/javanet.c; \ then mv -f .deps/javanet.Tpo .deps/javanet.Plo; else rm -f .deps/javanet.Tpo; exit 1; fi mkdir .libs gcc -DHAVE_CONFIG_H -I. -I../../../../classpath/native/jni/java-net -I../../../include -I../../../../classpath/include -I../../../../classpath/native/jni/classpath -I../../../../classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -Werror -g -O2 -MT javanet.lo -MD -MP -MF .deps/javanet.Tpo -c ../../../../classpath/native/jni/java-net/javanet.c -fPIC -DPIC -o .libs/javanet.o if /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../../classpath/native/jni/java-net -I../../../include -I../../../../classpath/include -I../../../../classpath/native/jni/classpath -I../../../../classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -Werror -g -O2 -MT java_net_VMInetAddress.lo -MD -MP -MF .deps/java_net_VMInetAddress.Tpo -c -o java_net_VMInetAddress.lo ../../../../classpath/native/jni/java-net/java_net_VMInetAddress.c; \ then mv -f .deps/java_net_VMInetAddress.Tpo .deps/java_net_VMInetAddress.Plo; else rm -f .deps/java_net_VMInetAddress.Tpo; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I../../../../classpath/native/jni/java-net -I../../../include -I../../../../classpath/include -I../../../../classpath/native/jni/classpath -I../../../../classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -Werror -g -O2 -MT java_net_VMInetAddress.lo -MD -MP -MF .deps/java_net_VMInetAddress.Tpo -c ../../../../classpath/native/jni/java-net/java_net_VMInetAddress.c -fPIC -DPIC -o .libs/java_net_VMInetAddress.o if /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../../classpath/native/jni/java-net -I../../../include -I../../../../classpath/include -I../../../../classpath/native/jni/classpath -I../../../../classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -Werror -g -O2 -MT java_net_VMNetworkInterface.lo -MD -MP -MF .deps/java_net_VMNetworkInterface.Tpo -c -o java_net_VMNetworkInterface.lo ../../../../classpath/native/jni/java-net/java_net_VMNetworkInterface.c; \ then mv -f .deps/java_net_VMNetworkInterface.Tpo .deps/java_net_VMNetworkInterface.Plo; else rm -f .deps/java_net_VMNetworkInterface.Tpo; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I../../../../classpath/native/jni/java-net -I../../../include -I../../../../classpath/include -I../../../../classpath/native/jni/classpath -I../../../../classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -Werror -g -O2 -MT java_net_VMNetworkInterface.lo -MD -MP -MF .deps/java_net_VMNetworkInterface.Tpo -c ../../../../classpath/native/jni/java-net/java_net_VMNetworkInterface.c -fPIC -DPIC -o .libs/java_net_VMNetworkInterface.o if /bin/sh ../../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../../classpath/native/jni/java-net -I../../../include -I../../../../classpath/include -I../../../../classpath/native/jni/classpath -I../../../../classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -Werror -g -O2 -MT java_net_VMURLConnection.lo -MD -MP -MF .deps/java_net_VMURLConnection.Tpo -c -o java_net_VMURLConnection.lo ../../../../classpath/native/jni/java-net/java_net_VMURLConnection.c; \ then mv -f .deps/java_net_VMURLConnection.Tpo .deps/java_net_VMURLConnection.Plo; else rm -f .deps/java_net_VMURLConnection.Tpo; exit 1; fi gcc -DHAVE_CONFIG_H -I. -I../../../../classpath/native/jni/java-net -I../../../include -I../../../../classpath/include -I../../../../classpath/native/jni/classpath -I../../../../classpath/native/jni/native-lib -W -Wall -Wmissing-declarations -Wwrite-strings -Wmissing-prototypes -Wno-long-long -Wstrict-prototypes -pedantic -Werror -g -O2 -MT java_net_VMURLConnection.lo -MD -MP -MF
Re: HTMLWriter
Hi Roman, That tip was useful, thanks! ;) David Fu. Hi Fu, One more question, do you have any idea what isBlockTag() is for? Although I have implemented this method, I am not sure where it is supposed to be used. Thanks! Sorry, no idea yet. Maybe it's not really important. Little tip: You could create a subclass, override that method and call Thread.dumpStack() to get a stacktrace and see from where it gets called. Maybe you can find out the use of that method this way. /Roman
Re: gkeytool error
Hi, now only gkeytool fails. I have used the classes of glib.zip. These Classes are working well. I did : jamvm -version java version 1.4.2 JamVM version 1.4.3 Copyright (C) 2003-2006 Robert Lougher [EMAIL PROTECTED] I did : which jamvm /usr/local/bin/jamvm the last lines of gkeytool(/classpaht-0.92/gnu/classpath/tools/keytool/gkeytool and /usr/local/classpath/bin): prefix=/usr/local/classpath tools_dir=${prefix}/share/classpath tools_cp=${tools_dir}/tools.zip exec /usr/local/bin/jamvm -Xbootclasspath/p:${tools_cp} gnu.classpath.tools.keytool.Main $@ regards haoyang Am Freitag, den 20.10.2006, 14:39 +0200 schrieb Mario Torre: Il giorno ven, 20/10/2006 alle 11.35 +0200, Haoyang Lin ha scritto: Hi I did the same as you said. but the errors are still the same as before Hi! Works for me :) compiled with ./configure --disable-plugin --with-jikes --with-vm=/home/neugens/work_space/Eclipse/classpath/install/bin/jamvm Interesting... I know it is a stupid question, this is the only program that fails? I mean, have you tried to run $ jamvm --version it works? and the output of $ which jamvm Like Raif said, it would be nice to have the last lines of gkeytool. Ciao, Mario
Free implementations of [un]pack200?
I'm trying to figure out if it's possible to manually extract the .bin files provided of JDK6 betas so that japi can be run on it on a nightly basis (without having to actually execute the code, since I can't guarantee I can trust the source). Turns out after a few false starts I should have done what my instinct was in the first place and just run unzip on it, because it is a valid zip file. However there isn't an rt.jar file inside the zip, but an rt.pack file instead, which apparently can be extracted using an unpack200 program that as far as I can tell has been bundled with the JDK since 1.5 (this was news to me ;) ). Running the unpack200 binary from inside the zip is of course just as bad as running the bin file in the first place, but I *could* of course install JDK 1.5 from a trusted source and use unpack200 from that. Before I resort to using non-free software in the japi runs, though, I figured it was worth asking if anyone knows of a Free implementation of this unpack200 thingumy. Stuart. -- http://sab39.dev.netreach.com/
Re: Free implementations of [un]pack200?
Stuart Ballard wrote: Running the unpack200 binary from inside the zip is of course just as bad as running the bin file in the first place, but I *could* of course install JDK 1.5 from a trusted source and use unpack200 from that. Before I resort to using non-free software in the japi runs, though, I figured it was worth asking if anyone knows of a Free implementation of this unpack200 thingumy. I believe Alex Blewitt was working on it in the context of Harmony. I'm not sure how far along he is, but asking won't hurt :) cheers, dalibor topic
Re: Free implementations of [un]pack200?
Thanks for the hint :) A little googling found his blog which has this gem dated Oct 14th: Following on from my last success, I'm pleased to report that I've managed not only to decompress the data, but also reassemble it into a suitable archive and write it out. It handles any non-class file, and currently, .class files that are entirely empty interfaces. So, if you've got any oversized archives of types like java.io.Serializable, this could save you literally a hundred bytes or so ... Sounds like he's making good progress but has quite a ways to go. I'll have to go with the JDK from a trusted source approach I think :) Thanks again, Stuart. -- http://sab39.dev.netreach.com/
switch to IPv6-only
Hi, some days ago I posted a question where I was wondering why the RI calls all their network stuff with AF_INET6 even if the user explicitly wants to do IPv4-only stuff. I think I found the reason and am here to ask for going the same route in GNU Classpath. Let me try to explain the situation: When a new socket is created the native code will currently call socket(AF_INET, ...) at some place. Usually the user then configures the socket and binds it to a specific inet address. Not until this binding operation is started we know whether the user wants an IPv4 socket or an IPv6 one. However the current implementation has decided this already and it is AF_INET (== IPv4). Consequently stuff like connecting to IPv6 servers fails. For multicast sockets the situation is even more worse: If you do a 'new MulticastSocket()' the socket is created as AF_INET and is bound automatically to the IPv4 ANY_ADDR. Doing a joinGroup()/leaveGroup() with an IPv6 address is quite pointless. What I am proposing is that we do all our native interaction as if the addresses where IPv6. As IP4v is a subset of IPv6 there should be no problem: Prepend 12 zeros before an IP4v address and you're done. But what about the platforms that do not natively support IPv6? Bad luck, they have to use a little hack: Skip the first 12 bytes in a buffer containing an address and call the system function with AF_INET instead. Additionally they have to adjust VMPlainSocketImpl's methods to throw some error when someone passes an Inet6Address to them. Questions, opinions, suggestions? cya Robert signature.asc Description: OpenPGP digital signature
Re: switch to IPv6-only
Robert Schuster wrote: Hi, some days ago I posted a question where I was wondering why the RI calls all their network stuff with AF_INET6 even if the user explicitly wants to do IPv4-only stuff. I think I found the reason and am here to ask for going the same route in GNU Classpath. Let me try to explain the situation: When a new socket is created the native code will currently call socket(AF_INET, ...) at some place. Usually the user then configures the socket and binds it to a specific inet address. Not until this binding operation is started we know whether the user wants an IPv4 socket or an IPv6 one. However the current implementation has decided this already and it is AF_INET (== IPv4). Consequently stuff like connecting to IPv6 servers fails. For multicast sockets the situation is even more worse: If you do a 'new MulticastSocket()' the socket is created as AF_INET and is bound automatically to the IPv4 ANY_ADDR. Doing a joinGroup()/leaveGroup() with an IPv6 address is quite pointless. What I am proposing is that we do all our native interaction as if the addresses where IPv6. As IP4v is a subset of IPv6 there should be no problem: Prepend 12 zeros before an IP4v address and you're done. But what about the platforms that do not natively support IPv6? Bad luck, they have to use a little hack: Skip the first 12 bytes in a buffer containing an address and call the system function with AF_INET instead. Additionally they have to adjust VMPlainSocketImpl's methods to throw some error when someone passes an Inet6Address to them. Questions, opinions, suggestions? I like this idea. One thing I think we should do is to check the socket() errno, and if it is EAFNOSUPPORT, then fall back to ipv4 only, as I think that is the indication that there is no ipv6 support in the kernel. Since even on Linux based systems the ipv6 support is optional, we should still have a working java runtime if ipv6 is not configured. David Daney
[commit-cp] classpath ChangeLog java/awt/Scrollbar.java
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tania Bento tbento06/10/24 13:59:01 Modified files: . : ChangeLog java/awt : Scrollbar.java Log message: 2006-10-24 Tania Bento [EMAIL PROTECTED] * java/awt/Scrollbar.java: (setLineIncrement): Removed unnecessary if-clause and if lineIncrement == 0, then it should be set to 1, not 0. (setPageIncrement): Removed unnecessary if-clause and if pageIncrement == 0, then it should be set to 1, not 0. (setValues): If visibleAmount = 0, it should be set to 1, not 0. If maximum = minimum, maximum should be set to mininum + 1. The actual value of maximum is maximum - visibleAmount, so I made this change to the appropriate if-check. Remove the two unneccessary if-clauses. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8716r2=1.8717 http://cvs.savannah.gnu.org/viewcvs/classpath/java/awt/Scrollbar.java?cvsroot=classpathr1=1.28r2=1.29
[commit-cp] classpath ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tania Bento tbento06/10/24 13:59:47 Modified files: . : ChangeLog Log message: CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8717r2=1.8718
[commit-cp] classpath ChangeLog tools/Makefile.am tools/too...
CVSROOT:/sources/classpath Module name:classpath Changes by: Thomas Fitzsimmons fitzsim06/10/24 18:03:33 Modified files: . : ChangeLog tools : Makefile.am toolwrapper.c Log message: 2006-10-24 Thomas Fitzsimmons [EMAIL PROTECTED] * tools/Makefile.am: Add ASM_JAR define to each tool's CFLAGS. * tools/toolwrapper.c (main): Set bootclasspath, not classpath. Add ASM_JAR to bootclasspath. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8718r2=1.8719 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/Makefile.am?cvsroot=classpathr1=1.24r2=1.25 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/toolwrapper.c?cvsroot=classpathr1=1.3r2=1.4
[commit-cp] classpath java/net/NetworkInterface.java vm/ref...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/10/24 23:19:48 Modified files: java/net : NetworkInterface.java vm/reference/java/net: VMNetworkInterface.java . : ChangeLog Log message: 2006-10-25 Robert Schuster [EMAIL PROTECTED] Fixes PR29576 * java/net/NetworkInterface.java: (createAnyInterface): New method. (equals): Added if-statement to handle case where netif.name is null. * vm/reference/java/net/VMNetworkInterface.java: (hashCode): Rewritten. (VMNetworkInterface): New constructor. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/java/net/NetworkInterface.java?cvsroot=classpathr1=1.20r2=1.21 http://cvs.savannah.gnu.org/viewcvs/classpath/vm/reference/java/net/VMNetworkInterface.java?cvsroot=classpathr1=1.5r2=1.6 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8719r2=1.8720
[commit-cp] classpath ChangeLog java/net/MulticastSocket.java
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/10/24 23:32:25 Modified files: . : ChangeLog java/net : MulticastSocket.java Log message: 2006-10-25 Robert Schuster [EMAIL PROTECTED] Fixes PR29576 * java/net/MulticastSocket.java: (getNetworkInterface): Return a special NetworkInterface instance if the socket's multicast interface is set to any. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8720r2=1.8721 http://cvs.savannah.gnu.org/viewcvs/classpath/java/net/MulticastSocket.java?cvsroot=classpathr1=1.26r2=1.27
[commit-cp] classpath java/net/Inet6Address.java ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/10/24 23:46:05 Modified files: java/net : Inet6Address.java . : ChangeLog Log message: 2006-10-25 Robert Schuster [EMAIL PROTECTED] * java/net/Inet6Address.java: (isMulticastAddress): Fixed check. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/java/net/Inet6Address.java?cvsroot=classpathr1=1.16r2=1.17 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8721r2=1.8722
[commit-cp] classpath gnu/java/net/PlainSocketImpl.java gnu...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/10/25 00:33:28 Modified files: gnu/java/net : PlainSocketImpl.java PlainDatagramSocketImpl.java include: Makefile.am native/jni/java-net: Makefile.am gnu_java_net_VMPlainSocketImpl.c native/jni/java-nio: gnu_java_nio_VMChannel.c native/jni/native-lib: cpio.c cpio.h vm/reference/gnu/java/nio: VMChannel.java vm/reference/gnu/java/net: VMPlainSocketImpl.java java/net : Socket.java . : NEWS ChangeLog Log message: Lots of changes. 2006-10-25 Robert Schuster [EMAIL PROTECTED] * 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
[commit-cp] classpath native/jni/java-net/javanet.c native/...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/10/25 00:39:02 Modified files: native/jni/java-net: javanet.c javanet.h . : ChangeLog Log message: 2006-10-25 Robert Schuster [EMAIL PROTECTED] * native/jni/java-net/javanet.h: Added declaration for _javanet_create_inetaddress. * native/jni/java-net/javanet.c: (_javanet_create_inetaddress): Removed static keyword. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/java-net/javanet.c?cvsroot=classpathr1=1.36r2=1.37 http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/java-net/javanet.h?cvsroot=classpathr1=1.15r2=1.16 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8723r2=1.8724
[commit-cp] classpath java/net/MulticastSocket.java ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Robert Schuster rschuster 06/10/25 00:45:42 Modified files: java/net : MulticastSocket.java . : ChangeLog Log message: 2006-10-25 Robert Schuster [EMAIL PROTECTED] * java/net/MulticastSocket.java: (setNetworkInterface): Rewritten. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/java/net/MulticastSocket.java?cvsroot=classpathr1=1.27r2=1.28 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.8724r2=1.8725