MingW32 cross-compilation C library problem: round(2.1) = 3!

Hi everyone,

this message is for those using Linux to cross-compile Windows apps with the
tools provided at http://www.libsdl.org/extras/win32/cross/

If I run this little program in Windows:

double t;
for (t=2.0;t<3.0;t+=0.1)
{ printf(“round(%f) = %f\n”,t,round(t)); }

I get a fatal result:

round(2.000000) = 2.000000
round(2.100000) = 3.000000
round(2.200000) = 3.000000
round(2.300000) = 3.000000
round(2.400000) = 3.000000
round(2.500000) = 3.000000
round(2.600000) = 3.000000
round(2.700000) = 3.000000
round(2.800000) = 3.000000
round(2.900000) = 3.000000

I guess the function ‘round’ is in
/usr/local/cross-tools/i386-mingw32msvc/lib/libmingwex.a

md5sum is 04a73264ef8f468a9fbe88e20b2fe566

Needless to say that the MingW guys don’t have the problem, so it may be related
specifically to the SDL cross-compile build…?

Cheers,
Elmar–
Elmar Krieger, PhD
YASARA Biosciences & CMBI Outstation Austria
Neue-Welt-Hoehe 13/b
A-8042 Graz
Austria/Europe

             Ww
           c(@@)c

================()==OUu============
=WHAT IF YASARA knows the answer?!=
=----- http://www.yasara.org -----=
=- http://www.cmbi.ru.nl/whatif -=
============OOo====================
() ()
/ /