From e7e18a21d244061497ee88dea27d4695da2f28f3 Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Thu, 14 Sep 2000 07:51:56 +0000 Subject: defineclass.cc: Include alloca.h only if HAVE_ALLOCA_H. * 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. From-SVN: r36404 --- libjava/ChangeLog | 7 +++++++ libjava/defineclass.cc | 2 ++ libjava/interpret.cc | 11 +++++++---- libjava/java/lang/natDouble.cc | 2 ++ libjava/java/lang/reflect/natMethod.cc | 2 ++ 5 files changed, 20 insertions(+), 4 deletions(-) (limited to 'libjava') diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 191aaec..b2c825e 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,3 +1,10 @@ +2000-09-14 Alexandre Oliva + + * 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. + 2000-09-13 Alexandre Oliva * configure.in (LIBDATASTARTSPEC): Use `%s' to search for diff --git a/libjava/defineclass.cc b/libjava/defineclass.cc index e38ffec..7ddead0 100644 --- a/libjava/defineclass.cc +++ b/libjava/defineclass.cc @@ -24,7 +24,9 @@ details. */ #ifdef INTERPRETER +#if HAVE_ALLOCA_H #include +#endif #include #include diff --git a/libjava/interpret.cc b/libjava/interpret.cc index d6368d5..74e8788 100644 --- a/libjava/interpret.cc +++ b/libjava/interpret.cc @@ -35,7 +35,9 @@ details. */ #ifdef INTERPRETER +#if HAVE_ALLOCA_H #include +#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_InterpMethodInvocation *inv) 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_InterpMethodInvocation *inv) sp -= rmeth->stack_item_count; - NULLCHECK(sp[0]); + NULLCHECK (sp[0].o); fun = (void (*)()) rmeth->method->ncode; } @@ -2178,10 +2180,11 @@ void _Jv_InterpMethod::continue1 (_Jv_InterpMethodInvocation *inv) 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 (), rmeth->method->name, diff --git a/libjava/java/lang/natDouble.cc b/libjava/java/lang/natDouble.cc index 9e78655..dc799b2 100644 --- a/libjava/java/lang/natDouble.cc +++ b/libjava/java/lang/natDouble.cc @@ -10,7 +10,9 @@ details. */ #include +#if HAVE_ALLOCA_H #include +#endif #include diff --git a/libjava/java/lang/reflect/natMethod.cc b/libjava/java/lang/reflect/natMethod.cc index 8972852..0f829de 100644 --- a/libjava/java/lang/reflect/natMethod.cc +++ b/libjava/java/lang/reflect/natMethod.cc @@ -10,7 +10,9 @@ details. */ #include +#if HAVE_ALLOCA_H #include +#endif #include #include -- cgit v1.1