<div dir="rtl"><div dir="ltr">Hi David, </div><div dir="ltr"><br></div><div dir="ltr">You are correct, I was under the wrong impression that longs are 64 bit on Win32. So indeed all references above map (with differing typdefs) HCRYPTPROV to 32 bits on Win32 and 64 bits on Win64.</div>
<div dir="ltr"><br></div><div dir="ltr">In any case, I submitted a patch using rand_s() from MSVCRT.</div><div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote"><div dir="ltr">2013/10/8 David Chisnall <span dir="ltr"><<a href="mailto:David.Chisnall@cl.cam.ac.uk" target="_blank">David.Chisnall@cl.cam.ac.uk</a>></span></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On 7 Oct 2013, at 21:20, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>> wrote:<br>
<br>
> Looking in the MingW header file basestd.h, ULONG_PTR is defined to either __int64 in WIN64 or long in WIN32, so it is always 64 bit.<br>
<br>
</div>Did I miss something? Long is 32-bits on win32 (and on win64, which breaks a lot of code that assumes that you can round trip pointers through long, because even though the standard has never guaranteed this it's been possible on pretty much every system that isn't an IBM mainframe for decades). On Win32, long is the size of a pointer, on Win64, __int64 is the size of a pointer.<br>
<span class="HOEnZb"><font color="#888888"><br>
David<br>
<br>
<br>
</font></span></blockquote></div><br></div>