From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 99558 invoked by alias); 17 Sep 2018 13:34:33 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 99404 invoked by uid 89); 17 Sep 2018 13:34:31 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-19.8 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_2,GIT_PATCH_3,KAM_LAZY_DOMAIN_SECURITY autolearn=ham version=3.3.2 spammy=Wno-narrowing, wno-narrowing, wnonarrowing, Wnonarrowing X-HELO: smtp.CeBiTec.Uni-Bielefeld.DE Received: from smtp.CeBiTec.Uni-Bielefeld.DE (HELO smtp.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Sep 2018 13:34:30 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id AF649B18 for ; Mon, 17 Sep 2018 15:34:27 +0200 (CEST) Received: from smtp.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id m90mZJSc2b-q for ; Mon, 17 Sep 2018 15:34:25 +0200 (CEST) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.152]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 99132B14 for ; Mon, 17 Sep 2018 15:34:25 +0200 (CEST) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.15.2+Sun/8.15.2/Submit) id w8HDYPRw018620; Mon, 17 Sep 2018 15:34:25 +0200 (MEST) From: Rainer Orth To: gdb-patches@sourceware.org Subject: [PATCH] Cast RLIM_INFINITY to rlim_t to fix 64-bit Solaris 10 build Date: Mon, 17 Sep 2018 13:34:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00573.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 1465 gdb doesn't currently build on 64-bit Solaris 10: /vol/src/gnu/gdb/hg/master/local/gdb/utils.c: In function =E2=80=98void dum= p_core()=E2=80=99: /vol/src/gnu/gdb/hg/master/local/gdb/utils.c:223:55: error: narrowing conve= rsion of =E2=80=98-3=E2=80=99 from =E2=80=98long int=E2=80=99 to =E2=80=98rlim_t= =E2=80=99 {aka =E2=80=98long unsigned int=E2=80=99} inside { } [-Wnarrowing] struct rlimit rlim =3D { RLIM_INFINITY, RLIM_INFINITY }; ^ /vol/src/gnu/gdb/hg/master/local/gdb/utils.c:223:55: error: narrowing conve= rsion of =E2=80=98-3=E2=80=99 from =E2=80=98long int=E2=80=99 to =E2=80=98rlim_t= =E2=80=99 {aka =E2=80=98long unsigned int=E2=80=99} inside { } [-Wnarrowing] This was introduced by=20 2018-08-27 Tom Tromey PR build/23087: * configure: Rebuild. * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing. and can be fixed by the following patch. Solaris 11 isn't affected because there has #define RLIM_INFINITY ((rlim_t)-3l) instead of #define RLIM_INFINITY (-3l) on Solaris 10. Tested on amd64-pc-solaris2.10 and amd64-pc-solaris2.11. Ok for master? Rainer --=20 ---------------------------------------------------------------------------= -- Rainer Orth, Center for Biotechnology, Bielefeld University 2018-09-17 Rainer Orth * utils.c (dump_core) [HAVE_SETRLIMIT]: Cast RLIM_INFINITY to rlim_t. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=sol10-rlim_inifinity.patch Content-length: 477 # HG changeset patch # Parent e76ee5ead0d6305ffdac7965cf62a7b8b1ae5d36 Cast RLIM_INFINITY to rlim_t to fix 64-bit Solaris 10 build diff --git a/gdb/utils.c b/gdb/utils.c --- a/gdb/utils.c +++ b/gdb/utils.c @@ -220,7 +220,7 @@ void dump_core (void) { #ifdef HAVE_SETRLIMIT - struct rlimit rlim = { RLIM_INFINITY, RLIM_INFINITY }; + struct rlimit rlim = { (rlim_t) RLIM_INFINITY, (rlim_t) RLIM_INFINITY }; setrlimit (RLIMIT_CORE, &rlim); #endif /* HAVE_SETRLIMIT */ --=-=-=--