Your problem does seem familiar. I ran across an issue like that with the Solaris compiler which seems to be kind of like the MS compiler in the respect that even when you use a C++ include file like <cmath>, which instead of to ‘inserting’ functions into the std namespace, simply inserts them into the global namespace, and then “doesn’t know” about the same functions when std:: is prepended to their call…. The following fixed my issue:
Change src/xalanc/PlatformSupport/DoubleSupport.hpp as follows:
- add an #if defined(SOLARIS) / #include <math.h> / #endif section
- in the isNAN(double) function put an #if defined(SOLARIS) / return isnan(theNumber) != 0; / #else / and #endif around the return std::isnan(theNumber) != 0; line
To change it for GNU g++ you’d need to replace the two occurrences of SOLARIS in the above with __GCC__ if memory serves. When you do that, is your compilation issue gone?
I’m having some problems building the latest xalan-c on a Solaris 10 platform.
I configure with the following options:
./runConfigure –p solaris –c gcc –x g++ -P /my/dest
When I try and build, I get the following error when compiling DOMStringHelper.cpp:
In file included from
static member function `static bool
isnan' undeclared in namespace `std'
gmake: *** [../../obj/DOMStringHelper.o] Error 1
Has anyone come across this before?