summaryrefslogtreecommitdiff
path: root/lib/libcrypto/rand/rand_win.c
diff options
context:
space:
mode:
authorBob Beck <beck@cvs.openbsd.org>2001-06-22 00:03:45 +0000
committerBob Beck <beck@cvs.openbsd.org>2001-06-22 00:03:45 +0000
commit642a4bcb90082ea29d17ec26cf3bf24f137f6d78 (patch)
tree7bfd115a4edcd10efea47366faf8014148d5dbf2 /lib/libcrypto/rand/rand_win.c
parenta53ec830979e8b3c974a48b5486fe532177cde14 (diff)
openssl-engine-0.9.6a merge
Diffstat (limited to 'lib/libcrypto/rand/rand_win.c')
-rw-r--r--lib/libcrypto/rand/rand_win.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/libcrypto/rand/rand_win.c b/lib/libcrypto/rand/rand_win.c
index 9f2dcff9a92..3d137badd0e 100644
--- a/lib/libcrypto/rand/rand_win.c
+++ b/lib/libcrypto/rand/rand_win.c
@@ -570,14 +570,15 @@ static void readtimer(void)
DWORD w;
LARGE_INTEGER l;
static int have_perfc = 1;
-#ifndef __GNUC__
+#ifdef _MSC_VER
static int have_tsc = 1;
DWORD cyclecount;
if (have_tsc) {
__try {
__asm {
- rdtsc
+ _emit 0x0f
+ _emit 0x31
mov cyclecount, eax
}
RAND_add(&cyclecount, sizeof(cyclecount), 1);
@@ -725,8 +726,9 @@ int RAND_poll(void)
#ifdef DEVRANDOM
return 1;
-#endif
+#else
return 0;
+#endif
}
#endif