Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9b708f1

Browse files
committed
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 thereadline.h we are using. This avoids problems in some scenarios where bothreadline and editline are installed. Report and patch by Zdenek Kotala.
1 parent1e6bd55 commit9b708f1

File tree

1 file changed

+14
-8
lines changed

1 file changed

+14
-8
lines changed

‎src/bin/psql/input.h

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright (c) 2000-2009, PostgreSQL Global Development Group
55
*
6-
* $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.31 2009/01/01 17:23:55 momjian Exp $
6+
* $PostgreSQL: pgsql/src/bin/psql/input.h,v 1.32 2009/08/24 16:18:13 tgl Exp $
77
*/
88
#ifndefINPUT_H
99
#defineINPUT_H
@@ -16,21 +16,27 @@
1616
*/
1717
#ifdefHAVE_LIBREADLINE
1818
#defineUSE_READLINE 1
19+
1920
#if defined(HAVE_READLINE_READLINE_H)
2021
#include<readline/readline.h>
22+
#if defined(HAVE_READLINE_HISTORY_H)
23+
#include<readline/history.h>
24+
#endif
25+
2126
#elif defined(HAVE_EDITLINE_READLINE_H)
2227
#include<editline/readline.h>
28+
#if defined(HAVE_EDITLINE_HISTORY_H)
29+
#include<editline/history.h>
30+
#endif
31+
2332
#elif defined(HAVE_READLINE_H)
2433
#include<readline.h>
25-
#endif
26-
#if defined(HAVE_READLINE_HISTORY_H)
27-
#include<readline/history.h>
28-
#elif defined(HAVE_EDITLINE_HISTORY_H)
29-
#include<editline/history.h>
30-
#elif defined(HAVE_HISTORY_H)
34+
#if defined(HAVE_HISTORY_H)
3135
#include<history.h>
3236
#endif
33-
#endif
37+
38+
#endif/* HAVE_READLINE_READLINE_H, etc */
39+
#endif/* HAVE_LIBREADLINE */
3440

3541
#include"pqexpbuffer.h"
3642

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp