diff options
author | Chong Lu <Chong.Lu@windriver.com> | 2014-04-03 07:52:22 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-04-04 11:53:51 +0100 |
commit | b996f22f8bed0c587392e33cc58c4b9c673ad50e (patch) | |
tree | 5cec994ab668f51e921038d7f9b0ab098c2266f1 /meta/recipes-devtools/python/python3/python3-fix-build-error-with-Readline-6.3.patch | |
parent | 69a88dabbe028fe6f2423b25ad985f84372f4584 (diff) | |
download | poky-b996f22f8bed0c587392e33cc58c4b9c673ad50e.tar.gz |
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 <Chong.Lu@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3/python3-fix-build-error-with-Readline-6.3.patch')
-rw-r--r-- | meta/recipes-devtools/python/python3/python3-fix-build-error-with-Readline-6.3.patch | 62 |
1 files changed, 62 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3/python3-fix-build-error-with-Readline-6.3.patch b/meta/recipes-devtools/python/python3/python3-fix-build-error-with-Readline-6.3.patch new file mode 100644 index 0000000000..44e2b7e5f1 --- /dev/null +++ b/meta/recipes-devtools/python/python3/python3-fix-build-error-with-Readline-6.3.patch | |||
@@ -0,0 +1,62 @@ | |||
1 | python3: fix build error with Readline 6.3 | ||
2 | |||
3 | Backport two patches from upstream: | ||
4 | |||
5 | use new readline function types (closes #20374) | ||
6 | Issue #20374: Avoid compiler warnings when compiling readline with libedit. | ||
7 | |||
8 | Upstream-Status: Backport | ||
9 | |||
10 | Signed-off-by: Chong Lu <Chong.Lu@windriver.com> | ||
11 | --- | ||
12 | Modules/readline.c | 15 ++++++++++++--- | ||
13 | 1 file changed, 12 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/Modules/readline.c b/Modules/readline.c | ||
16 | index 096c6d1..1646ef8 100644 | ||
17 | --- a/Modules/readline.c | ||
18 | +++ b/Modules/readline.c | ||
19 | @@ -773,15 +773,24 @@ on_hook(PyObject *func) | ||
20 | return result; | ||
21 | } | ||
22 | |||
23 | + | ||
24 | static int | ||
25 | +#if defined(_RL_FUNCTION_TYPEDEF) | ||
26 | on_startup_hook(void) | ||
27 | +#else | ||
28 | +on_startup_hook() | ||
29 | +#endif | ||
30 | { | ||
31 | return on_hook(startup_hook); | ||
32 | } | ||
33 | |||
34 | #ifdef HAVE_RL_PRE_INPUT_HOOK | ||
35 | static int | ||
36 | +#if defined(_RL_FUNCTION_TYPEDEF) | ||
37 | on_pre_input_hook(void) | ||
38 | +#else | ||
39 | +on_pre_input_hook() | ||
40 | +#endif | ||
41 | { | ||
42 | return on_hook(pre_input_hook); | ||
43 | } | ||
44 | @@ -936,12 +945,12 @@ setup_readline(void) | ||
45 | rl_bind_key_in_map ('\t', rl_complete, emacs_meta_keymap); | ||
46 | rl_bind_key_in_map ('\033', rl_complete, emacs_meta_keymap); | ||
47 | /* Set our hook functions */ | ||
48 | - rl_startup_hook = (Function *)on_startup_hook; | ||
49 | + rl_startup_hook = (rl_hook_func_t *)on_startup_hook; | ||
50 | #ifdef HAVE_RL_PRE_INPUT_HOOK | ||
51 | - rl_pre_input_hook = (Function *)on_pre_input_hook; | ||
52 | + rl_pre_input_hook = (rl_hook_func_t *)on_pre_input_hook; | ||
53 | #endif | ||
54 | /* Set our completion function */ | ||
55 | - rl_attempted_completion_function = (CPPFunction *)flex_complete; | ||
56 | + rl_attempted_completion_function = (rl_completion_func_t *)flex_complete; | ||
57 | /* Set Python word break characters */ | ||
58 | completer_word_break_characters = | ||
59 | rl_completer_word_break_characters = | ||
60 | -- | ||
61 | 1.7.9.5 | ||
62 | |||