diff options
author | Monty <monty@mariadb.org> | 2020-05-15 11:50:59 +0300 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2020-05-15 15:20:42 +0300 |
commit | a7c4e85dd665fd5d3b7585833b68cb234901783b (patch) | |
tree | 59b4b4f665e94123c20146515454d55b5666f379 /client | |
parent | d49233caf696ba5896ff9119ca1a07039368ab23 (diff) | |
download | mariadb-git-a7c4e85dd665fd5d3b7585833b68cb234901783b.tar.gz |
Use history.h include file if readline is used
This allows us to remove our own declarations of functions and structures
that are declared in the history.h file.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index d5ab1a12c7a..2395f0055dc 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -91,6 +91,9 @@ extern "C" { #include <conio.h> #else #include <readline.h> +#if !defined(USE_LIBEDIT_INTERFACE) +#include <history.h> +#endif #define HAVE_READLINE #define USE_POPEN #endif @@ -1043,22 +1046,6 @@ static const char *embedded_server_groups[]= { "server", "embedded", "mysql_SERVER", "mariadb_SERVER", 0 }; #ifdef HAVE_READLINE -/* - HIST_ENTRY is defined for libedit, but not for the real readline - Need to redefine it for real readline to find it -*/ -#if !defined(HAVE_HIST_ENTRY) -typedef struct _hist_entry { - const char *line; - const char *data; -} HIST_ENTRY; -#endif - -extern "C" int add_history(const char *command); /* From readline directory */ -extern "C" int read_history(const char *command); -extern "C" int write_history(const char *command); -extern "C" HIST_ENTRY *history_get(int num); -extern "C" int history_length; static int not_in_history(const char *line); static void initialize_readline (); static void fix_history(String *final_command); |