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

Commit374b2b0

Browse files
committed
Why can't everyone be standard? :(
Add some code to make psql happy with a system where there is *no*history code available, but there is readline code...
1 parentd049cec commit374b2b0

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

‎src/bin/psql/psql.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.51 1997/01/2521:58:08 scrappy Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.52 1997/01/2522:16:36 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -35,12 +35,12 @@
3535
#else
3636
# ifdefHAVE_READLINE_H
3737
# include<readline.h>
38-
#ifdefHAVE_HISTORY_H
38+
#ifndefNO_HISTORY
3939
# include<history.h>
4040
# endif
4141
# else
4242
# include<readline/readline.h>
43-
#ifdefHAVE_READLINE_HISTORY_H
43+
#ifndefNO_HISTORY
4444
# include<readline/history.h>
4545
# endif
4646
# endif

‎src/include/config.h‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,16 @@
2323
/* #undef HAVE_HISTORY_H */
2424
/* #undef HAVE_READLINE_HISTORY_H */
2525

26+
/* this is meant to handle the condition where the system has readline
27+
* capabilities, but no history. Unfortunately, it isn't as simple as
28+
* testing for the existance of -lhistory, since newer -lreadline seems to
29+
* include the -lhistory library, but newer readline.h doesn't
30+
*/
31+
#if defined(HAVE_LIBREADLINE)
32+
# if !defined(HAVE_HISTORY_H)|| !defined(HAVE_READLINE_HISTORY_H)
33+
# defineNO_HISTORY_H
34+
# endif
35+
#endif
2636

2737
#defineHAVE_SYS_SELECT_H
2838
#defineHAVE_TERMIOS_H

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp