dart-sdk/runtime/platform/math.h
zra@google.com 9e6655f810 Fixes Android build by using C++ math header instead of C one.
This change also requires prefacing the math calls with
std::, i.e. isinf -> std::isinf.

R=asiva@google.com, koda@google.com

Review URL: https://codereview.chromium.org//353403004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@37839 260f80e4-7a28-3924-810f-c04153c831b5
2014-06-30 22:15:26 +00:00

19 lines
678 B
C++

// Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file
// 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.
#ifndef PLATFORM_MATH_H_
#define PLATFORM_MATH_H_
// We must take these math functions from the C++ header file as long as we
// are using the STL. Otherwise the Android build will break due to confusion
// between C++ and C headers when math.h is also included.
#include <cmath>
#define isinf(val) std::isinf(val)
#define isnan(val) std::isnan(val)
#define signbit(val) std::signbit(val)
#define isfinite(val) std::isfinite(val)
#endif // PLATFORM_MATH_H_