Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Commit187e865

Browse 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 sayits no longer constant anymore -- but I suppose it's no different thandefining then undefining pre-processor constants.Rod Taylor <rbt@rbt.ca>
1 parent6a0d6d0 commit187e865

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/bin/psql/input.c

Lines 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
staticchar*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)

[8]ページ先頭

©2009-2025 Movatter.jp