summaryrefslogtreecommitdiffstats
path: root/crypto/rand/rand_win.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-12-17 00:30:03 +0000
committerBodo Möller <bodo@openssl.org>2000-12-17 00:30:03 +0000
commitb2e7419a1d453bf39dbe38620a10069ec799da65 (patch)
tree47cd520caa99fa364d47f03dfa77bde0f5e3e659 /crypto/rand/rand_win.c
parent6546fdfaf8a337b50b8296b11778327e539fe5e2 (diff)
Simplify preprocessor statements.
Diffstat (limited to 'crypto/rand/rand_win.c')
-rw-r--r--crypto/rand/rand_win.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index e8e12e21c7..eed64e62a2 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -688,17 +688,18 @@ static void readscreen(void)
#include <time.h>
+#ifdef NO_FP_API
+# undef DEVRANDOM
+#endif
+
int RAND_poll(void)
{
unsigned long l;
pid_t curr_pid = getpid();
-#ifndef NO_FP_API
#ifdef DEVRANDOM
FILE *fh;
#endif
-#endif
-#ifndef NO_FP_API
#ifdef DEVRANDOM
/* Use a random entropy pool device. Linux, FreeBSD and OpenBSD
* have this. Use /dev/urandom if you can as /dev/random may block
@@ -716,7 +717,6 @@ int RAND_poll(void)
memset(tmpbuf,0,n);
}
#endif
-#endif
/* put in some default random data, we need more than just this */
l=curr_pid;
@@ -727,11 +727,9 @@ int RAND_poll(void)
l=time(NULL);
RAND_add(&l,sizeof(l),0);
-#ifndef NO_FP_API
#ifdef DEVRANDOM
return 1;
#endif
-#endif
return 0;
}