From 1f8ba5aa60cff9584b520e0b5311637e4bed36d5 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Mon, 31 May 2010 17:33:55 +0000 Subject: XPath: Added check for fpclassify presence before use git-svn-id: http://pugixml.googlecode.com/svn/trunk@488 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixpath.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pugixpath.cpp') diff --git a/src/pugixpath.cpp b/src/pugixpath.cpp index 6cca5af..75d0e6e 100644 --- a/src/pugixpath.cpp +++ b/src/pugixpath.cpp @@ -286,7 +286,7 @@ namespace { #if defined(_MSC_VER) || defined(__BORLANDC__) return !!_isnan(value); - #elif defined(FP_NAN) + #elif defined(fpclassify) && defined(FP_NAN) return fpclassify(value) == FP_NAN; #else // fallback @@ -301,7 +301,7 @@ namespace if (_finite(value)) return (value == 0) ? PUGIXML_TEXT("0") : 0; if (_isnan(value)) return PUGIXML_TEXT("NaN"); return PUGIXML_TEXT("-Infinity") + (value > 0); - #elif defined(FP_NAN) && defined(FP_INFINITE) && defined(FP_ZERO) + #elif defined(fpclassify) && defined(FP_NAN) && defined(FP_INFINITE) && defined(FP_ZERO) switch (fpclassify(value)) { case FP_NAN: -- cgit v1.2.3