From patchwork Thu Sep 17 23:18:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: "Moore, Catherine" X-Patchwork-Id: 519071 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 5FAD2140291 for ; Fri, 18 Sep 2015 09:18:26 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=Q98hUcx5; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; q=dns; s= default; b=d9pspSaLDy27O5djmjFETl41CNZrhIh0NwKdzqTy5FxUbllvWk4Mq 66+ripW6ULtxRjQxU4DPGVcyRBFx+dtdWMqhVP8WRoE50DuS83+ky7bIKMstUZf2 spZcAFJ/keDeivQSK5/tjWbpUOq4xl5+tTPvFAtTTrOXAxtT3TqSRo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:references:in-reply-to :content-type:content-transfer-encoding:mime-version; s=default; bh=/VmpVfuKQY7Bv1HVTrjZ+UXJR/o=; b=Q98hUcx5rwYRZw5kGC22y96mIx0g Bc4LIssfuzJIHpO+zXbccQ3bTlXkM0fMJ1392aGBFzgk+9MoZGzbJ6oxHGuruUBX UfnSi8jaKeSBTuii8OhFr4eE2tQV+nDA+ieTr1ddxm1y6BVykrmhMUrQ/NEyeVR1 gJBaMJHaR8TbO1Q= Received: (qmail 24143 invoked by alias); 17 Sep 2015 23:18:10 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 24121 invoked by uid 89); 17 Sep 2015 23:18:09 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-Spam-User: qpsmtpd, 3 recipients X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 17 Sep 2015 23:18:07 +0000 Received: from svr-orw-fem-04.mgc.mentorg.com ([147.34.97.41]) by relay1.mentorg.com with esmtp id 1ZciRI-0004de-02 from Catherine_Moore@mentor.com ; Thu, 17 Sep 2015 16:18:04 -0700 Received: from NA-MBX-04.mgc.mentorg.com ([169.254.4.113]) by SVR-ORW-FEM-04.mgc.mentorg.com ([147.34.97.41]) with mapi id 14.03.0224.002; Thu, 17 Sep 2015 16:18:03 -0700 From: "Moore, Catherine" To: Jonathan Wakely , "fdumont@gcc.gnu.org" CC: Gerald Pfeifer , "libstdc++@gcc.gnu.org" , "gcc-patches@gcc.gnu.org" Subject: RE: [patch] libstdc++/65142 Check read() result in std::random_device. Date: Thu, 17 Sep 2015 23:18:02 +0000 Message-ID: References: <20150911134418.GK2631@redhat.com> <20150915114713.GS2631@redhat.com> <20150917150757.GF2969@redhat.com> <20150917212811.GH2969@redhat.com> <20150917225409.GJ2969@redhat.com> In-Reply-To: <20150917225409.GJ2969@redhat.com> MIME-Version: 1.0 > -----Original Message----- > From: Jonathan Wakely [mailto:jwakely@redhat.com] > Sent: Thursday, September 17, 2015 6:54 PM > To: Moore, Catherine; fdumont@gcc.gnu.org > Cc: Gerald Pfeifer; libstdc++@gcc.gnu.org; gcc-patches@gcc.gnu.org > Subject: Re: [patch] libstdc++/65142 Check read() result in > std::random_device. > > On 17/09/15 22:32 +0000, Moore, Catherine wrote: > > > > > >> -----Original Message----- > >> From: gcc-patches-owner@gcc.gnu.org [mailto:gcc-patches- > >> owner@gcc.gnu.org] On Behalf Of Jonathan Wakely > >> Sent: Thursday, September 17, 2015 5:28 PM > >> To: Gerald Pfeifer > >> Cc: libstdc++@gcc.gnu.org; gcc-patches@gcc.gnu.org > >> Subject: Re: [patch] libstdc++/65142 Check read() result in > >> std::random_device. > >> > >> On 17/09/15 22:21 +0200, Gerald Pfeifer wrote: > >> >On Thu, 17 Sep 2015, Jonathan Wakely wrote: > >> >>> Any comments on this version? > >> >> Committed to trunk. > >> > > >> >Unfortunately this broke bootstrap on FreeBSD 10.1. > >> > > >> >/scratch/tmp/gerald/gcc-HEAD/libstdc++-v3/src/c++11/random.cc: In > >> member function 'std::random_device::result_type > >> std::random_device::_M_getval()': > >> >/scratch/tmp/gerald/gcc-HEAD/libstdc++- > v3/src/c++11/random.cc:144:22: > >> >error: 'errno' was not declared in this scope > >> > else if (e != -1 || errno != EINTR) > >> > ^ > >> >/scratch/tmp/gerald/gcc-HEAD/libstdc++- > v3/src/c++11/random.cc:144:31: > >> >error: 'EINTR' was not declared in this scope > >> > else if (e != -1 || errno != EINTR) > >> > ^ > >> >Makefile:545: recipe for target 'random.lo' failed > >> > > >> >I probably won't be able to dig in deeper today, but figured this > >> >might already send you on the right path? > >> > > >> >Actually... > >> > > >> >...how about he patch below? Bootstraps on > >> >i386-unknown-freebsd10.1, no regressions. > >> > >> Sorry about that, I've committed your patch. > >> > >> >Gerald > >> > > >> > > >I'm still seeing errors for a build of the mips-sde-elf target with these > patches. > > > >Errors are: > >/scratch/cmoore/virgin-upstream-elf-lite/src/gcc-trunk-5/libstdc++-v3/s > >rc/c++11/debug.cc: In function 'void > {anonymous}::print_word({anonymous > >}::PrintContext&, const char*, std::ptrdiff_t)': > >/scratch/cmoore/virgin-upstream-elf-lite/src/gcc-trunk-5/libstdc++-v3/s > >rc/c++11/debug.cc:573:10: error: 'stderr' was not declared in this scop > >e > > fprintf(stderr, "\n"); > > ^ > >/scratch/cmoore/virgin-upstream-elf-lite/src/gcc-trunk-5/libstdc++-v3/s > >rc/c++11/debug.cc:573:22: error: 'fprintf' was not declared in this sco > >pe > > fprintf(stderr, "\n"); > > ^ > >/scratch/cmoore/virgin-upstream-elf-lite/src/gcc-trunk-5/libstdc++-v3/s > >rc/c++11/debug.cc:596:14: error: 'stderr' was not declared in this scop e > > fprintf(stderr, "%s", spacing); > > ^ > >/scratch/cmoore/virgin-upstream-elf-lite/src/gcc-trunk-5/libstdc++-v3/s > >rc/c++11/debug.cc:596:35: error: 'fprintf' was not declared in this sco pe > > fprintf(stderr, "%s", spacing); > > ^ > >/scratch/cmoore/virgin-upstream-elf-lite/src/gcc-trunk-5/libstdc++-v3/s > >rc/c++11/debug.cc:600:24: error: 'stderr' was not declared in this > >scope > > int written = fprintf(stderr, "%s", word); > > ^ > >/scratch/cmoore/virgin-upstream-elf-lite/src/gcc-trunk-5/libstdc++-v3/s > >rc/c++11/debug.cc:600:42: error: 'fprintf' was not declared in this > >scop e > > int written = fprintf(stderr, "%s", word); > > That's a different problem, due to https://gcc.gnu.org/r227885 > > François, could you take a look please? > I've now committed this patch to solve this problem (pre-approved by Jonathan). 2015-09-17 Catherine Moore * src/c++11/debug.cc: Include . Index: src/c++11/debug.cc =================================================================== --- src/c++11/debug.cc (revision 227887) +++ src/c++11/debug.cc (working copy) @@ -32,6 +32,7 @@ #include #include +#include #include // for std::min #include // for _Hash_impl