From 42a344683a3a9d4ca9a87ea0c6ddf7c5cbe953ea Mon Sep 17 00:00:00 2001 From: Bruce Momjian <bruce@momjian.us> Date: Mon, 11 Nov 1996 05:55:33 +0000 Subject: [PATCH] Remove warnings when readline is not used. --- src/bin/psql/psql.c | 4 ++-- src/bin/psql/rlstubs.c | 10 ++++++---- src/bin/psql/rlstubs.h | 20 ++++++++++++++++++++ 3 files changed, 28 insertions(+), 6 deletions(-) create mode 100644 src/bin/psql/rlstubs.h diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index a7544dc2d90..ce22a4ae004 100644 --- a/src/bin/psql/psql.c +++ b/src/bin/psql/psql.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.27 1996/11/10 03:04:12 momjian Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.28 1996/11/11 05:55:30 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -26,7 +26,7 @@ #include "psqlHelp.h" #ifdef NOREADLINE -extern char *readline(char *); /* in rlstubs.c */ +#include "rlstubs.h" #else /* from the GNU readline library */ #ifdef OLD_READLINE diff --git a/src/bin/psql/rlstubs.c b/src/bin/psql/rlstubs.c index b753fab430b..98a1f6ebf10 100644 --- a/src/bin/psql/rlstubs.c +++ b/src/bin/psql/rlstubs.c @@ -7,12 +7,14 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/rlstubs.c,v 1.2 1996/07/30 07:47:58 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/rlstubs.c,v 1.3 1996/11/11 05:55:32 momjian Exp $ * *------------------------------------------------------------------------- */ #include <stdio.h> +#include "rlstubs.h" + char * readline(char *prompt) { @@ -23,19 +25,19 @@ readline(char *prompt) } int -write_history() +write_history(char *dum) { return 0; } int -using_history() +using_history(void) { return 0; } int -add_history() +add_history(char *dum) { return 0; } diff --git a/src/bin/psql/rlstubs.h b/src/bin/psql/rlstubs.h new file mode 100644 index 00000000000..c9334eaca1c --- /dev/null +++ b/src/bin/psql/rlstubs.h @@ -0,0 +1,20 @@ +/*------------------------------------------------------------------------- + * + * rlstubs.h + * stub routines when compiled without readline and history libraries + * + * Copyright (c) 1994-5, Regents of the University of California + * + * + * IDENTIFICATION + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/rlstubs.h,v 1.1 1996/11/11 05:55:33 momjian Exp $ + * + *------------------------------------------------------------------------- + */ +extern char *readline(char *prompt); + +extern int write_history(char *dum); + +extern int using_history(void); + +extern int add_history(char *dum); -- GitLab