Re: [cp-patches] Re: [commit-cp] classpath ./ChangeLog lib/Makefile.am m4/acincl...
Mark Wielaard wrote: Hi Dalibor, On Tue, 2005-12-13 at 01:20 +, Dalibor Topic wrote: Log message: Build breakage fix for jikes 1.19 2005-12-12 Dalibor Topic <[EMAIL PROTECTED]> Fixes bug #25353 * m4/acinclude.m4: Added JIKESWARNINGS makefile variable. Only add +Pno-shadow to JIKESWARNINGS if not using jikes 1.19. * lib/Makefile.am: Use JIKESWARNINGS instead of explicitely listing the warnings. Nice, this seems to work fine for me. But the patch never made it to classpath-patches. Could you repost it? Yes, of course, sorry about the inconvenience. Patch attached. cheers, dalibor topic === RCS file: /var/lib/cvs/sources/classpath/classpath/m4/acinclude.m4,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- classpath/classpath/m4/acinclude.m4 2005/09/11 23:20:18 1.7 +++ classpath/classpath/m4/acinclude.m4 2005/12/13 01:20:29 1.8 @@ -135,9 +135,18 @@ JIKESENCODING= if test -n "`$JIKES --help 2>&1 | grep encoding`"; then - JIKESENCODING='-encoding UTF-8' + JIKESENCODING='-encoding UTF-8' fi AC_SUBST(JIKESENCODING) + +JIKESWARNINGS="+Pno-switchcheck" +if test "x$JIKES_VERSION_MAJOR" = x"1" ; then + if ! test "x$JIKES_VERSION_MINOR" = x"19"; then +JIKESWARNINGS="$JIKESWARNINGS +Pno-shadow" + fi +fi +AC_SUBST(JIKESWARNINGS) + fi ]) === RCS file: /var/lib/cvs/sources/classpath/classpath/lib/Makefile.am,v retrieving revision 1.105 retrieving revision 1.106 diff -u -r1.105 -r1.106 --- classpath/classpath/lib/Makefile.am 2005/12/05 13:25:00 1.105 +++ classpath/classpath/lib/Makefile.am 2005/12/13 01:20:29 1.106 @@ -19,7 +19,7 @@ JAVAC = exit 1 else if FOUND_JIKES -JAVAC = $(JIKES) +Pno-shadow +Pno-switchcheck +F $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(compile_classpath) -d . @classes +JAVAC = $(JIKES) $(JIKESWARNINGS) +F $(JIKESENCODING) -bootclasspath '' -extdirs '' -sourcepath '' --classpath $(compile_classpath) -d . @classes else if FOUND_KJC ## FIXME: from what I can tell, kjc does not support a -encoding option. ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Small fixlet to improve distributability of embedded gnu classpath checkouts
Hi all, I've checked in a fix from Guilhem to make sure that GNU Classpath's sources for the part of the class libraries written in the Java programming language end up in the right subdirectory of GNU Classpath, rather than in top_distdir. That fixes make distcheck for Kaffe, which uses a regularly updated checkout of GNU Classpath. cheers, dalibor topic 2005-12-18 Guilhem Lavaux <[EMAIL PROTECTED]> * libraries/javalib/external/classpath/lib/Makefile.am: Replaced $(top_distdir) with $(distdir)/.. to make sure that GNU Classpath's class library sources don't end up in the wrong location in kaffe's tarball. Index: lib/Makefile.am === RCS file: /sources/classpath/classpath/lib/Makefile.am,v retrieving revision 1.106 diff -u -r1.106 Makefile.am --- lib/Makefile.am 13 Dec 2005 01:20:29 - 1.106 +++ lib/Makefile.am 18 Dec 2005 18:37:50 - @@ -153,10 +153,10 @@ dist-hook: mkdir -p $(distdir) - cp -dfR $(top_srcdir)/gnu $(top_srcdir)/java $(top_srcdir)/javax $(top_srcdir)/org $(top_srcdir)/vm $(top_srcdir)/resource $(top_distdir) + cp -dfR $(top_srcdir)/gnu $(top_srcdir)/java $(top_srcdir)/javax $(top_srcdir)/org $(top_srcdir)/vm $(top_srcdir)/resource $(distdir)/.. # Delete not wanted files. - $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax $(top_distdir)/org $(top_distdir)/vm $(top_distdir)/resource -name CVS -print | xargs rm -fr - $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax $(top_distdir)/org $(top_distdir)/vm $(top_distdir)/resource -name .cvsignore -print | xargs rm -f - $(FIND) $(top_distdir)/gnu $(top_distdir)/java $(top_distdir)/javax $(top_distdir)/org $(top_distdir)/vm -name class-dependencies.conf -print | xargs rm -f - rm -f $(top_distdir)/gnu/classpath/Configuration.java - rm -f $(top_distdir)/java/util/LocaleData.java + $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../vm $(distdir)/../resource -name CVS -print | xargs rm -fr + $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../vm $(distdir)/../resource -name .cvsignore -print | xargs rm -f + $(FIND) $(distdir)/../gnu $(distdir)/../java $(distdir)/../javax $(distdir)/../org $(distdir)/../vm -name class-dependencies.conf -print | xargs rm -f + rm -f $(distdir)/../gnu/classpath/Configuration.java + rm -f $(distdir)/../java/util/LocaleData.java ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: small warning fixes in fdlibm
Hi all, I've fixed a small compiler warning issue with fdlibm. cheers, dalibor topic 2005-12-19 Dalibor Topic <[EMAIL PROTECTED]> * native/fdlibm/mprec.h (DEBUG): Include stdlib.h for exit() prototype to fix compiler warning. Index: native/fdlibm/mprec.h === RCS file: /sources/classpath/classpath/native/fdlibm/mprec.h,v retrieving revision 1.6 diff -u -r1.6 mprec.h --- native/fdlibm/mprec.h 16 Dec 2005 21:11:23 - 1.6 +++ native/fdlibm/mprec.h 19 Dec 2005 20:10:43 - @@ -86,6 +86,7 @@ #ifdef DEBUG #include "stdio.h" +#include #define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);} #endif ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] small patch to clean up 'inner' classes
Tom Tromey wrote: "Dalibor" == Dalibor Topic <[EMAIL PROTECTED]> writes: Dalibor> the attached patch cleans up the inner classes a bit, turning them Dalibor> into real, private, static final inner classes where possible. That Dalibor> causes less weird classes to hang around in our 'exported' APIs, and Dalibor> makes creating profiles for Classpath's libraries simpler. Sorry I didn't speak up on this sooner. I agree this is generally a good thing to do. There is just one nit to watch out for... Dalibor> -class IntPair implements Serializable { Dalibor> - public int first, second; Dalibor> -} [ ... ] Dalibor> + private static final class IntPair implements Serializable { Dalibor> +public int first, second; Dalibor> + } The default constructor for a class will have the same permissions as the class itself, in this case 'private IntPair()'. But this means that any attempt to instantiate -- 'new IntPair()' -- will then cause an accessor constructor with default access to be created. So, it is slightly better to either make the class package-private, or to add an explicit no-argument package-private constructor. Thanks, Which Eclipse version warns about this? I'd like to give it a go on Kaffe and refactor things a bit. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Re: FYI: java/io/FileInputStream.java & java/io/FileOutputStream.java
Jeroen Frijters sumatra.nl> writes: > > Hi, > > I committed the attached patch. > > Regards, > Jeroen > > 2005-03-03 Jeroen Frijters frijters.net> > > * java/io/FileInputStream.java (FileInputStream(File)), > java/io/FileOutputStream.java (FileOutputStream(File)): > Removed unnecessary File.isDirectory() check. > Hi Jeroen, while trying to merge the patch into Kaffe I noticed that it breaks the http://www.kaffe.org/cgi-bin/viewcvs.cgi/kaffe/test/regression/ FileChecks.java?rev=1.2&content-type=text/vnd.viewcvs-markup regression test in Kaffe. According to API docs for File*outStream, the File constructor is supposed to throw an exception if the file parameter is a directory. Could you elaborate some more on the patch? cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Re: FYI: java/io/FileInputStream.java& java/io/FileOutputStream.java
Jeroen Frijters wrote: Dalibor Topic wrote: Jeroen Frijters sumatra.nl> writes: 2005-03-03 Jeroen Frijters frijters.net> * java/io/FileInputStream.java (FileInputStream(File)), java/io/FileOutputStream.java (FileOutputStream(File)): Removed unnecessary File.isDirectory() check. Hi Jeroen, while trying to merge the patch into Kaffe I noticed that it breaks the http://www.kaffe.org/cgi-bin/viewcvs.cgi/kaffe/test/regression/ FileChecks.java?rev=1.2&content-type=text/vnd.viewcvs-markup regression test in Kaffe. According to API docs for File*outStream, the File constructor is supposed to throw an exception if the file parameter is a directory. Could you elaborate some more on the patch? This means that FileChannelImpl.open() should be fixed to throw the proper exception. Doing the explicit check in the File[In|Out]putStream doesn't make sense, because it is inherently racy (and inefficient too). Yeah, i can understand the inefficient part, as the same code is duplicated in two classes. Could you elaborate some more on the racy part? I've been working on a patch that moves the check into the constructor of FileChannelImpl, which is, afaik, the only code that calls open(). It passes the kaffe regression tests for me, and now I'm running mauve over it, to see if I broke something accidentally. I didn't notice the failure because I use a custom version of FileChannelImpl, so sorry about that. No worries, that's what hand merging is good for: time-shifted peer review :) cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Re: FYI: java/io/FileInputStream.java& java/io/FileOutputStream.java
Jeroen Frijters wrote: Dalibor Topic wrote: Yeah, i can understand the inefficient part, as the same code is duplicated in two classes. Could you elaborate some more on the racy part? If another application creates a directory after the check, but before the file is created, an incorrect error is thrown. So ideally the native code that calls the platform file open API needs to handle this error case. Isn't that the case in any way, independently of the implementation strategy used? Unless a platform has an atomic 'check if dir and open' function call, there is always a time slice where some other application can do stuff that invalidates what we know. Another strategy to implement this in the FileChannelImpl constructor would be to call open() first, and then to check whether what we have opened is a directory, and if it is one to call close() + throw FileNotFoundException in that case. Does that sound OK? I can attach a patch, if you're interested. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Re: FYI: java/io/FileInputStream.java& java/io/FileOutputStream.java
Jeroen Frijters wrote: Another strategy to implement this in the FileChannelImpl constructor would be to call open() first, and then to check whether what we have opened is a directory, and if it is one to call close() + throw FileNotFoundException in that case. Does that sound OK? That sounds like a good approach to me. I would think it would be pretty efficient too. OK, I'll post a patch that does that, without the close() part, after some more testing and writing a muave test case. Thanks for your help! cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Re: FYI: java/io/FileInputStream.java& java/io/FileOutputStream.java
Dalibor Topic wrote: Jeroen Frijters wrote: Another strategy to implement this in the FileChannelImpl constructor would be to call open() first, and then to check whether what we have opened is a directory, and if it is one to call close() + throw FileNotFoundException in that case. Does that sound OK? That sounds like a good approach to me. I would think it would be pretty efficient too. OK, I'll post a patch that does that, without the close() part, after some more testing and writing a muave test case. Thanks for your help! Attached. ChangeLog: 2005-03-10 Dalibor Topic <[EMAIL PROTECTED]> * libraries/javalib/gnu/java/nio/channels/FileChannelImpl.java (FileChannelImpl(Sting, int)): Removed. (FileChannelImpl(File, int)) Added. Check if opened file is a directory. * libraries/javalib/java/io/FileInputStream.java (FileInputStream): Fixed javadocs. Call FileChannelImpl(File, int). * libraries/javalib/java/io/FileOutputStream.java (FileInputStream): Call FileChannelImpl(File, int). * libraries/javalib/java/io/RandomAccessFile.java (RandomAccessFile): Call FileChannelImpl(File, int). Switched constructors around. cheers, dalibor topic Index: gnu/java/nio/channels/FileChannelImpl.java === RCS file: /cvsroot/classpath/classpath/gnu/java/nio/channels/FileChannelImpl.java,v retrieving revision 1.8 diff -u -r1.8 FileChannelImpl.java --- gnu/java/nio/channels/FileChannelImpl.java 17 Feb 2005 12:57:27 - 1.8 +++ gnu/java/nio/channels/FileChannelImpl.java 10 Mar 2005 01:09:29 - @@ -41,6 +41,7 @@ import gnu.classpath.Configuration; import gnu.java.nio.FileLockImpl; +import java.io.File; import java.io.FileNotFoundException; import java.io.IOException; import java.nio.ByteBuffer; @@ -101,10 +102,16 @@ } /* Open a file. MODE is a combination of the above mode flags. */ - public FileChannelImpl (String path, int mode) throws FileNotFoundException + public FileChannelImpl (File file, int mode) throws FileNotFoundException { +final String path = file.getPath(); fd = open (path, mode); this.mode = mode; + +// First open the file and then check if it is a a directory +// to avoid race condition. +if (file.isDirectory()) + throw new FileNotFoundException(file.getPath() + " is a directory"); } /* Used by init() (native code) */ Index: java/io/FileInputStream.java === RCS file: /cvsroot/classpath/classpath/java/io/FileInputStream.java,v retrieving revision 1.31 diff -u -r1.31 FileInputStream.java --- java/io/FileInputStream.java 3 Mar 2005 08:56:02 - 1.31 +++ java/io/FileInputStream.java 10 Mar 2005 01:09:33 - @@ -76,7 +76,8 @@ * @param name The name of the file this stream should read from * * @exception SecurityException If read access to the file is not allowed - * @exception FileNotFoundException If the file does not exist. + * @exception FileNotFoundException If the file does not exist + * or if it is a directory */ public FileInputStream(String name) throws FileNotFoundException { @@ -97,7 +98,8 @@ * @param file The File object this stream should read from * * @exception SecurityException If read access to the file is not allowed - * @exception FileNotFoundException If the file does not exist. + * @exception FileNotFoundException If the file does not exist + * or if it is a directory. */ public FileInputStream(File file) throws FileNotFoundException { @@ -105,7 +107,7 @@ if (s != null) s.checkRead(file.getPath()); -ch = new FileChannelImpl (file.getPath(), FileChannelImpl.READ); +ch = new FileChannelImpl (file, FileChannelImpl.READ); } /** Index: java/io/FileOutputStream.java === RCS file: /cvsroot/classpath/classpath/java/io/FileOutputStream.java,v retrieving revision 1.34 diff -u -r1.34 FileOutputStream.java --- java/io/FileOutputStream.java 3 Mar 2005 08:56:02 - 1.34 +++ java/io/FileOutputStream.java 10 Mar 2005 01:09:33 - @@ -155,10 +155,10 @@ if (s != null) s.checkWrite(file.getPath()); -ch = new FileChannelImpl (file.getPath(), (append - ? FileChannelImpl.WRITE - | FileChannelImpl.APPEND - : FileChannelImpl.WRITE)); + ch = new FileChannelImpl (file, (append +? FileChannelImpl.WRITE +| FileChannelImpl.APPEND +: FileChannelImpl.WRITE)); } /** Index: java/io/RandomAccessFile.java === RCS file: /cvsroot/classpath/classpath/java/io/RandomAccessFile.java,v retrieving revision 1.44 diff -u -r1.44 RandomAccessFile.java --- java/io/RandomAccessFile.java 16 Feb 2005 11:18:37 - 1.44 +++ java/io/RandomAccessFile.java 10 Ma
Re: [cp-patches] java/text/DecimalFormat.java: ParseException overlooked
Am Montag, den 07.03.2005, 22:04 + schrieb Ito Kazumitsu: > In message "[cp-patches] java/text/DecimalFormat.java: ParseException > overlooked" > on 05/03/01, Ito Kazumitsu <[EMAIL PROTECTED]> writes: > > :> I think this is a bug of java/text/DecimalFormat.java: > > Could someone take care of this issue? I'm sorry for the long delay, Ito. Thank you very much for the patch, I've checked it into Classpath and Kaffe. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Build fix for Darwin
Hi all, the attached patch fixed a small build problem on Darwin6 due to a missing include statement. cheers, dalibor topic Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.3378 diff -u -r1.3378 ChangeLog --- ChangeLog 27 Mar 2005 00:09:07 - 1.3378 +++ ChangeLog 27 Mar 2005 02:18:00 - @@ -1,3 +1,18 @@ +2005-03-26 Dalibor Topic <[EMAIL PROTECTED]> + +* native/jni/java-nio/gnu_java_nio_VMSelector.c: +Moved include statement for config.h to the top to +fix the build on Darwin6. + +Reported by: Riccardo Mottola <[EMAIL PROTECTED]> + +2005-03-26 Dalibor Topic <[EMAIL PROTECTED]> + +* native/jni/java-nio/gnu_java_nio_VMSelector.c: +Include to fix build on OS X. + +Reported by: Michael Franz <[EMAIL PROTECTED]> + 2005-03-26 Ito Kazumitsu <[EMAIL PROTECTED]> * java/text/DecimalFormat.java (parse): Index: native/jni/java-nio/gnu_java_nio_VMSelector.c === RCS file: /cvsroot/classpath/classpath/native/jni/java-nio/gnu_java_nio_VMSelector.c,v retrieving revision 1.4 diff -u -r1.4 gnu_java_nio_VMSelector.c --- native/jni/java-nio/gnu_java_nio_VMSelector.c 18 Mar 2005 04:50:32 - 1.4 +++ native/jni/java-nio/gnu_java_nio_VMSelector.c 27 Mar 2005 02:18:02 - @@ -35,12 +35,18 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ +#include "config.h" + +/* needs to be included on OSX before */ +#if defined(HAVE_SYS_TYPES_H) +#include +#endif + #include #include #include -#include #include #include ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] [Patch] javax.swing.JTextArea: Suggesting to revert.
Michael Koch wrote: On Thu, Apr 28, 2005 at 01:40:13PM -0500, Archie Cobbs wrote: What about assert? Can we use assert in Classpath code yet? No, we cant yet. Michael, could you elaborate a bit on why we can't do it yet? I recall the discussion fromIRc, but I think it would be cool to have for the Mediation Wiki as well. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: reference leak fix
Hi all, the attached patch fixed a leak of JNI references for me with tvbrowser[1], so I've checked it in. 2005-05-21 Dalibor Topic <[EMAIL PROTECTED]> * native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c (area_updated): Delete jpixels reference after use to avoid wasting references. cheers, dalibor topic [1] http://www.tvbrowser.org Index: native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c === RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c,v retrieving revision 1.12 diff -u -r1.12 gnu_java_awt_peer_gtk_GdkPixbufDecoder.c --- native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c 16 Mar 2005 15:21:59 - 1.12 +++ native/jni/gtk-peer/gnu_java_awt_peer_gtk_GdkPixbufDecoder.c 21 May 2005 19:03:00 - @@ -154,6 +154,7 @@ (jint) width, (jint) height, jpixels, stride_pixels); + (*env)->DeleteLocalRef(env, jpixels); gdk_threads_enter (); } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Patch: RFC: add --with-vm-classes
Tom Tromey wrote: Originally I planned to make one patch that solved everything, but while working on it I realized that the result was simply too big to manage well. So, my current plan is incremental: do as minimal a build change as possible, and then, once it is in, write followup patches to clean up specific oddities. Yeah, I've been doing the same with selected VM interface classes with pretty good results. I can recommend the approach :) cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] finite() for fdlibm
Christian Thalinger wrote: > Hi! > > Since there are some finite() calls in classpath's native code, we > should also provide a implementation. This one is taken and adapted from > the current file available from http://www.netlib.org/fdlibm/. sounds good to me. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Cleanup for Configuration.DEBUG in gnu.java.text
Hi all, small cleanup for gnu/java/text/FormatCharacterIterator.java. 2005-07-10 Dalibor Topic <[EMAIL PROTECTED]> * gnu/java/text/FormatCharacterIterator.java: Removed unnecessary import of gnu.classpath.Configuration. (DEBUG) New private static field. (debug, dumpTable) Use DEBUG. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] FYI: Cleanup for Configuration.DEBUG in gnu.java.text
Dalibor Topic wrote: Hi all, small cleanup for gnu/java/text/FormatCharacterIterator.java. 2005-07-10 Dalibor Topic <[EMAIL PROTECTED]> * gnu/java/text/FormatCharacterIterator.java: Removed unnecessary import of gnu.classpath.Configuration. (DEBUG) New private static field. (debug, dumpTable) Use DEBUG. added the patch this time around. cheers, dalibor topic ? bin Index: gnu/java/text/FormatCharacterIterator.java === RCS file: /cvsroot/classpath/classpath/gnu/java/text/FormatCharacterIterator.java,v retrieving revision 1.3 diff -u -r1.3 FormatCharacterIterator.java --- gnu/java/text/FormatCharacterIterator.java 2 Jul 2005 20:32:15 - 1.3 +++ gnu/java/text/FormatCharacterIterator.java 10 Jul 2005 15:08:31 - @@ -37,8 +37,6 @@ exception statement from your version. */ package gnu.java.text; -import gnu.classpath.Configuration; - import java.text.AttributedCharacterIterator; import java.util.HashMap; import java.util.HashSet; @@ -65,7 +63,8 @@ private int attributeIndex; private int[] ranges; private HashMap[] attributes; - + private static final boolean DEBUG = false; + /** * This constructor builds an empty iterated strings. The attributes * are empty and so is the string. However you may append strings @@ -496,7 +495,7 @@ private void debug(String s) { -if (Configuration.DEBUG) +if (DEBUG) System.out.println(s); } @@ -504,7 +503,7 @@ { int start_range = 0; -if (!Configuration.DEBUG) +if (!DEBUG) return; System.out.println("Dumping internal table:"); ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Small error message improvement
Hi all, I've slightly improved a GridBayLayout error message. 2005-07-10 Dalibor Topic <[EMAIL PROTECTED]> * java/awt/GridBagLayout.java: (addLayoutComponent) Improved error message. cheers, dalibor topic Index: java/awt/GridBagLayout.java === RCS file: /cvsroot/classpath/classpath/java/awt/GridBagLayout.java,v retrieving revision 1.18 diff -u -r1.18 GridBagLayout.java --- java/awt/GridBagLayout.java 2 Jul 2005 20:32:25 - 1.18 +++ java/awt/GridBagLayout.java 10 Jul 2005 17:14:03 - @@ -129,7 +129,9 @@ return; if (!(constraints instanceof GridBagConstraints)) - throw new IllegalArgumentException(); + throw new IllegalArgumentException("constraints " + + constraints + + " are not an instance of GridBagConstraints"); setConstraints (component, (GridBagConstraints) constraints); } ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: DEBUG usage cleanup in ObjectInputStream
Hi all, I've cleaned things up in ObjectInputStream a bit. 2005-07-10 Dalibor Topic <[EMAIL PROTECTED]> * java/io/ObjectInputStream.java (DEBUG): New private static field. (ObjectInputStream, resolveClass) Use DEBUG. cheers, dalibor topic ? bin Index: java/io/ObjectInputStream.java === RCS file: /cvsroot/classpath/classpath/java/io/ObjectInputStream.java,v retrieving revision 1.58 diff -u -r1.58 ObjectInputStream.java --- java/io/ObjectInputStream.java 2 Jul 2005 20:32:38 - 1.58 +++ java/io/ObjectInputStream.java 10 Jul 2005 17:30:17 - @@ -75,7 +75,7 @@ public ObjectInputStream(InputStream in) throws IOException, StreamCorruptedException { -if (Configuration.DEBUG) +if (DEBUG) { String val = System.getProperty("gcj.dumpobjects"); if (dump == false && val != null && !val.equals("")) @@ -773,7 +773,7 @@ if (callersClassLoader == null) { callersClassLoader = currentLoader (); - if (Configuration.DEBUG && dump) + if (DEBUG && dump) { dumpElementln ("CallersClassLoader = " + callersClassLoader); } @@ -1910,6 +1910,8 @@ // The nesting depth for debugging output private int depth = 0; + + private static final boolean DEBUG = false; private void dumpElement (String msg) { ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: improved getObjectField checks and error message
Hi all, attached is a small patch that improved the readability of the getObjectField checking code, and the error messages. 2005-07-10 Dalibor Topic <[EMAIL PROTECTED]> * java/io/ObjectOutputStream.java (getObjectField): Clarified error checking code, and improved exception messages. cheers, dalibor topic Index: java/io/ObjectOutputStream.java === RCS file: /cvsroot/classpath/classpath/java/io/ObjectOutputStream.java,v retrieving revision 1.55 diff -u -r1.55 ObjectOutputStream.java --- java/io/ObjectOutputStream.java 10 Jul 2005 18:07:15 - 1.55 +++ java/io/ObjectOutputStream.java 10 Jul 2005 18:09:51 - @@ -1486,10 +1486,16 @@ Field f = getField (klass, field_name); ObjectStreamField of = new ObjectStreamField(f.getName(), f.getType()); - if (of.getTypeString() == null || - !of.getTypeString().equals(type_code)) + /* if of is primitive something went wrong + * in the check for primitive classes in writeFields. + */ + if (of.isPrimitive()) throw new InvalidClassException - ("invalid type code for " + field_name + " in class " + klass.getName()); + ("invalid type code for " + field_name + " in class " + klass.getName() + " : object stream field is primitive"); + + if (!of.getTypeString().equals(type_code)) + throw new InvalidClassException + ("invalid type code for " + field_name + " in class " + klass.getName() + " : object stream field " + of + " has type string " + of.getTypeString() + " instead of " + type_code); Object o = f.get (obj); // FIXME: We should check the type_code here ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: DEBUG cleanup in ObjectOutputStream
Hi all, I've cleaned up ObjectOutputStream a bit. 2005-07-10 Dalibor Topic <[EMAIL PROTECTED]> * java/io/ObjectOutputStream.java (DEBUG): New constant. (ObjectOutputStream, writeObject) Use internal debug switch. cheers, dalibor topic ? bin Index: java/io/ObjectOutputStream.java === RCS file: /cvsroot/classpath/classpath/java/io/ObjectOutputStream.java,v retrieving revision 1.54 diff -u -r1.54 ObjectOutputStream.java --- java/io/ObjectOutputStream.java 2 Jul 2005 20:32:38 - 1.54 +++ java/io/ObjectOutputStream.java 10 Jul 2005 17:51:07 - @@ -146,7 +146,7 @@ useSubclassMethod = false; writeStreamHeader(); -if (Configuration.DEBUG) +if (DEBUG) { String val = System.getProperty("gcj.dumpobjects"); if (val != null && !val.equals("")) @@ -378,7 +378,7 @@ setBlockDataMode(false); try { - if (Configuration.DEBUG) + if (DEBUG) { e.printStackTrace(System.out); } @@ -389,7 +389,7 @@ StreamCorruptedException ex = new StreamCorruptedException (ioe + " thrown while exception was being written to stream."); - if (Configuration.DEBUG) + if (DEBUG) { ex.printStackTrace(System.out); } @@ -1559,6 +1565,8 @@ // Set if we're generating debugging dumps private boolean dump = false; + + private static final boolean DEBUG = false; static { ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: copyright year update
Hi all, I updated the copyright info for ObjectOutputStream to include 2005. 2005-07-10 Dalibor Topic <[EMAIL PROTECTED]> * java/io/ObjectOutputStream.java: Updated copyright information for 2005. cheers, dalibor topic Index: java/io/ObjectOutputStream.java === RCS file: /cvsroot/classpath/classpath/java/io/ObjectOutputStream.java,v retrieving revision 1.56 diff -u -r1.56 ObjectOutputStream.java --- java/io/ObjectOutputStream.java 10 Jul 2005 18:17:45 - 1.56 +++ java/io/ObjectOutputStream.java 10 Jul 2005 18:24:28 - @@ -1,5 +1,5 @@ /* ObjectOutputStream.java -- Class used to write serialized objects - Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004 + Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] RFC: New JCL helper functions for RawData handling
Guilhem Lavaux wrote: On Fri, 2005-07-22 at 13:55 -0600, Tom Tromey wrote: "Guilhem" == Guilhem Lavaux <[EMAIL PROTECTED]> writes: Guilhem> Here are some new functions for JCL to help create RawData Guilhem> instances and retrieve data from them. Guilhem> +#ifdef POINTERS_ARE_64BIT Guilhem> + rawDataClass = (*env)->FindClass (env, "gnu/classpath/RawData64"); At FOSDEM we talked about renaming these ... want to take it on? :-) Could you be more specific ? A link to the discussion ? I may take it on but I need to know what was decided. ;-) We discussed things during the classpath meeting, see http://developer.classpath.org/mediation/Fosdem2005 for a list. No decision was reached that I recall or can find documented ;( cheers, dalibr topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Re: Help needed to persuade apaches about the Classpath license.
Meskauskas Audrius wrote: So the idea evolves into plan to force Apache Geronimo to run on Classpath (or just using our CORBA, as the first step in this way) and announce results of the work, probably placing the working solution as an independent project. In this way we may better persuade the Apache groups to use our work, finally increasing our chances to get seriously into the Harmony project. s/force/fix . 1.0 M4 just came out today, so I'll take a quick look of I can get it to build/run on kaffe. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] FYI: Qt peers
Roman Kennke wrote: Hi Sven, Commited a few new files. This was a nice surprise when I cvsup'd tomorrow :-) Thank you. Is there a get-me-going-quickly-file somewhere? Or would you add one? I'll add some build machinery when I merge it into Kaffe later tonight, and post a patch for Classpath for review. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Include assert.h in Qt peers
Hi all, while I was working on the build machinery for Qt peers, I noticed that they needed assert.h in various class files to build with classpath's jni.h so I added those with the attached patch. cheers, dalibor topic 2005-08-15 Dalibor Topic <[EMAIL PROTECTED]> * native/jni/qt-peer/mainqtthread.cpp, native/jni/qt-peer/qmatrix.cpp, native/jni/qt-peer/qpainterpath.cpp, native/jni/qt-peer/qpen.cpp, native/jni/qt-peer/qtbuttonpeer.cpp, native/jni/qt-peer/qtcanvaspeer.cpp, native/jni/qt-peer/qtcheckboxpeer.cpp, native/jni/qt-peer/qtchoicepeer.cpp, native/jni/qt-peer/qtcomponentpeer.cpp, native/jni/qt-peer/qtdialogpeer.cpp, native/jni/qt-peer/qtfiledialogpeer.cpp, native/jni/qt-peer/qtfontmetrics.cpp, native/jni/qt-peer/qtfontpeer.cpp, native/jni/qt-peer/qtframepeer.cpp, native/jni/qt-peer/qtgraphics.cpp, native/jni/qt-peer/qtimage.cpp, native/jni/qt-peer/qtlabelpeer.cpp, native/jni/qt-peer/qtlistpeer.cpp, native/jni/qt-peer/qtmenubarpeer.cpp, native/jni/qt-peer/qtmenucomponentpeer.cpp, native/jni/qt-peer/qtmenuitempeer.cpp, native/jni/qt-peer/qtmenupeer.cpp, native/jni/qt-peer/qtpanelpeer.cpp, native/jni/qt-peer/qtpopupmenupeer.cpp, native/jni/qt-peer/qtscreendevice.cpp, native/jni/qt-peer/qtscrollbarpeer.cpp, native/jni/qt-peer/qtscrollpanepeer.cpp, native/jni/qt-peer/qttextareapeer.cpp, native/jni/qt-peer/qttextfieldpeer.cpp, native/jni/qt-peer/qtvolatileimage.cpp, native/jni/qt-peer/qtwindowpeer.cpp: Include . Common subdirectories: native/jni/qt-peer/CVS and ../kaffe/libraries/clib/awt/classpath-qt/CVS diff -u native/jni/qt-peer/mainqtthread.cpp ../kaffe/libraries/clib/awt/classpath-qt/mainqtthread.cpp --- native/jni/qt-peer/mainqtthread.cpp 2005-08-11 19:06:48.0 +0200 +++ ../kaffe/libraries/clib/awt/classpath-qt/mainqtthread.cpp 2005-08-13 17:43:07.0 +0200 @@ -35,6 +35,7 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ +#include #include #include #include Only in ../kaffe/libraries/clib/awt/classpath-qt/: Makefile.am Only in ../kaffe/libraries/clib/awt/classpath-qt/: Makefile.in diff -u native/jni/qt-peer/qmatrix.cpp ../kaffe/libraries/clib/awt/classpath-qt/qmatrix.cpp --- native/jni/qt-peer/qmatrix.cpp 2005-08-11 19:06:48.0 +0200 +++ ../kaffe/libraries/clib/awt/classpath-qt/qmatrix.cpp 2005-08-13 17:43:07.0 +0200 @@ -35,6 +35,7 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ +#include #include #include #include "nativewrapper.h" diff -u native/jni/qt-peer/qpainterpath.cpp ../kaffe/libraries/clib/awt/classpath-qt/qpainterpath.cpp --- native/jni/qt-peer/qpainterpath.cpp 2005-08-11 19:06:48.0 +0200 +++ ../kaffe/libraries/clib/awt/classpath-qt/qpainterpath.cpp 2005-08-13 17:43:07.0 +0200 @@ -35,6 +35,7 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ +#include #include #include #include "nativewrapper.h" diff -u native/jni/qt-peer/qpen.cpp ../kaffe/libraries/clib/awt/classpath-qt/qpen.cpp --- native/jni/qt-peer/qpen.cpp 2005-08-11 19:06:48.0 +0200 +++ ../kaffe/libraries/clib/awt/classpath-qt/qpen.cpp 2005-08-13 17:43:07.0 +0200 @@ -35,6 +35,7 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ +#include #include #include #include diff -u native/jni/qt-peer/qtbuttonpeer.cpp ../kaffe/libraries/clib/awt/classpath-qt/qtbuttonpeer.cpp --- native/jni/qt-peer/qtbuttonpeer.cpp 2005-08-11 19:06:48.0 +0200 +++ ../kaffe/libraries/clib/awt/classpath-qt/qtbuttonpeer.cpp 2005-08-13 17:43:07.0 +0200 @@ -35,6 +35,7 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ +#include #include #include #include diff -u native/jni/qt-peer/qtcanvaspeer.cpp ../kaffe/libraries/clib/awt/classpath-qt/qtcanvaspeer.cpp --- native/jni/qt-peer/qtcanvaspeer.cpp 2005-08-11 19:06:48.0 +0200 +++ ../kaffe/libraries/clib/awt/classpath-qt/qtcanvaspeer.cpp 2005-08-13 17:43:07.0 +0200 @@ -35,6 +35,7 @@ obligated to do so. If you do not wish to do so, delete this exception statement from your version. */ +#include #include #include #include diff -u native/jni/qt-peer/qtcheckboxpeer.cpp ../kaffe/libraries/clib/awt/classpath-qt/qtcheckboxpeer.cpp --- native/jni/qt-peer/qtcheckboxpeer.cpp 2005-08-11 19:06:48.0 +0200 +++ ../kaffe/libraries/clib/awt/classpath-qt/qtcheckboxpeer.cpp 2005-08-13 17:43:07.0 +0200 @@ -35,6 +35,7 @@ obligated to do so. If you do not wish to do so, delete this except
Re: [cp-patches] RFC: qt4 peers build machinery
Mark Wielaard wrote: Hi, On Tue, 2005-08-16 at 23:26 +0200, Dalibor Topic wrote: the attached patch adds the necessary build machinery for Qt 4 peers. Thanks! Still trying to get a clean build environment. But you will at least need a little update to the check_jni_methods.sh script. Attached. Hi Mark, thanks for your patch and your help in testing this on IRC. While the build works fine for me wihout it, ( [...] make[4]: Leaving directory `/home/topic/projects/build-classpath/native/jni/qt-peer' make[3]: Leaving directory `/home/topic/projects/build-classpath/native/jni/qt-peer' make[3]: Entering directory `/home/topic/projects/build-classpath/native/jni' cd ../../../classpath/classpath && scripts/check_jni_methods.sh diff: `-0' option is obsolete; use `-U 0' diff: Try `diff --help' for more information. make[3]: Leaving directory `/home/topic/projects/build-classpath/native/jni' make[2]: Leaving directory `/home/topic/projects/build-classpath/native/jni' [...] ), feel free to check it in if it helps in your build environment. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] RFC: qt4 peers build machinery
Mark Wielaard wrote: After the little check_jni_script cleanup I only needed the following small changes to get a normal make distcheck and a configure with --with-jikes --enable-Werror --with-javah=gcjh-4.0 --enable-regen-headers working again. That should also fix the autobuilder. Note that warnings are currently not turned on for the qt-peer directory. This should also fix the autobuilder. Hi Mark, I'll add the warning flags later tonight, I'd like to discuss them with Sven first. They are already in Kaffe's version, I just wanted to avoid a situation where people go wild on the warnings and the next checkin might overwrite them all, spreading love and understanding ... 2005-08-17 Mark Wielaard <[EMAIL PROTECTED]> * native/jni/qt-peer/Makefile.am (libqtpeer_la_SOURCES): Remove eventmethods.h. I believe that's a bug in the patch, as the file still exists in the source code in the CVS. Please add it back when you have some time. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] RFC: qt4 peers build machinery
Mark Wielaard wrote: Strange. Our build environments much be a bit different since I don't get this warning. I changed my patch to use -U 0 now. Hi Mark, Thanks for checking in a patch so quickly, I'll give it a try and see if it fixes the warning for me. diff --version shows 2.8.1 on my side, FC4. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] RFC: qt4 peers build machinery
Mark Wielaard wrote: Hi Dalibor, On Wed, 2005-08-17 at 14:34 +0200, Dalibor Topic wrote: 2005-08-17 Mark Wielaard <[EMAIL PROTECTED]> * native/jni/qt-peer/Makefile.am (libqtpeer_la_SOURCES): Remove eventmethods.h. I believe that's a bug in the patch, as the file still exists in the source code in the CVS. Please add it back when you have some time. Yes, sorry about that. Somehow the removal of native/jni/qt-peer/eventmethods.cpp made me think that I should also remove eventmethods.h. Obviously a thinko. Thanks, Mark! cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Re: Make qt-peers build and run out of the box
Mark Wielaard wrote: > Hi, > > We really need Qt 4.0.1 so this updates the requirement. yep, thanks, that's fine. > The qt-peer/Makefile.am was also updated to not need any hacking of the > include paths (this didn't work reliably if the path included multiple > include directories, like with the default Debian install) Could you elaborate on that one? I have no idea what debian does, but I'd guess that your patch breaks code that uses #include , the style in trolltech's Qt examples and docs, rather than #include . :( More generally, I'd suggest rewriting the build tool stuff to simply use a qmake pro file for the qt peers, rather then messing with automake. That's what Trolltech does in their Qt 4.0.1 release, after all, and that seems to work just fine on win32, x11 and Mac OS X :) That would in theory allow us to remove the moc target and all that from the Malefile.am, and would not require messing with #includes, paths, letting people chose whatever include style floats their boats [1], and additionally, allow Sven to hack on the native peers without having to run through the build system fun required for the rest of GNU Classpath. So ... I'll look into it, and see what I can do. > and to use > the general AM_LDFLAGS and AM_CXXFLAGS (important since the > CLASSPATH_MODULE flags depend on the architecture/os, or Darwin is > weird). Thanks, that's OK, too. > To make this all work out of the box a small include cleanup > patch was also needed. Let's see if using qmake provides a better way, that does not require messing with #include statements or paths to accomodate for Trolltech's pkg-config CFLAGS oddities, or Debian-specific Qt 4 packaging problems. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Re: Make qt-peers build and run out of the box
Mark Wielaard wrote: Hi, On Tue, 2005-08-23 at 21:07 +0200, Dalibor Topic wrote: The qt-peer/Makefile.am was also updated to not need any hacking of the include paths (this didn't work reliably if the path included multiple include directories, like with the default Debian install) Could you elaborate on that one? It replaces strings like /usr/include/qt with /usr/include/Qt/qt which is just plain wrong. You are of course right, that is a simple bug in my sed scriptlet, and shouldn't take long to fix. I see that you have just posted another fix, which is cool, too. But as invested some time in making fun of the bikeshed discussion we're having here (and boy, are you soo wrong about the colour of it all!), I'll give you the funny ranting bits: You may have missed the part in my original mail where I went to great length to explicitely make sure that people mucking around with the Qt peers should *build their own* Qt4 library, and in particular not use the one in Debian unstable. I guess I was not loud and clear enough ;) Let me repeat that: build your own Qt 4.0.1 library if you want to play with the qt peers in GNU Classpath. Don't use whatever your distribution provides, it is simply not good enough: you need the absolute bleeding edge. In particular since, according to http://packages.qa.debian.org/q/qt4-x11.html the current version of Qt 4 in debian unstable is Qt 4.0.0, which, as you said yourself, is not suitable for the Qt peers. So, I have no idea how you managed to verify that your fix indeed works with Debian's Qt 4.0.1 release that does not exist yet according to debian buildds or the mailing list archive of debian-qt-kde list [1]. ;) So ... I'll look into it, and see what I can do. Sure. For now I would like to have a working build though. That's easy enough, and has been proven to work for several people, including yourself: build your own qt 4.0.1 installation and use that. ;) So if Sven can work with this I would like to commit this so everybody can start helping out and debug the new peers. OK? Given that no suitable qt4 release exists in debian yet, I'd like to wait to see what the real qt 4.0.1 looks like in Debian proper, and till then a) fix the sed script to not be so easily thrown off track and b) try to see if we can get somewhere with qmake. You seem to have made some progress on a) in another patch, I'll give that a try on my system, too. You obviously have a working setup yourself, judging by the screenshots you posted on your blog, so there is no need to make the source code of the peers worse[2] before it is clear that they are really necessary for Debian. cheers, dalibor topic [1] http://lists.debian.org/debian-qt-kde/2005/08/index.html ... latest is qt4-x11-4.0.0-3. [2] Well, debian sticks the includes in one place, someone else will surely stick them somewhere else, and I don't want to see the next patch "fixing" the includes by prepending a "include/qt3" path to all #include statements, just because some distribution decided that's the one true way to package the Qt4 includes or someone at Trolltech screwed up the pc files badly and made them return "-I/usr" for CFLAGS. ;) Let me repeat this again: no distribution I know of currently ships a version of Qt4 that is suitable for GNU Classpath development, and probably will not do so for the rest of the year, because there is no need to do so. Build your own Qt 4.0.1 installation if your want to build the peers. Maybe I should post a patch for configure that prints that as a JIKES_STYLE_WARNING when people enable the Qt peers build. ;) ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Re: Make qt-peers build and run out of the box
Mark Wielaard wrote: Hi, If you think that is wrong maybe there is a bug in the .pc files? I looked but couldn't find any bug report against this. I believe that is a bug in the pc files, that my sed appendix tries to work around. I'll report it upstream. I am not against using another convention then required by the pkg-config files. But that feels wrong since it means we are trying to second guess the results of pkg-config which was supposed to make our lives easier. results of pkg-config made my life easier? Yeah, right ;) By having a CFLAGS setting for C++ source code, where automake expects them in CXXFLAGS? ;) pkg-config is pretty useful for some C-based things, like GNOME. It is not very useful outside of them. In this case, pkg-config is useful to check that the version of Qt meets our requirements. That's cool. Through a wink of chance, it also seems to provide useful linker flags, and *almost* useful compiler flags. I would not rely on pkg-config for that, since it is, for all I know about Qt, in general not used by anyone to write Qt applications, and Trolltech really only supports using qmake. Debian even forgot to ship the pc files for a while in 3.3 series and hardly anyone noticed. ;) If someone could figure out why pkg-config gives us CFLAGS that seem unintuitive to some that would be appreciated. Because the CFLAGS setting in the pc files in the lib/ directory in the qt 4.0.1 source code miss the respective module directory entries. They should be trivial to fix for 4.0.2, though. cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Re: Make qt-peers build and run out of the box
Dalibor Topic wrote: Mark Wielaard wrote: Hi, If you think that is wrong maybe there is a bug in the .pc files? I looked but couldn't find any bug report against this. I believe that is a bug in the pc files, that my sed appendix tries to work around. I'll report it upstream. I tried, but currently the Qt bug tracker is only open to customers, though that is going to change over time. [1] So I'd suggest reporting it to Debian instead, once Debian begins shipping a good enough Qt 4 release for GNU Classpath. cheers, dalibor topic [1] http://www.trolltech.com/developer/faqs/index.html?catid=1972&id=375 ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
Re: [cp-patches] Make qt-peers build and run out of the box
Mark Wielaard wrote: Hi, After a short discussion on irc people seemed to assume that the .pc $includedir given by pkg-config was in error. So I changed the patch a little bit and included a simple autoconf check to make sure we always get the include dirs in QT_CFLAGS right (in case the $includedir in the .pc file gets "fixed" in a later release). That's a very good idea! 2005-08-23 Mark Wielaard <[EMAIL PROTECTED]> * configure.ac: Check for QtGui >= 4.0.1. Check for and add extra include dirs ($includedir/Qt) to QT_CFLAGS. fine * native/jni/qt-peer/.cvsignore: Add slotcallbacks.moc.h. fine * native/jni/qt-peer/Makefile.am (QT_CXXFLAGS): Removed. (libqtpeer_la_CXXFLAGS): Removed. (libqtpeer_la_LDFLAGS): Removed. (AM_LDFLAGS): Set to @CLASSPATH_MODULE@ @[EMAIL PROTECTED] (AM_CXXFLAGS): Set to @[EMAIL PROTECTED] fine. I tried it and works like a charm in my setup as well, builds nice with qt4.0.1, fails otherwise, and the gtk build still works fine, too ;) Thank you very much for improving the patch so quickly. Good work! * native/jni/qt-peer/.cvsignore: Add slotcallbacks.moc.h. while that's a cool hack, there is no need to list it twice in the ChangeLog ;) With this no "cleanup" of the #include statements in the .cpp files is necessary anymore. Yeah, thanks for not messing with the include files. It seems to work fine for everything I throw at it. Works fine, here, too. OK to commit? Fine from my side. It is a really nice improvement over the previous state of affairs, thanks for doing the hard work, and responding so readily to peer review. You rock ;) cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] Re: Make qt-peers build and run out of the box
Mark Wielaard wrote: Hi Dalibor, The idea of the patch is to actually test where the include files are instead of blindly replacing them. The old configure stuff did not replace any files. It merely added a sed-munged cpp flag to the original broken cpp flag ;) But, semantic joking aside, your latest patch is clearly a big improvement over both the previous patch and the original code. Thanks for writing it and taking the time to improve it, you've done some really nice work there. And you got rid of the sed bit, which is always a plus. ;) I just want the build to work out of the box now so people can start playing with the new stuff so we have some extra testing time before the release. Yeah, I understand your excitement, I am excited about them too ;) Let me nevertheless bring the excitement level down a bit: The build will not work out of the box for normal people for at least another 3-6 months, until distributions actually start shipping the respective necessary qt4 release. The current target group for the peers is afaict the regulars on #kaffe, #classpath and #gcj, as long as FC 5/6, and the next Debian & Ubuntu releases carrying KDE 4 are out. I would not expect too much external uptake at this point of time, really. If you are looking for external testing & patches, you may want to talk with bero & KDE developers like zander to see if someone in that camp is interested. Placing an article on the dot would be useful, eventually, for example. If you have a better build system please post a patch. Right now, nope. I think it's as good as it gets wrt to using automake atm, thanks to your good work. I'll investigate using qmake, as well, as it would allow us to get rid of the pkg-config broken-flags business for good. The autoconf tests I added should notice that situation and issue a warning in that case. We cannot predict the future, but I think the tests I propose cover the most likely installation/configuration options. Yeah, they are a very good idea. good work! cheers, dalibor topic ___ Classpath-patches mailing list Classpath-patches@gnu.org http://lists.gnu.org/mailman/listinfo/classpath-patches
[cp-patches] FYI: Removed unused primlib code
hi all, as previously discussed [1], I've removed the unused primlib code from classpath native library. 2005-10-24 Dalibor Topic <[EMAIL PROTECTED]> * native/jni/classpath/primlib.c, native/jni/classpath/primlib.h: Removed since unused. * native/jni/classpath/Makefile.am: (libclasspath_la_SOURCES) Removed primlib.c and primlib.h. cheers, dalibor topic [1] http://lists.gnu.org/archive/html/classpath/2004-12/msg8.html Index: ChangeLog === RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.5336 diff -u -r1.5336 ChangeLog --- ChangeLog 24 Oct 2005 20:48:40 - 1.5336 +++ ChangeLog 24 Oct 2005 22:00:38 - @@ -1,3 +1,11 @@ +2005-10-24 Dalibor Topic <[EMAIL PROTECTED]> + + * native/jni/classpath/primlib.c, + native/jni/classpath/primlib.h: Removed since unused. + + * native/jni/classpath/Makefile.am: (libclasspath_la_SOURCES) + Removed primlib.c and primlib.h. + 2005-10-24 David Gilbert <[EMAIL PROTECTED]> * examples/gnu/classpath/examples/swing/ScrollBarDemo.java: New file. Index: native/jni/classpath/Makefile.am === RCS file: /cvsroot/classpath/classpath/native/jni/classpath/Makefile.am,v retrieving revision 1.5 diff -u -r1.5 Makefile.am --- native/jni/classpath/Makefile.am11 Aug 2005 23:39:40 - 1.5 +++ native/jni/classpath/Makefile.am24 Oct 2005 22:00:40 - @@ -5,7 +5,6 @@ libclasspath_la_SOURCES = jcl.c jcl.h \ jnilink.c jnilink.h \ - primlib.c primlib.h \ native_state.c native_state.h AM_LDFLAGS = @CLASSPATH_MODULE@ Index: native/jni/classpath/primlib.c === RCS file: native/jni/classpath/primlib.c diff -N native/jni/classpath/primlib.c --- native/jni/classpath/primlib.c 2 Jul 2005 20:32:52 - 1.7 +++ /dev/null 1 Jan 1970 00:00:00 - @@ -1,724 +0,0 @@ -/* primlib.c - Copyright (C) 1998 Free Software Foundation, Inc. - -This file is part of GNU Classpath. - -GNU Classpath is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -GNU Classpath is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with GNU Classpath; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -#include -#include -#include - -static jclass nativeWrapClass[PRIMLIB_NUMTYPES] = - { NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL -}; - -static jclass nativeTypeClass[PRIMLIB_NUMTYPES] = - { NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL -}; - -static jmethodID nativeWrapClassConstructor[PRIMLIB_NUMTYPES] = - { NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL -}; - -static jmethodID nativeWrapClassAccessor[PRIMLIB_NUMTYPES] = - { NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL -}; - -static const char *nativeWrapClassName[PRIMLIB_NUMTYPES] = { - NULL, - NULL, - "java/lang/Boolean", - "java/lang/Byte", - "java/lang/Character", - "java/lang/Short", - "java/lang/Integer", - "java/lang/Long", - "java/lang/Float", - "java/lang/Double", - "java/lang/Void", - NULL -}; - -static const char *nativeWrapClassConstructorSig[PRIMLIB_NUMTYPES] = { - NULL, - NULL, - "(Z)V&quo
[cp-patches] FYI: Removed unused primlib test
Hi all, as discusses before [1], I've removed the unused primlib test. 2005-10-24 Dalibor Topic <[EMAIL PROTECTED]> * test/native/lib/PrimlibInterface.c, test/native/lib/PrimlibInterface.h, test/native/lib/PrimlibTest.java: Removed unused test. cheers, dalibor topic [1] http://lists.gnu.org/archive/html/classpath/2004-12/msg8.html Index: test/native/lib/PrimlibInterface.c === RCS file: test/native/lib/PrimlibInterface.c diff -N test/native/lib/PrimlibInterface.c --- test/native/lib/PrimlibInterface.c 1 Jul 1998 03:41:24 - 1.1 +++ /dev/null 1 Jan 1970 00:00:00 - @@ -1,162 +0,0 @@ -#include "PrimlibInterface.h" -#include - -/* - * Class: PrimlibInterface - * Method:unwrapBoolean - * Signature: (Ljava/lang/Object;)Z - */ -JNIEXPORT jboolean JNICALL Java_PrimlibInterface_unwrapBoolean -(JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapBoolean(env, o); -} - -/* - * Class: PrimlibInterface - * Method:unwrapByte - * Signature: (Ljava/lang/Object;)B - */ -JNIEXPORT jbyte JNICALL Java_PrimlibInterface_unwrapByte - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapByte(env, o); -} - -/* - * Class: PrimlibInterface - * Method:unwrapShort - * Signature: (Ljava/lang/Object;)S - */ -JNIEXPORT jshort JNICALL Java_PrimlibInterface_unwrapShort - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapShort(env, o); -} - -/* - * Class: PrimlibInterface - * Method:unwrapChar - * Signature: (Ljava/lang/Object;)C - */ -JNIEXPORT jchar JNICALL Java_PrimlibInterface_unwrapChar - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapChar(env, o); -} - -/* - * Class: PrimlibInterface - * Method:unwrapInt - * Signature: (Ljava/lang/Object;)I - */ -JNIEXPORT jint JNICALL Java_PrimlibInterface_unwrapInt - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapInt(env, o); -} - -/* - * Class: PrimlibInterface - * Method:unwrapLong - * Signature: (Ljava/lang/Object;)J - */ -JNIEXPORT jlong JNICALL Java_PrimlibInterface_unwrapLong - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapLong(env, o); -} - -/* - * Class: PrimlibInterface - * Method:unwrapFloat - * Signature: (Ljava/lang/Object;)F - */ -JNIEXPORT jfloat JNICALL Java_PrimlibInterface_unwrapFloat - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapFloat(env, o); -} - -/* - * Class: PrimlibInterface - * Method:unwrapDouble - * Signature: (Ljava/lang/Object;)D - */ -JNIEXPORT jdouble JNICALL Java_PrimlibInterface_unwrapDouble - (JNIEnv * env, jclass thisClass, jobject o) { - return PRIMLIB_UnwrapDouble(env, o); -} - -/* - * Class: PrimlibInterface - * Method:wrapBoolean - * Signature: (Z)Ljava/lang/Boolean; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapBoolean -(JNIEnv * env, jclass thisClass, jboolean val) { - return PRIMLIB_WrapBoolean(env, val); -} - -/* - * Class: PrimlibInterface - * Method:wrapByte - * Signature: (B)Ljava/lang/Byte; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapByte -(JNIEnv * env, jclass thisClass, jbyte val) { - return PRIMLIB_WrapByte(env, val); -} - -/* - * Class: PrimlibInterface - * Method:wrapShort - * Signature: (S)Ljava/lang/Short; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapShort -(JNIEnv * env, jclass thisClass, jshort val) { - return PRIMLIB_WrapShort(env, val); -} - -/* - * Class: PrimlibInterface - * Method:wrapChar - * Signature: (C)Ljava/lang/Character; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapChar -(JNIEnv * env, jclass thisClass, jchar val) { - return PRIMLIB_WrapChar(env, val); -} - -/* - * Class: PrimlibInterface - * Method:wrapInt - * Signature: (I)Ljava/lang/Integer; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapInt -(JNIEnv * env, jclass thisClass, jint val) { - return PRIMLIB_WrapInt(env, val); -} - -/* - * Class: PrimlibInterface - * Method:wrapLong - * Signature: (J)Ljava/lang/Long; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapLong -(JNIEnv * env, jclass thisClass, jlong val) { - return PRIMLIB_WrapLong(env, val); -} - -/* - * Class: PrimlibInterface - * Method:wrapFloat - * Signature: (F)Ljava/lang/Float; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapFloat -(JNIEnv * env, jclass thisClass, jfloat val) { - return PRIMLIB_WrapFloat(env, val); -} - -/* - * Class: PrimlibInterface - * Method:wrapDouble - * Signature: (D)Ljava/lang/Double; - */ -JNIEXPORT jobject JNICALL Java_PrimlibInterface_wrapDouble -(JNIEnv * env, jclass thisClass, jdouble val) { - return PRIMLIB_WrapDouble(env, val); -} Index: test/native/l