clisp-2.49-readline7_fixes-1.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435
  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.
  7. diff -r 5f425363afa9 modules/readline/readline.lisp
  8. --- a/modules/readline/readline.lisp Sun Feb 26 12:00:08 2017 +0100
  9. +++ b/modules/readline/readline.lisp Sun Feb 26 12:06:00 2017 +0100
  10. @@ -59,6 +59,14 @@
  11. (def-c-type readline-vcpfunc (c-function (:arguments (text c-string))))
  12. (def-c-type keymap c-pointer)
  13. +(c-lines "#if RL_VERSION_MAJOR >= 7
  14. +typedef unsigned long rl_readline_state_t;
  15. +#else
  16. +typedef int rl_readline_state_t;
  17. +#endif~%")
  18. +(c-lines "#define HAVE_RL_READLINE_STATE_T 1~%")
  19. +(def-c-type rl_readline_state_t)
  20. +
  21. ;;; Basic behavior
  22. (def-call-out readline (:name "readline")
  23. (:documentation
  24. @@ -432,7 +443,7 @@
  25. "The version of this incarnation of the readline library, e.g., 0x0402."))
  26. (def-c-var gnu-readline-p (:name "rl_gnu_readline_p") (:type int)
  27. (:documentation "True if this is real GNU readline."))
  28. -(def-c-var readline-state (:name "rl_readline_state") (:type int)
  29. +(def-c-var readline-state (:name "rl_readline_state") (:type rl_readline_state_t)
  30. (:documentation "Flags word encapsulating the current readline state."))
  31. (def-c-var editing-mode (:name "rl_editing_mode") (:type int)
  32. (:documentation "Says which editing mode readline is currently using.