diff options
Diffstat (limited to 'byterun/win32.c')
-rw-r--r-- | byterun/win32.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/byterun/win32.c b/byterun/win32.c index 2b4aacced..d807f6900 100644 --- a/byterun/win32.c +++ b/byterun/win32.c @@ -469,13 +469,18 @@ int caml_win32_random_seed (intnat data[16]) { /* For better randomness, consider: http://msdn.microsoft.com/library/en-us/seccrypto/security/rtlgenrandom.asp + http://blogs.msdn.com/b/michael_howard/archive/2005/01/14/353379.aspx */ FILETIME t; + LARGE_INTEGER pc; GetSystemTimeAsFileTime(&t); + QueryPerformanceCounter(&pc); /* PR#6032 */ data[0] = t.dwLowDateTime; data[1] = t.dwHighDateTime; data[2] = GetCurrentProcessId(); - return 3; + data[3] = pc.LowPart; + data[4] = pc.HighPart; + return 5; } |