This is the mail archive of the cygwin@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Re: JNI C return NaN for float and double
- To: "Isselmou Ould-Dellahy" <iod@ccrl.mot.com>
- Subject: Re: JNI C return NaN for float and double
- From: Mumit Khan <khan@xraylith.wisc.EDU>
- Date: Thu, 01 Apr 1999 18:11:34 -0600
- cc: cygwin@sourceware.cygnus.com
"Isselmou Ould-Dellahy" <iod@ccrl.mot.com> writes:
> Hi,
>
> How can I make a JNI interfaced C code, compiled as a dll, return the right
> double or float number to its java caller? In my case (see the simple
> Mummit's HelloWorld modified example below) it works fine when the returned
> type is char or short or long; but it returns a NaN in case of float or doubl
> e.
> I have cygwin-b20.1 and java 1.1.6
This bug was fixed in egcs-1.1.2. Until this release, all WINAPI aka
STDCALL functions returning floats or doubles returned garbage. Note
how I conveniently left these out of the JNI examples ;-)
See http://www.xraylith.wisc.edu/pub/khan/gnu-win32/ for egcs-1.1.2, or
ftp://ftp.xraylith.wisc.edu/pub/khan/gnu-win32/cygwin/egcs-1.1.2/ to go
straight to ftp site.
Regards,
Mumit
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com