This is the mail archive of the
java-patches@sources.redhat.com
mailing list for the Java project.
Portability issues
- To: java-patches at sources dot redhat dot com
- Subject: Portability issues
- From: Alexandre Oliva <aoliva at redhat dot com>
- Date: 10 Sep 2000 06:55:04 -0300
- Organization: GCC Team, Red Hat
This patch fixes some build problems I found on FreeBSD and
Solaris/x86. Ok to install?
Index: libjava/ChangeLog
from Alexandre Oliva <aoliva@redhat.com>
* defineclass.cc: Include alloca.h only if HAVE_ALLOCA_H.
* java/lang/natDouble.cc: Likewise.
* java/lang/reflect/natMethod.cc: Likewise.
* interpret.cc: Likewise. Fix NULLCHECKs that tested a _Jv_word.
Index: libjava/defineclass.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/defineclass.cc,v
retrieving revision 1.10
diff -u -p -r1.10 defineclass.cc
--- libjava/defineclass.cc 2000/05/31 22:49:18 1.10
+++ libjava/defineclass.cc 2000/09/10 09:54:51
@@ -24,7 +24,9 @@ details. */
#ifdef INTERPRETER
+#if HAVE_ALLOCA_H
#include <alloca.h>
+#endif
#include <java-cpool.h>
#include <gcj/cni.h>
Index: libjava/interpret.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/interpret.cc,v
retrieving revision 1.19
diff -u -p -r1.19 interpret.cc
--- libjava/interpret.cc 2000/08/02 03:25:12 1.19
+++ libjava/interpret.cc 2000/09/10 09:54:51
@@ -35,7 +35,9 @@ details. */
#ifdef INTERPRETER
+#if HAVE_ALLOCA_H
#include <alloca.h>
+#endif
#define ClassError _CL_Q34java4lang5Error
extern java::lang::Class ClassError;
@@ -51,7 +53,7 @@ static void throw_null_pointer_exception
__attribute__ ((__noreturn__));
#endif
-extern "C" double __ieee754_fmod __P((double,double));
+extern "C" double __ieee754_fmod (double,double);
static inline void dupx (_Jv_word *sp, int n, int x)
{
@@ -678,7 +680,7 @@ void _Jv_InterpMethod::continue1 (_Jv_In
rmeth = (_Jv_ResolvePoolEntry (defining_class, index)).rmethod;
sp -= rmeth->stack_item_count;
- NULLCHECK(sp[0]);
+ NULLCHECK (sp[0].o);
if (rmeth->vtable_index == -1)
{
@@ -2147,7 +2149,7 @@ void _Jv_InterpMethod::continue1 (_Jv_In
sp -= rmeth->stack_item_count;
- NULLCHECK(sp[0]);
+ NULLCHECK (sp[0].o);
fun = (void (*)()) rmeth->method->ncode;
}
@@ -2178,9 +2180,10 @@ void _Jv_InterpMethod::continue1 (_Jv_In
rmeth = (_Jv_ResolvePoolEntry (defining_class, index)).rmethod;
sp -= rmeth->stack_item_count;
- NULLCHECK(sp[0]);
jobject rcv = sp[0].o;
+
+ NULLCHECK (rcv);
fun = (void (*)())
_Jv_LookupInterfaceMethod (rcv->getClass (),
Index: libjava/java/lang/natDouble.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/natDouble.cc,v
retrieving revision 1.8
diff -u -p -r1.8 natDouble.cc
--- libjava/java/lang/natDouble.cc 2000/06/24 18:11:01 1.8
+++ libjava/java/lang/natDouble.cc 2000/09/10 09:54:51
@@ -10,7 +10,9 @@ details. */
#include <config.h>
+#if HAVE_ALLOCA_H
#include <alloca.h>
+#endif
#include <stdlib.h>
Index: libjava/java/lang/reflect/natMethod.cc
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/lang/reflect/natMethod.cc,v
retrieving revision 1.15
diff -u -p -r1.15 natMethod.cc
--- libjava/java/lang/reflect/natMethod.cc 2000/09/06 21:20:45 1.15
+++ libjava/java/lang/reflect/natMethod.cc 2000/09/10 09:54:52
@@ -10,7 +10,9 @@ details. */
#include <config.h>
+#if HAVE_ALLOCA_H
#include <alloca.h>
+#endif
#include <gcj/cni.h>
#include <jvm.h>
--
Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist *Please* write to mailing lists, not to me