From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15397 invoked by alias); 11 Feb 2014 21:36:16 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15366 invoked by uid 48); 11 Feb 2014 21:36:12 -0000 From: "gnu at binarywings dot net" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/57920] [c++11] Linux: std::random_device reads too much from /dev/urandom Date: Tue, 11 Feb 2014 21:36:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 4.7.2 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: gnu at binarywings dot net X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: paolo.carlini at oracle dot com X-Bugzilla-Target-Milestone: 4.9.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2014-02/txt/msg01097.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57920 Florian Philipp changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gnu at binarywings dot net --- Comment #9 from Florian Philipp --- Created attachment 32110 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=32110&action=edit Patch without POSIX I/O I find the original patch as applied to mainline unnecessarily complicated. You can achieve the same just with std I/O by deactivating buffering with std::setbuf. Basically a one line change when applied to the original version.