Index: runtime/lib/double.cc |
=================================================================== |
--- runtime/lib/double.cc (revision 37827) |
+++ runtime/lib/double.cc (working copy) |
@@ -2,7 +2,7 @@ |
// for details. All rights reserved. Use of this source code is governed by a |
// BSD-style license that can be found in the LICENSE file. |
-#include <math.h> |
+#include <cmath> |
#include "vm/bootstrap_natives.h" |
@@ -73,7 +73,7 @@ |
static RawInteger* DoubleToInteger(double val, const char* error_msg) { |
- if (isinf(val) || isnan(val)) { |
+ if (std::isinf(val) || std::isnan(val)) { |
const Array& args = Array::Handle(Array::New(1)); |
args.SetAt(0, String::Handle(String::New(error_msg))); |
Exceptions::ThrowByType(Exceptions::kUnsupported, args); |
@@ -258,13 +258,13 @@ |
DEFINE_NATIVE_ENTRY(Double_getIsInfinite, 1) { |
const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0)); |
- return Bool::Get(isinf(arg.value())).raw(); |
+ return Bool::Get(std::isinf(arg.value())).raw(); |
} |
DEFINE_NATIVE_ENTRY(Double_getIsNaN, 1) { |
const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0)); |
- return Bool::Get(isnan(arg.value())).raw(); |
+ return Bool::Get(std::isnan(arg.value())).raw(); |
} |
@@ -272,7 +272,7 @@ |
const Double& arg = Double::CheckedHandle(arguments->NativeArgAt(0)); |
// Include negative zero, infinity. |
double dval = arg.value(); |
- return Bool::Get(signbit(dval) && !isnan(dval)).raw(); |
+ return Bool::Get(std::signbit(dval) && !std::isnan(dval)).raw(); |
} |
// Add here only functions using/referring to old-style casts. |