This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [avail for test] readline-4.2-1


Jason Tishler wrote:
> > > Unfortunately, due to API changes (i.e., deprecation) both PostgreSQL
> > > and Python no longer build OOTB.  PostgreSQL and Python fail to link
> > > because filename_completion_function() and completion_matches() are no
> > > longer being exported from the readline's import library, respectively:
> >
> > So, even to use the functions as included in the static lib or dll,
> > you'd have to modify readline.h.  I don't think that's a good idea --
> > besides, heed Chet's warning: These *will* go away (completely)
> > sometime.
> 
> I saw Chet's warning too.  But, others don't seem to be taking this
> warning too seriously -- see below...
> 
> > > Would you be willing to re-export these two functions (and possibly all
> > > of the ones in compat.c)?  Otherwise, this is going to take some time...
> >
> > Well, I believe that merely postpones the problem.
> 
> Agreed.
> 
> > Don't worry about
> > the delay; take your time.  Chris has convinced me to include the old
> > DLL's (e.g. cygreadline4.dll) within a new readline-4.2-2 package.  Look
> > for that to come out soon.
> 
> The above is good news.
> 
> > > Devise patches, submit patches, wait for patches to be considered,
> > > revise patches, submit patches, etc...
> >
> > Yeah.  How do you conditionalize on library versions?
> >
> > if readline-version > 4.2, then
> > #define COMPLETION_MATCHES rl_completion_matches
> > else
> > #define COMPLETION_MATCHES completion_matches
> > endif
> >
> > ????
> 
> I found the following patch on the pgsql-patches list:
> 
>     http://postgresql.readysetnet.com/mhonarc/pgsql-patches/2001-04/msg00049.html
> 
> It seemed exactly for what I was looking.  Unfortunately, it was
> rejected in favor for what appears (at least to me) to be the "ostrich"
> approach. :,)

Hmm...the *accepted* patch there sez:

-#ifndef HAVE_FILENAME_COMPLETION_FUNCTION_DECL
-char      *filename_completion_function(char *, int);
+extern char *filename_completion_function();
 
+#ifdef HAVE_RL_COMPLETION_MATCHES
+#define completion_matches(x, y) rl_completion_matches((x),
((rl_compentry_func_t *)(y)))
 #endif
 
Well, the filename_completion_function hack will NOT work.  It needs to
be __declspec(dllimport) extern char *filename_completion_function(); 
(maybe, if linking to dll. or not, if linking statically...)

the #define completion_matches() seems like an OK fix to me.  I don't
know why they couldn't also have done #define
filename_completion_function, as well.
 
> I will post to the python-dev and pgsql-patches lists, attempting to
> solicit the best approach with which to go forward.

Good luck...

--Chuck

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]