On Wed, 2003-06-25 at 11:26, Tom Lane wrote:
> Rod Taylor <[EMAIL PROTECTED]> 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 <[EMAIL PROTECTED]>

PGP Key: http://www.rbt.ca/rbtpub.asc
Index: input.c
===================================================================
RCS file: /home/rbt/work/postgresql/cvs/pgsql-server/src/bin/psql/input.c,v
retrieving revision 1.23
diff -c -r1.23 input.c
*** input.c	20 Mar 2003 06:43:35 -0000	1.23
--- input.c	25 Jun 2003 23:45:57 -0000
***************
*** 86,92 ****
  	static char *prev_hist = NULL;
  
  	if (useReadline)
! 		s = readline(prompt);
  	else
  		s = gets_basic(prompt);
  
--- 86,93 ----
  	static char *prev_hist = NULL;
  
  	if (useReadline)
! 		/* On some platforms, readline is declared as readline(char *) */
! 		s = readline((char *) prompt);
  	else
  		s = gets_basic(prompt);
  

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to