On Sat, 14 Apr 2001, Peter Eisentraut wrote:
> andrea gelmini writes:
>
> > debian unstable, i386.
> > upgrade libreadline 4.2
> > postgres doesn't compile.
>
> It seems there were some incompatible changes in readline 4.2. Use
> version 4.1 until we have a fix.
The essence of the problem seems to be in the following lines of
readline.h that comes with libreadline 4.2 (/usr/include/readline/readline.h):
Line 415-429
#if 0
/* Backwards compatibility (compat.c). These will go away sometime. */
extern void free_undo_list __P((void));
extern int maybe_save_line __P((void));
extern int maybe_unsave_line __P((void));
extern int maybe_replace_line __P((void));
extern int ding __P((void));
extern int alphabetic __P((int));
extern int crlf __P((void));
extern char **completion_matches __P((char *, rl_compentry_func_t *));
extern char *username_completion_function __P((const char *, int));
extern char *filename_completion_function __P((const char *, int));
#endif
And the fix to make it compile is the following:
src/bin/psql/tab-complete.c
Line 64:
char *filename_completion_function(char *, int);
should read
char *rl_filename_completion_function(char *, int);
Readline continued to work for me after having upgraded my Debian to
the latest unstable release (which apparently contained alse libreadline
4.2) and patching the tab-complete.c file.
Sorry for the "pseudodiff" but hopefully it gives a clue. Since I do not
know much about libreadline and its history I hope someone else will
tell how the actual patch should look like (so it would work with older
versions).
Juhan Ernits