<div dir="rtl"><div dir="ltr">Hi Kim,</div><div dir="ltr"><br></div><div dir="ltr">MingW does use MSVCRT unlike Cygwin that provides independent library, so it provides rand_s() as well. For MingW-builds you can find rand_s() prototype in:</div>

<div dir="ltr"><br></div><div dir="ltr"><font face="courier new, monospace">c:\Program Files (x86)\mingw-builds\x32-4.8.1-win32-dwarf-rev5\mingw32\i686-w64-mingw32\include\stdlib.h<br></font></div><div dir="ltr"><br></div>

<div dir="ltr">The import libraries <font face="courier new, monospace">libmsvcr*.a</font> are in the lib directory.</div><div dir="ltr"><br></div><div dir="ltr">In general, due to the shared runtime DLL, the libraries of MSVC and MingW are quite similar. The major difference encountered so far is the long double type size.</div>

<div dir="ltr"><br></div><div dir="ltr">Yaron</div><div dir="ltr"><br></div><div dir="ltr"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div dir="ltr">2013/10/8 Kim Gräsman <span dir="ltr"><<a href="mailto:kim.grasman@gmail.com" target="_blank">kim.grasman@gmail.com</a>></span></div>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Yaron,<br>
<br>
On Tue, Oct 8, 2013 at 7:16 PM, Yaron Keren <<a href="mailto:yaron.keren@gmail.com">yaron.keren@gmail.com</a>> wrote:<br>
><br>
> +#if defined(_WIN32)<br>
<br>
Shouldn't these be guarded by _LIBCPP_MSVCRT instead of _WIN32?<br>
<br>
_WIN32 will be true for MinGW as well, which doesn't use the Microsoft<br>
CRT, AFAIK.<br>
<span class="HOEnZb"><font color="#888888"><br>
- Kim<br>
</font></span></blockquote></div><br></div>