summaryrefslogtreecommitdiffstats
path: root/package/python
diff options
context:
space:
mode:
authorIvan Sergeev <vsergeev@kumunetworks.com>2014-04-16 14:48:43 -0700
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2014-04-20 18:45:56 +0200
commitd4f4e01ace99a6d21ca79c556ca53bf12b0fdbd8 (patch)
tree128e8fb26b9c283bf997ed459704db2434e05a80 /package/python
parent286ee8001c092f9dab1634f778d70d1d8b5d591f (diff)
python: fix readline extension compilation with readline 6.3
Signed-off-by: Ivan Sergeev <vsergeev@kumunetworks.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/python')
-rw-r--r--package/python/python-013-fix-readline-6.3.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/package/python/python-013-fix-readline-6.3.patch b/package/python/python-013-fix-readline-6.3.patch
new file mode 100644
index 000000000..97ae45c82
--- /dev/null
+++ b/package/python/python-013-fix-readline-6.3.patch
@@ -0,0 +1,34 @@
+fix readline extension compilation against readline 6.3
+
+readline 6.3 removed some typedefs that had been deprecated for some time, but
+Python 2.7.6 still uses them and therefore fails to build the readline
+extension when it is enabled. This issue has been addressed in the Python bug
+tracker here: http://bugs.python.org/issue20374. The patch below is based on
+the readline_func_cast.patch patch uploaded there. Also see
+http://lists.gnu.org/archive/html/bug-readline/2014-03/msg00003.html for more
+information.
+
+This patch should be removed with the next Python 2.7 release, which should
+include the fix.
+
+Signed-off-by: Ivan Sergeev <vsergeev@kumunetworks.com>
+
+diff -purN python-2.7.6.orig/Modules/readline.c python-2.7.6/Modules/readline.c
+--- python-2.7.6.orig/Modules/readline.c 2014-04-16 13:40:17.566874715 -0700
++++ python-2.7.6/Modules/readline.c 2014-04-16 13:37:15.421231983 -0700
+@@ -911,12 +911,12 @@ setup_readline(void)
+ rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap);
+ rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap);
+ /* Set our hook functions */
+- rl_startup_hook = (Function *)on_startup_hook;
++ rl_startup_hook = on_startup_hook;
+ #ifdef HAVE_RL_PRE_INPUT_HOOK
+- rl_pre_input_hook = (Function *)on_pre_input_hook;
++ rl_pre_input_hook = on_pre_input_hook;
+ #endif
+ /* Set our completion function */
+- rl_attempted_completion_function = (CPPFunction *)flex_complete;
++ rl_attempted_completion_function = flex_complete;
+ /* Set Python word break characters */
+ completer_word_break_characters =
+ rl_completer_word_break_characters =