diff options
author | Bruce Momjian <bruce@momjian.us> | 2003-07-25 19:27:06 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2003-07-25 19:27:06 +0000 |
commit | 187e865174024c49f84e074184d8e3f05d44a923 (patch) | |
tree | 3f030ece8430565647e0da4c6a81d06b9bdd8d2b /src/bin/psql/input.c | |
parent | 6a0d6d0060d575440a46f1218ed78565f565890c (diff) |
> Rod Taylor <rbt@rbt.ca> writes:
> > It seems that readline() on my system (FreeBSD 4.8) isn't declared to
> > take the prompt as a const. Thus, remove const from gets_interactive()
> > to remove the warning.
>
> I think it would be a lot cleaner to just put a cast to char * into the
> readline call (with a note about why).
Ok.. that works.
I must say it's a little strange being able to take a constant and say
its no longer constant anymore -- but I suppose it's no different than
defining then undefining pre-processor constants.
Rod Taylor <rbt@rbt.ca>
Diffstat (limited to 'src/bin/psql/input.c')
-rw-r--r-- | src/bin/psql/input.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bin/psql/input.c b/src/bin/psql/input.c index cb0cc677659..26fe7659e2a 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.24 2003/07/23 08:47:39 petere Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.25 2003/07/25 19:27:06 momjian Exp $ */ #include "postgres_fe.h" #include "input.h" @@ -86,7 +86,8 @@ gets_interactive(const char *prompt) static char *prev_hist = NULL; if (useReadline) - s = readline(prompt); + /* On some platforms, readline is declared as readline(char *) */ + s = readline((char *) prompt); else s = gets_basic(prompt); |