Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(642)

Unified Diff: src/platform-posix.cc

Issue 20274002: Don't duplicate ceiling() for every POSIX platform. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix typo Created 7 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform-openbsd.cc ('k') | src/platform-solaris.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-posix.cc
diff --git a/src/platform-posix.cc b/src/platform-posix.cc
index 804b38bd5e8f38ac05b6adc1cfc8e992aecedc25..9bc3193631aab80a0b71e799259c2c35b1d19e65 100644
--- a/src/platform-posix.cc
+++ b/src/platform-posix.cc
@@ -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);
}
« no previous file with comments | « src/platform-openbsd.cc ('k') | src/platform-solaris.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698