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

Appearance settings

Commit 187e865

Browse filesBrowse files
committed
> 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>
1 parent 6a0d6d0 commit 187e865
Copy full SHA for 187e865

File tree

Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-2
lines changed
Open diff view settings
Collapse file

‎src/bin/psql/input.c‎

Copy file name to clipboardExpand all lines: src/bin/psql/input.c
+3-2Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
* Copyright 2000 by PostgreSQL Global Development Group
55
*
6-
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.24 2003/07/23 08:47:39 petere Exp $
6+
* $Header: /cvsroot/pgsql/src/bin/psql/input.c,v 1.25 2003/07/25 19:27:06 momjian Exp $
77
*/
88
#include "postgres_fe.h"
99
#include "input.h"
@@ -86,7 +86,8 @@ gets_interactive(const char *prompt)
8686
static char *prev_hist = NULL;
8787

8888
if (useReadline)
89-
s = readline(prompt);
89+
/* On some platforms, readline is declared as readline(char *) */
90+
s = readline((char *) prompt);
9091
else
9192
s = gets_basic(prompt);
9293

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.