summaryrefslogtreecommitdiff
path: root/ruby/src
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2016-03-09 12:18:07 +0100
committerJose <jose@zeroc.com>2016-03-09 12:18:07 +0100
commit2bee7a5a32454c3e3f267a3173c7a71930fa63a6 (patch)
tree0764b1358b634ebe8ca79222ed20f95792ae3f9b /ruby/src
parenticegriddb Windows build fixes (diff)
downloadice-2bee7a5a32454c3e3f267a3173c7a71930fa63a6.tar.bz2
ice-2bee7a5a32454c3e3f267a3173c7a71930fa63a6.tar.xz
ice-2bee7a5a32454c3e3f267a3173c7a71930fa63a6.zip
isfinite not supported with VS 2012
Diffstat (limited to 'ruby/src')
-rw-r--r--ruby/src/IceRuby/Types.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/ruby/src/IceRuby/Types.cpp b/ruby/src/IceRuby/Types.cpp
index 8ca6e29cffa..4834320d1e2 100644
--- a/ruby/src/IceRuby/Types.cpp
+++ b/ruby/src/IceRuby/Types.cpp
@@ -597,7 +597,13 @@ IceRuby::PrimitiveInfo::marshal(VALUE p, const Ice::OutputStreamPtr& os, ObjectM
}
assert(TYPE(val) == T_FLOAT);
double d = static_cast<double>(RFLOAT_VALUE(val));
- if(isfinite(d) && (d > numeric_limits<float>::max() || d < -numeric_limits<float>::max()))
+ if(
+#if defined(_MSC_VER) && (_MSC_VER <= 1700)
+ _finite(val) &&
+#else
+ isfinite(d) &&
+#endif
+ (d > numeric_limits<float>::max() || d < -numeric_limits<float>::max()))
{
throw RubyException(rb_eTypeError, "value is out of range for a float");
}