mirror of
https://github.com/postgres/postgres.git
synced 2025-05-28 05:21:27 +03:00
Fix inclusions of readline/editline header files so that we only attempt to
#include the version of history.h that is in the same directory as the readline.h we are using. This avoids problems in some scenarios where both readline and editline are installed. Report and patch by Zdenek Kotala.
This commit is contained in:
parent
ed398d1957
commit
f735f4715a
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright (c) 2000-2005, PostgreSQL Global Development Group
|
||||
*
|
||||
* $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.23 2005/01/01 05:43:08 momjian Exp $
|
||||
* $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.23.6.1 2009/08/24 16:18:36 tgl Exp $
|
||||
*/
|
||||
#ifndef INPUT_H
|
||||
#define INPUT_H
|
||||
@ -16,21 +16,27 @@
|
||||
*/
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
#define USE_READLINE 1
|
||||
|
||||
#if defined(HAVE_READLINE_READLINE_H)
|
||||
#include <readline/readline.h>
|
||||
#elif defined(HAVE_EDITLINE_READLINE_H)
|
||||
#include <editline/readline.h>
|
||||
#elif defined(HAVE_READLINE_H)
|
||||
#include <readline.h>
|
||||
#endif
|
||||
#if defined(HAVE_READLINE_HISTORY_H)
|
||||
#include <readline/history.h>
|
||||
#elif defined(HAVE_EDITLINE_HISTORY_H)
|
||||
#endif
|
||||
|
||||
#elif defined(HAVE_EDITLINE_READLINE_H)
|
||||
#include <editline/readline.h>
|
||||
#if defined(HAVE_EDITLINE_HISTORY_H)
|
||||
#include <editline/history.h>
|
||||
#elif defined(HAVE_HISTORY_H)
|
||||
#endif
|
||||
|
||||
#elif defined(HAVE_READLINE_H)
|
||||
#include <readline.h>
|
||||
#if defined(HAVE_HISTORY_H)
|
||||
#include <history.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* HAVE_READLINE_READLINE_H, etc */
|
||||
#endif /* HAVE_LIBREADLINE */
|
||||
|
||||
|
||||
char *gets_interactive(const char *prompt);
|
||||
|
Loading…
x
Reference in New Issue
Block a user