Commit 269ab56f authored by Sergei Golubchik's avatar Sergei Golubchik

small plugin API related fixes

* define MYSQL_DYNAMIC_PLUGIN only for server plugins
* don't typedef my_bool in mysql.h if plugin.h has already done it
* fix the include guard in plugin.h
parent 227f63db
......@@ -186,8 +186,11 @@ MACRO(MYSQL_ADD_PLUGIN)
ADD_LIBRARY(${target} MODULE ${SOURCES})
DTRACE_INSTRUMENT(${target})
SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX ""
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN")
SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX "")
IF (NOT ARG_CLIENT)
SET_TARGET_PROPERTIES (${target} PROPERTIES
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN")
ENDIF()
TARGET_LINK_LIBRARIES (${target} mysqlservices ${ARG_LINK_LIBRARIES})
......
......@@ -48,7 +48,11 @@ extern "C" {
#ifndef MYSQL_ABI_CHECK
#include <sys/types.h>
#endif
#ifndef MYSQL_PLUGIN_INCLUDED
typedef char my_bool;
#endif
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
#define __WIN__
#endif
......
......@@ -14,8 +14,8 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
#ifndef _my_plugin_h
#define _my_plugin_h
#ifndef MYSQL_PLUGIN_INCLUDED
#define MYSQL_PLUGIN_INCLUDED
/*
On Windows, exports from DLL need to be declared
......
......@@ -217,7 +217,7 @@ void get_tty_password_buff(const char *opt_message, char *buff, size_t buflen)
}
#endif /*__WIN__*/
#ifndef MYSQL_DYNAMIC_PLUGIN
#ifndef NO_GET_TTY_PASSWORD
char *get_tty_password(const char *opt_message)
{
char buff[80];
......
......@@ -14,5 +14,6 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
ADD_DEFINITIONS(-DNO_GET_TTY_PASSWORD)
MYSQL_ADD_PLUGIN(dialog dialog.c ${CMAKE_SOURCE_DIR}/libmysql/get_password.c
MODULE_ONLY CLIENT COMPONENT ClientPlugins)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment