This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: JNI/Win32 Patch #2: Fix lookup of "JNI_OnLoad" on loading a JNI DLL
- From: Tom Tromey <tromey at redhat dot com>
- To: Ranjit Mathew <rmathew at hotmail dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: 08 Dec 2002 13:13:29 -0700
- Subject: Re: JNI/Win32 Patch #2: Fix lookup of "JNI_OnLoad" on loading a JNI DLL
- References: <asrjss$fh8$1@main.gmane.org> <asuso1$ssk$1@main.gmane.org>
- Reply-to: tromey at redhat dot com
>>>>> "Ranjit" == Ranjit Mathew <rmathew@hotmail.com> writes:
Ranjit> I'm sorry, but I overlooked the fact that the JNI_OnLoad
Ranjit> function itself must be called using the "stdcall" convention.
These patches generally look fine to me. I think we should wait for
the paperwork to clear before putting them in, though.
Ranjit> +#ifdef WIN32
Ranjit> + jint vers = ((jint (__attribute__((stdcall)) *) (JavaVM *, void *))
Ranjit> + onload) (vm, NULL);
Let's use `JNICALL' here and avoid the #ifdef.
Tom