projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
old MSVC versions don't have rdtsc
[openssl.git]
/
crypto
/
rand
/
rand_win.c
diff --git
a/crypto/rand/rand_win.c
b/crypto/rand/rand_win.c
index 56558c4f154a865b487610200c2ad120899b4947..7453fe589ea02b87718a06899925ba123e0ba314 100644
(file)
--- a/
crypto/rand/rand_win.c
+++ b/
crypto/rand/rand_win.c
@@
-113,7
+113,7
@@
#include <openssl/rand.h>
#include "rand_lcl.h"
#include <openssl/rand.h>
#include "rand_lcl.h"
-#if defined(
WINDOWS) || defined(
WIN32)
+#if defined(
OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_
WIN32)
#include <windows.h>
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
#include <windows.h>
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
@@
-582,7
+582,8
@@
static void readtimer(void)
if (have_tsc) {
__try {
__asm {
if (have_tsc) {
__try {
__asm {
- rdtsc
+ _emit 0x0f
+ _emix 0x31
mov cyclecount, eax
}
RAND_add(&cyclecount, sizeof(cyclecount), 1);
mov cyclecount, eax
}
RAND_add(&cyclecount, sizeof(cyclecount), 1);