File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 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)
1919 return super ( func , headers )
2020end
2121
22+ def readline . have_type ( type )
23+ return super ( type , headers )
24+ end
25+
2226dir_config ( 'curses' )
2327dir_config ( 'ncurses' )
2428dir_config ( 'termcap' )
@@ -94,4 +98,11 @@ def readline.have_func(func)
9498readline . have_func ( "rl_redisplay" )
9599readline . have_func ( "rl_insert_text" )
96100readline . 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+
97108create_makefile ( "readline" )
Original file line number Diff line number Diff line change @@ -1974,7 +1974,7 @@ Init_readline()
19741974
19751975 rl_attempted_completion_function = readline_attempted_completion_function ;
19761976#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 ;
19781978#endif
19791979#ifdef HAVE_RL_CATCH_SIGNALS
19801980 rl_catch_signals = 0 ;
You can’t perform that action at this time.
0 commit comments