diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-02 13:06:27 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-12-02 13:06:27 -0500 |
commit | a7da41981021575e2359683d994eec6c9d246321 (patch) | |
tree | fcc3b7bc23f87bb62164ee62b21d740687cd74d2 /src | |
parent | a22d6a2cb62c4fc6d7c4b077d8014fd4ffaec426 (diff) | |
download | postgresql-a7da41981021575e2359683d994eec6c9d246321.tar.gz postgresql-a7da41981021575e2359683d994eec6c9d246321.zip |
Add configure probe for rl_variable_bind().
Some exceedingly ancient readline libraries lack this function, causing
commit 3d858af07 to fail. Per buildfarm (via Michael Paquier).
Discussion: https://postgr.es/m/E1msTLm-0007Cm-Ri@gemulon.postgresql.org
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/input.c | 2 | ||||
-rw-r--r-- | src/include/pg_config.h.in | 3 | ||||
-rw-r--r-- | src/tools/msvc/Solution.pm | 1 |
3 files changed, 6 insertions, 0 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c index 1dcd95a7b9e..501f5d5fbc5 100644 --- a/src/bin/psql/input.c +++ b/src/bin/psql/input.c @@ -356,8 +356,10 @@ initializeInput(int flags) /* set appropriate values for Readline's global variables */ initialize_readline(); +#ifdef HAVE_RL_VARIABLE_BIND /* set comment-begin to a useful value for SQL */ (void) rl_variable_bind("comment-begin", "-- "); +#endif /* this reads ~/.inputrc, so do it after rl_variable_bind */ rl_initialize(); diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index d793734fe10..7525c165974 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -485,6 +485,9 @@ /* Define to 1 if you have the `rl_reset_screen_size' function. */ #undef HAVE_RL_RESET_SCREEN_SIZE +/* Define to 1 if you have the `rl_variable_bind' function. */ +#undef HAVE_RL_VARIABLE_BIND + /* Define to 1 if you have the <security/pam_appl.h> header file. */ #undef HAVE_SECURITY_PAM_APPL_H diff --git a/src/tools/msvc/Solution.pm b/src/tools/msvc/Solution.pm index 1cb31d929fe..2c8cd521e94 100644 --- a/src/tools/msvc/Solution.pm +++ b/src/tools/msvc/Solution.pm @@ -354,6 +354,7 @@ sub GenerateFiles HAVE_RL_FILENAME_QUOTE_CHARACTERS => undef, HAVE_RL_FILENAME_QUOTING_FUNCTION => undef, HAVE_RL_RESET_SCREEN_SIZE => undef, + HAVE_RL_VARIABLE_BIND => undef, HAVE_SECURITY_PAM_APPL_H => undef, HAVE_SETENV => undef, HAVE_SETPROCTITLE => undef, |