summaryrefslogtreecommitdiff
path: root/plugin/auth/dialog.c
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/auth/dialog.c')
-rw-r--r--plugin/auth/dialog.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/plugin/auth/dialog.c b/plugin/auth/dialog.c
index 49ab0c9a158..76b2ddae528 100644
--- a/plugin/auth/dialog.c
+++ b/plugin/auth/dialog.c
@@ -33,13 +33,16 @@
a correct password. It shows the situation when a number of questions
is not known in advance.
*/
-#define _GNU_SOURCE /* for RTLD_DEFAULT */
-
-#include <mysql/plugin_auth.h>
+#include <my_global.h>
#include <mysql/client_plugin.h>
+#include <mysql.h>
#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
+
+#if defined (_WIN32)
+# define RTLD_DEFAULT GetModuleHandle(NULL)
+#endif
+
+#include <mysql/plugin_auth.h>
/**
first byte of the question string is the question "type".
@@ -51,8 +54,6 @@
#define PASSWORD_QUESTION "\4"
#define LAST_PASSWORD "\5"
-typedef unsigned char uchar;
-
/********************* SERVER SIDE ****************************************/
/**
@@ -216,9 +217,6 @@ maria_declare_plugin_end;
dialog plugin will use it for communication with the user. Otherwise
a default gets() based implementation will be used.
*/
-#include <mysql.h>
-#include <dlfcn.h>
-
static mysql_authentication_dialog_ask_t ask;
static char *builtin_ask(MYSQL *mysql __attribute__((unused)),