Skip site navigation (1) Skip section navigation (2)

Re: PATCH: postgresql-7.1 + readline-4.2 compatability

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "Adam J(dot) Richter" <adam(at)yggdrasil(dot)com>
Cc: <pgsql-patches(at)postgresql(dot)org>
Subject: Re: PATCH: postgresql-7.1 + readline-4.2 compatability
Date: 2001-04-16 15:26:13
Message-ID: Pine.LNX.4.30.0104161720130.760-100000@peter.localdomain (view raw or flat)
Thread:
Lists: pgsql-patches
Adam J. Richter writes:

> 	The following patch allows postgresql-7.1 to build under
> readline-4.2, per the discussion on this topic on pgsql-hackers.
> This patch should also preserve backware compatability.  It makes
> the source code use the readline-4.2 terminology, with #define's
> for automatic backward compatability.

This is already fixed in current CVS, to be released in 7.1.1.  The patch
is available at http://www.postgresql.org/~petere/readline42.html.  I
don't believe that your patch is complete.  There are a few more places
that need to be changed, for example the assignment of
rl_attempted_completion_function.

>[snipped]
> --- postgresql-7.1/src/bin/psql/tab-complete.c	Sun Apr  1 12:17:32 2001
> +++ postgresql/src/bin/psql/tab-complete.c	Mon Apr 16 00:57:08 2001
> @@ -60,9 +60,11 @@
>  #include "common.h"
>  #include "settings.h"
>
> -#ifndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
> -char	   *filename_completion_function(char *, int);
> -
> +#ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION_DECL
> +#  define rl_filename_completion_function filename_completion_function
> +#  ifndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
> +     char	   *filename_completion_function(char *, int);
> +#  endif
>  #endif
>
>  #define BUF_SIZE 2048
> @@ -731,7 +733,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);
>
>
>  	/*

-- 
Peter Eisentraut   peter_e(at)gmx(dot)net   http://funkturm.homeip.net/~peter


In response to

pgsql-patches by date

Next:From: Peter EisentrautDate: 2001-04-16 17:56:09
Subject: Re: Patch for PostgreSQL 7.0.3 to compile on Tru64 UNIX v5.0A with Compaq C T6.4-212 (dtk)
Previous:From: Tom LaneDate: 2001-04-16 15:19:47
Subject: Re: PATCH: postgresql-7.1 + readline-4.2 compatability

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group