From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28065 invoked by alias); 9 Dec 2002 01:00:12 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 28058 invoked from network); 9 Dec 2002 01:00:11 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 9 Dec 2002 01:00:11 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.11.6/8.11.6) with ESMTP id gB90YlP01446 for ; Sun, 8 Dec 2002 19:34:47 -0500 Received: from pobox.corp.redhat.com (pobox.corp.redhat.com [172.16.52.156]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gB910AD21166 for ; Sun, 8 Dec 2002 20:00:10 -0500 Received: from localhost.redhat.com (romulus-int.sfbay.redhat.com [172.16.27.46]) by pobox.corp.redhat.com (8.11.6/8.11.6) with ESMTP id gB9109u10359 for ; Sun, 8 Dec 2002 20:00:09 -0500 Received: by localhost.redhat.com (Postfix, from userid 469) id 8CB37FF79; Sun, 8 Dec 2002 19:55:48 -0500 (EST) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15859.59924.42114.329528@localhost.redhat.com> Date: Sun, 08 Dec 2002 17:25:00 -0000 To: gdb-patches@sources.redhat.com Subject: [PATCH] fix -Werrors from new readline X-SW-Source: 2002-12/txt/msg00268.txt.bz2 I found a few more places that needed to be updated for readline 4.3. Committed. Elena 2002-12-08 Elena Zannoni More cleanup from import of readline 4.3. * completer.h (complete_line, readline_line_completion_function): Update prototypes. (line_completion_function): Removed, not used outside of completer.c. * completer.c (readline_line_completion_function, complete_function, line_completion_function): Use const for first parameter. (line_completion_function): Make static. (filename_completer): filename_completion_function is now called rl_filename_completion_function * corelow.c: Include . * exec.c: Ditto. * solib.c: Ditto. * source.c: Ditto. * symfile.c: Ditto. * symmisc.c: Ditto. * top.c (init_main): No need to coerce readline_line_completion_function anymore. * cli/cli-dump.c: Include . Index: exec.c =================================================================== RCS file: /cvs/uberbaum/gdb/exec.c,v retrieving revision 1.21 diff -u -p -r1.21 exec.c --- exec.c 30 Nov 2002 16:33:55 -0000 1.21 +++ exec.c 9 Dec 2002 00:53:10 -0000 @@ -36,6 +36,7 @@ #endif #include +#include #include "gdb_string.h" #include "gdbcore.h" Index: top.c =================================================================== RCS file: /cvs/uberbaum/gdb/top.c,v retrieving revision 1.68 diff -u -p -r1.68 top.c --- top.c 26 Sep 2002 17:46:04 -0000 1.68 +++ top.c 9 Dec 2002 00:53:12 -0000 @@ -1952,7 +1952,7 @@ init_main (void) write_history_p = 0; /* Setup important stuff for command line editing. */ - rl_completion_entry_function = (int (*)()) readline_line_completion_function; + rl_completion_entry_function = readline_line_completion_function; rl_completer_word_break_characters = get_gdb_completer_word_break_characters (); rl_completer_quote_characters = get_gdb_completer_quote_characters (); Index: symmisc.c =================================================================== RCS file: /cvs/uberbaum/gdb/symmisc.c,v retrieving revision 1.12 diff -u -p -r1.12 symmisc.c --- symmisc.c 29 Jul 2002 22:55:26 -0000 1.12 +++ symmisc.c 9 Dec 2002 00:53:13 -0000 @@ -34,6 +34,7 @@ #include "bcache.h" #include "gdb_string.h" +#include #ifndef DEV_TTY #define DEV_TTY "/dev/tty" Index: symfile.c =================================================================== RCS file: /cvs/uberbaum/gdb/symfile.c,v retrieving revision 1.74 diff -u -p -r1.74 symfile.c --- symfile.c 25 Nov 2002 21:00:51 -0000 1.74 +++ symfile.c 9 Dec 2002 00:53:16 -0000 @@ -42,6 +42,7 @@ #include "gdb_obstack.h" #include "completer.h" #include "bcache.h" +#include #include #include Index: source.c =================================================================== RCS file: /cvs/uberbaum/gdb/source.c,v retrieving revision 1.36 diff -u -p -r1.36 source.c --- source.c 24 Oct 2002 21:02:53 -0000 1.36 +++ source.c 9 Dec 2002 00:53:17 -0000 @@ -44,6 +44,7 @@ #include "filenames.h" /* for DOSish file names */ #include "completer.h" #include "ui-out.h" +#include #ifdef CRLF_SOURCE_FILES Index: solib.c =================================================================== RCS file: /cvs/uberbaum/gdb/solib.c,v retrieving revision 1.50 diff -u -p -r1.50 solib.c --- solib.c 12 May 2002 04:20:06 -0000 1.50 +++ solib.c 9 Dec 2002 00:53:18 -0000 @@ -42,6 +42,7 @@ #include "filenames.h" /* for DOSish file names */ #include "solist.h" +#include /* external data declarations */ Index: corelow.c =================================================================== RCS file: /cvs/uberbaum/gdb/corelow.c,v retrieving revision 1.26 diff -u -p -r1.26 corelow.c --- corelow.c 30 Nov 2002 16:33:55 -0000 1.26 +++ corelow.c 9 Dec 2002 00:53:18 -0000 @@ -38,6 +38,7 @@ #include "gdbthread.h" #include "regcache.h" #include "symfile.h" +#include #ifndef O_BINARY #define O_BINARY 0 Index: completer.c =================================================================== RCS file: /cvs/uberbaum/gdb/completer.c,v retrieving revision 1.12 diff -u -p -r1.12 completer.c --- completer.c 20 Nov 2002 08:58:01 -0000 1.12 +++ completer.c 9 Dec 2002 00:53:19 -0000 @@ -31,7 +31,7 @@ #include "gdbcmd.h" /* Needed for rl_completer_word_break_characters() and for - filename_completion_function. */ + rl_filename_completion_function. */ #include /* readline defines this. */ @@ -40,7 +40,8 @@ #include "completer.h" /* Prototypes for local functions */ -char *line_completion_function (char *text, int matches, char *line_buffer, +static +char *line_completion_function (const char *text, int matches, char *line_buffer, int point); /* readline uses the word breaks for two things: @@ -104,7 +105,7 @@ get_gdb_completer_quote_characters (void /* Line completion interface function for readline. */ char * -readline_line_completion_function (char *text, int matches) +readline_line_completion_function (const char *text, int matches) { return line_completion_function (text, matches, rl_line_buffer, rl_point); } @@ -135,7 +136,7 @@ filename_completer (char *text, char *wo while (1) { char *p; - p = filename_completion_function (text, subsequent_name); + p = rl_filename_completion_function (text, subsequent_name); if (return_val_used >= return_val_alloced) { return_val_alloced *= 2; @@ -382,7 +383,7 @@ command_completer (char *text, char *wor should pretend that the line ends at POINT. */ char ** -complete_line (char *text, char *line_buffer, int point) +complete_line (const char *text, char *line_buffer, int point) { char **list = NULL; char *tmp_command, *p; @@ -628,8 +629,8 @@ complete_line (char *text, char *line_bu which is a possible completion, it is the caller's responsibility to free the string. */ -char * -line_completion_function (char *text, int matches, char *line_buffer, int point) +static char * +line_completion_function (const char *text, int matches, char *line_buffer, int point) { static char **list = (char **) NULL; /* Cache of completions */ static int index; /* Next cached completion */ Index: completer.h =================================================================== RCS file: /cvs/uberbaum/gdb/completer.h,v retrieving revision 1.7 diff -u -p -r1.7 completer.h --- completer.h 20 Nov 2002 08:58:01 -0000 1.7 +++ completer.h 9 Dec 2002 00:53:19 -0000 @@ -19,11 +19,9 @@ #if !defined (COMPLETER_H) #define COMPLETER_H 1 -extern char **complete_line (char *text, char *line_buffer, int point); +extern char **complete_line (const char *text, char *line_buffer, int point); -extern char *line_completion_function (char *, int, char *, int); - -extern char *readline_line_completion_function (char *text, int matches); +extern char *readline_line_completion_function (const char *text, int matches); extern char **noop_completer (char *, char *); Index: cli/cli-dump.c =================================================================== RCS file: /cvs/uberbaum/gdb/cli/cli-dump.c,v retrieving revision 1.6 diff -u -p -r1.6 cli-dump.c --- cli/cli-dump.c 9 Aug 2002 16:36:10 -0000 1.6 +++ cli/cli-dump.c 9 Dec 2002 00:53:20 -0000 @@ -31,6 +31,7 @@ #include "gdb_assert.h" #include #include "target.h" +#include #define XMALLOC(TYPE) ((TYPE*) xmalloc (sizeof (TYPE)))