@@ -196,6 +196,8 @@ void tee_putc(int c, FILE *file);
196196static void tee_print_sized_data (const char *, unsigned int , unsigned int , bool );
197197/* The names of functions that actually do the manipulation. */
198198static int get_options (int argc,char **argv);
199+ extern " C" my_bool get_one_option (int optid, const struct my_option *opt,
200+ char *argument);
199201static int com_quit (String *str,char *),
200202 com_go(String *str,char *), com_ego(String *str,char *),
201203 com_print(String *str,char *),
@@ -349,8 +351,8 @@ static ulong start_timer(void);
349351static void end_timer (ulong start_time,char *buff);
350352static void mysql_end_timer (ulong start_time,char *buff);
351353static void nice_time (double sec,char *buff,bool part_second);
352- static sig_handler mysql_end (int sig);
353- static sig_handler handle_sigint (int sig);
354+ extern " C " sig_handler mysql_end (int sig);
355+ extern " C " sig_handler handle_sigint (int sig);
354356
355357int main (int argc,char *argv[])
356358{
@@ -814,7 +816,7 @@ and you are welcome to modify and redistribute it under the GPL license\n");
814816}
815817
816818
817- static my_bool
819+ my_bool
818820get_one_option (int optid, const struct my_option *opt __attribute__ ((unused)),
819821 char *argument)
820822{
@@ -1427,7 +1429,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
14271429#ifdef HAVE_READLINE
14281430
14291431static char *new_command_generator (const char *text, int );
1430- static char **new_mysql_completion (const char *text, int start, int end);
1432+ extern " C " char **new_mysql_completion (const char *text, int start, int end);
14311433
14321434/*
14331435 Tell the GNU Readline library how to complete. We want to try to complete
@@ -1436,9 +1438,9 @@ static char **new_mysql_completion (const char *text, int start, int end);
14361438*/
14371439
14381440#if defined(USE_NEW_READLINE_INTERFACE) || defined(USE_LIBEDIT_INTERFACE)
1439- char *no_completion (const char *,int )
1441+ extern " C " char *no_completion (const char *,int )
14401442#else
1441- char *no_completion ()
1443+ extern " C " char *no_completion ()
14421444#endif
14431445{
14441446 return 0 ; /* No filename completion */
@@ -1540,9 +1542,9 @@ static void initialize_readline (char *name)
15401542 array of matches, or NULL if there aren't any.
15411543*/
15421544
1543- static char **new_mysql_completion (const char *text,
1544- int start __attribute__ ((unused)),
1545- int end __attribute__((unused)))
1545+ char **new_mysql_completion (const char *text,
1546+ int start __attribute__ ((unused)),
1547+ int end __attribute__((unused)))
15461548{
15471549 if (!status.batch && !quick)
15481550#if defined(USE_NEW_READLINE_INTERFACE)
0 commit comments