This is the mail archive of the mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: JNI C return NaN for float and double

"Isselmou Ould-Dellahy" <> 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 for egcs-1.1.2, or to go
straight to ftp site.


Want to unsubscribe from this list?
Send a message to