[Magic-dev] Re: supported Magic platforms
David Fang
fang at csl.cornell.edu
Mon May 16 13:26:21 EDT 2005
Hi,
According to the headers I've checked, the 'completion_function' methods
were prefixed with "rl_" sometime between 4.1 and 4.2.
> Hmm, I was just reading the code, trying to install the latest Magic
> on FreeBSD-4.11, and I noticed that Magic comes with its own copy
> of readline 4.3, so you shouldn't need to provide it yourself.
> Unfortunately, compiling on my system, it sees that I have readline
> installed (default with 4.11 I think), so it tries to use the system
> readline, but it's older, and missing rl_filename_completion_function,
> so the compile fails. Not a difficult to thing to fix, but still.
I've found that the following patchlet takes care of readline portability,
whether it's version 4.x or 5.x.
-------------% snip %--------------
-#ifdef READLINE_4_DOT_2_PLUS
+#if defined(READLINE_4_DOT_2_PLUS) || (RL_VERSION_MAJOR >= 5) || (RL_VERSION_MAJOR == 4 && RL_VERSION_MINOR >= 2)
#define filename_completion_function rl_filename_completion_function
#define username_completion_function rl_username_completion_function
#endif
-------------% snip %--------------
Incidentally, no problems with readline-5.0 so far.
David Fang
Computer Systems Laboratory
Electrical & Computer Engineering
Cornell University
http://www.csl.cornell.edu/~fang/ -- *gag* work in progress
More information about the magic-dev
mailing list