Re: YA readline 4.2 patch
От | Jason Tishler |
---|---|
Тема | Re: YA readline 4.2 patch |
Дата | |
Msg-id | 20010606143824.J524@dothill.com обсуждение исходный текст |
Ответ на | Re: YA readline 4.2 patch (Tom Lane <tgl@sss.pgh.pa.us>) |
Список | pgsql-patches |
Tom, On Wed, Jun 06, 2001 at 02:08:21PM -0400, Tom Lane wrote: > Jason Tishler <Jason.Tishler@dothill.com> writes: > >> I'm confused. The current code already builds cleanly against readline > >> 4.2. Why do we need to change it? > > > 1. The current code does *not* build cleanly against readline 4.2 > > under Cygwin. > > Why not? It builds cleanly for me, under gcc. I don't understand why > Cygwin would be different. I thought that we have been here before... Remember that DLLs under Windows are *not* the same as shared libraries under UNIX. In order for Cygwin PostgreSQL to link cleanly against Cygwin readline (which is DLL), the functions imported must be decorated with: __declspec(dllimport) So, declaring filename_completion_function() with: extern char *filename_completion_function(); is not sufficient. Instead, it must be declared as follows: extern __declspec(dllimport) char *filename_completion_function(const char *, int); My patch accomplishes the above (without affecting other platforms), but conditionally uses filename_completion_function() or rl_filename_completion_function() as appropriate. Jason -- Jason Tishler Director, Software Engineering Phone: 732.264.8770 x235 Dot Hill Systems Corp. Fax: 732.264.8798 82 Bethany Road, Suite 7 Email: Jason.Tishler@dothill.com Hazlet, NJ 07730 USA WWW: http://www.dothill.com
В списке pgsql-patches по дате отправления: