![](https://secure.gravatar.com/avatar/214fe9a0ecb4aed8994e8618ade6f5a8.jpg?s=120&d=mm&r=g)
Peter Moulder wrote:
We may need to write our own isnan.h header.
I think you are right. In the mingw implementation, <math.h> is actually #undef-ing isnan() when the "c++ bits" are included for __GLIBCPP__.
Defines in config.h are thus ignored. So much for that idea. I think the reason is that Mingw's #include files are broken, as far as isnan() is concerned. Google had some other people's problems with this.
So, as a temporary fix, 1. I added a trivial isnan.h to /src 2. On files that need isnan(), made that the last #include 3. Named the new definition isNaN() in order to avoid name conflicts.
Seems to compile/link on Linux and Mingw nicely now. Someone might try OSX. I would not be surprised if the latest MinGW has the definitions fixed.
Bob