aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
authorAnthony Green <green@redhat.com>2001-06-02 08:49:31 +0000
committerAnthony Green <green@gcc.gnu.org>2001-06-02 08:49:31 +0000
commitc8fb98139d128d61cd1c4695dc115d3a16da66b2 (patch)
treefebe06899bfff25464060449a4e2fdff758976c6 /libjava/java
parent6a6a4abb1a0be208f602b57b2c33207a2d0ff990 (diff)
downloadgcc-c8fb98139d128d61cd1c4695dc115d3a16da66b2.zip
gcc-c8fb98139d128d61cd1c4695dc115d3a16da66b2.tar.gz
gcc-c8fb98139d128d61cd1c4695dc115d3a16da66b2.tar.bz2
USE_LIBFFI change
From-SVN: r42791
Diffstat (limited to 'libjava/java')
-rw-r--r--libjava/java/lang/reflect/natMethod.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/libjava/java/lang/reflect/natMethod.cc b/libjava/java/lang/reflect/natMethod.cc
index 61adf26..f269d2f 100644
--- a/libjava/java/lang/reflect/natMethod.cc
+++ b/libjava/java/lang/reflect/natMethod.cc
@@ -44,7 +44,11 @@ details. */
#include <stdlib.h>
+#if USE_LIBFFI
#include <ffi.h>
+#else
+#include <java/lang/UnsupportedOperationException.h>
+#endif
// FIXME: remove these.
#define BooleanClass java::lang::Boolean::class$
@@ -107,6 +111,7 @@ can_widen (jclass from, jclass to)
return fromx <= tox;
}
+#ifdef USE_LIBFFI
static inline ffi_type *
get_ffi_type (jclass klass)
{
@@ -148,6 +153,7 @@ get_ffi_type (jclass klass)
return r;
}
+#endif // USE_LIBFFI
jobject
java::lang::reflect::Method::invoke (jobject obj, jobjectArray args)
@@ -312,6 +318,7 @@ _Jv_CallAnyMethodA (jobject obj,
jvalue *args,
jvalue *result)
{
+#ifdef USE_LIBFFI
JvAssert (! is_constructor || ! obj);
JvAssert (! is_constructor || return_type);
@@ -428,6 +435,10 @@ _Jv_CallAnyMethodA (jobject obj,
result->l = obj;
return ex;
+#else
+ throw new java::lang::UnsupportedOperationException;
+ return 0;
+#endif // USE_LIBFFI
}
// This is another version of _Jv_CallAnyMethodA, but this one does