[kaffe] CVS kaffe (dalibor): Fixed make check failures on x86_64-linux

Kaffe CVS cvs-commits at kaffe.org
Sat Jul 10 13:08:55 PDT 2004


PatchSet 4926 
Date: 2004/07/10 20:00:48
Author: dalibor
Branch: HEAD
Tag: (none) 
Log:
Fixed make check failures on x86_64-linux

2004-07-10  Dalibor Topic  <robilad at kaffe.org>

        * kaffe/kaffevm/support.c:
        Fixed broken '#if defined' tests for NO_HOLES,
        PROMOTE_jfloat2jdouble in order to fix make check
        failures on x86_64-linux.

        Reported by: Gwenole Beauchesne  <gbeauchesne at mandrakesoft.com>

Members: 
	ChangeLog:1.2491->1.2492 
	kaffe/kaffevm/support.c:1.69->1.70 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.2491 kaffe/ChangeLog:1.2492
--- kaffe/ChangeLog:1.2491	Sat Jul 10 09:30:07 2004
+++ kaffe/ChangeLog	Sat Jul 10 20:00:48 2004
@@ -1,3 +1,12 @@
+2004-07-10  Dalibor Topic  <robilad at kaffe.org>
+
+	* kaffe/kaffevm/support.c:
+	Fixed broken '#if defined' tests for NO_HOLES, 
+	PROMOTE_jfloat2jdouble in order to fix make check
+	failures on x86_64-linux.
+
+	Reported by: Gwenole Beauchesne  <gbeauchesne at mandrakesoft.com>
+		
 2004-07-10  Helmer Kraemer  <hkraemer at freenet.de>
 
 	* Makefile.am (kaffe-build-order): don't use -C option since it's
Index: kaffe/kaffe/kaffevm/support.c
diff -u kaffe/kaffe/kaffevm/support.c:1.69 kaffe/kaffe/kaffevm/support.c:1.70
--- kaffe/kaffe/kaffevm/support.c:1.69	Tue Jul  6 17:16:15 2004
+++ kaffe/kaffe/kaffevm/support.c	Sat Jul 10 20:00:50 2004
@@ -28,7 +28,7 @@
 #include "exception.h"
 #include "slots.h"
 #include "support.h"
-#ifndef HAVE_LIBFFI
+#if !defined(HAVE_LIBFFI)
 # define NEED_sysdepCallMethod 1
 #endif /* HAVE_LIBFFI */
 #include "classMethod.h"
@@ -57,7 +57,7 @@
 nativeFunction* native_funcs = null_funcs;
 #endif
 
-#ifdef HAVE_LIBFFI
+#if defined(HAVE_LIBFFI)
 #include <ffi.h>
 static inline ffi_type *j2ffi(char type)
 {
@@ -358,16 +358,16 @@
    unless explicitly overridden.  It implies NO_HOLES, unless
    explicitly defined otherwise.  */
 #if defined(PROMOTE_TO_64bits)
-# ifndef PROMOTE_jint2jlong
+# if !defined(PROMOTE_jint2jlong)
 #  define PROMOTE_jint2jlong 1
 # endif
-# ifndef PROMOTE_jfloat2jdouble
+# if !defined(PROMOTE_jfloat2jdouble)
 #  define PROMOTE_jfloat2jdouble 1
 # endif
 /* NO_HOLES causes all types to occupy only one slot in callargs, but
    not affecting their callsizes, that can still be used to
    distinguish among types.  */
-# ifndef NO_HOLES
+# if !defined(NO_HOLES)
 #  define NO_HOLES 1
 # endif
 #endif
@@ -414,6 +414,15 @@
 # define ENSURE_ALIGN64(DO) do {} while (0)
 #endif
 
+/* Finally, make sure that undefined symbols are defined as 0 */
+#if ! defined(PROMOTE_jfloat2jdouble)
+#define PROMOTE_jfloat2jdouble	0
+#endif /* ! defined(PROMOTE_jfloat2jdouble) */ 
+
+#if ! defined(NO_HOLES)
+#define NO_HOLES	0
+#endif /*  ! defined(NO_HOLES) */
+
 /**
  * Generic routine to call a native or Java method (array style).
  *
@@ -521,9 +530,9 @@
 		case 'F':
 			call.callsize[i] = 1;
 			in[i].PROM_f = args[j].f;
-#if PROMOTE_jfloat2jdouble
-			call.calltype[i] = 'D';
-#endif
+			if (PROMOTE_jfloat2jdouble) {
+				call.calltype[i] = 'D';
+			}
 			break;
 		case 'I':
 		use_int:
@@ -538,13 +547,13 @@
 			if (promoted) { /* compensate for the second array element by incrementing args */
 			  args++;
 			}
-#if ! NO_HOLES
-			s += call.callsize[i];
-			in[i+1].i = (&in[i].i)[1];
-			i++; 
-			call.calltype[i] = 0;
-			call.callsize[i] = 0;
-#endif
+			if (! NO_HOLES) {
+				s += call.callsize[i];
+				in[i+1].i = (&in[i].i)[1];
+				i++; 
+				call.calltype[i] = 0;
+				call.callsize[i] = 0;
+			}
 			break;
 		case '[':
 			call.calltype[i] = 'L';
@@ -767,9 +776,9 @@
 		case 'F':
 			call.callsize[i] = 1;
 			in[i].PROM_f = (jfloat)va_arg(args, jdouble);
-#if PROMOTE_jfloat2jdouble
-			call.calltype[i] = 'D';
-#endif
+			if (PROMOTE_jfloat2jdouble) {
+				call.calltype[i] = 'D';
+			}
 			break;
 		case 'D':
 			call.callsize[i] = 2;
@@ -781,12 +790,12 @@
 			ENSURE_ALIGN64({});
 			in[i].j = va_arg(args, jlong);
 		second_word:
-#if ! NO_HOLES
-			s += call.callsize[i];
-			in[i+1].i = (&in[i].i)[1];
-			i++;
-			call.callsize[i] = 0;
-#endif
+			if(! NO_HOLES) {
+				s += call.callsize[i];
+				in[i+1].i = (&in[i].i)[1];
+				i++;
+				call.callsize[i] = 0;
+			}
 			break;
 		case '[':
 			call.calltype[i] = 'L';



More information about the kaffe mailing list