Re: YA readline 4.2 patch

From: Jason Tishler <Jason(dot)Tishler(at)dothill(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Pgsql-Patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: YA readline 4.2 patch
Date: 2001-06-06 18:38:24
Message-ID: 20010606143824.J524@dothill.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

Tom,

On Wed, Jun 06, 2001 at 02:08:21PM -0400, Tom Lane wrote:
> Jason Tishler <Jason(dot)Tishler(at)dothill(dot)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(dot)Tishler(at)dothill(dot)com
Hazlet, NJ 07730 USA WWW: http://www.dothill.com

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Jan Wieck 2001-06-06 19:01:12 Re: Patch for cursors with multiple parameters
Previous Message Dave Bodenstab 2001-06-06 18:34:31 7.1 odbc bug & patch