summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUlf Möller <ulf@openssl.org>2005-03-19 11:52:15 +0000
committerUlf Möller <ulf@openssl.org>2005-03-19 11:52:15 +0000
commit55d26b902cada7071405bd418c508eee0188db12 (patch)
treef9cd047564bc2f609aa705855b1cd3c781e49e34
parentc4fddde87b60ab6393c1a57dfa51dd1dff2f7902 (diff)
Cygwin randomness
-rw-r--r--CHANGES3
-rw-r--r--crypto/rand/rand_win.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index ef7990b328..18b3a1a32a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,7 +4,8 @@
Changes between 0.9.6m and 0.9.6n [XX XXX XXXX]
- *)
+ *) Use Windows randomness collection on Cygwin.
+ [Ulf Möller]
Changes between 0.9.6l and 0.9.6m [17 Mar 2004]
diff --git a/crypto/rand/rand_win.c b/crypto/rand/rand_win.c
index 9e87f49872..fac4da1b73 100644
--- a/crypto/rand/rand_win.c
+++ b/crypto/rand/rand_win.c
@@ -113,7 +113,7 @@
#include <openssl/rand.h>
#include "rand_lcl.h"
-#if defined(WINDOWS) || defined(WIN32)
+#if defined(WINDOWS) || defined(WIN32) || defined(__CYGWIN32__)
#include <windows.h>
#ifndef _WIN32_WINNT
# define _WIN32_WINNT 0x0400
@@ -643,6 +643,7 @@ static void readtimer(void)
static void readscreen(void)
{
+#ifndef __CYGWIN32__
HDC hScrDC; /* screen DC */
HDC hMemDC; /* memory DC */
HBITMAP hBitmap; /* handle for our bitmap */
@@ -703,6 +704,7 @@ static void readscreen(void)
DeleteObject(hBitmap);
DeleteDC(hMemDC);
DeleteDC(hScrDC);
+#endif
}
#else /* Unix version */