Re: PATCH: postgresql-7.1 + readline-4.2 compatability - Mailing list pgsql-patches

From Peter Eisentraut
Subject Re: PATCH: postgresql-7.1 + readline-4.2 compatability
Date
Msg-id Pine.LNX.4.30.0104161720130.760-100000@peter.localdomain
Whole thread Raw
In response to PATCH: postgresql-7.1 + readline-4.2 compatability  ("Adam J. Richter" <adam@yggdrasil.com>)
List 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@gmx.net   http://funkturm.homeip.net/~peter


pgsql-patches by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Patch for catching incompatible types in fk constraints
Next
From: Tom Lane
Date:
Subject: Re: PATCH: postgresql-7.1 + readline-4.2 compatability