Skip to content

Commit 187e865

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 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

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
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)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy