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
This commit is contained in:
Richard Levitte
2004-06-28 11:55:28 +00:00
parent 7d3932e8cf
commit 47c1735acd
7 changed files with 59 additions and 38 deletions

View File

@@ -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