Possible explanation for readline configuration problems

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Possible explanation for readline configuration problems
Дата
Msg-id 12552.987217627@sss.pgh.pa.us
обсуждение исходный текст
Ответы Re: Possible explanation for readline configuration problems  (Bruce Momjian <pgman@candle.pha.pa.us>)
Re: Possible explanation for readline configuration problems  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: Possible explanation for readline configuration problems  (Peter Eisentraut <peter_e@gmx.net>)
Список pgsql-hackers
We've gotten several different reports lately of peculiar compilation
errors and warnings involving readline in 7.1.  They look like configure
is actively doing the wrong thing --- for example, how could we see
reports like this:

tab-complete.c:734: `filename_completion_function' undeclared (first use in this function)
tab-complete.c:734: (Each undeclared identifier is reported only once
tab-complete.c:734: for each function it appears in.)

when the code makes a point of providing a declaration for
filename_completion_function if configure didn't see it in the headers?

After eyeballing the code I think I have a theory.  psql/input.h will
preferentially include <readline/readline.h>, not <readline.h>, if both
HAVE_READLINE_READLINE_H and HAVE_READLINE_H are defined.  But the tests
in configure make the opposite choice!  Maybe the people who are having
trouble have two different versions of readline header files visible at
those two names, leading to configure's results being wrong for the
header file that input.h actually selects?

In normal situations this still wouldn't matter because configure only
defines one of the two symbols HAVE_READLINE_READLINE_H and HAVE_READLINE_H.
BUT: suppose someone runs configure, then installs a newer libreadline
and runs configure again?  I think caching of configure results could
lead to both symbols becoming defined, if both headers are out there.

It's a bit of a reach, but I'm having a hard time seeing how configure
could produce the wrong results otherwise.  Thoughts?

Andrea and Kevin, what do your src/include/config.h files have for
these symbols?
        regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: NetBSD "Bad address" failure (was Re: Third call for platform testing)
Следующее
От: Mark Butler
Дата:
Сообщение: Postmaster fatal defect - pl/pgsql return type conversion