public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: NightStrike <nightstrike@gmail.com>
To: Jonathan Wakely <jwakely.gcc@gmail.com>
Cc: niXman <i.nixman@gmail.com>, gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Some questions about adding mingw support for std::random_device
Date: Sat, 05 Jan 2013 18:51:00 -0000	[thread overview]
Message-ID: <CAF1jjLsZOy1itO_f89m1b_diQYjPyk+OOKqb_9A-u+aOrKd6rQ@mail.gmail.com> (raw)
In-Reply-To: <CAH6eHdS7uEzhm+0A+=W+O0LYfFwa8Fo3T-n02xwyNpdt5qC=sA@mail.gmail.com>

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

      reply	other threads:[~2013-01-05 15:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-28  8:05 niXman
2012-12-28 14:12 ` Jonathan Wakely
2013-01-05 13:25   ` niXman
2013-01-05 15:35     ` Jonathan Wakely
2013-01-05 18:51       ` NightStrike [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAF1jjLsZOy1itO_f89m1b_diQYjPyk+OOKqb_9A-u+aOrKd6rQ@mail.gmail.com \
    --to=nightstrike@gmail.com \
    --cc=gcc-help@gcc.gnu.org \
    --cc=i.nixman@gmail.com \
    --cc=jwakely.gcc@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).