|
From: | Dalibor Topic |
Subject: | Re: [cp-patches] RFC: replacing jni_md-x86-linux.h by a generic jni_md.h |
Date: | Thu, 05 Jan 2006 04:57:36 +0100 |
User-agent: | Mozilla Thunderbird 1.0.7 (X11/20051013) |
Tom Tromey wrote:
"Dalibor" == Dalibor Topic <address@hidden> writes:Dalibor> the attached patch replaces the os/cpu/toolchain specific Dalibor> jni-md.h by a generic version that uses fixed size C99's Dalibor> types to typedef java types. It's been successfully used in Dalibor> Kaffe for a while. I think there are 2 problems with this patch. Dalibor> +#include "config-int.h" First, we need jni_md.h to be installed. This means that config-int.hmust be installed ... but it isn't.
Thanks for spotting that bug, Tom, I'll post an updated version of the patch.
Kaffe indeed installs config-int.h along with jni_md.h. I think the file should be renamed then to something like classpath_stdint_wrapper.h to make sure it differentiates itself from other headers.
And, simply installing it may be wrong as it could redefine things like int8_t or whatever.
If the macro works as it should (delegating to stdint.h/inttypes.h whenthose are available), I don't think that is going to be an issue. Could you elaborate?
Dalibor> +/* Define some defaults */ Dalibor> +#define JNICALL Dalibor> +#define JNIEXPORT Dalibor> +#define JNIIMPORT These aren't correct for Windows. The old approach offered the possibility of defining these correctly, at least in theory :-).
That's right. I've got the old version of them in Kaffe's version the file which defined them for Windows. ;)
I am not quite sure what the best approach is here. Would #including "jni_md_vm.h", which would be empty per default, and having all JNI* macros be defined conditionally upon them being #if ! defined be a workeable solution, as it would give those runtimes that need to redefine JNI* an entry point?
cheers, dalibor topic
[Prev in Thread] | Current Thread | [Next in Thread] |