Subject: Re: [avail for test] readline-4.2-1
From: Jason Tishler <[email-masked]>
To: "Charles S. Wilson" <[email-masked]>
Cc: [email-masked]
Date: Wed, 6 Jun 2001 09:14:49 -0400

Chuck,

On Tue, Jun 05, 2001 at 11:31:04PM -0400, Charles S. Wilson wrote:
> Jason Tishler wrote:
> > 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:
> 
> [snip]
> 
> 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.

Thanks for doing my job!  I don't know how I missed the above.  When I saw
all of the rl_* stuff being removed from configure.in, I got discouraged
and punted.

Anyway, I'm in the process of testing the attached patch under Cygwin
with readline 4.1 and 4.2 and Linux with 2.2.1 and 4.2.  If all checks
out OK, then I will submit this patch to pgsql-patches.

BTW, a minor variation of this patch should work for Python too.

Thanks,
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: [email-masked]
Hazlet, NJ 07730 USA                 WWW:   http://www.dothill.com
Index: configure.in
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/configure.in,v
retrieving revision 1.128
diff -u -p -r1.128 configure.in
--- configure.in	2001/06/02 18:25:16	1.128
+++ configure.in	2001/06/06 10:36:33
@@ -928,7 +928,7 @@ AC_TRY_LINK([#include <stdio.h>
 AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER)],
 [AC_MSG_RESULT(no)])
 
-AC_CHECK_FUNCS([rl_completion_matches])
+AC_CHECK_FUNCS([rl_completion_matches rl_filename_completion_function])

 dnl Cannot use AC_CHECK_FUNC because finite may be a macro
Index: src/bin/psql/tab-complete.c
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/bin/psql/tab-complete.c,v
retrieving revision 1.32
diff -u -p -r1.32 tab-complete.c
--- src/bin/psql/tab-complete.c	2001/05/08 21:06:43	1.32
+++ src/bin/psql/tab-complete.c	2001/06/06 10:36:33
@@ -60,7 +60,9 @@
 #include "common.h"
 #include "settings.h"
 
-extern char *filename_completion_function();
+#ifdef HAVE_RL_FILENAME_COMPLETION_FUNCTION
+#define filename_completion_function rl_filename_completion_function
+#endif
 
 #ifdef HAVE_RL_COMPLETION_MATCHES
 #define completion_matches(x, y) rl_completion_matches((x), ((rl_compentry_func_t *)(y)))
Index: src/include/config.h.in
===================================================================
RCS file: /home/projects/pgsql/cvsroot/pgsql/src/include/config.h.in,v
retrieving revision 1.165
diff -u -p -r1.165 config.h.in
--- src/include/config.h.in	2001/06/02 18:25:18	1.165
+++ src/include/config.h.in	2001/06/06 10:36:33
@@ -589,6 +589,9 @@ extern int fdatasync(int fildes);
 /* Set to 1 if you have rl_completion_matches */
 #undef HAVE_RL_COMPLETION_MATCHES
 
+/* Set to 1 if you have rl_filename_completion_function */
+#undef HAVE_RL_FILENAME_COMPLETION_FUNCTION
+
 /* Set to 1 if you have getopt_long() (GNU long options) */
 #undef HAVE_GETOPT_LONG

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