summaryrefslogtreecommitdiffstats
path: root/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp
diff options
context:
space:
mode:
authorkh <qtc-committer@nokia.com>2009-07-29 16:32:57 (GMT)
committerkh <qtc-committer@nokia.com>2009-07-29 16:32:57 (GMT)
commit91005e4878c76630390fd17afec2f283fcd5121d (patch)
treec9a997a7c542da025ff00549ea80bd517557c577 /src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp
parentf21a36efaab400e086a8c1e87f91da595e4a4443 (diff)
parentb2b626a936d778b89f8fbf33ac914d99876ec4b3 (diff)
downloadQt-91005e4878c76630390fd17afec2f283fcd5121d.zip
Qt-91005e4878c76630390fd17afec2f283fcd5121d.tar.gz
Qt-91005e4878c76630390fd17afec2f283fcd5121d.tar.bz2
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp')
-rw-r--r--src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp b/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp
index c94d5a4..0e6e208 100644
--- a/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp
+++ b/src/3rdparty/webkit/JavaScriptCore/wtf/RandomNumber.cpp
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
- * (C) 2008 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
+ * (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmobile.com/)
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -34,6 +34,12 @@
#include <stdint.h>
#include <stdlib.h>
+#if PLATFORM(WINCE)
+extern "C" {
+#include "wince/mt19937ar.c"
+}
+#endif
+
namespace WTF {
double weakRandomNumber()
@@ -74,6 +80,8 @@ double randomNumber()
// Mask off the low 53bits
fullRandom &= (1LL << 53) - 1;
return static_cast<double>(fullRandom)/static_cast<double>(1LL << 53);
+#elif PLATFORM(WINCE)
+ return genrand_res53();
#else
uint32_t part1 = rand() & (RAND_MAX - 1);
uint32_t part2 = rand() & (RAND_MAX - 1);