Thanks for your suggestion. It could have been the include files but I 
recompiled gcc on the system and it didn't change anything. Actually, I found 
the solution when I tried to understand why configure detects a finite() 
function on a system which does not have it.

First, I checked that there is no finite() function on my system: my libm.sl 
file is a symbolic link to libm.2, which does not contain this function. I 
don't know if it is the case for every HP-UX 11.11 system or if it is the 
result of a patch (as there is another file in /usr/lib, named libm.1, which 
contains the finite() function, probably for compatibility). And this symbol is 
not contained in any shared library under /usr (I checked them all).

When configure checks to see if we have finite(), it attempts to compile a 
small program containing 'dummy=finite(1.0)'. On my system, where I am using 
gcc 4.0.2, this small program is tested with a '-O2' flag, and the gcc 
optimizer is too smart ! It detects that we are writing to a dummy var, and it 
removes the line ! You can verify it with 'gcc -S -O2' or with 'nm' applied to 
the 'conftest' resulting executable file. After the call to finite() has been 
removed, of course, the program compiles fine (it is empty now) and configure 
wrongly concludes that we have finite().

In order for the check to be done correctly, we have to provide a program that 
the compiler cannot optimize, ie where it cannot detect that the call is 
useless, even if it is very very smart. Here is a patch with such a program. 
The fact of putting the call in a public function outside of main() forces the 
compiler to keep it, as it could be referenced from another file at link time.

$ diff configure.in configure.in.new
964c964
<       [int dummy=finite(1.0);],
---
>       [return 0; } int is_f(number) double number; { return finite(number); ]

After applying this patch on my system, everything works fine, HAVE_FINITE is 
not defined and float.c correctly switches to the isfinite() macro, defined in 
<math.h>.

Regards

François


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to