Yet another attempt to fix Tiger.
authoroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Dec 2008 07:54:28 +0000 (07:54 +0000)
committeroliver@apple.com <oliver@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 30 Dec 2008 07:54:28 +0000 (07:54 +0000)
Reviewed by NOBODY(Build fix)

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@39516 268f45cc-cd09-0410-ab3c-d52691b4dbfc

JavaScriptCore/ChangeLog
JavaScriptCore/wtf/RandomNumber.cpp

index 1ac5f9e..1f29221 100644 (file)
@@ -2,6 +2,15 @@
 
         Reviewed by NOBODY (Build fix).
 
+        Yet another attempt to fix Tiger.
+
+        * wtf/RandomNumber.cpp:
+        (WTF::randomNumber):
+
+2008-12-29  Oliver Hunt  <oliver@apple.com>
+
+        Reviewed by NOBODY (Build fix).
+
         Tiger build fix (correct this time)
 
         * wtf/RandomNumber.cpp:
index ebbb24b..b40bb14 100644 (file)
@@ -29,6 +29,7 @@
 
 #include "RandomNumberSeed.h"
 
+#include <limits>
 #include <limits.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -51,7 +52,7 @@ double randomNumber()
 
     return static_cast<double>(u) / (static_cast<double>(UINT_MAX) + 1.0);
 #elif PLATFORM(DARWIN)
-    return static_cast<double>(arc4random()) / (static_cast<double>(UINT32_MAX) + 1.0);
+    return static_cast<double>(arc4random()) / (static_cast<double>(std::numeric_limits<uint32_t>::max()) + 1.0);
 #else
     return static_cast<double>(rand()) / (static_cast<double>(RAND_MAX) + 1.0);
 #endif