summaryrefslogtreecommitdiff
path: root/src/pugixpath.cpp
diff options
context:
space:
mode:
authorarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-31 17:33:55 +0000
committerarseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640>2010-05-31 17:33:55 +0000
commit1f8ba5aa60cff9584b520e0b5311637e4bed36d5 (patch)
tree3650fa345900df20aa37f823fe8a291d84ca26d9 /src/pugixpath.cpp
parent88bdad514c1a265022beb3464345e02cd1c4c1ec (diff)
XPath: Added check for fpclassify presence before use
git-svn-id: http://pugixml.googlecode.com/svn/trunk@488 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src/pugixpath.cpp')
-rw-r--r--src/pugixpath.cpp4
1 files changed, 2 insertions, 2 deletions
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: