On Sat, 5 Aug 2006, David Xu wrote:
>> Oops, that's my fault. It compiles fine for me, though; I wonder how
>> I could be including an isnan() definition there while you're not.
>> I'll add an explicit #include "math.h"; let me know if that fixes it.
> No, I had to comment that block. Maybe because I was using a Mac? Do
> you know if anyone has successfully compiled libMesh on Mac?
Yes, but not in the last 24 hours! ;-)
Seriously, this is the only place isnan() is used in libMesh; if the
Mac C libraries don't include that function we would never have seen
the problem before.
Hmm... doing a Google search for: isnan "os x"
suggests that this is a common problem. It looks like isnan() is in
the C99 standard but isn't in the official C++ standard yet, so strict
C++ compilers will give us problems with it.
I have no desire to write my own isnan() wrapper to use for just one
little optional diagnostic message, so let's try to just get it out of
the way. When isnan() is in scope it's supposed to be a macro, so if
instead of commenting that block out entirely you wrap it with:
#endif // isnan
Will that compile okay?
If so let me know and I'll commit the change to CVS. Sorry about the