stages: 2/02-squashfs: apply some patches from Debian to make the ISO more reliable
[dragora.git] / patches / clisp / clisp-2.49-readline7_fixes-1.patch
blobfbf828651bf51834bc78e43e7c3099556059b14b
1 Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
2 Date: 2017-07-14
3 Initial Package Version: 2.49
4 Upstream Status: Applied
5 Origin: Upstream
6 Description: Fixes build with readline-7 IFF libffcall is used.
8 diff -r 5f425363afa9 modules/readline/readline.lisp
9 --- a/modules/readline/readline.lisp Sun Feb 26 12:00:08 2017 +0100
10 +++ b/modules/readline/readline.lisp Sun Feb 26 12:06:00 2017 +0100
11 @@ -59,6 +59,14 @@
12 (def-c-type readline-vcpfunc (c-function (:arguments (text c-string))))
13 (def-c-type keymap c-pointer)
15 +(c-lines "#if RL_VERSION_MAJOR >= 7
16 +typedef unsigned long rl_readline_state_t;
17 +#else
18 +typedef int rl_readline_state_t;
19 +#endif~%")
20 +(c-lines "#define HAVE_RL_READLINE_STATE_T 1~%")
21 +(def-c-type rl_readline_state_t)
23 ;;; Basic behavior
24 (def-call-out readline (:name "readline")
25 (:documentation
26 @@ -432,7 +443,7 @@
27 "The version of this incarnation of the readline library, e.g., 0x0402."))
28 (def-c-var gnu-readline-p (:name "rl_gnu_readline_p") (:type int)
29 (:documentation "True if this is real GNU readline."))
30 -(def-c-var readline-state (:name "rl_readline_state") (:type int)
31 +(def-c-var readline-state (:name "rl_readline_state") (:type rl_readline_state_t)
32 (:documentation "Flags word encapsulating the current readline state."))
33 (def-c-var editing-mode (:name "rl_editing_mode") (:type int)
34 (:documentation "Says which editing mode readline is currently using.