diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-10-21 23:07:13 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-10-21 23:07:13 +0200 |
commit | aeaa112edbf40f17c7978642539443544241185d (patch) | |
tree | 97faebc5269e23af60a451907271bfa11643f353 /plugin | |
parent | b3223453f7e4398ff0f55471ac7dc4aecf2caf8d (diff) | |
download | mariadb-git-aeaa112edbf40f17c7978642539443544241185d.tar.gz |
fixes for windows
Diffstat (limited to 'plugin')
-rw-r--r-- | plugin/auth_dialog/dialog.c | 28 | ||||
-rw-r--r-- | plugin/semisync/semisync_master.cc | 9 | ||||
-rw-r--r-- | plugin/win_auth_client/CMakeLists.txt | 2 |
3 files changed, 7 insertions, 32 deletions
diff --git a/plugin/auth_dialog/dialog.c b/plugin/auth_dialog/dialog.c index 48e9c4a3882..9f974f6898f 100644 --- a/plugin/auth_dialog/dialog.c +++ b/plugin/auth_dialog/dialog.c @@ -24,31 +24,15 @@ asks the user the question, as provided by the server and reports the answer back to the server. No encryption is involved, the answers are sent in clear text. - - Two examples are provided: two_questions server plugin, that asks - the password and an "Are you sure?" question with a reply "yes, of course". - It demonstrates the usage of "password" (input is hidden) and "ordinary" - (input can be echoed) questions, and how to mark the last question, - to avoid an extra roundtrip. - - And three_attempts plugin that gives the user three attempts to enter - a correct password. It shows the situation when a number of questions - is not known in advance. */ -#if defined (WIN32) && !defined (RTLD_DEFAULT) -# define RTLD_DEFAULT GetModuleHandle(NULL) -#endif - -#if !defined (_GNU_SOURCE) -# define _GNU_SOURCE /* for RTLD_DEFAULT */ -#endif - +#include <my_global.h> #include <mysql/client_plugin.h> -#include <string.h> -#include <stdio.h> -#include <stdlib.h> #include <mysql.h> -#include <dlfcn.h> +#include <string.h> + +#if defined (_WIN32) +# define RTLD_DEFAULT GetModuleHandle(NULL) +#endif /* This plugin performs a dialog with the user, asking questions and diff --git a/plugin/semisync/semisync_master.cc b/plugin/semisync/semisync_master.cc index 2701c575b7a..bfdea128e68 100644 --- a/plugin/semisync/semisync_master.cc +++ b/plugin/semisync/semisync_master.cc @@ -47,11 +47,7 @@ static int getWaitTime(const struct timespec& start_ts); static unsigned long long timespec_to_usec(const struct timespec *ts) { -#ifndef __WIN__ return (unsigned long long) ts->tv_sec * TIME_MILLION + ts->tv_nsec / TIME_THOUSAND; -#else - return ts->tv.i64 / 10; -#endif /* __WIN__ */ } /******************************************************************************* @@ -678,10 +674,6 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name, } /* Calcuate the waiting period. */ -#ifdef __WIN__ - abstime.tv.i64 = start_ts.tv.i64 + (__int64)wait_timeout_ * TIME_THOUSAND * 10; - abstime.max_timeout_msec= (long)wait_timeout_; -#else unsigned long long diff_nsecs = start_ts.tv_nsec + (unsigned long long)wait_timeout_ * TIME_MILLION; abstime.tv_sec = start_ts.tv_sec; @@ -691,7 +683,6 @@ int ReplSemiSyncMaster::commitTrx(const char* trx_wait_binlog_name, diff_nsecs -= TIME_BILLION; } abstime.tv_nsec = diff_nsecs; -#endif /* __WIN__ */ /* In semi-synchronous replication, we wait until the binlog-dump * thread has received the reply on the relevant binlog segment from the diff --git a/plugin/win_auth_client/CMakeLists.txt b/plugin/win_auth_client/CMakeLists.txt index 4541e23e94c..1e65673adbd 100644 --- a/plugin/win_auth_client/CMakeLists.txt +++ b/plugin/win_auth_client/CMakeLists.txt @@ -28,7 +28,7 @@ IF(WIN32) log_client.cc common.cc handshake.cc) MYSQL_ADD_PLUGIN(authentication_windows_client ${PLUGIN_SOURCES} ${HEADERS} - LINK_LIBRARUES Secur32 + LINK_LIBRARIES Secur32 MODULE_ONLY) ENDIF(WIN32) |