[PATCH] libcxx random_device for Win32

Yaron Keren yaron.keren at gmail.com
Tue Oct 8 13:04:41 PDT 2013


Hi Kim,

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:

c:\Program Files
(x86)\mingw-builds\x32-4.8.1-win32-dwarf-rev5\mingw32\i686-w64-mingw32\include\stdlib.h

The import libraries libmsvcr*.a are in the lib directory.

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.

Yaron




2013/10/8 Kim Gräsman <kim.grasman at gmail.com>

> Hi Yaron,
>
> On Tue, Oct 8, 2013 at 7:16 PM, Yaron Keren <yaron.keren at gmail.com> wrote:
> >
> > +#if defined(_WIN32)
>
> Shouldn't these be guarded by _LIBCPP_MSVCRT instead of _WIN32?
>
> _WIN32 will be true for MinGW as well, which doesn't use the Microsoft
> CRT, AFAIK.
>
> - Kim
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131008/ca150984/attachment.html>


More information about the cfe-commits mailing list