1
0
mirror of https://github.com/postgres/postgres.git synced 2025-08-09 17:03:00 +03:00

The attached patch enables PostgreSQL CVS to build cleanly under Cygwin

when built against readline 4.2.  Specifically, it handles the deprecation
of

    filename_completion_function()

with preference for

    rl_filename_completion_function()

Although, I was motivated by Cygwin support, IMO this patch is appropriate
for all platforms.  To quote from the readline source:

    #if 0
    /* Backwards compatibility (compat.c).  These will go away sometime. */
    ...
    extern READLINE_EXPORT(char, *filename_completion_function) ...
    #endif

Note that this patch is modeled after the one by Peter Eisentraut for
completion_matches():

    http://www.ca.postgresql.org/~petere/readline42.html
I tested this patch under the following environments:

    Cygwin with readline 4.1
    Cygwin with readline 4.2
    Linux with readline 2.2.1
    Linux with readline 4.2

and it behaved as expected.

Jason Tishler
This commit is contained in:
Bruce Momjian
2001-06-11 22:12:48 +00:00
parent 8af0ea9dc1
commit 92f450652c
3 changed files with 9 additions and 4 deletions

View File

@@ -928,7 +928,7 @@ AC_TRY_LINK([#include <stdio.h>
AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER)],
[AC_MSG_RESULT(no)])
AC_CHECK_FUNCS([rl_completion_matches])
AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function])
dnl Cannot use AC_CHECK_FUNC because finite may be a macro