From 1b95f4bdafbd4e00a6235fc7a7786df7c048dd51 Mon Sep 17 00:00:00 2001 From: tv Date: Mon, 6 Aug 2001 22:50:07 +0000 Subject: [PATCH] Cast &readline_line_completion_function to a (Function *) to make it the proper fully qualified ANSI type. XXX: Cast it again to a (void *) because libedit's readline emulation thinks that rl_completion_entry_function should be a (CPFunction *) -- perhaps more correct, but it breaks compatibility. libedit might be better to change to conform to what readline wants. --- gnu/dist/toolchain/gdb/top.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/gnu/dist/toolchain/gdb/top.c b/gnu/dist/toolchain/gdb/top.c index 0959d4151e71..636a3ac3c71e 100644 --- a/gnu/dist/toolchain/gdb/top.c +++ b/gnu/dist/toolchain/gdb/top.c @@ -1864,8 +1864,6 @@ filename_completer (text, word) char *text; char *word; { - /* From readline. */ - extern char *filename_completion_function PARAMS ((char *, int)); int subsequent_name; char **return_val; int return_val_used; @@ -4123,7 +4121,7 @@ init_main () write_history_p = 0; /* Setup important stuff for command line editing. */ - rl_completion_entry_function = (int (*)()) readline_line_completion_function; + rl_completion_entry_function = (void *)(Function *) &readline_line_completion_function; rl_completer_word_break_characters = gdb_completer_word_break_characters; rl_completer_quote_characters = gdb_completer_quote_characters; rl_readline_name = "gdb";