File tree 2 files changed +12
-1
lines changed
2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,10 @@ def readline.have_func(func)
19
19
return super ( func , headers )
20
20
end
21
21
22
+ def readline . have_type ( type )
23
+ return super ( type , headers )
24
+ end
25
+
22
26
dir_config ( 'curses' )
23
27
dir_config ( 'ncurses' )
24
28
dir_config ( 'termcap' )
@@ -94,4 +98,11 @@ def readline.have_func(func)
94
98
readline . have_func ( "rl_redisplay" )
95
99
readline . have_func ( "rl_insert_text" )
96
100
readline . have_func ( "rl_delete_text" )
101
+ unless readline . have_type ( "rl_hook_func_t*" )
102
+ # rl_hook_func_t is available since readline-4.2 (2001).
103
+ # Function is removed at readline-6.3 (2014).
104
+ # However, editline (NetBSD 6.1.3, 2014) doesn't have rl_hook_func_t.
105
+ $defs << "-Drl_hook_func_t=Function"
106
+ end
107
+
97
108
create_makefile ( "readline" )
Original file line number Diff line number Diff line change @@ -1974,7 +1974,7 @@ Init_readline()
1974
1974
1975
1975
rl_attempted_completion_function = readline_attempted_completion_function ;
1976
1976
#if defined(HAVE_RL_PRE_INPUT_HOOK )
1977
- rl_pre_input_hook = (Function * )readline_pre_input_hook ;
1977
+ rl_pre_input_hook = (rl_hook_func_t * )readline_pre_input_hook ;
1978
1978
#endif
1979
1979
#ifdef HAVE_RL_CATCH_SIGNALS
1980
1980
rl_catch_signals = 0 ;
You can’t perform that action at this time.
0 commit comments