[cp-patches] FYI: bump needed auto* versions
Ralf Wildenhues (CCd) went through the whole toolchain (gcc, binutils, gdb, etc) and bumped the required auto* versions to the latest stable releases. This seems to be a good idea generally, so I think we ought to do it for Classpath as well. The only actual source change needed for this is to update cp-hacking.texinfo. You might think that, given this, perhaps we should not update the versions -- but I think it still makes sense, in that it means that future patches can now rely on these minimums. Tom 2009-08-15 Ralf Wildenhues ralf.wildenh...@gmx.de * doc/cp-hacking.texinfo (Needed Tools and Libraries): Bump Autoconf version to 2.64, Automake to 1.11, M4 to 1.4.6. Index: doc/cp-hacking.texinfo === RCS file: /cvsroot/classpath/classpath/doc/cp-hacking.texinfo,v retrieving revision 1.7 diff -u -r1.7 cp-hacking.texinfo --- doc/cp-hacking.texinfo 9 Mar 2008 16:28:58 - 1.7 +++ doc/cp-hacking.texinfo 17 Aug 2009 16:08:11 - @@ -11,7 +11,7 @@ This file contains important information you will need to know if you are going to hack on the GNU Classpath project code. -Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2005,2007 Free Software Foundation, Inc. +Copyright (C) 1998,1999,2000,2001,2002,2003,2004,2005,2007,2009 Free Software Foundation, Inc. @ifnotplaintext @dircategory GNU Libraries @@ -351,13 +351,13 @@ @item CVS 1.11+ @item -automake 1.9+ +automake 1.11+ @item -autoconf 2.59+ +autoconf 2.64+ @item libtool 1.5+ @item -GNU m4 1.4 +GNU m4 1.4.6 @item texinfo 4.2+ @end itemize
Re: [cp-patches] FYI: bump needed auto* versions
Andrew == Andrew John Hughes gnu_and...@member.fsf.org writes: Andrew The autoconf jump seems a bit steep. 2.64 was only released at the Andrew end of July, less than a month ago. I guess you can downgrade it if you feel strongly about it. It is true that this is really bleed-in from GCC. I do think it is a reasonable choice (I would not have committed it otherwise), but there may be other reasonable choices. Tom
[commit-cp] classpath ChangeLog doc/cp-hacking.texinfo
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 09/08/17 16:09:33 Modified files: . : ChangeLog doc: cp-hacking.texinfo Log message: 2009-08-15 Ralf Wildenhues ralf.wildenh...@gmx.de * doc/cp-hacking.texinfo (Needed Tools and Libraries): Bump Autoconf version to 2.64, Automake to 1.11, M4 to 1.4.6. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9772r2=1.9773 http://cvs.savannah.gnu.org/viewcvs/classpath/doc/cp-hacking.texinfo?cvsroot=classpathr1=1.7r2=1.8
Re: trouble w/ synchronized close method in PushbackInputStream
Robert == Robert Dodier [EMAIL PROTECTED] writes: Robert PushbackInputStream.close is synchronized. Apparently there is a Robert deadlock: if I cut out the synchronized keyword, the program runs Robert to completion. I am guessing that there is a thread sleeping in read() Robert or something like that; I didn't investigate further. Could you file this in bugzilla? That way at least it won't get lost. Or, send a patch :-) Tom
[cp-patches] Patch: FYI: AIX fixlet in fdlibm.h
I'm checking this in. This comes from a GCC maintainer. fdlibm fails to build on AIX because 'hz' is defined in some system header there. This patch works around the problem by undeffing hz. Tom ChangeLog: 2008-10-23 David Edelsohn [EMAIL PROTECTED] * native/fdlibm/fdlibm.h: Undef hz. Index: native/fdlibm/fdlibm.h === RCS file: /cvsroot/classpath/classpath/native/fdlibm/fdlibm.h,v retrieving revision 1.15 diff -u -r1.15 fdlibm.h --- native/fdlibm/fdlibm.h 13 Sep 2007 19:39:42 - 1.15 +++ native/fdlibm/fdlibm.h 24 Oct 2008 15:23:55 - @@ -24,6 +24,14 @@ #include config.h #include stdlib.h +/* + * AIX includes a header that defines hz, + * which conflicts with an fdlibm variable in some functions. + */ +#ifdef _AIX +#undef hz +#endif + /* GCJ LOCAL: Include files. */ #include ieeefp.h /* CLASSPATH LOCAL: */
[commit-cp] classpath ChangeLog native/fdlibm/fdlibm.h
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/10/24 15:25:26 Modified files: . : ChangeLog native/fdlibm : fdlibm.h Log message: 2008-10-23 David Edelsohn [EMAIL PROTECTED] * native/fdlibm/fdlibm.h: Undef hz. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9733r2=1.9734 http://cvs.savannah.gnu.org/viewcvs/classpath/native/fdlibm/fdlibm.h?cvsroot=classpathr1=1.15r2=1.16
[commit-cp] classpath ChangeLog native/jni/gtk-peer/gnu_jav...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/10/17 18:52:30 Modified files: . : ChangeLog native/jni/gtk-peer: gnu_java_awt_peer_gtk_CairoGraphics2D.c Log message: 2008-10-17 Robert Lougher [EMAIL PROTECTED] * native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c (Java_gnu_java_awt_peer_gtk_CairoGraphics2D_cairoDrawGlyphVector): Release 'fonts'. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9731r2=1.9732 http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_CairoGraphics2D.c?cvsroot=classpathr1=1.26r2=1.27
[cp-patches] FYI: make jar use foreach
I'm checking this in. While looking at a jar oddity I found that it was still explicitly using iterators. IMO it is cleaner to use the 1.5 foreach feature. This patch implements this. Tom ChangeLog: 2008-10-16 Tom Tromey [EMAIL PROTECTED] * tools/gnu/classpath/tools/jar/WorkSet.java (initSet): Use foreach. Change argument type. (WorkSet): Change argument type. * tools/gnu/classpath/tools/jar/Indexer.java (indexJarFile): Use foreach. * tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries): Use foreach. (getAllEntries): Likewise. Index: tools/gnu/classpath/tools/jar/Creator.java === RCS file: /cvsroot/classpath/classpath/tools/gnu/classpath/tools/jar/Creator.java,v retrieving revision 1.8 diff -u -r1.8 Creator.java --- tools/gnu/classpath/tools/jar/Creator.java 26 May 2008 19:03:41 - 1.8 +++ tools/gnu/classpath/tools/jar/Creator.java 16 Oct 2008 17:12:45 - @@ -1,5 +1,5 @@ /* Creator.java - create a new jar file - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2008 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -49,7 +49,6 @@ import java.text.MessageFormat; import java.util.ArrayList; import java.util.HashSet; -import java.util.Iterator; import java.util.jar.Attributes; import java.util.jar.JarFile; import java.util.jar.JarOutputStream; @@ -179,13 +178,9 @@ private ArrayListEntry getAllEntries(Main parameters) { -Iterator it = parameters.entries.iterator(); ArrayListEntry allEntries = new ArrayListEntry(); -while (it.hasNext()) - { -Entry entry = (Entry) it.next(); -addEntries(allEntries, entry); - } +for (Entry entry : parameters.entries) + addEntries(allEntries, entry); return allEntries; } @@ -196,13 +191,9 @@ writtenItems.add(META-INF/); //$NON-NLS-1$ writtenItems.add(JarFile.MANIFEST_NAME); -ArrayList allEntries = getAllEntries(parameters); -Iterator it = allEntries.iterator(); -while (it.hasNext()) - { -Entry entry = (Entry) it.next(); -writeFile(entry.file, entry.name, parameters.verbose); - } +ArrayListEntry allEntries = getAllEntries(parameters); +for (Entry entry : allEntries) + writeFile(entry.file, entry.name, parameters.verbose); } protected Manifest createManifest(Main parameters) Index: tools/gnu/classpath/tools/jar/Indexer.java === RCS file: /cvsroot/classpath/classpath/tools/gnu/classpath/tools/jar/Indexer.java,v retrieving revision 1.7 diff -u -r1.7 Indexer.java --- tools/gnu/classpath/tools/jar/Indexer.java 7 May 2008 01:45:43 - 1.7 +++ tools/gnu/classpath/tools/jar/Indexer.java 16 Oct 2008 17:12:45 - @@ -1,5 +1,5 @@ /* Indexer.java -- add index.list file to jar - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2008 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -46,7 +46,6 @@ import java.io.OutputStream; import java.text.MessageFormat; import java.util.Enumeration; -import java.util.Iterator; import java.util.LinkedHashSet; import java.util.StringTokenizer; import java.util.jar.Attributes; @@ -90,10 +89,9 @@ result.append(fileName); // Any line ending will do. result.append('\n'); -Iterator i = entries.iterator(); -while (i.hasNext()) + for (String s : entries) { -result.append(i.next()); +result.append(s); result.append('\n'); } // Paragraph break. Index: tools/gnu/classpath/tools/jar/WorkSet.java === RCS file: /cvsroot/classpath/classpath/tools/gnu/classpath/tools/jar/WorkSet.java,v retrieving revision 1.2 diff -u -r1.2 WorkSet.java --- tools/gnu/classpath/tools/jar/WorkSet.java 15 Dec 2006 19:45:38 - 1.2 +++ tools/gnu/classpath/tools/jar/WorkSet.java 16 Oct 2008 17:12:45 - @@ -1,5 +1,5 @@ /* WorkSet.java -- Helper to track what files to work on - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2008 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -40,21 +40,18 @@ import java.util.ArrayList; import java.util.HashSet; -import java.util.Iterator; public class WorkSet { private HashSetString allItems; - private void initSet(ArrayList entries) + private void initSet(ArrayListEntry entries) { if (entries == null || entries.isEmpty()) return; allItems = new HashSetString(); -Iterator it = entries.iterator(); -while (it.hasNext()) +for (Entry entry : entries) { -Entry entry = (Entry) it.next(); int len = entry.name.length(); while (len 0 entry.name.charAt(len - 1
[commit-cp] classpath ChangeLog tools/gnu/classpath/tools/j...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/10/16 17:20:24 Modified files: . : ChangeLog tools/gnu/classpath/tools/jar: Creator.java Indexer.java WorkSet.java Log message: * tools/gnu/classpath/tools/jar/WorkSet.java (initSet): Use foreach. Change argument type. (WorkSet): Change argument type. * tools/gnu/classpath/tools/jar/Indexer.java (indexJarFile): Use foreach. * tools/gnu/classpath/tools/jar/Creator.java (writeCommandLineEntries): Use foreach. (getAllEntries): Likewise. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9730r2=1.9731 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/jar/Creator.java?cvsroot=classpathr1=1.8r2=1.9 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/jar/Indexer.java?cvsroot=classpathr1=1.7r2=1.8 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/jar/WorkSet.java?cvsroot=classpathr1=1.2r2=1.3
Re: [cp-patches] [rvm-core] State of Jikes RVM patches waiting to go into Classpath
Ian == Ian Rogers [EMAIL PROTECTED] writes: Ian Sorry about that, it's the same thread just at the end rather than the Ian initial patch. What are these other VMs you speak of ;-) Can I apply Ian it and see if something somewhere falls over then fix it, rather than Ian pre-emptively finding things out about VMs I don't use. The problem case had to do with extended time stamps in zip files. My memory of this stuff has faded, but here's the note: http://gcc.gnu.org/ml/java/2003-03/msg00267.html If this remains a non-problem then I would not worry much. In any case we can always back out or otherwise fix changes that cause problems. Tom
Re: [cp-patches] RFC: AIX build fix - paths too long in check_jni.sh
Ian == Ian Rogers [EMAIL PROTECTED] writes: Ian Dave Grove fixed an AIX build issue for the Jikes RVM with the Ian attached patch. Jikes RVM tracker here: Ian http://jira.codehaus.org/browse/RVM-526 It reads slightly strangely to me, but no big deal -- it isn't unclear. Ok with a ChangeLog entry. Tom
Re: FW: Help a noob?
Twisti == Christian Thalinger [EMAIL PROTECTED] writes: Twisti You don't need to write that one, the shipped one works. I compile GNU Twisti Classpath and CACAO on IRIX for a long time: Do you have a configure change that didn't make it upstream to Classpath? Just curious :) Tom
Re: FW: Help a noob?
Geoffrey == Greene, Geoffrey N [EMAIL PROTECTED] writes: But that's weird. This is supposed to be a REPLACEMENT for java...why would it need javac? How can I get around the need for javac? And why is it needed anyway? Basically, all the 1.5 compilers in existence are written in java. So, you need a java runtime to run them. A simple way to do a bootstrap on a new machine is to build the .class files on a working machine, then copy them over. An even simpler way is to see if somebody already has them built and will make them available for download :-) Once you have the Classpath .class files, you can get a VM running. Then you have enough to rebuild everything from scratch on the new machine. Also, I notice the WARNING...in the code below: checking jni_md.h support... configure: WARNING: no jni_md.h is built in a funny way. Basically we look for a pre-made one in $srcdir/include that matches the current CPU/OS combination. So, to do a new port you would have to write this file. This is not hard, ordinarily. Tom
Re: [cp-patches] [PATCH, classpath, build] Use AM_COND_IF if available.
Ralf == Ralf Wildenhues [EMAIL PROTECTED] writes: Ralf Tested by building the tree with --{enable,disable}-tool-wrappers and Ralf with Automake 1.9.6 and git Automake. OK for GCC trunk, and if yes, can Ralf somebody push this to classpath upstream? This is ok. I will check it in to classpath. thanks, Tom
[commit-cp] classpath ChangeLog configure.ac m4/acinclude.m...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/07/15 15:33:52 Modified files: . : ChangeLog configure.ac m4 : acinclude.m4 tools : Makefile.am Log message: 2008-07-15 Ralf Wildenhues [EMAIL PROTECTED] * m4/acinclude.m4 (CLASSPATH_COND_IF): New macro. * configure.ac: Use it. * tools/Makefile.am (!CREATE_WRAPPERS): Update comment. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9687r2=1.9688 http://cvs.savannah.gnu.org/viewcvs/classpath/configure.ac?cvsroot=classpathr1=1.238r2=1.239 http://cvs.savannah.gnu.org/viewcvs/classpath/m4/acinclude.m4?cvsroot=classpathr1=1.37r2=1.38 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/Makefile.am?cvsroot=classpathr1=1.52r2=1.53
Re: [cp-patches] FYI: PR36636 Copy updated JAR file if renaming fails
Andrew == Andrew John Hughes [EMAIL PROTECTED] writes: Andrew gjar -u doesn't work if the jar file being updated is not on Andrew the same filesystem as /tmp. We could just make the temporary file in the same directory as the desired output file. Tom
[cp-patches] Patch: FYI: fix PR 32198
I'm checking this in to Classpath and libgcj. This fixes PR 32198. rmic had an inverted isAssignableFrom test. Tom ChangeLog: 2008-06-24 Tom Tromey [EMAIL PROTECTED] PR libgcj/32198: * tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java (compile): Reverse isAssignableFrom test. Index: tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java === RCS file: /cvsroot/classpath/classpath/tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java,v retrieving revision 1.2 diff -u -r1.2 SourceGiopRmicCompiler.java --- tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java 7 May 2008 01:45:45 - 1.2 +++ tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java 24 Jun 2008 16:51:27 - @@ -1,5 +1,5 @@ /* SourceGiopRmicCompiler -- Central GIOP-based RMI stub and tie compiler class. - Copyright (C) 2006 Free Software Foundation + Copyright (C) 2006, 2008 Free Software Foundation This file is part of GNU Classpath. @@ -292,7 +292,7 @@ for (int j = 0; j exc.length; j++) { -if (RemoteException.class.isAssignableFrom(exc[j])) +if (exc[j].isAssignableFrom(RemoteException.class)) { remEx = true; break;
[commit-cp] classpath ChangeLog tools/gnu/classpath/tools/r...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/06/24 17:36:07 Modified files: . : ChangeLog tools/gnu/classpath/tools/rmic: SourceGiopRmicCompiler.java Log message: PR libgcj/32198: * tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java (compile): Reverse isAssignableFrom test. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9660r2=1.9661 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/rmic/SourceGiopRmicCompiler.java?cvsroot=classpathr1=1.2r2=1.3
Re: [cp-patches] make jni.h C++ compatible with OpenJDK
Twisti == Christian Thalinger [EMAIL PROTECTED] writes: Twisti This patch renames the JNINativeInterface_ variable in Twisti _Jv_JNIEnv to be compatible with OpenJDK. Without that it's Twisti not possible to compile C++ code with both. Twisti OK to commit? Yes, this is fine. I'm surprised that 'functions' is a public member. But, I suppose this must be done so that C++ code can easily determine if a given function is implemented by the VM. Tom
Re: [cp-patches] [PATCH, classpath] dtoa.c: missing include
Ralf == Ralf Wildenhues [EMAIL PROTECTED] writes: Ralf the trivial patch below avoids a warning about undeclared 'free'. Ralf bootstrapped and regtested. OK for GCC trunk, and if yes, can somebody Ralf put this in upstream classpath? I got to this today and found that stdlib.h is already included in Classpath's dtoa.c. Tom
Re: [cp-patches] [PATCH, classpath] dtoa.c: missing include
Ralf == Ralf Wildenhues [EMAIL PROTECTED] writes: Ralf the trivial patch below avoids a warning about undeclared Ralf 'free'. bootstrapped and regtested. OK for GCC trunk, and if Ralf yes, can somebody put this in upstream classpath? This is ok. I'll push it upstream next week. Ralf (Cc:ing the author of the file as requested in the header.) I'm pretty sure that info is obsolete. Tom
[commit-cp] classpath ChangeLog include/jni.h
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/06/15 17:12:10 Modified files: . : ChangeLog include: jni.h Log message: * include/jni.h (_jobjectRefType, jobjectRefType): Always declare. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9640r2=1.9641 http://cvs.savannah.gnu.org/viewcvs/classpath/include/jni.h?cvsroot=classpathr1=1.11r2=1.12
[cp-patches] Patch: RFC: Always define jobjectRefType
This patch changes Classpath's jni.h to always define jobjectRefType. I don't see a reason it should be conditionally defined -- it is part of the spec and, I think, all implementations will have to define it in exactly the same way. I'll check this in sometime soon-ish (Friday maybe) unless there are objections. thanks, Tom ChangeLog: 2008-06-11 Tom Tromey [EMAIL PROTECTED] * include/jni.h (_jobjectRefType, jobjectRefType): Always declare. Index: include/jni.h === RCS file: /cvsroot/classpath/classpath/include/jni.h,v retrieving revision 1.11 diff -u -r1.11 jni.h --- include/jni.h 30 Aug 2007 11:25:23 - 1.11 +++ include/jni.h 11 Jun 2008 17:21:06 - @@ -1,5 +1,5 @@ /* jni.h - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008 Free Software Foundation This file is part of GNU Classpath. @@ -136,16 +136,6 @@ struct _jmethodID; typedef struct _jfieldID *jfieldID; typedef struct _jmethodID *jmethodID; - -enum _jobjectRefType -{ - JNIInvalidRefType= 0, - JNILocalRefType = 1, - JNIGlobalRefType = 2, - JNIWeakGlobalRefType = 3 -}; - -typedef enum _jobjectRefType jobjectRefType; #endif /* Version numbers. */ @@ -164,6 +154,15 @@ #define JNI_EDETACHED(-2) #define JNI_EVERSION (-3) +enum _jobjectRefType +{ + JNIInvalidRefType= 0, + JNILocalRefType = 1, + JNIGlobalRefType = 2, + JNIWeakGlobalRefType = 3 +}; + +typedef enum _jobjectRefType jobjectRefType; #ifdef __cplusplus extern C
Re: Savannah has Mercurial!
Andrew == Andrew John Hughes [EMAIL PROTECTED] writes: Andrew For me the speed of diffs/status checks in CVS is appalling Andrew and has a significant impact on my work habits. For diff I can't help you, but for status I recommend the cvs utils. I've used these upwards of ten years, I can't really picture using cvs without them. FWIW, I'm ambivalent about changing Classpath's VC system. We haven't had many branches historically (do we have any now?), bypassing one of cvs's big problems. The diff thing is annoying, though I guess I'm used to it. One consideration is whether there is Eclipse support for the new system. Assuming, that is, that any active Classpath developers are using Eclipse. Tom
Re: [cp-patches] RFC: @file support for gjavah gjar
Robert == Robert Schuster [EMAIL PROTECTED] writes: Robert The other tools are not affected by this change nor does this modify the Robert core getopt functionality (except that I made the 'programName' field Robert protected - was private). I don't think we need this to be protected. Instead I think parseFileList and notifyFile can throw an OptionException. Parser will emit the proper error message in this case. At least, I think that should work, since that was the idea behind the OptionException design -- clients can throw an exception and only the parser framework needs to know how to format an error message. If that does not work perhaps we can add a new method to Parser -- I'd rather avoid exposing a field. Some of the indentation seems wrong to me, though I always find it a bit hard to tell due to diffs making tabs look weird. Aside from those things this looks good to me. Robert + // While not reached end of line ... Robert +while (start length) E.g., this comment seems indented improperly. Robert + public void notifyFile(String fileArgument) Robert + throws OptionException In context this looks like it should be further to the right. Robert + { Robert + if (fileArgument.codePointAt(0) == '@') Robert + { Likewise this brace. Tom
Re: [cp-patches] FYI: gjar @file fix
Robert == Robert Schuster [EMAIL PROTECTED] writes: Robert What my implementation does not handle is whitespace inside filenames Robert and quoting. However I am not sure whether this is supported in filelist Robert anyway. Somewhere there is a rule for how javac handles this. As I recall, jacks had a test for it; this is what I used when writing gcjx :) In any case, it is easy enough to test the JDK jar to see what it does. Robert It may be possible that some tools need @file support and some Robert not (Does anyone know more about this?). And such a case I Robert would change the getopt API to explicitly request @file Robert support in parse(). I think it is fine to add some code to the generic parser to let subclasses treat '@' specially, if that is needed. I am less sure about adding java-specific file name parsing to the generic command-line parser code. That code is not supposed to be specific to java tooling (at least frysk uses it, fwiw). Tom
Re: [cp-patches] Fix for Class.getSimpleName()
Andrew == Andrew Haley [EMAIL PROTECTED] writes: Andrew Yes, but gcj's implementation was also broken. This is the Andrew current gcj code; please let me know if you think it's still Andrew wrong. I think looking for a $ in general is wrong. I think instead the name should be looked up in the InnerClasses attribute. AFAIK that's the only guaranteed-reliable way to do this. That said, I doubt this implementation will fail in real life. Tom
Re: [cp-patches] FYI: Fix Integer.parseInt(+x) bug
Andrew == Andrew John Hughes [EMAIL PROTECTED] writes: Andrew This makes Classpath parse +x as x, not -x. ChangeLog: I think this will parse '-+5', which I assume is not intended. Andrew ch = str.charAt(++index); Andrew} Andrew +if (ch == '+') ... probably should be 'else if'. Tom
Re: Integer.parseInt(+42) gives -42
David == David Daney [EMAIL PROTECTED] writes: David I am not an expert in this realm, but this may be small enough David so that an assignment is not necessary. Yes, I agree, particularly because there is really only one fix for this -- delete the '+' code. Actually, the proposed patch doesn't seem to go far enough in that direction... AFAICT a leading '+' is not allowed at all; there's no reason to check for it specially. Tom
Re: [cp-patches] FYI: PR36147 Fix post-toString use of CPStringBuilder
Andrew == Andrew John Hughes [EMAIL PROTECTED] writes: Andrew This adds a feature to CPStringBuilder so that it knows Andrew when its array has been shared with a String object. Once Andrew this has happened, any future write operations will allocate Andrew a new array and reset the flag. CPStringBuilder.toString's documentation still says: [...] Note * that the result is not a copy, so future modifications to this buffer * do affect the String. That isn't true any more ... and anyway should never have been true, since a mutable String will mess with any number of things internally. Tom
Re: How to build Classpath without Classpath
Gustavo == Gustavo Guillermo Perez [EMAIL PROTECTED] writes: ecj-binary - gcj-4.3 - classpath 0.9x (x = 5) - cacao 0.98+hg20071001 (or newer) - ecj(-bootstrap) Gustavo Yes very well, I having nightmares cause I can't have a Gustavo binary build of gcc 4.3 or 4.4 without errors on uClibc, I Gustavo guess cross compiling is a solution but gcc 4.2.X and gcc Gustavo 4.1.X works natively. Having java on embedded systems is more Gustavo painful than last year. It seems to me that it should be possible to compile Classpath on *any* machine with a working java environment, then copy the classes around. I haven't looked at the cacao or jamvm build systems in a while, but supporting something like this would make it simpler to do ports. For instance, we could just have a glibj.zip download somewhere -- bootstrap problem solved. Tom
Re: How to build Classpath without Classpath
Gustavo == Gustavo Guillermo Perez [EMAIL PROTECTED] writes: Gustavo Hey I can do that, but what about rhe lib folder of gnu classpath Gustavo libraries are not binary compatible from glibc to uClibc Yeah, the idea is to compile the class files only, then build the rest on the new platform. This may require build hackery. And, it may require a bit of extra hackery in the initial build, depending on what classes the desired VM overrides, etc. Anyway, whatever is required, it sounds simpler to me than the long processes outlined upthread. And, on the plus side, if the needed Classpath build tweaks are done cleanly, we can check them in for future users. Tom
Re: [cp-patches] Fix for Class.getSimpleName()
Sebastian GCJ's implementation seems not to handle inner and local classes. Thanks. Sebastian I don't have a good overview of the classpath architecture, Sebastian yet. Maybe it would be better to remove the method Sebastian getSimpleName() in VMClass.java and implement it directly Sebastian in java.lang.Class? Yes, if it can be written using other parts of the defined API, then I think that would be preferable. In general it is best to only put something in VMClass if there is a need -- either when it can't be done using the public API, or when there is a performance issue with the straightforward approach. Tom
Re: [cp-patches] Fix for Class.getSimpleName()
Sebastian == Sebastian Mancke [EMAIL PROTECTED] writes: Sebastian Now, the method getSimpleName() is merged with the one of Sebastian glibgcj. (Not changing behaviour, but avoiding recursion) I noticed it is still different. My recollection (I haven't looked at this in a while) is that the gcj implementation is correct. And, it relies only on the published Class API. So, why not just use it directly in Classpath's Class? Sebastian +String fullName = getName(klass); Sebastian +int pos = fullName.lastIndexOf($); I think relying on the name mangling is not valid. That is why gcj's implementation uses isAnonymousClass and the like. Tom
Re: [cp-patches] Patch: FYI: speed up gen-classlist.sh
Mark Something is broken in this patch, at least for in srcdir builds. I end Mark up with an empty cat | sed which then just sits there. I believe it Mark comes from: Mark I don't really know what the intention is here. I assume that the whole Mark sedding should be skipped if there is no such omit file. Could you take Mark a look? I'll fix it today. Sorry about that. Tom
Re: [cp-patches] Patch: FYI: speed up gen-classlist.sh
Mark == Mark Wielaard [EMAIL PROTECTED] writes: Mark At this point $vm_dirlist is ../vm/reference and $1 is standard, but Mark there is no ../vm/reference/standard.omit file, so $vm_omitlist will Mark stay empty leading to the empty cat | sed. Thanks for tracking this down. And, sorry about the mess. Here's the patch I'm committing. This fixed it for me. Tom ChangeLog: 2008-04-18 Tom Tromey [EMAIL PROTECTED] * lib/gen-classlist.sh.in: Skip 'sed' steps if no vm_omitlist found. Index: lib/gen-classlist.sh.in === RCS file: /cvsroot/classpath/classpath/lib/gen-classlist.sh.in,v retrieving revision 1.41 diff -u -r1.41 gen-classlist.sh.in --- lib/gen-classlist.sh.in 17 Apr 2008 22:46:20 - 1.41 +++ lib/gen-classlist.sh.in 18 Apr 2008 14:29:43 - @@ -119,8 +119,10 @@ vm_omitlist=$vm_omitlist $dir/$1.omit fi done -cat $vm_omitlist | sed $sed_omit_hash tmp.awk -cat $vm_omitlist | sed $sed_omit_main_loop tmp.awk +if test -n $vm_omitlist; then + cat $vm_omitlist | sed $sed_omit_hash tmp.awk + cat $vm_omitlist | sed $sed_omit_main_loop tmp.awk +fi @AWK@ -f tmp.awk vm.add ${top_builddir}/lib/classes.1 rm -f vm.omit vm.add tmp.omit tmp.awk
[commit-cp] classpath ChangeLog lib/gen-classlist.sh.in
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/04/18 14:30:35 Modified files: . : ChangeLog lib: gen-classlist.sh.in Log message: * lib/gen-classlist.sh.in: Skip 'sed' steps if no vm_omitlist found. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9575r2=1.9576 http://cvs.savannah.gnu.org/viewcvs/classpath/lib/gen-classlist.sh.in?cvsroot=classpathr1=1.41r2=1.42
[cp-patches] Patch: FYI: speed up gen-classlist.sh
I'm checking this in. This is a patch from a gcc contributor to speed up gen-classlist.sh. See the attached email for the details. (Well, the link in the attached email...) Tom ---BeginMessage--- * Tom Tromey wrote on Thu, Apr 17, 2008 at 01:45:13AM CEST: Ralf == Ralf Wildenhues [EMAIL PROTECTED] writes: Ralf [PATCH, classpath] speed up gen-classlist.sh Ralf http://gcc.gnu.org/ml/gcc-patches/2008-03/msg01403.html Ok. To answer your questions here -- it is probably better to explicitly call AC_PROG_AWK, and yes, I think running genclasses each time is intentional. OK, thanks. I enabled the AC_PROG_AWK there. I will push these into Classpath. If you don't mind, email me an updated copy of the second patch. Here you go. Please note that the other classpath patch caused lots of regenerated files. Cheers, Ralf 2008-04-18 Ralf Wildenhues [EMAIL PROTECTED] * lib/gen-classlist.sh.in: Avoid grepping each omission, by building an awk script with a hash for literal files, and awk regular expressions for the rest. * configure.ac: Call AC_PROG_AWK. * configure: Regenerate. Index: libjava/classpath/configure.ac === --- libjava/classpath/configure.ac (revision 134412) +++ libjava/classpath/configure.ac (working copy) @@ -375,7 +375,7 @@ dnl Initialize libtool AC_DISABLE_STATIC AC_PROG_LIBTOOL -dnl AC_PROG_AWK +AC_PROG_AWK AC_PROG_CC AM_PROG_CC_C_O AC_PROG_CPP Index: libjava/classpath/lib/gen-classlist.sh.in === --- libjava/classpath/lib/gen-classlist.sh.in (revision 134412) +++ libjava/classpath/lib/gen-classlist.sh.in (working copy) @@ -82,26 +82,48 @@ fi done -# FIXME: could be more efficient by constructing a series of greps. -for filexp in `cat tmp.omit`; do - grep -v ${filexp} ${top_builddir}/lib/classes.1 ${top_builddir}/lib/classes.tmp - mv ${top_builddir}/lib/classes.tmp ${top_builddir}/lib/classes.1 -done +# Mangle the omit expressions into a script suitable for old awk. +# Exploit the fact that many omissions are not regular expressions: +# assume a single file is listed if it does not contain '*', '$', +# and ends in '.java'. +sed_omit_hash=' +1i\ + BEGIN {\ +omit[] = 1 +$a\ + } +/[*$]/d +/\.java$/!d +s|^|omit[| +s|$|] = 1|' +sed_omit_main_loop=' +1i\ + {\ +if (omit[$3]) next +$a\ +print\ + } +/^[^*$]*\.java$/d +s|/|\\/|g +s|^| if ($3 ~ /| +s|$|/) next|' +sed $sed_omit_hash tmp.omit tmp.awk +sed $sed_omit_main_loop tmp.omit tmp.awk [EMAIL PROTECTED]@ -f tmp.awk ${top_builddir}/lib/classes.1 ${top_builddir}/lib/classes.tmp +mv ${top_builddir}/lib/classes.tmp ${top_builddir}/lib/classes.1 +vm_omitlist= for dir in $vm_dirlist; do if test -f $dir/$1.omit; then - for filexp in `cat $dir/$1.omit`; do -grep -v $filexp vm.add vm.add.1 -mv vm.add.1 vm.add - done + vm_omitlist=$vm_omitlist $dir/$1.omit fi done -cat vm.add classes.1 +cat $vm_omitlist | sed $sed_omit_hash tmp.awk +cat $vm_omitlist | sed $sed_omit_main_loop tmp.awk [EMAIL PROTECTED]@ -f tmp.awk vm.add ${top_builddir}/lib/classes.1 -rm vm.omit -rm vm.add -rm tmp.omit +rm -f vm.omit vm.add tmp.omit tmp.awk new= if test -f ${top_builddir}/lib/classes.2; then ---End Message---
[commit-cp] classpath ChangeLog configure.ac lib/gen-classl...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/04/17 22:46:21 Modified files: . : ChangeLog configure.ac lib: gen-classlist.sh.in Log message: 2008-04-17 Ralf Wildenhues [EMAIL PROTECTED] * lib/gen-classlist.sh.in: Avoid grepping each omission, by building an awk script with a hash for literal files, and awk regular expressions for the rest. * configure.ac: Call AC_PROG_AWK. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9574r2=1.9575 http://cvs.savannah.gnu.org/viewcvs/classpath/configure.ac?cvsroot=classpathr1=1.228r2=1.229 http://cvs.savannah.gnu.org/viewcvs/classpath/lib/gen-classlist.sh.in?cvsroot=classpathr1=1.40r2=1.41
[cp-patches] Patch: FYI: fix tools/Makefile nit
I'm checking this in. This fixes an automake nit with tools/Makefile.am. See the original posting for details: http://gcc.gnu.org/ml/gcc-patches/2008-03/msg00941.html Tom ChangeLog: 2008-04-16 Ralf Wildenhues [EMAIL PROTECTED] * m4/gcc_attribute.m4 (GCC_ATTRIBUTE): Fix cache variable name. * tools/Makefile.am (gappletviewer, gjarsigner, gkeytool, gjar) (gnative2ascii, gserialver, gjavah, grmiregistry, gtnameserv) (gorbd, grmid, grmic) [!CREATE_WRAPPERS]: Add stub dependencies for these scripts, to trick automake into hiding the respective rules for the programs below the CREATE_WRAPPERS conditional. Index: m4/gcc_attribute.m4 === RCS file: /cvsroot/classpath/classpath/m4/gcc_attribute.m4,v retrieving revision 1.2 diff -u -r1.2 gcc_attribute.m4 --- m4/gcc_attribute.m4 21 Aug 2006 23:34:45 - 1.2 +++ m4/gcc_attribute.m4 16 Apr 2008 23:50:11 - @@ -15,7 +15,7 @@ dnl GCC_ATTRIBUTE(short-label,cachevar,func-params,attribute,HAVE,desc,[true-cmds],[false-cmds]) AC_DEFUN([GCC_ATTRIBUTE],[ - CACHED_TRY_COMPILE(__attribute__(($1)),cv_c_gcc_attribute_$2,, + CACHED_TRY_COMPILE(__attribute__(($1)),gcc_cv_c_gcc_attribute_$2,, [extern int testfunction($3) __attribute__(($4))], AC_MSG_RESULT(yes) AC_DEFINE(HAVE_GNUC25_$5,,$6) Index: tools/Makefile.am === RCS file: /cvsroot/classpath/classpath/tools/Makefile.am,v retrieving revision 1.45 diff -u -r1.45 Makefile.am --- tools/Makefile.am 4 Mar 2008 22:25:47 - 1.45 +++ tools/Makefile.am 16 Apr 2008 23:50:11 - @@ -85,6 +85,19 @@ gjar gnative2ascii gserialver gjavah grmiregistry \ gtnameserv gorbd grmid grmic bin_PROGRAMS = +## FIXME: revisit this with a newer automake. +gappletviewer: gappletviewer.in +gjarsigner: gjarsigner.in +gkeytool: gkeytool.in +gjar: gjar.in +gnative2ascii: gnative2ascii.in +gserialver: gserialver.in +gjavah: gjavah.in +grmiregistry: grmiregistry.in +gtnameserv: gtnameserv.in +gorbd: gorbd.in +grmid: grmid.in +grmic: grmic.in endif EXTRA_DIST = toolwrapper.c gappletviewer.in gjarsigner.in gkeytool.in \ gjar.in gnative2ascii.in gserialver.in gjavah.in grmiregistry.in \
[commit-cp] classpath ChangeLog m4/gcc_attribute.m4 tools/M...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/04/16 23:54:13 Modified files: . : ChangeLog m4 : gcc_attribute.m4 tools : Makefile.am Log message: 2008-04-16 Ralf Wildenhues [EMAIL PROTECTED] * m4/gcc_attribute.m4 (GCC_ATTRIBUTE): Fix cache variable name. * tools/Makefile.am (gappletviewer, gjarsigner, gkeytool, gjar) (gnative2ascii, gserialver, gjavah, grmiregistry, gtnameserv) (gorbd, grmid, grmic) [!CREATE_WRAPPERS]: Add stub dependencies for these scripts, to trick automake into hiding the respective rules for the programs below the CREATE_WRAPPERS conditional. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9572r2=1.9573 http://cvs.savannah.gnu.org/viewcvs/classpath/m4/gcc_attribute.m4?cvsroot=classpathr1=1.2r2=1.3 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/Makefile.am?cvsroot=classpathr1=1.45r2=1.46
[commit-cp] classpath ChangeLog tools/gnu/classpath/tools/o...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/04/17 00:22:15 Modified files: . : ChangeLog tools/gnu/classpath/tools/orbd: Main.java tools/resource/gnu/classpath/tools/common: Messages.properties Log message: * tools/gnu/classpath/tools/orbd/Main.java: Bump copyright year. * tools/resource/gnu/classpath/tools/common/Messages.properties (ClasspathToolParser.VersionFormat): Bump copyright year. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9573r2=1.9574 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/orbd/Main.java?cvsroot=classpathr1=1.2r2=1.3 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/resource/gnu/classpath/tools/common/Messages.properties?cvsroot=classpathr1=1.1r2=1.2
[cp-patches] Patch: FYI: fix getopt Parser oddity
I'm checking this in. Andrew Cagney pointed out that the getopt Parser does not work if you add options to an OptionGroup after adding the group to the Parser. There doesn't seem to be a good reason to reject this, so this patch changes Parser to compute the 'options' array only when absolutely needed. Tom ChangeLog: 2008-03-20 Tom Tromey [EMAIL PROTECTED] * tools/gnu/classpath/tools/getopt/Parser.java (options): Don't initialize. (add, addFinal): Don't update options. (requireOptions): New method. (printHelp): Synchronize. Call requireOptions. (parse): Call requireOptions. Index: tools/gnu/classpath/tools/getopt/Parser.java === RCS file: /cvsroot/classpath/classpath/tools/gnu/classpath/tools/getopt/Parser.java,v retrieving revision 1.9 diff -u -r1.9 Parser.java --- tools/gnu/classpath/tools/getopt/Parser.java22 Sep 2006 01:01:26 - 1.9 +++ tools/gnu/classpath/tools/getopt/Parser.java20 Mar 2008 18:02:58 - @@ -1,5 +1,5 @@ /* Parser.java - parse command line options - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2008 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -66,7 +66,9 @@ private boolean longOnly; - private ArrayList options = new ArrayList(); + // All of the options. This is null initially; users must call + // requireOptions before access. + private ArrayList options; private ArrayList optionGroups = new ArrayList(); @@ -218,7 +220,6 @@ */ public synchronized void add(Option opt) { -options.add(opt); defaultGroup.add(opt); } @@ -230,7 +231,6 @@ */ protected synchronized void addFinal(Option opt) { -options.add(opt); finalGroup.add(opt); } @@ -242,7 +242,6 @@ */ public synchronized void add(OptionGroup group) { -options.addAll(group.options); // This ensures that the final group always appears at the end // of the options. if (optionGroups.isEmpty()) @@ -251,13 +250,29 @@ optionGroups.add(optionGroups.size() - 1, group); } + // Make sure the 'options' field is properly initialized. + private void requireOptions() + { +if (options != null) + return; +options = new ArrayList(); +Iterator it = optionGroups.iterator(); +while (it.hasNext()) + { + OptionGroup group = (OptionGroup) it.next(); + options.addAll(group.options); + } + } + public void printHelp() { this.printHelp(System.out); } - void printHelp(PrintStream out) + synchronized void printHelp(PrintStream out) { +requireOptions(); + if (headerText != null) { formatText(out, headerText); @@ -417,6 +432,7 @@ */ public synchronized void parse(String[] inArgs, FileArgumentCallback files) { +requireOptions(); try { args = inArgs;
[commit-cp] classpath ChangeLog tools/gnu/classpath/tools/g...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/03/20 18:04:44 Modified files: . : ChangeLog tools/gnu/classpath/tools/getopt: Parser.java Log message: * tools/gnu/classpath/tools/getopt/Parser.java (options): Don't initialize. (add, addFinal): Don't update options. (requireOptions): New method. (printHelp): Synchronize. Call requireOptions. (parse): Call requireOptions. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9560r2=1.9561 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/getopt/Parser.java?cvsroot=classpathr1=1.9r2=1.10
[cp-patches] Patch: realloc fix
I'm checking this in. This is a realloc usage fix from Jim Meyering. Tom ChangeLog: 2008-03-10 Jim Meyering [EMAIL PROTECTED] Don't leak upon failed realloc. * native/jni/classpath/jcl.c (JCL_realloc): Upon failed realloc, free the original buffer before throwing the exception. Index: native/jni/classpath/jcl.c === RCS file: /cvsroot/classpath/classpath/native/jni/classpath/jcl.c,v retrieving revision 1.27 diff -u -r1.27 jcl.c --- native/jni/classpath/jcl.c 17 Oct 2006 14:14:16 - 1.27 +++ native/jni/classpath/jcl.c 10 Mar 2008 19:00:27 - @@ -1,5 +1,5 @@ /* jcl.c - Copyright (C) 1998, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1998, 2005, 2006, 2008 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -152,9 +152,11 @@ JNIEXPORT void *JNICALL JCL_realloc (JNIEnv * env, void *ptr, size_t size) { + void *orig_ptr = ptr; ptr = realloc (ptr, size); if (ptr == 0) { + free (orig_ptr); JCL_ThrowException (env, java/lang/OutOfMemoryError, malloc() failed.); return NULL;
[cp-patches] Re: [PATCH] classpath doc typos
Ralf == Ralf Wildenhues [EMAIL PROTECTED] writes: Ralf Tested 'make docs info dvi pdf html' in classpath/doc. OK for trunk? Ralf If yes, will somebody push this upstream into classpath for me? Yes, this is ok. Thanks. Did Dalibor put it in Classpath? If not, let me know, and I will do it. Tom
[cp-patches] Re: [PATCH] classpath doc: punctuation
Ralf == Ralf Wildenhues [EMAIL PROTECTED] writes: Ralf libjava/classpath/ChangeLog: Ralf 2008-02-23 Ralf Wildenhues [EMAIL PROTECTED] Ralf * doc/cp-hacking.texinfo: Fix spacing after periods. Ralf * doc/cp-tools.texinfo: Likewise. Ralf * doc/cp-vmintegration.texinfo: Likewise. This one is ok too. Let me know if you still need me to push it into classpath. Tom
[commit-cp] classpath ChangeLog native/jni/classpath/jcl.c
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/03/10 19:01:42 Modified files: . : ChangeLog native/jni/classpath: jcl.c Log message: 2008-03-10 Jim Meyering [EMAIL PROTECTED] Don't leak upon failed realloc. * native/jni/classpath/jcl.c (JCL_realloc): Upon failed realloc, free the original buffer before throwing the exception. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9546r2=1.9547 http://cvs.savannah.gnu.org/viewcvs/classpath/native/jni/classpath/jcl.c?cvsroot=classpathr1=1.27r2=1.28
[cp-patches] Re: libjava/classpath/configure needs regenerated in 4.3
Ralf == Ralf Wildenhues [EMAIL PROTECTED] writes: Ralf libjava/classpath/configure needs an autoconf rerun to pick up the Ralf Libtool support for AIX 6.1. This holds for trunk as well as the 4.3 Ralf branch. OK for both? Sorry I didn't get to this sooner. AFAIK libjava does not work on AIX. So, while I think regenerating this configure script is fine, I also think it is not urgent. Tom
note on readdir_r
While looking into http://gcc.gnu.org/bugzilla/show_bug.cgi?id=24170, I noticed that Classpath is also using readdir_r. There is no reason to use this. Ulrich wrote a blog entry a while back explaining why: http://udrepper.livejournal.com/18555.html I'm not planning to fix this in Classpath, sorry. It should just be a matter of deleting the readdir_r case and configure checks, though. Tom
[cp-patches] Patch: FYI: fix @direntry in .texi
I'm checking this in. Jakub found this in libgcj; I'm just pushing the patch upstream for him. The bug is that the @direntry lines in the .texi files were wrong. Tom ChangeLog: 2008-02-18 Jakub Jelinek [EMAIL PROTECTED] * doc/cp-tools.texinfo (@direntry): Prefix info name with cp-. * doc/cp-hacking.texinfo (@direntry): Likewise. * doc/cp-vmintegration.texinfo (@direntry): Likewise. Index: doc/cp-hacking.texinfo === RCS file: /cvsroot/classpath/classpath/doc/cp-hacking.texinfo,v retrieving revision 1.5 diff -u -r1.5 cp-hacking.texinfo --- doc/cp-hacking.texinfo 15 Oct 2007 21:33:25 - 1.5 +++ doc/cp-hacking.texinfo 18 Feb 2008 18:30:44 - @@ -16,7 +16,7 @@ @ifnotplaintext @dircategory GNU Libraries @direntry -* Classpath Hacking: (hacking). GNU Classpath Hacker's Guide +* Classpath Hacking: (cp-hacking). GNU Classpath Hacker's Guide @end direntry @end ifnotplaintext @end ifinfo Index: doc/cp-tools.texinfo === RCS file: /cvsroot/classpath/classpath/doc/cp-tools.texinfo,v retrieving revision 1.4 diff -u -r1.4 cp-tools.texinfo --- doc/cp-tools.texinfo26 Mar 2007 22:58:20 - 1.4 +++ doc/cp-tools.texinfo18 Feb 2008 18:30:44 - @@ -27,7 +27,7 @@ @ifnotplaintext @dircategory GNU Libraries @direntry -* Classpath Tools: (tools). GNU Classpath Tools Guide +* Classpath Tools: (cp-tools). GNU Classpath Tools Guide @end direntry @end ifnotplaintext @end ifinfo Index: doc/cp-vmintegration.texinfo === RCS file: /cvsroot/classpath/classpath/doc/cp-vmintegration.texinfo,v retrieving revision 1.4 diff -u -r1.4 cp-vmintegration.texinfo --- doc/cp-vmintegration.texinfo8 Feb 2008 18:34:55 - 1.4 +++ doc/cp-vmintegration.texinfo18 Feb 2008 18:30:44 - @@ -17,7 +17,7 @@ @ifnotplaintext @dircategory GNU Libraries @direntry -* VM Integration: (vmintegration). GNU Classpath VM Integration Guide +* VM Integration: (cp-vmintegration). GNU Classpath VM Integration Guide @end direntry @end ifnotplaintext @end ifinfo
Re: Classpath Tools
Andrew == Andrew John Hughes [EMAIL PROTECTED] writes: Andrew Does anyone know why our tools use -Xbootclasspath to load as in: Andrew exec @VM_BINARY@ -Xbootclasspath/p:${tools_cp} Andrew gnu.classpath.tools.javah.Main $@ Andrew The option is not supported by either gcj or JikesRVM (although the Andrew latter also uses it to build). Can we swap it for just plain Andrew -classpath? It could just be historical. It is hard to remember; I spent a little time looking at cvs annotate and the mailing list archives, but I didn't find anything. BTW, gjavah.in is marked -kb, which is wrong. Tom
Re: [cp-patches] [patch] check for xulrunner-1.9
Matthias == Matthias Klose [EMAIL PROTECTED] writes: Matthias This patch checks for a build using xulrunner-1.9. Ok to Matthias checkin? (please commit it to classpath as well). Matthias PKG_CHECK_MODULES(MOZILLA, mozilla-plugin, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no]) Matthias if test x${MOZILLA_FOUND} = xno; then Matthias + PKG_CHECK_MODULES(MOZILLA, mozilla-plugin libxul, [MOZILLA_FOUND=yes], [MOZILLA_FOUND=no]) Is that 'mozilla-plugin' in the new PKG_CHECK_MODULES a mistake? Should it just look for libxul here? Tom
Re: [cp-patches] RFC: use helper method to clone char array in java.lang.String
Ian + * java/lang/String.java Ian + Only copy live portion of String. Use array copies in preference to clone. The ChangeLog entry should mention method names. See other examples in the file, or the GNU coding standards. Otherwise -- looks good to me, thanks. Tom
Re: [cp-patches] RFC: tweaks to java.util.zip.ZipEntry
Ian == Ian Rogers [EMAIL PROTECTED] writes: Ian the attached patch stops the lazy initialization of a Calendar object Ian in ZipEntry and instead uses a static final one. I thought this could lead to odd results sometimes, when the calendrical data is in a zip. But it is hard to remember. Maybe a bit of archaeology is in order -- looking through the cvs logs or the list archives to see why the code is the way it is. (That info should be in comments, of course...) Ian It also modifies the clone method to instead of using Ian Object.clone to use the ZipEntry's own copy constructor. This isn't a safe transform if the class is not final. Cloning a subclass will yield the wrong type. Tom
Re: [cp-patches] RFC: use helper method to clone char array in java.lang.String
Ian == Ian Rogers [EMAIL PROTECTED] writes: Ian Please let me know if you think this patch is suitable for Ian inclusion. It looks fine. I do have one nit, which is that we put spaces around operators... this problem is pervasive in the patch, but here's one example: Ian +newStr[x-offset] = newChar; That should read newStr[x - offset] = newChar; Tom
Re: [cp-patches] RFC: use helper method to clone char array in java.lang.String
Ian == Ian Rogers [EMAIL PROTECTED] writes: Ian + private static char[] cloneCharArray(char[] src) Ian + { Ian +char[] copy = new char[src.length]; Ian +VMSystem.arraycopy(src, 0, copy, 0, src.length); Ian +return copy; Ian + } I think it would be better in these places to copy the live subset of the char[] -- if 'this' String is a slice of some other array, we don't want to copy the entire array, but instead only the part that we use. This will use less memory. Unfortunately this change would mean updating the logic of the surrounding functions, since they generally use offsets into the original array. Tom
[cp-patches] Re: [PATCH,classpath] Fix some typos
Bernhard == Bernhard Fischer [EMAIL PROTECTED] writes: Bernhard The attached patch fixes 's/by by/by/g' for classpath. Bernhard It was not tested, please apply if you think it is ok. Bernhard libjava/classpath/ChangeLog Bernhard 2008-01-27 Bernhard Fischer Bernhard * java/util/SimpleTimeZone.java (SimpleTimeZone): Fix typo in comment. Bernhard * gnu/CORBA/GIOP/v1_2/RequestHeader.java (RequestHeader): Fix typo in Bernhard exception message. I'm going to check this in to Classpath and libcj. (Patch appended for Classpath readers.) Thanks. Tom Index: gnu/CORBA/GIOP/v1_2/RequestHeader.java === --- gnu/CORBA/GIOP/v1_2/RequestHeader.java (revision 131907) +++ gnu/CORBA/GIOP/v1_2/RequestHeader.java (working copy) @@ -153,7 +153,7 @@ throw new NO_IMPLEMENT(Object addressing by IOP tagged profile); case ReferenceAddr : - throw new NO_IMPLEMENT(Object addressing by by IOR addressing info); + throw new NO_IMPLEMENT(Object addressing by IOR addressing info); default : MARSHAL m = new MARSHAL(Unknow addressing method in request, + Index: java/util/SimpleTimeZone.java === --- java/util/SimpleTimeZone.java (revision 131907) +++ java/util/SimpleTimeZone.java (working copy) @@ -999,7 +999,7 @@ /** * Serializes this object to a stream. @serialdata The object is * first written in the old JDK 1.1 format, so that it can be read - * by by the old classes. This means, that the + * by the old classes. This means, that the * codestart/endDay(OfWeek)/code-Fields are written in the * DOW_IN_MONTH_MODE rule, since this was the only supported rule * in 1.1.
[cp-patches] Re: more doc typos
Gerald == Gerald Pfeifer [EMAIL PROTECTED] writes: libjava/classpath/ChangeLog: 2008-01-24 Ralf Wildenhues [EMAIL PROTECTED] * doc/README.jaxp: Fix typos. Gerald I committed this on your behalf so that this will be in GCC Gerald 4.3.0, but you may also want to Cc: [EMAIL PROTECTED] Gerald for anything Java-related. In particular, changes in classpath/ usually should go upstream as well. I'm checking this fix into Classpath. Tom Index: libjava/classpath/doc/README.jaxp === --- libjava/classpath/doc/README.jaxp(Revision 131766) +++ libjava/classpath/doc/README.jaxp(Arbeitskopie) @@ -155,7 +155,7 @@ When using libxmlj, the libxmlj shared library must be available. In general it is picked up by the runtime using GNU Classpath. If not you might want to try adding the directory where libxmlj.so is installed -(by default ${prefix}/lib/classpath/) with ldconfig or specifing in the +(by default ${prefix}/lib/classpath/) with ldconfig or specifying in the LD_LIBRARY_PATH environment variable. Additionally, you may need to specify the location of your shared libraries to the runtime environment using the java.library.path system property. @@ -174,7 +174,7 @@ using thread context variables. Update: thread context variables have been introduced. This is very -untested though, libxmll therefore still has the single thread +untested though, libxmlj therefore still has the single thread bottleneck.
[commit-cp] classpath ChangeLog doc/README.jaxp
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/01/28 16:32:31 Modified files: . : ChangeLog doc: README.jaxp Log message: 2008-01-27 Ralf Wildenhues [EMAIL PROTECTED] * doc/README.jaxp: Fix typos. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9477r2=1.9478 http://cvs.savannah.gnu.org/viewcvs/classpath/doc/README.jaxp?cvsroot=classpathr1=1.4r2=1.5
[commit-cp] classpath ChangeLog gnu/CORBA/GIOP/v1_2/Request...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/01/28 16:52:40 Modified files: . : ChangeLog gnu/CORBA/GIOP/v1_2: RequestHeader.java java/util : SimpleTimeZone.java Log message: 2008-01-27 Bernhard Fischer [EMAIL PROTECTED] * java/util/SimpleTimeZone.java (SimpleTimeZone): Fix typo in comment. * gnu/CORBA/GIOP/v1_2/RequestHeader.java (RequestHeader): Fix typo in exception message. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9478r2=1.9479 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/CORBA/GIOP/v1_2/RequestHeader.java?cvsroot=classpathr1=1.6r2=1.7 http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/SimpleTimeZone.java?cvsroot=classpathr1=1.32r2=1.33
Re: [cp-patches] RFC: adding -reverse to gnative2ascii
Mario == Mario Torre [EMAIL PROTECTED] writes: Mario This patch adds the -reverse option to gnative2ascii as described here: Mario http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=103 Mario Mark told me that Tom Tromey is already working on it too, so feel free Mario to ignore this one. Sorry about this overlap btw -- I didn't realize you were doing it, and I'd emailed before reading the list. Tom
[cp-patches] Patch: FYI: -reverse argument for native2ascii
I'm checking this in to Classpath and libgcj. Sun's native2ascii accepts -reverse, while we accept -reversed. This changes Classpath to conform. This bug came from the IcedTea build: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=103 Tom ChangeLog: 2008-01-24 Tom Tromey [EMAIL PROTECTED] * resource/gnu/classpath/tools/native2ascii/messages.properties (Native2ASCII.ReversedHelpCompat): New. * tools/gnu/classpath/tools/native2ascii/Native2ASCII.java (createParser): Add -reverse. Update -reversed. Index: resource/gnu/classpath/tools/native2ascii/messages.properties === RCS file: /cvsroot/classpath/classpath/resource/gnu/classpath/tools/native2ascii/messages.properties,v retrieving revision 1.1 diff -u -r1.1 messages.properties --- resource/gnu/classpath/tools/native2ascii/messages.properties 20 May 2006 22:10:31 - 1.1 +++ resource/gnu/classpath/tools/native2ascii/messages.properties 24 Jan 2008 14:27:37 - @@ -1,5 +1,5 @@ # messages.properties -- English language messages -# Copyright (C) 2006 Free Software Foundation, Inc. +# Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is part of GNU Classpath. # @@ -41,3 +41,4 @@ Native2ASCII.EncodingArgName=NAME Native2ASCII.EncodingSpecified=encoding already specified Native2ASCII.ReversedHelp=convert from encoding to native +Native2ASCII.ReversedHelpCompat=alias for -reverse (deprecated) Index: tools/gnu/classpath/tools/native2ascii/Native2ASCII.java === RCS file: /cvsroot/classpath/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java,v retrieving revision 1.5 diff -u -r1.5 Native2ASCII.java --- tools/gnu/classpath/tools/native2ascii/Native2ASCII.java8 Jan 2007 17:00:49 - 1.5 +++ tools/gnu/classpath/tools/native2ascii/Native2ASCII.java24 Jan 2008 14:27:37 - @@ -1,5 +1,5 @@ /* Native2ASCII.java - native2ascii program - Copyright (C) 2003, 2007 Free Software Foundation, Inc. + Copyright (C) 2003, 2007, 2008 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -101,7 +101,17 @@ encoding = argument; } }); -result.add(new Option(reversed, Messages.getString(Native2ASCII.ReversedHelp)) //$NON-NLS-1$ //$NON-NLS-2$ +result.add(new Option(reverse, Messages.getString(Native2ASCII.ReversedHelp)) //$NON-NLS-1$ //$NON-NLS-2$ +{ + public void parsed(String argument) throws OptionException + { +reversed = true; + } +}); + +// We mistakenly added the extra d in reversed; now we don't +// want to remove it, for backward compatibility. +result.add(new Option(reversed, Messages.getString(Native2ASCII.ReversedHelpCompat)) //$NON-NLS-1$ //$NON-NLS-2$ { public void parsed(String argument) throws OptionException {
[commit-cp] classpath ChangeLog resource/gnu/classpath/tool...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/01/24 18:28:42 Modified files: . : ChangeLog resource/gnu/classpath/tools/native2ascii: messages.properties tools/gnu/classpath/tools/native2ascii: Native2ASCII.java Log message: * resource/gnu/classpath/tools/native2ascii/messages.properties (Native2ASCII.ReversedHelpCompat): New. * tools/gnu/classpath/tools/native2ascii/Native2ASCII.java (createParser): Add -reverse. Update -reversed. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9475r2=1.9476 http://cvs.savannah.gnu.org/viewcvs/classpath/resource/gnu/classpath/tools/native2ascii/messages.properties?cvsroot=classpathr1=1.1r2=1.2 http://cvs.savannah.gnu.org/viewcvs/classpath/tools/gnu/classpath/tools/native2ascii/Native2ASCII.java?cvsroot=classpathr1=1.5r2=1.6
[commit-cp] classpath ChangeLog java/net/URI.java
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 08/01/21 20:09:56 Modified files: . : ChangeLog java/net : URI.java Log message: 2008-01-21 Luciano Chavez [EMAIL PROTECTED] PR libgcj/34369: * java/net/URI.java (relativize): Check initial segment for trailing /. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9474r2=1.9475 http://cvs.savannah.gnu.org/viewcvs/classpath/java/net/URI.java?cvsroot=classpathr1=1.20r2=1.21
[cp-patches] Patch: FYI: PR 33206
I'm checking this in. This fixes a possible overflow in isProbablePrime. Tom 2007-08-28 John X [EMAIL PROTECTED] PR classpath/33206: * java/math/BigInteger.java (isProbablePrime): Handle case of large 'b'. Index: java/math/BigInteger.java === RCS file: /cvsroot/classpath/classpath/java/math/BigInteger.java,v retrieving revision 1.32 diff -u -r1.32 BigInteger.java --- java/math/BigInteger.java 21 Dec 2006 13:02:53 - 1.32 +++ java/math/BigInteger.java 28 Aug 2007 18:35:39 - @@ -1,5 +1,5 @@ /* java.math.BigInteger -- Arbitary precision integers - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -1313,7 +1313,7 @@ int b = pMinus1.getLowestSetBit(); // Set m such that this = 1 + 2^b * m. -BigInteger m = pMinus1.divide(valueOf(2L b - 1)); +BigInteger m = pMinus1.divide(valueOf(2L).pow(b)); // The HAC (Handbook of Applied Cryptography), Alfred Menezes al. Note // 4.49 (controlling the error probability) gives the number of trials
[commit-cp] classpath ChangeLog java/math/BigInteger.java
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 07/08/28 18:37:56 Modified files: . : ChangeLog java/math : BigInteger.java Log message: 2007-08-28 John X [EMAIL PROTECTED] PR classpath/33206: * java/math/BigInteger.java (isProbablePrime): Handle case of large 'b'. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9373r2=1.9374 http://cvs.savannah.gnu.org/viewcvs/classpath/java/math/BigInteger.java?cvsroot=classpathr1=1.32r2=1.33
[cp-patches] Patch: FYI: Class.internalGetFields
I'm checking this in. We lose the order of fields in internalGetFields. This in turn makes JNA die. The order is not guaranteed, of course, but there's no reason that Class should rearrange things gratuitously -- that's what the VM is for :) Tom ChangeLog: 2007-08-15 Tom Tromey [EMAIL PROTECTED] * java/lang/Class.java (internalGetFields): Use LinkedHashSet. Index: java/lang/Class.java === RCS file: /cvsroot/classpath/classpath/java/lang/Class.java,v retrieving revision 1.52 diff -u -r1.52 Class.java --- java/lang/Class.java4 Feb 2007 09:58:00 - 1.52 +++ java/lang/Class.java15 Aug 2007 16:22:29 - @@ -1,5 +1,5 @@ /* Class.java -- Representation of a Java class. - Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006 + Copyright (C) 1998, 1999, 2000, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation This file is part of GNU Classpath. @@ -66,7 +66,7 @@ import java.util.Arrays; import java.util.Collection; import java.util.HashMap; -import java.util.HashSet; +import java.util.LinkedHashSet; /** @@ -596,7 +596,7 @@ */ private Field[] internalGetFields() { -HashSetField set = new HashSetField(); +LinkedHashSetField set = new LinkedHashSetField(); set.addAll(Arrays.asList(getDeclaredFields(true))); Class[] interfaces = getInterfaces(); for (int i = 0; i interfaces.length; i++)
[cp-patches] Patch: FYI: fix typo in LinkedHashSet
This fixes a typo in LinkedHashSet javadoc. Tom ChangeLog: 2007-08-15 Tom Tromey [EMAIL PROTECTED] * java/util/LinkedHashSet.java (LinkedHashSet): Fix typo. Index: java/util/LinkedHashSet.java === RCS file: /cvsroot/classpath/classpath/java/util/LinkedHashSet.java,v retrieving revision 1.6 diff -u -r1.6 LinkedHashSet.java --- java/util/LinkedHashSet.java10 Dec 2006 20:25:46 - 1.6 +++ java/util/LinkedHashSet.java15 Aug 2007 16:26:39 - @@ -1,6 +1,6 @@ /* LinkedHashSet.java -- a set backed by a LinkedHashMap, for linked list traversal. - Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2001, 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -98,7 +98,7 @@ /** * Construct a new, empty HashSet whose backing HashMap has the default - * capacity (11) and loadFacor (0.75). + * capacity (11) and loadFactor (0.75). */ public LinkedHashSet() {
[commit-cp] classpath ChangeLog
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 07/08/15 16:25:41 Modified files: . : ChangeLog Log message: * java/lang/Class.java (internalGetFields): Use LinkedHashSet. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9360r2=1.9361
[commit-cp] classpath/java/lang Class.java
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 07/08/15 16:27:00 Modified files: java/lang : Class.java Log message: * java/lang/Class.java (internalGetFields): Use LinkedHashSet. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/java/lang/Class.java?cvsroot=classpathr1=1.52r2=1.53
[commit-cp] classpath ChangeLog java/util/LinkedHashSet.java
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 07/08/15 16:29:10 Modified files: . : ChangeLog java/util : LinkedHashSet.java Log message: * java/util/LinkedHashSet.java (LinkedHashSet): Fix typo. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9361r2=1.9362 http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/LinkedHashSet.java?cvsroot=classpathr1=1.6r2=1.7
Re: [cp-patches] RFC: @filelist support for jar
Twisti == Christian Thalinger [EMAIL PROTECTED] writes: Twisti This patch adds support for @filelist, where the file filelist Twisti may only contain files and not options, as the spec says. Twisti Should I commit that (incomplete) patch? It looks good to me. What is incomplete about it? Tom
Re: [cp-patches] RFC: @filelist support for jar
Twisti == Christian Thalinger [EMAIL PROTECTED] writes: Twisti @files can include any arguments that are valid, not only Twisti files. Maybe you know how to get Java getopt to support that. Ah. I am not sure there is a way from outside. But perhaps this could be an option on the option Parser itself. Then other programs could enable it as well. Tom
[cp-patches] Patch: FYI: PR java/32862
This fixes a couple bugs in EnumMap. One is that EnumMap.get() will return the empty slot object. Oops. This is PR java/32862. The other is that EnumMap.clone() calls new. This is only correct when a class (or clone itself) is final. I looked but did not see other instances of this bug in java.util. Tom Index: ChangeLog from Tom Tromey [EMAIL PROTECTED] PR java/32862: * java/util/EnumMap.java (get): Special case emptySlot. (clone): Rewrote. Index: java/util/EnumMap.java === RCS file: /cvsroot/classpath/classpath/java/util/EnumMap.java,v retrieving revision 1.4 diff -u -r1.4 EnumMap.java --- java/util/EnumMap.java 21 Dec 2006 13:02:50 - 1.4 +++ java/util/EnumMap.java 24 Jul 2007 15:24:10 - @@ -1,5 +1,5 @@ /* EnumMap.java - Map where keys are enum constants - Copyright (C) 2004, 2005 Free Software Foundation, Inc. + Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -140,7 +140,8 @@ EnumK e = (EnumK) key; if (e.getDeclaringClass() != enumClass) return null; -return store[e.ordinal()]; +V o = store[e.ordinal()]; +return o == emptySlot ? null : o; } public V put(K key, V value) @@ -387,8 +388,18 @@ public EnumMapK, V clone() { -/* This constructor provides this functionality */ -return new EnumMap(this); +EnumMapK, V result; +try + { + result = (EnumMapK, V) super.clone(); + } +catch (CloneNotSupportedException ignore) + { + // Can't happen. + result = null; + } +result.store = store.clone(); +return result; } }
[cp-patches] Patch: FYI: jni.h fixlet for emacs
I'm checking this in. Emacs complained about the local variables section in jni.h. This makes it stop complaining. Tom 2007-06-28 Tom Tromey [EMAIL PROTECTED] * include/jni.h: Fixed local variables. Index: include/jni.h === RCS file: /cvsroot/classpath/classpath/include/jni.h,v retrieving revision 1.9 diff -u -r1.9 jni.h --- include/jni.h 22 Jun 2007 10:07:34 - 1.9 +++ include/jni.h 28 Jun 2007 15:35:06 - @@ -1,5 +1,5 @@ /* jni.h - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007 Free Software Foundation This file is part of GNU Classpath. @@ -1640,13 +1640,15 @@ /* Keep c-font-lock-extra-types in alphabetical order. */ -/* Local Variables: */ -/* c-font-lock-extra-types: (\\sw+_t - JNIEnv JNINativeMethod JavaVM JavaVMOption jarray - jboolean jbooleanArray jbyte jbyteArray jchar jcharArray - jclass jdouble jdoubleArray jfieldID jfloat jfloatArray - jint jintArray jlong jlongArray jmethodID jobject jstring jthrowable - jvalue jweak) */ -/* End: */ +/* +Local Variables: +c-font-lock-extra-types: (\\sw+_t \ + JNIEnv JNINativeMethod JavaVM JavaVMOption jarray \ + jboolean jbooleanArray jbyte jbyteArray jchar jcharArray \ + jclass jdouble jdoubleArray jfieldID jfloat jfloatArray \ + jint jintArray jlong jlongArray jmethodID jobject \ + jstring jthrowable jvalue jweak) +End: +*/ #endif /* _CLASSPATH_JNI_H */
Re: J2SE compliant RE for Arm Linux
Søren == Søren Boll Overgaard [EMAIL PROTECTED] writes: Kinda old thread, but wanted to clear this up... Søren So far, none of the the platforms I've been looking at (except Søren PERC, which is prohibitively priced) support J2SE 5.0. Thus, my Søren question is, can you provide me with a pointer to a J2SE 5.0 Søren JRE (GNU classpath based or otherwise) which will run on an ARM Søren Linux platform? GCC svn supports 1.5 and, probably, runs on ARM. Tom
[commit-cp] classpath ChangeLog include/jni.h
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 07/06/28 15:47:38 Modified files: . : ChangeLog include: jni.h Log message: * include/jni.h: Fixed local variables. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9345r2=1.9346 http://cvs.savannah.gnu.org/viewcvs/classpath/include/jni.h?cvsroot=classpathr1=1.9r2=1.10
Re: URLLoader / RemoteURLLoader
Martin == Martin Schlienger [EMAIL PROTECTED] writes: Martin Well I am actually patching URLClassLoader. RemoteURLLoader Martin seemed to provide some connection to http protocol. When is it Martin exactly used? The various Loader classes are used to handle particular URL types. RemoteURLLoader is used for things other than file: and jar:. Martin Caused by: java.lang.NoClassDefFoundError: gnu/java/net/protocol/http/Headers That class is part of Classpath. Did you remove it as part of your size reduction? All the files in that package are needed for http: to work. Martin Is this sci-fi to work inside URLClasseLoader to load classes Martin from http URL ? Nope, it should be pretty easy. Really you shouldn't have to modify URLClassLoader at all. Tom
Re: [cp-patches] RFC: Gstreamer audio backend configure patch
Mario == Mario Torre [EMAIL PROTECTED] writes: Mario This patch does not contains code, only configuration setups, Mario and it is not meant to be committed. I need some feedback on Mario that because I'm not a configure expert so it is highly Mario probable that I've missed something. Looks pretty good to me. Mario DIST_SUBDIRS = classpath java-io java-lang java-net java-nio java-util \ Mario - gtk-peer gconf-peer qt-peer xmlj midi-alsa midi-dssi \ Mario + gtk-peer gconf-peer gstreamer-peer qt-peer xmlj midi-alsa midi-dssi \ This looks like it may go past column 79... Mario +dnl FIXME: this is pretty hight requirement, maybe it can be lowered Mario +dnl moreover, we really need all these? Mario +GST_MAJORMINOR=0.10 Mario +GST_REQUIRED=0.10.10 I'd just delete the comment and require 0.10. But then, my OS already has that version :). Does some common OS not ship the right gstreamer? Mario +dnl -fno-strict-aliasing -export-symbols-regex [_]*\(gst_\|Gst\|GST_\).* -fno-strict-aliasing is really for legacy code. New code should not need this -- just write correct C instead. (I know it is in a comment, I just didn't know why I wanted to point that out.) Mario +resource/META-INF/services/javax.sound.sampled.spi.AudioFileReader Mario +resource/META-INF/services/javax.sound.sampled.spi.MixerProvider We talked a bit about not doing this... but I never replied to your note and now I forgot what you said. Do we need this? Or is there another way? Tom
Re: URLLoader / RemoteURLLoader
Martin == Martin Schlienger [EMAIL PROTECTED] writes: Martin -I noticed that URLLoader and RemoteURLLoader are also Martin intended to load remote directories. May someone give me any Martin hint to use these one? These are only for use as internal helpers of URLClassLoader. Martin The very best would be that we launch our software with jamvm Martin -classpath http: //url-to-my-classpath-classes/mypackage.jar You may want to look at JNLP. Martin Another question: what is the gnu/java/net/loader/Load_ prefix Martin for? there is no class that begins with Load_ . This is in cases a VM wants to add support for some URL type it provides. libgcj uses this to handle gcjlib: URLs. Tom
Re: Classpath 0.95 build issue
Audrius == Audrius Meskauskas [EMAIL PROTECTED] writes: Audrius This is becoming the permanent topic already. Maybe we could add Audrius something to README or hackers guide? Sounds good to me. Dâniel, would you mind making a patch for this? Perhaps a change to the FAQ is the best bet. Tom
Re: Compilation Time | More questions ClassLoader
Martin == Martin Schlienger [EMAIL PROTECTED] writes: Martin Current behavior acts like this, macro-algorithm: [..] Martin Class loadClass(String className){ Martin if (bootstrap) { Martin c= VMClassLoader.loadClass(className); Martin Basically all we have done is add a step at Martin bootstrap. Normally all classes to perform a Martin RemoteClassLoader.loadClass() can be loaded with the first Martin step VMClassLoader.loadClass(). In the end we want to have Martin only these classes in the local core API and the rest of the Martin API distant. Yup. I'd suggest that instead of thinking of the solution in terms of writing a class loader, think about it in terms of writing some code that simply returns a byte[] that is the class contents. Then call this downloading code from VMClassLoader.loadClass. How you implement the downloading is up to you, but it turns out to be pretty simple to re-use URLClassLoader for this... just treat the .class file at the URL as a resource, not a class, and don't use the loadClass family of calls on your delegate URLClassLoader at all. Martin We have done some basic tests and this seemed to work. However, when Martin trying with a more complete program, it appears that it throws Martin IllegalAccessException making me think that some security is added Martin when using the defineClass() on core API. For this sort of a thing more details are needed. At least a full stack trace. But if you follow the above this may be moot. Tom
Re: Compilation Time | More questions ClassLoader
Martin == Martin Schlienger [EMAIL PROTECTED] writes: Martin - Is there any place where I can find something like a UML sequence Martin diagram of classloading mechanisms. Nope, sorry. Martin It seems there is a lot of back and forth between Martin URLClassLoader, ClassLoader, VMClassLoader and all is a little Martin bit confusing. Most of this is delegation. ClassLoaders are arranged in a dynamic hierarchy and each delegates loading to its parent before trying to load itself. This chain is rooted in VMClassLoader, which is not a standard class but rather the way we've chosen to represent the bootstrap loader inn Classpath . Martin - Any suggestion to make a class loaded by another loader to have the Martin same rights as the ones loaded with the bootstrap ( Martin VMClassLoader.loadClass() ). Since we are loading some of the classes Martin from glibj.zip with another loader that can access a remote file, but Martin ATM we have some IllegalAccessException with some of these. Since we Martin use the default ClassLoader's defineClass(), we may have to hack this Martin one (no success ATM). The VM* classes in Classpath are a bit funny. They define an API but they don't use inheritance for implementations -- instead a given VM can replace one of the classes entirely and it is simply expected to conform to the defined API. So, you can change VMClassLoader to do whatever you like. For instance, in libgcj we delegate some operations to a URLClassLoader that we construct after VM startup. I'm not really sure what you mean about IllegalAccessException and the default defineClass. As I recall, ultimately all classes are defined via a method on VMClassLoader. Tom
Re: Compilation Time | More questions -Charsets
Martin == Martin Schlienger [EMAIL PROTECTED] writes: Martin Actually since we saw that support for different charsets were Martin constantly added to GNU/Classpath, this may have been linked with Martin GNU/Classpath and not jamvm. Martin Indeed, gnu.java.nio.charset.Provider loads multiple default charsets. Martin We modify this one as well. It seems that UTF8 , 8859_1 and US_ASCII Martin are enough to boot. What makes a charset considered mandatory in Martin GNU/Classpath? Oh, sorry, I thought you meant charsets being searched for at startup or something like that. But instead you seem to be talking about registration of the NIO charsets... is that right? There is no rule here as far as I know. We just register all the charsets we have. Adding a charset is done either because it is specified by the standard, or because someone needed it. I suppose registration could be done more lazily somehow. I haven't looked into it. Tom
Re: [cp-patches] FYI: fix for user specified javac
Mark == Mark Wielaard [EMAIL PROTECTED] writes: Mark gcj --main=com.sun.tools.javac.Main -g -o ~/bin/javac \ Mark dist/lib/javac.jar I tried this. svn trunk gcj can't build the jar -- some ICE. But when I added -findirect-dispatch it worked just fine and the resulting javac compiled classpath with no trouble. Tom
Re: Compilation Time | More questions -Charsets
Martin == Martin Schlienger [EMAIL PROTECTED] writes: Martin Now we are investigating the charsets classes since for sure we don't Martin need them all on our minimal system. JamVM tries to load a bunch of Martin them when initializing and we would stick to one (8859 or UTF8 for Martin example). You may give us a hint again about how to make jamvm/gnu Martin classpath work with only one charset. I don't know about jamvm in particular. In most places, though, something like 'file.encoding' chooses the encoding to use. The locale may also affect this. So as a first attempt I would make sure that these things are set properly. Tom
Re: couldn't able to install classpath: java.lang.OutOfMemoryError
== r srinivasaraju [EMAIL PROTECTED] writes: but when it comes to executing gmake, its giving some error. Internal compiler error java.lang.OutOfMemoryError: Java heap space There's not much we can do about this. Maybe you don't have enough memory. Maybe you need to increase the heap available to whatever JVM is running ecj. We don't know, sorry. Tom
Re: [cp-patches] FYI: fix for hacked up autotools toolchains
Dalibor == Dalibor Topic [EMAIL PROTECTED] writes: Dalibor 2007-04-22 Dalibor Topic [EMAIL PROTECTED] Dalibor * Makefile.am (ACLOCAL_AMFLAGS): Add contents of env var Dalibor LOCAL_ACLOCAL_AMFLAGS to allow for systems where the user Dalibor has a mix of system hacked-up autotools. Eww, gross. What gives here? Why is '-I m4' no longer correct? Tom
Re: Compilation Time
Martin == Martin Schlienger [EMAIL PROTECTED] writes: Martin Each time we change the ClassLoader.java class, compilation Martin lasts quite a long and I am not really convinced that Martin everything need to be recompiled. I am quite a beginner with Martin Makefile but it seems that no real check is done and Martin everything is compiled by default. Martin Maybe you can give me some tricks on that or tell me what method you Martin use when hacking Classpath. IMNSHO, the best way to do incremental development on Classpath is to use Eclipse. It will only recompile the minimum necessary when you make a change. There a HOWTO for setting this up on the wiki -- it isn't as trivial as we would like, but it is doable, and once you have it set up you rarely have to tweak it. Tom
[cp-patches] Patch: FYI: PR 31626
I'm checking this in on the gcc trunk, the RH 4.1 branch, and Classpath. This is a patch from Casey to fix PR 31626. The bug here is that we are missing a method that Mylar uses. Tom Index: ChangeLog from Casey Marshall [EMAIL PROTECTED] PR classpath/31626: * gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java (createSocket): New method. Index: gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java === --- gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java(revision 123959) +++ gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java(working copy) @@ -132,4 +132,12 @@ socket.connect(new InetSocketAddress(host, port)); return socket; } + + /* (non-Javadoc) + * @see javax.net.SocketFactory#createSocket() + */ + @Override public Socket createSocket() throws IOException + { +return new SSLSocketImpl(contextImpl, null, -1, new Socket(), true); + } }
[cp-patches] Patch: FYI: CNI -vs- bridge methods
I'm checking this in on the trunk and in to Classpath. Jakub, I did not put this on the RH 4.1 branch yet. While it does not affect binary compatibility, it might affect source compatibility if there is a program that uses CNI and tries to call a bridge target method. I don't know of any such program but I thought perhaps I was forgetting something. Are there CNI users other than frysk? (I looked at frysk and did not see any suspect calls.) The bug here is that with covariant returns we can end up with multiple bridge methods, with a single ultimate target method, in a single class. So our old naive approach of renaming these to target$method will not work. Our fix is to use the name DeclaringClass$method instead. This works well enough for all the cases in libgcj. It is possible that a future addition to Java could break this. Note that our whole approach here is suspect though... if the compiler ever gets smarter, it could, perhaps, devirtualize such a call and then we would fail to link. Tom Index: ChangeLog from Tom Tromey [EMAIL PROTECTED] * Regenerated headers with new gjavah. Index: classpath/ChangeLog from Tom Tromey [EMAIL PROTECTED] * tools/gnu/classpath/tools/javah/MethodHelper.java (print): Changed arguments. Directly print method name. * tools/gnu/classpath/tools/javah/ClassWrapper.java (methodNameMap): New field. (makeVtable): Initialize it. (printMethods): Compute name for bridge targets. Index: classpath/tools/gnu/classpath/tools/javah/ClassWrapper.java === --- classpath/tools/gnu/classpath/tools/javah/ClassWrapper.java (revision 123959) +++ classpath/tools/gnu/classpath/tools/javah/ClassWrapper.java (working copy) @@ -1,5 +1,5 @@ /* ClassWrapper.java - wrap ASM class objects - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -43,6 +43,7 @@ import java.io.PrintStream; import java.lang.reflect.Modifier; import java.util.ArrayList; +import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; @@ -68,6 +69,11 @@ // A set of all the method names in this class. HashSet methodNames = new HashSet(); + // This maps a method name + descriptor, e.g. method()V, to the + // name chosen for the method. This is used when computing the + // names of bridge method targets. + HashMap methodNameMap = new HashMap(); + public ClassWrapper(Main classpath) { this.classpath = classpath; @@ -187,18 +193,24 @@ superClass.makeVtable(); vtable = new ArrayList(superClass.vtable); bridgeTargets = new HashSet(superClass.bridgeTargets); + methodNameMap = new HashMap(superClass.methodNameMap); } else { // Object. vtable = new ArrayList(); bridgeTargets = new HashSet(); + methodNameMap = new HashMap(); } addLocalMethods(); addInterfaces(this); -// Make a set of all the targets of bridge methods. -// We rename bridge methods to avoid problems with C++. +// Make a set of all the targets of bridge methods. We rename +// bridge target methods to avoid problems with C++. You might +// think we could rename the bridge methods themselves, but bridge +// methods by definition override a method from the superclass -- +// and we have to consider the superclass' header as an +// unchangeable entity. Iterator i = methods.iterator(); while (i.hasNext()) { @@ -232,8 +244,25 @@ while (i.hasNext()) { MethodNode m = (MethodNode) i.next(); -boolean isTarget = bridgeTargets.contains(m.name + m.desc); -MethodHelper.print(out, m, this, isTarget); + String nameToUse; + String sum = m.name + m.desc; + if (bridgeTargets.contains(sum)) + { + if (methodNameMap.containsKey(sum)) + nameToUse = (String) methodNameMap.get(sum); + else + { + // Bridge target that is new in this class. + String cname = this.name; + int index = cname.lastIndexOf('/'); + cname = cname.substring(index + 1); + nameToUse = cname + $ + m.name; + } + } + else + nameToUse = Keywords.getCxxName(m.name); + methodNameMap.put(sum, nameToUse); +MethodHelper.print(out, m, this, nameToUse); } } Index: classpath/tools/gnu/classpath/tools/javah/MethodHelper.java === --- classpath/tools/gnu/classpath/tools/javah/MethodHelper.java (revision 123959) +++ classpath/tools/gnu/classpath/tools/javah/MethodHelper.java (working copy) @@ -1,5 +1,5 @@ /* MethodHelper.java - helper class for manipulating methods - Copyright (C) 2006 Free Software Foundation
[cp-patches] Patch: FYI: minor fix in SSLSocketFactoryImpl
I'm checking this in to gcc svn trunk, RH 4.1 branch, and Classpath cvs. This fixes a bug found by Tom Fitzsimmons. In SSLSocketFactoryImpl we were delegating createSocket calls in a way where the 4-argument form would end up calling bind() twice on a socket, yielding an exception. This changes the code to delegate the other way around. I tested this on the test case (also hacked to try the 2-arg call) and also on the javax.net subset of Mauve. Tom Index: classpath/ChangeLog from Tom Tromey [EMAIL PROTECTED] https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236614 * gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java (createSocket): Change order of delegation. Index: classpath/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java === --- classpath/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java (revision 123877) +++ classpath/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java (working copy) @@ -1,5 +1,5 @@ /* SSLSocketFactoryImpl.java -- - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is a part of GNU Classpath. @@ -93,10 +93,7 @@ @Override public SSLSocketImpl createSocket(String host, int port) throws IOException, UnknownHostException { -SSLSocketImpl socket = new SSLSocketImpl(contextImpl, host, port); -InetSocketAddress endpoint = new InetSocketAddress(host, port); -socket.connect(endpoint); -return socket; +return createSocket(host, port, null, 0); } /* (non-Javadoc) @@ -106,8 +103,10 @@ InetAddress localHost, int localPort) throws IOException, UnknownHostException { -SSLSocketImpl socket = createSocket(host, port); +SSLSocketImpl socket = new SSLSocketImpl(contextImpl, host, port); +InetSocketAddress endpoint = new InetSocketAddress(host, port); socket.bind(new InetSocketAddress(localHost, localPort)); +socket.connect(endpoint); return socket; } @@ -117,10 +116,7 @@ @Override public SSLSocketImpl createSocket(InetAddress host, int port) throws IOException { -SSLSocketImpl socket = new SSLSocketImpl(contextImpl, - host.getCanonicalHostName(), port); -socket.connect(new InetSocketAddress(host, port)); -return socket; +return createSocket(host, port, null, 0); } /* (non-Javadoc) @@ -130,8 +126,10 @@ InetAddress localHost, int localPort) throws IOException { -SSLSocketImpl socket = createSocket(host, port); +SSLSocketImpl socket = new SSLSocketImpl(contextImpl, + host.getCanonicalHostName(), port); socket.bind(new InetSocketAddress(localHost, localPort)); +socket.connect(new InetSocketAddress(host, port)); return socket; } }
[commit-cp] classpath ChangeLog gnu/javax/net/ssl/provider/...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 07/04/16 20:20:14 Modified files: . : ChangeLog gnu/javax/net/ssl/provider: SSLSocketFactoryImpl.java Log message: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=236614 * gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java (createSocket): Change order of delegation. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9256r2=1.9257 http://cvs.savannah.gnu.org/viewcvs/classpath/gnu/javax/net/ssl/provider/SSLSocketFactoryImpl.java?cvsroot=classpathr1=1.2r2=1.3
Re: [cp-patches] Patch: FYI: hard-code SAX fallback
Jeroen == Jeroen Frijters [EMAIL PROTECTED] writes: I think for proper operation we have to remove the various XML service files from META-INF; see the earlier thread. But in order for this to work we also have to fix SAX to properly fall back to the Classpath SAX parser. Jeroen Any update on this? I'm convinced that we must remove the Jeroen META-INF/services files (at least for XML, but my guess is Jeroen that we should remove all of them). I've been super busy with F7 work, but I will try to get to this soon-ish. I'll at least remove all the XML-related ones. The others probably need a code audit first. Tom
Re: [cp-patches] FYI: Some CORBA deprecations
Mark == Mark Wielaard [EMAIL PROTECTED] writes: Mark This only leaves 2 interfaces as missing for full 1.5 coverage. They are Mark simple to add, but I don't really know how they are supposed to be used. Mark They aren't referenced from any public method or class it seems. Yeah.. FWIW the reason I never added these is that I assumed that they should probably be used by some internal thing. So I left them out as markers that we haven't done this. Perhaps Audrius could weigh in authoritatively...? Tom
Re: [cp-patches] FYI: Disable gnome accessibility
Andrew == Andrew Haley [EMAIL PROTECTED] writes: This is a gnome accessibility bug with multithreading, filed as http://bugzilla.gnome.org/show_bug.cgi?id=423057 , and this patch is a workaround until that issue is resolved. Andrew Is this the same bug as Andrew https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=226959, or is it Andrew another one? Interesting, it appears to have been fixed in at-spi. See also: http://bugzilla.gnome.org/show_bug.cgi?id=329454 ... a link to this was just added to (gnome bz) 423057. So maybe (hopefully) we don't need this after all... Francis, could you try Classpath without your patch but with the latest (rawhide) at-spi? Thanks. Tom
Re: [cp-patches] RFC: iconv -Werror compilation fix
Twisti == Christian Thalinger [EMAIL PROTECTED] writes: Twisti This patch fixes -Werror compilation with !HAVE_ICONV. Daney Twisti pointed me to the (void)-solution. I'm not sure if that is Twisti the best solution, but it works. Twisti Comments? We discussed on irc but I thought the answer should be in the list archives too. Annotation the argument with UNUSED. This is defined in config.h. We already use this all over; gcc's __attribute__ ((unused)) really means might or might not be used. Tom
[cp-patches] Patch: FYI: fix PR 29689
I'm checking (most of) this in to Classpath, and all of it to libgcj trunk and RH 4.1 branch. This fixes a couple buglets in logging. First, JarUtils was creating a logger. This doesn't seem very useful, and it interacts strangely with the libgcj startup. So, I'm inclined to just remove it. Please let me know if you don't like this for Classpath; I'm putting it in libgcj, though. Second, despite what the docs say, 'handlers' can be comma separated. In Java6 the javadoc was updated to reflect this; Tomcat relied on this. And, if a handler can't be found, we just skip it; Tomcat relies on this too. This patch was made against the libgcj repository so the paths are a bit screwy vis a vis the Classpath tree. But, you'll get the idea. Tom Index: classpath/ChangeLog from Tom Tromey [EMAIL PROTECTED] PR libgcj/29869: * gnu/java/util/jar/JarUtils.java (log): Commented out. (readSFManifest): Don't log. Index: ChangeLog from Tom Tromey [EMAIL PROTECTED] PR libgcj/29869: * java/util/logging/LogManager.java (readConfiguration): Handle comma-separated 'handlers'. Don't try to add a non-existing handler. Index: classpath/gnu/java/util/jar/JarUtils.java === --- classpath/gnu/java/util/jar/JarUtils.java (revision 123266) +++ classpath/gnu/java/util/jar/JarUtils.java (working copy) @@ -1,5 +1,5 @@ /* JarUtils.java -- Utility methods for reading/writing Manifest[-like] files - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -62,7 +62,10 @@ */ public abstract class JarUtils { - private static final Logger log = Logger.getLogger(JarUtils.class.getName()); + // We used to log here, but this causes problems during bootstrap, + // and it didn't seem worthwhile to preserve this. Still, this + // might be useful for debugging. + // private static final Logger log = Logger.getLogger(JarUtils.class.getName()); public static final String META_INF = META-INF/; public static final String DSA_SUFFIX = .DSA; public static final String SF_SUFFIX = .SF; @@ -112,9 +115,10 @@ { String version = expectHeader(version_header, br); attr.putValue(SIGNATURE_VERSION, version); -if (! DEFAULT_SF_VERSION.equals(version)) - log.warning(Unexpected version number: + version - + . Continue (but may fail later)); + // This may cause problems during VM bootstrap. +// if (! DEFAULT_SF_VERSION.equals(version)) +// log.warning(Unexpected version number: + version +// + . Continue (but may fail later)); } catch (IOException ioe) { Index: java/util/logging/LogManager.java === --- java/util/logging/LogManager.java (revision 123266) +++ java/util/logging/LogManager.java (working copy) @@ -559,13 +559,21 @@ if (handlers.equals(key)) { - StringTokenizer tokenizer = new StringTokenizer(value); + // In Java 5 and earlier this was specified to be + // whitespace-separated, but in reality it also accepted + // commas (tomcat relied on this), and in Java 6 the + // documentation was updated to fit the implementation. + StringTokenizer tokenizer = new StringTokenizer(value, +\t\n\r\f,); while (tokenizer.hasMoreTokens()) { String handlerName = tokenizer.nextToken(); Handler handler = (Handler) createInstance(handlerName, Handler.class, key); -Logger.root.addHandler(handler); + // Tomcat also relies on the implementation ignoring + // items in 'handlers' which are not class names. + if (handler != null) + Logger.root.addHandler(handler); } }
[commit-cp] classpath ChangeLog java/util/logging/LogManage...
CVSROOT:/cvsroot/classpath Module name:classpath Changes by: Tom Tromey tromey 07/03/30 04:13:43 Modified files: . : ChangeLog java/util/logging: LogManager.java Log message: PR libgcj/29869: * java/util/logging/LogManager.java (readConfiguration): Handle comma-separated 'handlers'. Don't try to add a non-existing handler. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpathr1=1.9184r2=1.9185 http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/logging/LogManager.java?cvsroot=classpathr1=1.27r2=1.28