From b996f22f8bed0c587392e33cc58c4b9c673ad50e Mon Sep 17 00:00:00 2001 From: Chong Lu Date: Thu, 3 Apr 2014 07:52:22 +0000 Subject: python: fix build error with Readline 6.3 Backport two patches from upstream: use new readline function types (closes #20374) Issue #20374: Avoid compiler warnings when compiling readline with libedit. [YOCTO #6107] (From OE-Core rev: a6b91ae7dec2edebc0eaea0592c42b1c455ad4d7) Signed-off-by: Chong Lu Signed-off-by: Saul Wold Signed-off-by: Richard Purdie --- .../python-fix-build-error-with-Readline-6.3.patch | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch (limited to 'meta/recipes-devtools/python/python') diff --git a/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch b/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch new file mode 100644 index 0000000000..b84f8c3461 --- /dev/null +++ b/meta/recipes-devtools/python/python/python-fix-build-error-with-Readline-6.3.patch @@ -0,0 +1,62 @@ +python: fix build error with Readline 6.3 + +Backport two patches from upstream: + +use new readline function types (closes #20374) +Issue #20374: Avoid compiler warnings when compiling readline with libedit. + +Upstream-Status: Backport + +Signed-off-by: Chong Lu +--- + Modules/readline.c | 15 ++++++++++++--- + 1 file changed, 12 insertions(+), 3 deletions(-) + +diff --git a/Modules/readline.c b/Modules/readline.c +index b5e258d..d3f52aa 100644 +--- a/Modules/readline.c ++++ b/Modules/readline.c +@@ -735,15 +735,24 @@ on_hook(PyObject *func) + return result; + } + ++ + static int ++#if defined(_RL_FUNCTION_TYPEDEF) + on_startup_hook(void) ++#else ++on_startup_hook() ++#endif + { + return on_hook(startup_hook); + } + + #ifdef HAVE_RL_PRE_INPUT_HOOK + static int ++#if defined(_RL_FUNCTION_TYPEDEF) + on_pre_input_hook(void) ++#else ++on_pre_input_hook() ++#endif + { + return on_hook(pre_input_hook); + } +@@ -886,12 +895,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 = (rl_hook_func_t *)on_startup_hook; + #ifdef HAVE_RL_PRE_INPUT_HOOK +- rl_pre_input_hook = (Function *)on_pre_input_hook; ++ rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook; + #endif + /* Set our completion function */ +- rl_attempted_completion_function = (CPPFunction *)flex_complete; ++ rl_attempted_completion_function = (rl_completion_func_t *)flex_complete; + /* Set Python word break characters */ + rl_completer_word_break_characters = + strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?"); +-- +1.7.9.5 + -- cgit v1.2.3-54-g00ecf