Commit e1b36b3b authored by bmeurer@chromium.org's avatar bmeurer@chromium.org

Don't duplicate ceiling() for every POSIX platform.

R=svenpanne@chromium.org

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@15872 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 09b1b9e4
......@@ -52,11 +52,6 @@ namespace v8 {
namespace internal {
double ceiling(double x) {
return ceil(x);
}
static Mutex* limit_mutex = NULL;
......
......@@ -63,16 +63,6 @@ namespace v8 {
namespace internal {
double ceiling(double x) {
// Correct as on OS X
if (-1.0 < x && x < 0.0) {
return -0.0;
} else {
return ceil(x);
}
}
static Mutex* limit_mutex = NULL;
......
......@@ -76,11 +76,6 @@ namespace v8 {
namespace internal {
double ceiling(double x) {
return ceil(x);
}
static Mutex* limit_mutex = NULL;
......
......@@ -79,16 +79,6 @@ namespace v8 {
namespace internal {
double ceiling(double x) {
// Correct Mac OS X Leopard 'ceil' behavior.
if (-1.0 < x && x < 0.0) {
return -0.0;
} else {
return ceil(x);
}
}
static Mutex* limit_mutex = NULL;
......
......@@ -61,11 +61,6 @@ namespace v8 {
namespace internal {
double ceiling(double x) {
return ceil(x);
}
static Mutex* limit_mutex = NULL;
......
......@@ -225,6 +225,12 @@ void OS::DebugBreak() {
// ----------------------------------------------------------------------------
// Math functions
double ceiling(double x) {
// Correct buggy 'ceil' on some systems (i.e. FreeBSD, OS X 10.5)
return (-1.0 < x && x < 0.0) ? -0.0 : ceil(x);
}
double modulo(double x, double y) {
return fmod(x, y);
}
......
......@@ -81,11 +81,6 @@ namespace v8 {
namespace internal {
double ceiling(double x) {
return ceil(x);
}
static Mutex* limit_mutex = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment