[kaffe] TestSerializable2 fix for amd64.

Kurt Roeckx kurt at roeckx.be
Fri Apr 15 17:21:16 PDT 2005


Hi,

It seems that the TestSerializable2 failure I've been seeing on
amd64 is caused by using an int instead of a ssize_t.  See the
last part of the diff for the fix.

I've also fixed a printf() call where it was just using %d
instead of %zd to print a ssize_t.


Kurt

-------------- next part --------------
Index: kaffe/kaffevm/kaffe-gc/gc-incremental.c
===================================================================
RCS file: /cvs/kaffe/kaffe/kaffe/kaffevm/kaffe-gc/gc-incremental.c,v
retrieving revision 1.23
diff -u -r1.23 gc-incremental.c
--- kaffe/kaffevm/kaffe-gc/gc-incremental.c	12 Apr 2005 18:43:21 -0000	1.23
+++ kaffe/kaffevm/kaffe-gc/gc-incremental.c	16 Apr 2005 00:19:40 -0000
@@ -1429,7 +1429,7 @@
 
         for (i = 0; i < nr; ) {
                 for (j = 0; j < 3 && i < nr; j++, i++) {
-                        dprintf("%10d :%5.1f /%5.1f  ", objectSizes[i].size, 
+                        dprintf("%10zd :%5.1f /%5.1f  ", objectSizes[i].size, 
 				(float)(objectSizes[i].count * 100 / (float)count), 
 				(float)(objectSizes[i].total * 100 / (float)total));
                 }
Index: libraries/clib/nio/FileChannelImpl.c
===================================================================
RCS file: /cvs/kaffe/kaffe/libraries/clib/nio/FileChannelImpl.c,v
retrieving revision 1.8
diff -u -r1.8 FileChannelImpl.c
--- libraries/clib/nio/FileChannelImpl.c	14 Nov 2004 18:02:24 -0000	1.8
+++ libraries/clib/nio/FileChannelImpl.c	16 Apr 2005 00:19:42 -0000
@@ -410,7 +410,7 @@
   int rc;
   uint8 one_byte;
   int nativeFd = (int)getFD(env, filechannel);
-  int ret;
+  ssize_t ret;
 
   do 
     {
@@ -464,7 +464,7 @@
   int rc;
   int nativeFd = (int)getFD(env, filechannel);
   uint8 real_byte = byte;
-  int ret;
+  ssize_t ret;
 
   do {
     rc = KWRITE(nativeFd, &real_byte, 1, &ret);


More information about the kaffe mailing list