From 5b3dbbc367f0c2417f34db8cd9cdaa4b35b31d2c Mon Sep 17 00:00:00 2001 From: tromey Date: Mon, 24 Jan 2005 19:05:34 +0000 Subject: * java/lang/Class.h (next): Updated documentation. Renamed to 'next_or_version'. * java/lang/natClassLoader.cc (_Jv_RegisterClasses): Use _Jv_CheckABIVersion. (_Jv_RegisterClasses_Counted): Likewise. (_Jv_RegisterClassHookDefault): Fix starting condition of duplicate-checking loop. * include/jvm.h (GCJ_VERSION): New define. (GCJ_BINARYCOMPAT_ADDITION): Likewise. (_Jv_CheckABIVersion): New function. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@94173 138bc75d-0d04-0410-961f-82ee72b054a4 --- libjava/include/jvm.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'libjava/include') diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 67a4b18176e..cf4d7d640d0 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -566,4 +566,19 @@ extern void (*_Jv_JVMPI_Notify_THREAD_END) (JVMPI_Event *event); extern void _Jv_RegisterBootstrapPackages (); + +// This is used to find ABI versions we recognize. +#define GCJ_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 10) +#define GCJ_BINARYCOMPAT_ADDITION 5 + +inline bool +_Jv_CheckABIVersion (unsigned long value) +{ + // For this release, recognize just our defined C++ ABI and our + // defined BC ABI. (In the future we may recognize past BC ABIs as + // well.) + return (value == GCJ_VERSION + || value == (GCJ_VERSION + GCJ_BINARYCOMPAT_ADDITION)); +} + #endif /* __JAVA_JVM_H__ */ -- cgit v1.2.3