- Fixed build of mysqli with MySQL 5.5.0-m2. (Andrey)
+- Improved LCG entropy (Rasmus, Samy Kamkar)
+
- Fixed bug #50680 (strtotime() does not support eighth ordinal number).
(Ilia)
- Fixed bug #50661 (DOMDocument::loadXML does not allow UTF-16). (Rob)
struct timeval tv;
if (gettimeofday(&tv, NULL) == 0) {
- LCG(s1) = tv.tv_sec ^ (~tv.tv_usec);
+ LCG(s1) = tv.tv_sec ^ (tv.tv_usec<<11);
} else {
LCG(s1) = 1;
}
LCG(s2) = (long) getpid();
#endif
+ /* Add entropy to s2 by calling gettimeofday() again */
+ if (gettimeofday(&tv, NULL) == 0) {
+ LCG(s2) ^= (tv.tv_usec<<11);
+ }
+
LCG(seeded) = 1;
}