Re: Can nhc98 1.20 compiled by ghc-6.8.2?
Matthias Kilian <[email protected]> Wed, 23 Jan 2008 20:19:09 +0100
| Newsgroups | gmane.comp.lang.haskell.nhc.user |
|---|---|
| Message-ID | <[email protected]> |
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