[nhc-users] Can nhc98 1.20 compiled by ghc-6.8.2?

Matthias Kilian kili at outback.escape.de
Wed Jan 23 14:19:09 EST 2008


On Wed, Jan 23, 2008 at 08:38:25PM +0800, pierric wrote:
> I tried to compile it using gcc 4.2.2,but I failed with an linking
> greencard-nhc98, which has a few symbols cannot be found such as
> "isnormal","isfinite".

Your operaring system's libc probably doesn't support those functions.
I've the same problem on OpenBSD.

For a poor emulation of signbit(), isnormal() and isfinite(), you may
substitute the following (for doubles):

	signbit(x)	->	copysign(1, x) < 0
	isnormal(x)	->	x != 0 && !isinf(x) && !isnan(x)
	isfinite(x)	->	!isinf(x) && !isnan(x)

For the float equivalents, use copysignf(), isinff() and isnanf()
instead.

Ciao,
	Kili

-- 
diffs are better if compilers see them first
		-- deraadt


More information about the Nhc-users mailing list