From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
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 [thread overview]
Message-ID: <ydd7g98qkpl.fsf@lokon.CeBiTec.Uni-Bielefeld.DE> (raw)
[-- Attachment #1: Type: text/plain, Size: 724 bytes --]
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 <sys/resource.h> 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 <ro@CeBiTec.Uni-Bielefeld.DE>
* cache.c (bfd_cache_max_open): Case RLIM_INFINITY to rlim_t.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: bfd-cache.patch --]
[-- Type: text/x-patch, Size: 374 bytes --]
--- 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 */
[-- Attachment #3: Type: text/plain, Size: 143 bytes --]
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
next reply other threads:[~2014-02-06 16:17 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-06 16:17 Rainer Orth [this message]
2014-02-06 17:02 ` Pedro Alves
2014-02-07 10:07 ` Rainer Orth
2014-02-07 14:55 ` Rainer Orth
2014-02-07 15:29 ` Pedro Alves
2014-02-07 15:30 ` Joel Brobecker
2014-02-07 15:48 ` Rainer Orth
2014-02-07 17:19 ` Joel Brobecker
2014-02-07 20:44 ` Tom Tromey
2014-02-10 15:47 ` Rainer Orth
2014-02-11 2:20 ` Joel Brobecker
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=ydd7g98qkpl.fsf@lokon.CeBiTec.Uni-Bielefeld.DE \
--to=ro@cebitec.uni-bielefeld.de \
--cc=gdb-patches@sourceware.org \
/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