postgres.git / summary / log / commit / refs
commit b040178c11ec50704fc4fd420bce188cd4f340a7
Author: Tom Lane <tgl@sss.pgh.pa.us>
Date: Mon Aug 24 16:18:25 2009 +0000
First released in: 9.0.0, 7.4.26, 8.0.22, 8.1.18, 8.2.14, 8.3.8, 8.4.1
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.
src/bin/psql/input.h | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
diff --git a/src/bin/psql/input.h b/src/bin/psql/input.h
index 8c998691261..6a17624f8f1 100644
--- a/src/bin/psql/input.h
+++ b/src/bin/psql/input.h
@@ -3,7 +3,7 @@
*
* Copyright (c) 2000-2008, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.30 2008/01/01 19:45:56 momjian Exp $
+ * $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.30.2.1 2009/08/24 16:18:25 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>
+#if defined(HAVE_READLINE_HISTORY_H)
+#include <readline/history.h>
+#endif
+
#elif defined(HAVE_EDITLINE_READLINE_H)
#include <editline/readline.h>
+#if defined(HAVE_EDITLINE_HISTORY_H)
+#include <editline/history.h>
+#endif
+
#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)
-#include <editline/history.h>
-#elif defined(HAVE_HISTORY_H)
+#if defined(HAVE_HISTORY_H)
#include <history.h>
#endif
-#endif
+
+#endif /* HAVE_READLINE_READLINE_H, etc */
+#endif /* HAVE_LIBREADLINE */
#include "pqexpbuffer.h"
[parent: f57d5b7b4baf]