diff options
author | Richard Levitte <levitte@openssl.org> | 2004-06-28 11:55:28 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2004-06-28 11:55:28 +0000 |
commit | 47c1735acd4fe3d26b192e6784069892c37320a2 (patch) | |
tree | 28c9c39fa44e5f0df5d86582fbc9d1ef0c9f7287 /crypto/rand | |
parent | 7d3932e8cf736ae9f81bc23662801ae79dbd45b5 (diff) |
NetWare fixes provided by Verdon Walker for OpenSSL 0.9.8-dev.
The changes have been mailed to <crypt@bis.doc.gov> as well.
PR: 903
Diffstat (limited to 'crypto/rand')
-rw-r--r-- | crypto/rand/rand_nw.c | 11 |
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 |