Thanks for the patch.

I have committed it to the (svn) trunk.  After researching some old
releases of HPUX for compatibility, I added the recognition of
XALAN_NO_STD_NAMESPACE to the patch before submission.  It should not
affect the newer C/C++ compilers and libraries.

I compiled several test systems with your patch on Windows, Linux,
FreeBSD with no problems.  Thanks for making Xalan-C a better product.

Sincerely,
Steven J. Hathaway
Xalan Documentation Project

> Hi,
> The compilation of xalan trunk on OpenBSD 5.1 yields the following output:
>
> g++ -O -DNDEBUG  -pthread -D_REENTRANT   -fno-elide-constructors -DOPENBSD
> -fPIC  -DXALAN_INMEM_MSG_LOADER -c -I/home/simon/ports/xalanc/trunk/src
> -I/home/simon/ports/xalanc/trunk/include -I../../nls/include
> -I/home/simon/local_software/src/
> -I/home/simon/local_software/include/xercesc
> -I/home/simon/local_software/include/  -o ../../obj/DOMStringHelper.o
> /home/simon/ports/xalanc/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp
>
> In file included from
> /home/simon/ports/xalanc/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp:50:
> /home/simon/ports/xalanc/trunk/src/xalanc/PlatformSupport/DoubleSupport.hpp:
> In static member function 'static bool
> xalanc_1_11::DoubleSupport::isNaN(double)':
> /home/simon/ports/xalanc/trunk/src/xalanc/PlatformSupport/DoubleSupport.hpp:83:
> error: 'isnan' was not declared in this scope
> gmake[1]: *** [../../obj/DOMStringHelper.o] Error 1
> gmake[1]: Leaving directory `/home/simon/ports/xalanc/trunk/src/xalanc'
> gmake: *** [all] Error 2
>
> The error seems to come from conflict between cmath (DOMStringHelper.cpp,
> line 32) and math.h (DoubleSupport.hpp, line 31). Reading from
> /usr/include/g++/cmath:
>
> /** @file include/cmath
>  *  This is a Standard C++ Library file.  You should @c #include this file
>  *  in your programs, rather than any of the "*.h" implementation files.
>
>
>
> The following patch solves the compilation error.
>
> Regards,
> Simon Elbaz
>
> Index: src/xalanc/PlatformSupport/DoubleSupport.hpp
> ===================================================================
> --- src/xalanc/PlatformSupport/DoubleSupport.hpp        (revision 1393709)
> +++ src/xalanc/PlatformSupport/DoubleSupport.hpp        (working copy)
> @@ -28,7 +28,7 @@
>  #if defined(_MSC_VER)
>  #include <float.h>
>  #endif
> -#include <math.h>
> +#include <cmath>
>  #include <functional>
>
>
> @@ -80,7 +80,7 @@
>  #if defined(_MSC_VER)
>          return _isnan(theNumber) != 0;
>  #elif defined(XALAN_POSIX2_AVAILABLE) && !defined(CYGWIN) &&
> !defined(MINGW)
> -        return isnan(theNumber) != 0;
> +        return std::isnan(theNumber) != 0;
>  #else
>          return s_NaN == theNumber;
>  #endif
>



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to