List:Commits« Previous MessageNext Message »
From:Pekka Nousiainen Date:May 9 2011 9:11am
Subject:bzr push into mysql-5.1-telco-7.0-wl4163 branch (pekka:4368 to 4369) WL#4163
View as plain text  
 4369 Pekka Nousiainen	2011-05-09
      wl#4163 i03_fix.diff
      no random() on windows, use ndb_rand()

    modified:
      storage/ndb/src/common/util/NdbPack.cpp
 4368 Pekka Nousiainen	2011-05-08
      wl#4163 i02_fix.diff
      signed vs unsigned warnings

    modified:
      storage/ndb/src/kernel/blocks/dbtux/DbtuxMeta.cpp
=== modified file 'storage/ndb/src/common/util/NdbPack.cpp'
--- a/storage/ndb/src/common/util/NdbPack.cpp	2011-05-05 14:32:32 +0000
+++ b/storage/ndb/src/common/util/NdbPack.cpp	2011-05-09 09:02:39 +0000
@@ -1133,13 +1133,13 @@ NdbPack::Bound::validate() const
 
 #define xmin(a, b) ((a) < (b) ? (a) : (b))
 
-#include <random.h>
+#include <ndb_rand.h>
 
 static uint // random 0..n-1
 getrandom(uint n)
 {
   if (n != 0) {
-    uint k = random();
+    uint k = ndb_rand();
     return k % n;
   }
   return 0;
@@ -2029,14 +2029,14 @@ testmain()
     if (seed < 0)
       seed = getpid();
     ll0("random seed: " << seed);
-    srandom(seed);
+    ndb_srand(seed);
   }
   loops = 100;
   int i;
   for (i = 0; loops == 0 || i < loops; i++) {
     ll0("loop:" << i << "/" << loops);
     if (seed == 0)
-      srandom(i);
+      ndb_srand(i);
     testrun();
   }
   // do not print "ok" in TAPTEST

No bundle (reason: useless for push emails).
Thread
bzr push into mysql-5.1-telco-7.0-wl4163 branch (pekka:4368 to 4369) WL#4163Pekka Nousiainen9 May