diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2002-04-10 22:47:09 +0000 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2002-04-10 22:47:09 +0000 |
commit | 5c1f31d2d47110f49d16bd56295125d656401855 (patch) | |
tree | 8e3cd0ad3576df4af07ede841db0f68b3908a2b7 /src | |
parent | 563673e15db995b6f531b44be7bb162330ac157a (diff) | |
download | postgresql-5c1f31d2d47110f49d16bd56295125d656401855.tar.gz postgresql-5c1f31d2d47110f49d16bd56295125d656401855.zip |
Readline and Zlib now required by default. Add options --without-readline
and --without-zlib to turn them off.
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/psql/input.c | 14 | ||||
-rw-r--r-- | src/bin/psql/input.h | 32 | ||||
-rw-r--r-- | src/bin/psql/startup.c | 13 | ||||
-rw-r--r-- | src/include/pg_config.h.in | 8 |
4 files changed, 22 insertions, 45 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c index 32872e9d71f..6e083506f3e 100644 --- a/src/bin/psql/input.c +++ b/src/bin/psql/input.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.18 2001/10/25 05:49:54 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.19 2002/04/10 22:46:58 petere Exp $ */ #include "postgres_fe.h" #include "input.h" @@ -19,8 +19,6 @@ /* (of course there is no runtime command for doing that :) */ #ifdef USE_READLINE static bool useReadline; -#endif -#ifdef USE_HISTORY static bool useHistory; #endif @@ -44,7 +42,7 @@ gets_interactive(char *prompt) { char *s; -#ifdef USE_HISTORY +#ifdef USE_READLINE const char *var; static char *prev_hist = NULL; #endif @@ -62,7 +60,7 @@ gets_interactive(char *prompt) } #endif -#ifdef USE_HISTORY +#ifdef USE_READLINE if (useHistory && s && s[0] != '\0') { var = GetVariable(pset.vars, "HISTCONTROL"); @@ -133,7 +131,7 @@ initializeInput(int flags) } #endif -#ifdef USE_HISTORY +#ifdef USE_READLINE if (flags == 1) { const char *home; @@ -168,7 +166,7 @@ initializeInput(int flags) bool saveHistory(char *fname) { -#ifdef USE_HISTORY +#ifdef USE_READLINE if (useHistory && fname) { if (write_history(fname) != 0) @@ -194,7 +192,7 @@ finishInput(void) finishInput(int exitstatus, void *arg) #endif { -#ifdef USE_HISTORY +#ifdef USE_READLINE if (useHistory) { char *home; diff --git a/src/bin/psql/input.h b/src/bin/psql/input.h index 8c6def33a3e..e893b8c5398 100644 --- a/src/bin/psql/input.h +++ b/src/bin/psql/input.h @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.15 2001/11/05 17:46:31 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/input.h,v 1.16 2002/04/10 22:47:03 petere Exp $ */ #ifndef INPUT_H #define INPUT_H @@ -12,26 +12,20 @@ * If some other file needs to have access to readline/history, include this * file and save yourself all this work. * - * USE_READLINE and USE_HISTORY are the definite pointers regarding existence or not. + * USE_READLINE is the definite pointers regarding existence or not. */ #ifdef HAVE_LIBREADLINE -#if defined(HAVE_READLINE_READLINE_H) -#include <readline/readline.h> -#define USE_READLINE 1 -#elif defined(HAVE_READLINE_H) -#include <readline.h> -#define USE_READLINE 1 -#endif -#endif - -#if defined(HAVE_HISTORY_FUNCTIONS) -#if defined(HAVE_READLINE_HISTORY_H) -#include <readline/history.h> -#define USE_HISTORY 1 -#elif defined(HAVE_HISTORY_H) -#include <history.h> -#define USE_HISTORY 1 -#endif +# define USE_READLINE 1 +# if defined(HAVE_READLINE_READLINE_H) +# include <readline/readline.h> +# elif defined(HAVE_READLINE_H) +# include <readline.h> +# endif +# if defined(HAVE_READLINE_HISTORY_H) +# include <readline/history.h> +# elif defined(HAVE_HISTORY_H) +# include <history.h> +# endif #endif char *gets_interactive(char *prompt); diff --git a/src/bin/psql/startup.c b/src/bin/psql/startup.c index 3a7b7a0f936..765f6db9013 100644 --- a/src/bin/psql/startup.c +++ b/src/bin/psql/startup.c @@ -3,7 +3,7 @@ * * Copyright 2000 by PostgreSQL Global Development Group * - * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.55 2002/03/27 19:16:13 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.56 2002/04/10 22:47:04 petere Exp $ */ #include "postgres_fe.h" @@ -636,7 +636,7 @@ showVersion(void) { puts("psql (PostgreSQL) " PG_VERSION); -#if defined(USE_READLINE) || defined (USE_HISTORY) || defined(MULTIBYTE) +#if defined(USE_READLINE) || defined(MULTIBYTE) fputs(gettext("contains support for: "), stdout); #ifdef USE_READLINE @@ -644,15 +644,6 @@ showVersion(void) #define _Feature #endif -#ifdef USE_HISTORY -#ifdef _Feature - fputs(", ", stdout); -#else -#define _Feature -#endif - fputs(gettext("history"), stdout); -#endif - #ifdef MULTIBYTE #ifdef _Feature fputs(", ", stdout); diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index cd27d28fa3c..2cfe5b16d6a 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -8,7 +8,7 @@ * or in pg_config.h afterwards. Of course, if you edit pg_config.h, then your * changes will be overwritten the next time you run configure. * - * $Id: pg_config.h.in,v 1.20 2002/04/03 05:39:33 petere Exp $ + * $Id: pg_config.h.in,v 1.21 2002/04/10 22:47:09 petere Exp $ */ #ifndef PG_CONFIG_H @@ -420,9 +420,6 @@ /* Define if you have the stricmp function. */ #undef HAVE_STRICMP -/* Set to 1 if you have history functions (either in libhistory or libreadline) */ -#undef HAVE_HISTORY_FUNCTIONS - /* Set to 1 if you have <pwd.h> */ #undef HAVE_PWD_H @@ -590,9 +587,6 @@ extern int fdatasync(int fildes); /* Set to 1 if you have libreadline.a */ #undef HAVE_LIBREADLINE -/* Set to 1 if you have libhistory.a */ -#undef HAVE_LIBHISTORY - /* Set to 1 if your libreadline defines rl_completion_append_character */ #undef HAVE_RL_COMPLETION_APPEND_CHARACTER |