[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] isnormal test in configure.in

From: Mike Thomas
Subject: [Gcl-devel] isnormal test in configure.in
Date: Fri, 7 Jun 2002 08:34:05 +1000

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


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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]