diff options
author | Vladislav Vaintroub <wlad@mariadb.com> | 2019-06-28 15:53:49 +0200 |
---|---|---|
committer | Vladislav Vaintroub <wlad@mariadb.com> | 2019-06-30 17:48:19 +0200 |
commit | db80f047512719311dd6e8ca0dece78094034b40 (patch) | |
tree | 65e1dd37155835a3e4561cfdae2f59d5f104870a | |
parent | 6dc71d4f1060ac50fb5d48daa7424039c4e8f9df (diff) | |
download | mariadb-git-db80f047512719311dd6e8ca0dece78094034b40.tar.gz |
Cleanup - do not dllexport statically built plugins
-rw-r--r-- | client/mysql.cc | 5 | ||||
-rw-r--r-- | client/mysqltest.cc | 5 | ||||
-rw-r--r-- | include/mysql/plugin.h | 22 |
3 files changed, 20 insertions, 12 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 47ab7644a50..c334e16fa20 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -4636,7 +4636,10 @@ static char *get_arg(char *line, get_arg_mode mode) string, and the "dialog" plugin will free() it. */ -MYSQL_PLUGIN_EXPORT +extern "C" +#ifdef _MSC_VER +__declspec(dllexport) +#endif char *mysql_authentication_dialog_ask(MYSQL *mysql, int type, const char *prompt, char *buf, int buf_len) diff --git a/client/mysqltest.cc b/client/mysqltest.cc index 577c6fb5080..c430892900e 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -11282,7 +11282,10 @@ static int setenv(const char *name, const char *value, int overwrite) that always reads from stdin with explicit echo. */ -MYSQL_PLUGIN_EXPORT +extern "C" +#ifdef _MSC_VER +__declspec(dllexport) +#endif char *mysql_authentication_dialog_ask(MYSQL *mysql, int type, const char *prompt, char *buf, int buf_len) diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 922edca1a3a..42a95e25697 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -23,18 +23,20 @@ unlike other compilers, uses C++ mangling for variables not only for functions. */ -#if defined(_MSC_VER) - #ifdef __cplusplus - #define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport) +#ifdef MYSQL_DYNAMIC_PLUGIN + #ifdef _MSC_VER + #define MYSQL_DLLEXPORT _declspec(dllexport) #else - #define MYSQL_PLUGIN_EXPORT __declspec(dllexport) - #endif -#else /*_MSC_VER */ - #ifdef __cplusplus - #define MYSQL_PLUGIN_EXPORT extern "C" - #else - #define MYSQL_PLUGIN_EXPORT + #define MYSQL_DLLEXPORT #endif +#else + #define MYSQL_DLLEXPORT +#endif + +#ifdef __cplusplus + #define MYSQL_PLUGIN_EXPORT extern "C" MYSQL_DLLEXPORT +#else + #define MYSQL_PLUGIN_EXPORT MYSQL_DLLEXPORT #endif #ifdef __cplusplus |