From 55d26b902cada7071405bd418c508eee0188db12 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ulf=20M=C3=B6ller?= Date: Sat, 19 Mar 2005 11:52:15 +0000 Subject: [PATCH] Cygwin randomness --- CHANGES | 3 ++- crypto/rand/rand_win.c | 4 +++- 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 #include "rand_lcl.h" -#if defined(WINDOWS) || defined(WIN32) +#if defined(WINDOWS) || defined(WIN32) || defined(__CYGWIN32__) #include #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 */ -- 2.25.1