projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a0f6e0c
)
Don't use __try+__except unless on VC++
author
Dr. Stephen Henson
<steve@openssl.org>
Sun, 20 Sep 2009 12:38:46 +0000
(12:38 +0000)
committer
Dr. Stephen Henson
<steve@openssl.org>
Sun, 20 Sep 2009 12:38:46 +0000
(12:38 +0000)
crypto/rand/rand_win.c
patch
|
blob
|
history
diff --git
a/crypto/rand/rand_win.c
b/crypto/rand/rand_win.c
index 25a76cf1ec2ebc71f882227aaea22ef795428d1a..efe0f8907059d8a4bde8a4559226fe6a26dd5776 100644
(file)
--- a/
crypto/rand/rand_win.c
+++ b/
crypto/rand/rand_win.c
@@
-497,6
+497,7
@@
int RAND_poll(void)
ZeroMemory(&hlist, sizeof(HEAPLIST32));
hlist.dwSize = sizeof(HEAPLIST32);
if (good) stoptime = GetTickCount() + MAXDELAY;
ZeroMemory(&hlist, sizeof(HEAPLIST32));
hlist.dwSize = sizeof(HEAPLIST32);
if (good) stoptime = GetTickCount() + MAXDELAY;
+#ifdef _MSC_VER
if (heaplist_first(handle, &hlist))
{
/*
if (heaplist_first(handle, &hlist))
{
/*
@@
-539,6
+540,29
@@
int RAND_poll(void)
&& ex_cnt_limit > 0);
}
&& ex_cnt_limit > 0);
}
+#else
+ if (heaplist_first(handle, &hlist))
+ {
+ do
+ {
+ RAND_add(&hlist, hlist.dwSize, 3);
+ hentry.dwSize = sizeof(HEAPENTRY32);
+ if (heap_first(&hentry,
+ hlist.th32ProcessID,
+ hlist.th32HeapID))
+ {
+ int entrycnt = 80;
+ do
+ RAND_add(&hentry,
+ hentry.dwSize, 5);
+ while (heap_next(&hentry)
+ && --entrycnt > 0);
+ }
+ } while (heaplist_next(handle, &hlist)
+ && GetTickCount() < stoptime);
+ }
+#endif
+
/* process walking */
/* PROCESSENTRY32 contains 9 fields that will change
* with each entry. Consider each field a source of
/* process walking */
/* PROCESSENTRY32 contains 9 fields that will change
* with each entry. Consider each field a source of