Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-Id: <199904020011.SAA29832@modi.xraylith.wisc.edu> X-Authentication-Warning: modi.xraylith.wisc.edu: localhost.xraylith.wisc.edu [127.0.0.1] didn't use HELO protocol To: "Isselmou Ould-Dellahy" cc: cygwin AT sourceware DOT cygnus DOT com Subject: Re: JNI C return NaN for float and double In-reply-to: Your message of "Thu, 01 Apr 1999 18:02:26 CST." <199904020002 DOT SAA11002 AT eastern DOT ccrl DOT mot DOT com> Date: Thu, 01 Apr 1999 18:11:34 -0600 From: Mumit Khan "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 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 AT sourceware DOT cygnus DOT com