diff -urN postgresql-7.1.org/configure.in postgresql-7.1/configure.in --- postgresql-7.1.org/configure.in Wed Apr 18 13:29:38 2001 +++ postgresql-7.1/configure.in Wed Apr 18 13:32:55 2001 @@ -903,7 +903,7 @@ else _readline_header='xxx' fi -AC_EGREP_HEADER([filename_completion_function], [$_readline_header], +AC_EGREP_HEADER([rl_filename_completion_function], [$_readline_header], [AC_DEFINE(HAVE_FILENAME_COMPLETION_FUNCTION_DECL) AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)]) diff -urN postgresql-7.1.org/src/bin/psql/tab-complete.c postgresql-7.1/src/bin/psql/tab-complete.c --- postgresql-7.1.org/src/bin/psql/tab-complete.c Wed Apr 18 13:29:38 2001 +++ postgresql-7.1/src/bin/psql/tab-complete.c Wed Apr 18 13:30:35 2001 @@ -61,7 +61,7 @@ #include "settings.h" #ifndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL -char *filename_completion_function(char *, int); +char *rl_filename_completion_function(char *, int); #endif @@ -72,9 +72,9 @@ /* Forward declaration of functions */ static char **psql_completion(char *text, int start, int end); static char *create_command_generator(char *text, int state); -static char *complete_from_query(char *text, int state); -static char *complete_from_const(char *text, int state); -static char *complete_from_list(char *text, int state); +static char *complete_from_query(const char *text, int state); +static char *complete_from_const(const char *text, int state); +static char *complete_from_list(const char *text, int state); static PGresult *exec_query(char *query); char *quote_file_name(char *text, int match_type, char *quote_pointer); @@ -162,13 +162,13 @@ 4) The list of attributes to the given table. */ #define COMPLETE_WITH_QUERY(query) \ -do { completion_charp = query; matches = completion_matches(text, complete_from_query); } while(0) +do { completion_charp = query; matches = rl_completion_matches(text, complete_from_query); } while(0) #define COMPLETE_WITH_LIST(list) \ -do { completion_charpp = list; matches = completion_matches(text, complete_from_list); } while(0) +do { completion_charpp = list; matches = rl_completion_matches(text, complete_from_list); } while(0) #define COMPLETE_WITH_CONST(string) \ -do { completion_charp = string; matches = completion_matches(text, complete_from_const); } while(0) +do { completion_charp = string; matches = rl_completion_matches(text, complete_from_const); } while(0) #define COMPLETE_WITH_ATTR(table) \ -do {completion_charp = Query_for_list_of_attributes; completion_info_charp = table; matches = completion_matches(text, complete_from_query); } while(0) +do {completion_charp = Query_for_list_of_attributes; completion_info_charp = table; matches = rl_completion_matches(text, complete_from_query); } while(0) /* The completion function. Acc. to readline spec this gets passed the text @@ -298,7 +298,7 @@ /* CREATE or DROP */ /* complete with something you can create or drop */ else if (strcasecmp(prev_wd, "CREATE") == 0 || strcasecmp(prev_wd, "DROP") == 0) - matches = completion_matches(text, create_command_generator); + matches = rl_completion_matches(text, create_command_generator); /* ALTER */ /* complete with what you can alter (TABLE, GROUP, USER) */ @@ -731,7 +731,7 @@ strcmp(prev_wd, "\\s") == 0 || strcmp(prev_wd, "\\w") == 0 || strcmp(prev_wd, "\\write") == 0 ) - matches = completion_matches(text, filename_completion_function); + matches = completion_matches(text, rl_filename_completion_function); /* @@ -829,7 +829,7 @@ etc. */ static char * -complete_from_query(char *text, int state) +complete_from_query(const char *text, int state) { static int list_index, string_length; @@ -877,7 +877,7 @@ SQL words that can appear at certain spot. */ static char * -complete_from_list(char *text, int state) +complete_from_list(const char *text, int state) { static int string_length, list_index; @@ -911,7 +911,7 @@ The string to be passed must be in completion_charp. */ static char * -complete_from_const(char *text, int state) +complete_from_const(const char *text, int state) { (void) text; /* We don't care about what was entered * already. */