Some questions about adding mingw support for std::random_device
NightStrike
nightstrike@gmail.com
Sat Jan 5 18:51:00 GMT 2013
On Sat, Jan 5, 2013 at 3:25 AM, Jonathan Wakely <jwakely.gcc@gmail.com> wrote:
> On 5 January 2013 12:14, niXman wrote:
>> 2012/12/28 Jonathan Wakely:
>>> Do you mean the files are present on the system where GCC is built,
>>> but not on the system where compiled programs run?
>> Yes, these files are not available not only where executed program
>> built with Mingw, but where Mingw used.
>> Mingw - native windows program. MSYS - POSIX environment emulator.
>>
>>> Fixing the test would be better, but if it's not possible to tell
>>> whether the files are usable until runtime then no preprocessor test
>>> can work.
>> For Mingw not need to check '/dev/random' or/and '/dev/urandom' are
>> available or not. It would be correct to say that these files are
>> always not available.
>
> In that case a quick fix would be to #undef _GLIBCXX_USE_RANDOM_TR1 in
> config/os/mingw32*/os_defines.h
Windows has the CryptGenRandom() API to get a random number. Reading
\Device\KsecDD directly doesn't work, AFAIK
More information about the Gcc-help
mailing list