diff options
author | Sergei Golubchik <sergii@pisem.net> | 2011-12-12 13:00:33 +0100 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2011-12-12 13:00:33 +0100 |
commit | 745c53ec06794c4faaf0c9c3f9a1bf4ffc3f0759 (patch) | |
tree | 560abf8d5af4977dcacbce07a9502cb84d6bb003 /include | |
parent | 63d32c115dd962b53cf7bcaa340472ee2f44f9e2 (diff) | |
parent | 6404504d0c10d58ad5861bdb72edd54508f1364c (diff) | |
download | mariadb-git-745c53ec06794c4faaf0c9c3f9a1bf4ffc3f0759.tar.gz |
5.2->5.3 merge
Diffstat (limited to 'include')
-rw-r--r-- | include/my_global.h | 10 | ||||
-rw-r--r-- | include/mysql.h.pp | 1 | ||||
-rw-r--r-- | include/mysql/client_plugin.h | 8 | ||||
-rw-r--r-- | include/mysql/plugin.h | 32 | ||||
-rw-r--r-- | include/mysql_com.h | 1 |
5 files changed, 30 insertions, 22 deletions
diff --git a/include/my_global.h b/include/my_global.h index 475ae4b27e4..2fc6e413398 100644 --- a/include/my_global.h +++ b/include/my_global.h @@ -1555,18 +1555,20 @@ do { doubleget_union _tmp; \ #define NO_EMBEDDED_ACCESS_CHECKS #endif -#ifdef HAVE_DLOPEN -#if defined(__WIN__) +#if defined(_WIN32) #define dlsym(lib, name) GetProcAddress((HMODULE)lib, name) #define dlopen(libname, unused) LoadLibraryEx(libname, NULL, 0) #define dlclose(lib) FreeLibrary((HMODULE)lib) -#elif defined(HAVE_DLFCN_H) +#define HAVE_DLOPEN +#endif + +#ifdef HAVE_DLFCN_H #include <dlfcn.h> #endif + #ifndef HAVE_DLERROR #define dlerror() "" #endif -#endif /* FreeBSD 2.2.2 does not define RTLD_NOW) */ #ifndef RTLD_NOW diff --git a/include/mysql.h.pp b/include/mysql.h.pp index 780dbc9db3d..bb75af4554a 100644 --- a/include/mysql.h.pp +++ b/include/mysql.h.pp @@ -140,6 +140,7 @@ void get_salt_from_password(unsigned char *res, const char *password); void make_password_from_salt(char *to, const unsigned char *hash_stage2); char *octet2hex(char *to, const char *str, unsigned int len); char *get_tty_password(const char *opt_message); +void get_tty_password_buff(const char *opt_message, char *to, size_t length); const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); my_bool my_thread_init(void); void my_thread_end(void); diff --git a/include/mysql/client_plugin.h b/include/mysql/client_plugin.h index 33c63b9df33..f463277c530 100644 --- a/include/mysql/client_plugin.h +++ b/include/mysql/client_plugin.h @@ -28,9 +28,7 @@ #include <stdlib.h> #endif -#ifdef MYSQL_PLUGIN_EXPORT #undef MYSQL_PLUGIN_EXPORT -#endif #if defined(_MSC_VER) #ifdef __cplusplus #define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport) @@ -38,7 +36,11 @@ #define MYSQL_PLUGIN_EXPORT __declspec(dllexport) #endif #else /*_MSC_VER */ -#define MYSQL_PLUGIN_EXPORT + #ifdef __cplusplus + #define MYSQL_PLUGIN_EXPORT extern "C" + #else + #define MYSQL_PLUGIN_EXPORT + #endif #endif /* known plugin types */ diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h index 5afc80e160b..d7189ff30b7 100644 --- a/include/mysql/plugin.h +++ b/include/mysql/plugin.h @@ -25,21 +25,17 @@ for functions. */ #if defined(_MSC_VER) -#if defined(MYSQL_DYNAMIC_PLUGIN) #ifdef __cplusplus #define MYSQL_PLUGIN_EXPORT extern "C" __declspec(dllexport) #else #define MYSQL_PLUGIN_EXPORT __declspec(dllexport) #endif -#else /* MYSQL_DYNAMIC_PLUGIN */ +#else /*_MSC_VER */ #ifdef __cplusplus - #define MYSQL_PLUGIN_EXPORT extern "C" + #define MYSQL_PLUGIN_EXPORT extern "C" #else - #define MYSQL_PLUGIN_EXPORT + #define MYSQL_PLUGIN_EXPORT #endif -#endif /*MYSQL_DYNAMIC_PLUGIN */ -#else /*_MSC_VER */ -#define MYSQL_PLUGIN_EXPORT #endif #ifdef __cplusplus @@ -129,14 +125,20 @@ struct st_maria_plugin DECLS[]= { #else #define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \ -MYSQL_PLUGIN_EXPORT int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION; \ -MYSQL_PLUGIN_EXPORT int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin); \ -MYSQL_PLUGIN_EXPORT struct st_mysql_plugin _mysql_plugin_declarations_[]= { - -#define MARIA_DECLARE_PLUGIN__(NAME, VERSION, PSIZE, DECLS) \ -MYSQL_PLUGIN_EXPORT int _maria_plugin_interface_version_= MARIA_PLUGIN_INTERFACE_VERSION; \ -MYSQL_PLUGIN_EXPORT int _maria_sizeof_struct_st_plugin_= sizeof(struct st_maria_plugin); \ -MYSQL_PLUGIN_EXPORT struct st_maria_plugin _maria_plugin_declarations_[]= { +MYSQL_PLUGIN_EXPORT int _mysql_plugin_interface_version_; \ +int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION; \ +MYSQL_PLUGIN_EXPORT int _mysql_sizeof_struct_st_plugin_; \ +int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin); \ +MYSQL_PLUGIN_EXPORT struct st_mysql_plugin _mysql_plugin_declarations_[]; \ +struct st_mysql_plugin _mysql_plugin_declarations_[]= { + +#define MARIA_DECLARE_PLUGIN__(NAME, VERSION, PSIZE, DECLS) \ +MYSQL_PLUGIN_EXPORT int _maria_plugin_interface_version_; \ +int _maria_plugin_interface_version_= MARIA_PLUGIN_INTERFACE_VERSION; \ +MYSQL_PLUGIN_EXPORT int _maria_sizeof_struct_st_plugin_; \ +int _maria_sizeof_struct_st_plugin_= sizeof(struct st_maria_plugin); \ +MYSQL_PLUGIN_EXPORT struct st_maria_plugin _maria_plugin_declarations_[]; \ +struct st_maria_plugin _maria_plugin_declarations_[]= { #endif diff --git a/include/mysql_com.h b/include/mysql_com.h index 81e0f4abaf6..d811b79889b 100644 --- a/include/mysql_com.h +++ b/include/mysql_com.h @@ -524,6 +524,7 @@ char *octet2hex(char *to, const char *str, unsigned int len); /* end of password.c */ char *get_tty_password(const char *opt_message); +void get_tty_password_buff(const char *opt_message, char *to, size_t length); const char *mysql_errno_to_sqlstate(unsigned int mysql_errno); /* Some other useful functions */ |