From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6294 invoked by alias); 6 Feb 2014 16:17:50 -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 6218 invoked by uid 89); 6 Feb 2014 16:17:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: smtp-relay.CeBiTec.Uni-Bielefeld.DE Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 06 Feb 2014 16:17:47 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id BCB70F1B for ; Thu, 6 Feb 2014 17:17:44 +0100 (CET) Received: from smtp-relay.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 QhyNdp7ibkZU for ; Thu, 6 Feb 2014 17:17:43 +0100 (CET) Received: from lokon.CeBiTec.Uni-Bielefeld.DE (lokon.CeBiTec.Uni-Bielefeld.DE [129.70.161.110]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 4C4ABF1A for ; Thu, 6 Feb 2014 17:17:43 +0100 (CET) Received: (from ro@localhost) by lokon.CeBiTec.Uni-Bielefeld.DE (8.14.7+Sun/8.14.7/Submit) id s16GHh37004364; Thu, 6 Feb 2014 17:17:43 +0100 (MET) From: Rainer Orth To: gdb-patches@sourceware.org Subject: Fix compilation of 64-bit gdb 7.7 on Solaris Date: Thu, 06 Feb 2014 16:17:00 -0000 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-SW-Source: 2014-02/txt/msg00096.txt.bz2 --=-=-= Content-Type: text/plain Content-length: 724 Compiling a 64-bit gdb 7.7 on Solaris (8 to 11) with gcc fails in bfd: cc1: warnings being treated as errors /vol/src/gnu/gdb/gdb-7.7/bfd/cache.c: In function 'bfd_cache_max_open': /vol/src/gnu/gdb/gdb-7.7/bfd/cache.c:85: error: comparison between signed and unsigned integer expressions This is about && rlim.rlim_cur != RLIM_INFINITY) where has typedef unsigned long rlim_t; #define RLIM_INFINITY (-3l) While I've raised the issue with Oracle, the problem can easily be avoided by casting RLIM_INFINITY to rlim_t, as the following patch does. Ok for mainline? Rainer 2014-02-06 Rainer Orth * cache.c (bfd_cache_max_open): Case RLIM_INFINITY to rlim_t. --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=bfd-cache.patch Content-length: 374 --- bfd/cache.c 2013/12/08 04:55:47 1.1 +++ bfd/cache.c 2014/02/06 16:13:27 @@ -82,7 +82,7 @@ bfd_cache_max_open (void) #ifdef HAVE_GETRLIMIT struct rlimit rlim; if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 - && rlim.rlim_cur != RLIM_INFINITY) + && rlim.rlim_cur != (rlim_t) RLIM_INFINITY) max = rlim.rlim_cur / 8; else #endif /* HAVE_GETRLIMIT */ --=-=-= Content-Type: text/plain Content-length: 143 -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University --=-=-=--