Skip to content

Commit f389e9d

Browse files
committed
Change how readline support is included in psql.c ...
See message to hackers@ mailing list concerning this...
1 parent 6dbe1be commit f389e9d

File tree

2 files changed

+21
-11
lines changed

2 files changed

+21
-11
lines changed

src/bin/psql/psql.c

Lines changed: 10 additions & 11 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.49 1997/01/13 02:35:32 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.50 1997/01/25 03:51:59 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -30,17 +30,16 @@
3030
#include "strdup.h"
3131
#endif
3232

33-
#ifdef NOREADLINE
34-
#include "rlstubs.h"
33+
#ifndef HAVE_LIBREADLINE
34+
# include "rlstubs.h"
3535
#else
36-
/* from the GNU readline library */
37-
#ifdef OLD_READLINE
38-
#include "readline.h"
39-
#include "history.h"
40-
#else
41-
#include <readline/readline.h>
42-
#include <readline/history.h>
43-
#endif
36+
# ifdef HAVE_READLINE_H
37+
# include <readline.h>
38+
# include <history.h>
39+
# else
40+
# include <readline/readline.h>
41+
# include <readline/history.h>
42+
# endif
4443
#endif
4544

4645
#define PROMPT "=> "

src/include/config.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,17 @@
88

99
#define BLCKSZ 8192
1010

11+
/* Define to enable readline/history support in psql */
12+
/* #undef HAVE_LIBREADLINE */
13+
14+
/* These two defines are not used until HAVE_LIBREADLINE
15+
* are also defined
16+
*
17+
* Define if <readline.h> vs <readline/readline.h>
18+
*/
19+
/* #undef HAVE_READLINE_H */
20+
21+
1122
#define HAVE_SYS_SELECT_H
1223
#define HAVE_TERMIOS_H
1324
#define HAVE_VALUES_H

0 commit comments

Comments
 (0)