aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2001-04-14 22:55:02 +0000
committerPeter Eisentraut <peter_e@gmx.net>2001-04-14 22:55:02 +0000
commiteb1b1643177b27b9f932a256226a0125bc230d55 (patch)
tree15fa722e9f710e7bfb178fad0cfea3cee5c8b4f4 /src
parent25efda227d2a3f8036f125c91f93d77304586181 (diff)
downloadpostgresql-eb1b1643177b27b9f932a256226a0125bc230d55.tar.gz
postgresql-eb1b1643177b27b9f932a256226a0125bc230d55.zip
Work with Readline 4.2.
Diffstat (limited to 'src')
-rw-r--r--src/bin/psql/tab-complete.c9
-rw-r--r--src/include/config.h.in6
2 files changed, 8 insertions, 7 deletions
diff --git a/src/bin/psql/tab-complete.c b/src/bin/psql/tab-complete.c
index f372e0ea61a..d80465af592 100644
--- a/src/bin/psql/tab-complete.c
+++ b/src/bin/psql/tab-complete.c
@@ -3,7 +3,7 @@
*
* Copyright 2000 by PostgreSQL Global Development Group
*
- * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.29 2001/03/30 04:50:47 tgl Exp $
+ * $Header: /cvsroot/pgsql/src/bin/psql/tab-complete.c,v 1.30 2001/04/14 22:55:02 petere Exp $
*/
/*----------------------------------------------------------------------
@@ -60,9 +60,10 @@
#include "common.h"
#include "settings.h"
-#ifndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
-char *filename_completion_function(char *, int);
+extern char *filename_completion_function();
+#ifdef HAVE_RL_COMPLETION_MATCHES
+#define completion_matches(x, y) rl_completion_matches((x), ((rl_compentry_func_t *)(y)))
#endif
#define BUF_SIZE 2048
@@ -100,7 +101,7 @@ void
initialize_readline(void)
{
rl_readline_name = pset.progname;
- rl_attempted_completion_function = psql_completion;
+ rl_attempted_completion_function = (void *)psql_completion;
rl_basic_word_break_characters = "\t\n@$><=;|&{( ";
diff --git a/src/include/config.h.in b/src/include/config.h.in
index a4c1752ea1f..0d989dbbb31 100644
--- a/src/include/config.h.in
+++ b/src/include/config.h.in
@@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure.
*
- * $Id: config.h.in,v 1.161 2001/03/23 18:42:12 tgl Exp $
+ * $Id: config.h.in,v 1.162 2001/04/14 22:55:02 petere Exp $
*/
#ifndef CONFIG_H
@@ -573,8 +573,8 @@ extern int fdatasync(int fildes);
/* Set to 1 if your libreadline defines rl_completion_append_character */
#undef HAVE_RL_COMPLETION_APPEND_CHARACTER
-/* Set to 1 if filename_completion_function is declared in the readline header */
-#undef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
+/* Set to 1 if you have rl_completion_matches */
+#undef HAVE_RL_COMPLETION_MATCHES
/* Set to 1 if you have getopt_long() (GNU long options) */
#undef HAVE_GETOPT_LONG