src/bin/psql/input.c

Поиск
Список
Период
Сортировка
Искать

src/bin/psql/input.c

От:
Rod Taylor <rbt@rbt.ca>
Дата:
Вложения:
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.
-- 
Rod Taylor 

PGP Key: http://www.rbt.ca/rbtpub.asc

Re: src/bin/psql/input.c

От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Rod Taylor  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).

			regards, tom lane

Re: src/bin/psql/input.c

От:
Rod Taylor <rbt@rbt.ca>
Дата:
Вложения:
On Wed, 2003-06-25 at 11:26, Tom Lane wrote:
> Rod Taylor  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 

PGP Key: http://www.rbt.ca/rbtpub.asc

Re: src/bin/psql/input.c

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

Your patch has been added to the PostgreSQL unapplied patches list at:

	http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------


Rod Taylor wrote:
-- Start of PGP signed section.
> On Wed, 2003-06-25 at 11:26, Tom Lane wrote:
> > Rod Taylor  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 
> 
> PGP Key: http://www.rbt.ca/rbtpub.asc

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073

Re: src/bin/psql/input.c

От:
Bruce Momjian <pgman@candle.pha.pa.us>
Дата:

Patch applied.  Thanks.

---------------------------------------------------------------------------



Rod Taylor wrote:
-- Start of PGP signed section.
> On Wed, 2003-06-25 at 11:26, Tom Lane wrote:
> > Rod Taylor  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 
> 
> PGP Key: http://www.rbt.ca/rbtpub.asc

[ Attachment, skipping... ]
-- End of PGP section, PGP failed!

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
FAQ