summaryrefslogtreecommitdiffstats
path: root/crypto/rand/rand_nw.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/rand/rand_nw.c')
-rw-r--r--crypto/rand/rand_nw.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/crypto/rand/rand_nw.c b/crypto/rand/rand_nw.c
index 0ff884783e..ba57812788 100644
--- a/crypto/rand/rand_nw.c
+++ b/crypto/rand/rand_nw.c
@@ -1,4 +1,4 @@
-/* crypto/rand/rand_win.c */
+/* crypto/rand/rand_nw.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -116,7 +116,7 @@
#if defined (OPENSSL_SYS_NETWARE)
#if defined(NETWARE_LIBC)
-#include <nks\thread.h>
+#include <nks/thread.h>
#endif
extern long RunningProcess;
@@ -147,18 +147,23 @@ int RAND_poll(void)
for( i=2; i<ENTROPY_NEEDED; i++)
{
+#ifdef __MWERKS__
asm
{
rdtsc
mov tsc, eax
}
+#else
+ asm volatile("rdtsc":"=A" (tsc));
+#endif
+
RAND_add(&tsc, sizeof(tsc), 1);
l = GetSuperHighResolutionTimer();
RAND_add(&l, sizeof(l), 0);
# if defined(NETWARE_LIBC)
- NXThreadYield();
+ NXThreadYield();
# else /* NETWARE_CLIB */
ThreadSwitchWithDelay();
# endif