Skip to content

readline 4.2 shows R has (fatal) incorrect declarations. (PR#913)

1 message · Brian Ripley

#
Specifically Solaris 2.7 and R 1.2.2 patched, but the principle is general.

src/unix/sys-unix.c declares the function tilde_expand from readline,
incorrectly for readline 4.x.  That's OK in 4.1 as it is not in the
included headers, but it is for 4.2, and so compilation fails (under gcc
2.95.3 at least).

The quick fix is (ca line 88)

char *tilde_expand(const char*);
                   ^^^^^

but we should really check the readline version number and only
define this in earlier versions.

There is also a conflict in src/unix/sys-std.c: readline_handler
is defined with unsigned char * but it should be char * according to the
readline 4.2 prototype.