[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Re: isnormal test in configure.in
From: |
Camm Maguire |
Subject: |
[Gcl-devel] Re: isnormal test in configure.in |
Date: |
06 Jun 2002 19:03:17 -0400 |
Hi Mike! Please let me know if it works now.
Take care,
"Mike Thomas" <address@hidden> writes:
> Hi Camm.
>
> The configure test for isnormal() fails on Mingw32. The following results
> are printed by the example below modified from configure and compiled with
> the given command line.
>
> I don't understand the configure macrology, but my guess is that if the
> program compiles and links then HAVE_ISNORMAL is turned on.
>
> If that is true, then the problem is probably that the "-lmingwex" switch
> has to be added to the compiler command line to get it to link.
>
> If that is incorrect, and in fact the results from the program run do count,
> don't forget that the float f may not be initialised to 0.0 (or anything at
> all for that matter) under Windows compilers unless you explicitly do so
> (not sure if that is the case for Mingw32, certainly it is true for Visual
> C).
>
> Cheers
>
> Mike Thomas
>
>
> ------------------------------------------
> gcc -otest1.exe test1.c -lmingwex
>
> ------------------------------------------
>
> #define _GNU_SOURCE
> #include <math.h>
> #include <stdio.h>
> int main() {
> float f;
> fprintf ( stderr, "%x %x\n", isnormal(f), !isnormal(f) ? 0 : 1 );
> return isnormal(f) || !isnormal(f) ? 0 : 1;
> }
>
> ------------------------------------------
>
> address@hidden c:/cvs/gcl
> $ ./test1
> 0 0
>
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah