From patchwork Fri Jun 20 10:50:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Kratochvil X-Patchwork-Id: 1590 Received: (qmail 1956 invoked by alias); 20 Jun 2014 10:50:12 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 1944 invoked by uid 89); 20 Jun 2014 10:50:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.0 required=5.0 tests=AWL, BAYES_00, SPF_HELO_PASS, SPF_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 20 Jun 2014 10:50:10 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s5KAo9jf022752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 20 Jun 2014 06:50:09 -0400 Received: from host2.jankratochvil.net (ovpn-116-53.ams2.redhat.com [10.36.116.53]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s5KAo4ID011575 (version=TLSv1/SSLv3 cipher=AES128-GCM-SHA256 bits=128 verify=NO) for ; Fri, 20 Jun 2014 06:50:07 -0400 Date: Fri, 20 Jun 2014 12:50:04 +0200 From: Jan Kratochvil To: gdb-patches@sourceware.org Subject: [patch] Fix --with-system-readline with readline-6.3 patch 5 Message-ID: <20140620105004.GA22236@host2.jankratochvil.net> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes Hi, I have filed now: --with-system-readline uses bundled readline include files https://sourceware.org/bugzilla/show_bug.cgi?id=17077 To see any effect of the patch below you have to do: rm -rf readline Otherwise readline include files get used the bundled ones from GDB which are currently 6.2 while system readline may be 6.3 already. You also have to use system readline-6.3 including its upstream patch: [Bug-readline] Readline-6.3 Official Patch 5 http://lists.gnu.org/archive/html/bug-readline/2014-04/msg00018.html Message-ID: <140415125618.AA57598.SM@caleb.ins.cwru.edu> In short it happens on Fedora Rawhide since: readline-6.3-1.fc21 https://koji.fedoraproject.org/koji/buildinfo?buildID=538941 The error is: https://kojipkgs.fedoraproject.org//work/tasks/9890/7059890/build.log ../../gdb/tui/tui-io.c:132:1: error: 'Function' is deprecated [-Werror=deprecated-declarations] static Function *tui_old_rl_getc_function; ^ ../../gdb/tui/tui-io.c:133:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations] static VFunction *tui_old_rl_redisplay_function; ^ ../../gdb/tui/tui-io.c:134:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations] static VFunction *tui_old_rl_prep_terminal; ^ ../../gdb/tui/tui-io.c:135:1: error: 'VFunction' is deprecated [-Werror=deprecated-declarations] static VFunction *tui_old_rl_deprep_terminal; ^ It is since bash change: lib/readline/rltypedefs.h - remove old Function/VFunction/CPFunction/CPPFunction typedefs as suggested by Tom Tromey The new typedefs used below are present in readline/rltypedefs.h since: git://git.savannah.gnu.org/bash.git commit 28ef6c316f1aff914bb95ac09787a3c83c1815fd Date: Fri Apr 6 19:14:31 2001 +0000 Jan gdb/ 2014-06-20 Jan Kratochvil Fix --with-system-readline with readline-6.3 patch 5. * tui/tui-io.c (tui_old_rl_getc_function, tui_old_rl_redisplay_function) (tui_old_rl_prep_terminal, tui_old_rl_deprep_terminal): Use rl_*_t types. diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index 761d203..dcccb08 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -129,10 +129,10 @@ static struct ui_file *tui_old_stderr; struct ui_out *tui_old_uiout; /* Readline previous hooks. */ -static Function *tui_old_rl_getc_function; -static VFunction *tui_old_rl_redisplay_function; -static VFunction *tui_old_rl_prep_terminal; -static VFunction *tui_old_rl_deprep_terminal; +static rl_getc_func_t *tui_old_rl_getc_function; +static rl_voidfunc_t *tui_old_rl_redisplay_function; +static rl_vintfunc_t *tui_old_rl_prep_terminal; +static rl_voidfunc_t *tui_old_rl_deprep_terminal; static int tui_old_rl_echoing_p; /* Readline output stream.