mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 15:15:34 +02:00
mysql.cc has to support older readline to compile on FreeBSD :((
This commit is contained in:
parent
c6ce7b3fbe
commit
0c417889d9
1 changed files with 9 additions and 1 deletions
|
|
@ -1070,9 +1070,13 @@ static void initialize_readline (char *name)
|
||||||
rl_readline_name = name;
|
rl_readline_name = name;
|
||||||
|
|
||||||
/* Tell the completer that we want a crack first. */
|
/* Tell the completer that we want a crack first. */
|
||||||
/* rl_attempted_completion_function = (CPPFunction *)mysql_completion;*/
|
#if RL_READLINE_VERSION > 0x0400
|
||||||
rl_attempted_completion_function = &new_mysql_completion;
|
rl_attempted_completion_function = &new_mysql_completion;
|
||||||
rl_completion_entry_function= &no_completion;
|
rl_completion_entry_function= &no_completion;
|
||||||
|
#else
|
||||||
|
rl_attempted_completion_function =(CPPFunction *)new_mysql_completion;
|
||||||
|
rl_completion_entry_function= (Function *)no_completion;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
@ -1087,7 +1091,11 @@ static char **new_mysql_completion (const char *text,
|
||||||
int end __attribute__((unused)))
|
int end __attribute__((unused)))
|
||||||
{
|
{
|
||||||
if (!status.batch && !quick)
|
if (!status.batch && !quick)
|
||||||
|
#if RL_READLINE_VERSION > 0x0400
|
||||||
return rl_completion_matches(text, new_command_generator);
|
return rl_completion_matches(text, new_command_generator);
|
||||||
|
#else
|
||||||
|
return completion_matches((char *)text, (CPFunction *)new_command_generator);
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
return (char**) 0;
|
return (char**) 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue