[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] Recent readline patch
From: |
Magnus Henoch |
Subject: |
[Gcl-devel] Recent readline patch |
Date: |
Tue, 02 Mar 2004 23:27:49 +0100 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
A recent patch to o/gcl_readline.d
(s/completion_matches/rl_completion_matches/) works fine with readline
4.3, but fails with readline 4.1, which is what OpenBSD ships with.
I added some autoconf magic in the attached patch. It shouldn't
affect building with readline 4.3, but I haven't tested it.
--- orig/configure.in
+++ mod/configure.in
@@ -1073,6 +1073,10 @@
# object no longer needed, 20040102 CM
# RL_LIB=mod/gcl_readline.o
,,-lncurses))
+
+# These tests discover differences between readline 4.1 and 4.3
+ AC_CHECK_DECLS(rl_completion_matches, , , readline/readline.h)
+ AC_CHECK_TYPES(rl_compentry_func_t, , , readline/readline.h)
fi
AC_SUBST(RL_OBJS)
--- orig/o/gcl_readline.d
+++ mod/o/gcl_readline.d
@@ -201,6 +201,16 @@
}
+#if !HAVE_DECL_RL_COMPLETION_MATCHES
+/* readline 4.3 has it, readline 4.1 has completion_matches instead */
+#define rl_completion_matches completion_matches
+#endif
+
+#if !HAVE_RL_COMPENTRY_FUNC_T
+/* same here */
+typedef char *rl_compentry_func_t(const char *, int);
+#endif
+
/* Attempt to complete on the contents of TEXT. START and END bound the
region of rl_line_buffer that contains the word to complete. TEXT is
the word to complete. We can use the entire contents of rl_line_buffer
Regards,
Magnus
- [Gcl-devel] Recent readline patch,
Magnus Henoch <=