From b1a2e92c98487c60571f331154aa266d173c2c17 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 27 Feb 2014 17:04:43 +0100 Subject: [PATCH] newlisp: fix build with readline>=6.3. --- .../newlisp/patches/readline-6.3-compat.patch | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 srcpkgs/newlisp/patches/readline-6.3-compat.patch diff --git a/srcpkgs/newlisp/patches/readline-6.3-compat.patch b/srcpkgs/newlisp/patches/readline-6.3-compat.patch new file mode 100644 index 0000000000..5ed8a50d26 --- /dev/null +++ b/srcpkgs/newlisp/patches/readline-6.3-compat.patch @@ -0,0 +1,45 @@ +--- newlisp.c.orig 2014-02-27 16:58:59.139505509 +0100 ++++ newlisp.c 2014-02-27 17:03:18.657517089 +0100 +@@ -129,7 +129,7 @@ char preLoad[] = + "(set (global 'module) (fn ($x) (load (append (env {NEWLISPDIR}) {/modules/} $x))))"; + void printHelpText(void); + #ifdef READLINE +-char ** newlisp_completion (char * text, int start, int end); ++char ** newlisp_completion (const char * text, int start, int end); + #endif + /* --------------------- globals -------------------------------------- */ + +@@ -885,7 +885,7 @@ if(errorReg && !isNil((CELL*)errorEvent- + + #ifdef READLINE + rl_readline_name = "newlisp"; +-rl_attempted_completion_function = (CPPFunction *)newlisp_completion; ++rl_attempted_completion_function = newlisp_completion; + #if defined(LINUX) || defined(_BSD) + /* in Bash .inputrc put 'set blink-matching-paren on' */ + rl_set_paren_blink_timeout(300000); /* 300 ms */ +@@ -940,7 +940,7 @@ return 0; + #endif + + #ifdef READLINE +-char * command_generator(char * text, int state) ++char * command_generator(const char * text, int state) + { + static int list_index, len, clen; + char * name; +@@ -968,12 +968,12 @@ return ((char *)NULL); + #ifdef _BSD + extern char **completion_matches PARAMS((char *, rl_compentry_func_t *)); + #else +-char ** completion_matches(const char * text, CPFunction commands); ++char ** completion_matches(const char * text, rl_compentry_func_t commands); + #endif + +-char ** newlisp_completion (char * text, int start, int end) ++char ** newlisp_completion (const char * text, int start, int end) + { +-return(completion_matches(text, (CPFunction *)command_generator)); ++return(completion_matches(text, command_generator)); + } + #endif /* READLINE */ +