Re: cvs postgres doesn't compile with libreadline 4.2 - Mailing list pgsql-hackers

From Juhan-Peep Ernits
Subject Re: cvs postgres doesn't compile with libreadline 4.2
Date
Msg-id Pine.GSO.4.21.0104160754360.21644-100000@suhkur.cc.ioc.ee
Whole thread Raw
In response to Re: cvs postgres doesn't compile with libreadline 4.2  (Peter Eisentraut <peter_e@gmx.net>)
List pgsql-hackers

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






pgsql-hackers by date:

Previous
From: "Rainer Mager"
Date:
Subject: RE: [BUGS] Problem with 7.0.3 dump -> 7.1b4 restore
Next
From: Thomas Lockhart
Date:
Subject: Re: [PATCHES] Patch for PostgreSQL 7.0.3 to compile on Tru64 UNIX v5.0A with Compaq C T6.4-212 (dtk)