debian unstable, i386.
upgrade libreadline 4.2
postgres doesn't compile.

gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations -I../../../src/interfaces/libpq -I../../../src/include   -c -o tab-complete.o tab-complete.c
tab-complete.c: In function `initialize_readline':
tab-complete.c:103: warning: assignment from incompatible pointer type
tab-complete.c: In function `psql_completion':
tab-complete.c:292: warning: implicit declaration of function `completion_matches'
tab-complete.c:292: warning: assignment makes pointer from integer without a cast
tab-complete.c:296: warning: assignment makes pointer from integer without a cast
tab-complete.c:301: warning: assignment makes pointer from integer without a cast
tab-complete.c:309: warning: assignment makes pointer from integer without a cast
tab-complete.c:320: warning: assignment makes pointer from integer without a cast
tab-complete.c:325: warning: assignment makes pointer from integer without a cast
tab-complete.c:332: warning: assignment makes pointer from integer without a cast
tab-complete.c:337: warning: assignment makes pointer from integer without a cast
tab-complete.c:342: warning: assignment makes pointer from integer without a cast
tab-complete.c:347: warning: assignment makes pointer from integer without a cast
tab-complete.c:350: warning: assignment makes pointer from integer without a cast
tab-complete.c:366: warning: assignment makes pointer from integer without a cast
tab-complete.c:371: warning: assignment makes pointer from integer without a cast
tab-complete.c:378: warning: assignment makes pointer from integer without a cast
tab-complete.c:381: warning: assignment makes pointer from integer without a cast
tab-complete.c:392: warning: assignment makes pointer from integer without a cast
tab-complete.c:400: warning: assignment makes pointer from integer without a cast
tab-complete.c:406: warning: assignment makes pointer from integer without a cast
tab-complete.c:410: warning: assignment makes pointer from integer without a cast
tab-complete.c:413: warning: assignment makes pointer from integer without a cast
tab-complete.c:420: warning: assignment makes pointer from integer without a cast
tab-complete.c:423: warning: assignment makes pointer from integer without a cast
tab-complete.c:429: warning: assignment makes pointer from integer without a cast
tab-complete.c:435: warning: assignment makes pointer from integer without a cast
tab-complete.c:440: warning: assignment makes pointer from integer without a cast
tab-complete.c:448: warning: assignment makes pointer from integer without a cast
tab-complete.c:455: warning: assignment makes pointer from integer without a cast
tab-complete.c:460: warning: assignment makes pointer from integer without a cast
tab-complete.c:465: warning: assignment makes pointer from integer without a cast
tab-complete.c:473: warning: assignment makes pointer from integer without a cast
tab-complete.c:478: warning: assignment makes pointer from integer without a cast
tab-complete.c:490: warning: assignment makes pointer from integer without a cast
tab-complete.c:493: warning: assignment makes pointer from integer without a cast
tab-complete.c:496: warning: assignment makes pointer from integer without a cast
tab-complete.c:506: warning: assignment makes pointer from integer without a cast
tab-complete.c:514: warning: assignment makes pointer from integer without a cast
tab-complete.c:521: warning: assignment makes pointer from integer without a cast
tab-complete.c:532: warning: assignment makes pointer from integer without a cast
tab-complete.c:541: warning: assignment makes pointer from integer without a cast
tab-complete.c:545: warning: assignment makes pointer from integer without a cast
tab-complete.c:553: warning: assignment makes pointer from integer without a cast
tab-complete.c:556: warning: assignment makes pointer from integer without a cast
tab-complete.c:559: warning: assignment makes pointer from integer without a cast
tab-complete.c:569: warning: assignment makes pointer from integer without a cast
tab-complete.c:572: warning: assignment makes pointer from integer without a cast
tab-complete.c:578: warning: assignment makes pointer from integer without a cast
tab-complete.c:582: warning: assignment makes pointer from integer without a cast
tab-complete.c:587: warning: assignment makes pointer from integer without a cast
tab-complete.c:592: warning: assignment makes pointer from integer without a cast
tab-complete.c:599: warning: assignment makes pointer from integer without a cast
tab-complete.c:604: warning: assignment makes pointer from integer without a cast
tab-complete.c:606: warning: assignment makes pointer from integer without a cast
tab-complete.c:608: warning: assignment makes pointer from integer without a cast
tab-complete.c:619: warning: assignment makes pointer from integer without a cast
tab-complete.c:622: warning: assignment makes pointer from integer without a cast
tab-complete.c:626: warning: assignment makes pointer from integer without a cast
tab-complete.c:634: warning: assignment makes pointer from integer without a cast
tab-complete.c:640: warning: assignment makes pointer from integer without a cast
tab-complete.c:646: warning: assignment makes pointer from integer without a cast
tab-complete.c:651: warning: assignment makes pointer from integer without a cast
tab-complete.c:660: warning: assignment makes pointer from integer without a cast
tab-complete.c:666: warning: assignment makes pointer from integer without a cast
tab-complete.c:672: warning: assignment makes pointer from integer without a cast
tab-complete.c:678: warning: assignment makes pointer from integer without a cast
tab-complete.c:682: warning: assignment makes pointer from integer without a cast
tab-complete.c:687: warning: assignment makes pointer from integer without a cast
tab-complete.c:690: warning: assignment makes pointer from integer without a cast
tab-complete.c:698: warning: assignment makes pointer from integer without a cast
tab-complete.c:702: warning: assignment makes pointer from integer without a cast
tab-complete.c:704: warning: assignment makes pointer from integer without a cast
tab-complete.c:709: warning: assignment makes pointer from integer without a cast
tab-complete.c:714: warning: assignment makes pointer from integer without a cast
tab-complete.c:716: warning: assignment makes pointer from integer without a cast
tab-complete.c:718: warning: assignment makes pointer from integer without a cast
tab-complete.c:725: warning: assignment makes pointer from integer without a cast
tab-complete.c:734: `filename_completion_function' undeclared (first use in this function)
tab-complete.c:734: (Each undeclared identifier is reported only once
tab-complete.c:734: for each function it appears in.)
tab-complete.c:734: warning: assignment makes pointer from integer without a cast
tab-complete.c:749: warning: assignment makes pointer from integer without a cast
tab-complete.c:763: warning: assignment makes pointer from integer without a cast
make[3]: *** [tab-complete.o] Error 1

ciao,
andrea

Wed, 11 Apr 2001 16:50:31 +0200
andrea gelmini <bungle@linux.it>
cvs postgres doesn't compile with libreadline 4.2
andrea gelmini <bungle@linux.it> writes:
> debian unstable, i386.
> upgrade libreadline 4.2
> postgres doesn't compile.

Seems strange.  Did you re-run PG's configure after installing libreadline?
Are you sure that the include (.h) files found by configure match the
library (.a or .so) file?

			regards, tom lane

Fri, 13 Apr 2001 19:50:08 -0400
Tom Lane <tgl@sss.pgh.pa.us>
Re: cvs postgres doesn't compile with libreadline 4.2 
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.

-- 
Peter Eisentraut      peter_e@gmx.net       http://yi.org/peter-e/


Sat, 14 Apr 2001 04:18:37 +0200 (CEST)
Peter Eisentraut <peter_e@gmx.net>
Re: cvs postgres doesn't compile with libreadline 4.2


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





Mon, 16 Apr 2001 08:06:20 +0200 (GMT)
Juhan-Peep Ernits <juhan@cc.ioc.ee>
Re: cvs postgres doesn't compile with libreadline 4.2