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
This commit is contained in:
parent
227f63db3b
commit
269ab56f8b
@ -186,8 +186,11 @@ MACRO(MYSQL_ADD_PLUGIN)
|
|||||||
ADD_LIBRARY(${target} MODULE ${SOURCES})
|
ADD_LIBRARY(${target} MODULE ${SOURCES})
|
||||||
DTRACE_INSTRUMENT(${target})
|
DTRACE_INSTRUMENT(${target})
|
||||||
|
|
||||||
SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX ""
|
SET_TARGET_PROPERTIES (${target} PROPERTIES PREFIX "")
|
||||||
|
IF (NOT ARG_CLIENT)
|
||||||
|
SET_TARGET_PROPERTIES (${target} PROPERTIES
|
||||||
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN")
|
COMPILE_DEFINITIONS "MYSQL_DYNAMIC_PLUGIN")
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
TARGET_LINK_LIBRARIES (${target} mysqlservices ${ARG_LINK_LIBRARIES})
|
TARGET_LINK_LIBRARIES (${target} mysqlservices ${ARG_LINK_LIBRARIES})
|
||||||
|
|
||||||
|
@ -48,7 +48,11 @@ extern "C" {
|
|||||||
#ifndef MYSQL_ABI_CHECK
|
#ifndef MYSQL_ABI_CHECK
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef MYSQL_PLUGIN_INCLUDED
|
||||||
typedef char my_bool;
|
typedef char my_bool;
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
|
#if (defined(_WIN32) || defined(_WIN64)) && !defined(__WIN__)
|
||||||
#define __WIN__
|
#define __WIN__
|
||||||
#endif
|
#endif
|
||||||
|
@ -14,8 +14,8 @@
|
|||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
|
||||||
|
|
||||||
#ifndef _my_plugin_h
|
#ifndef MYSQL_PLUGIN_INCLUDED
|
||||||
#define _my_plugin_h
|
#define MYSQL_PLUGIN_INCLUDED
|
||||||
|
|
||||||
/*
|
/*
|
||||||
On Windows, exports from DLL need to be declared
|
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__*/
|
#endif /*__WIN__*/
|
||||||
|
|
||||||
#ifndef MYSQL_DYNAMIC_PLUGIN
|
#ifndef NO_GET_TTY_PASSWORD
|
||||||
char *get_tty_password(const char *opt_message)
|
char *get_tty_password(const char *opt_message)
|
||||||
{
|
{
|
||||||
char buff[80];
|
char buff[80];
|
||||||
|
@ -14,5 +14,6 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
# 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
|
MYSQL_ADD_PLUGIN(dialog dialog.c ${CMAKE_SOURCE_DIR}/libmysql/get_password.c
|
||||||
MODULE_ONLY CLIENT COMPONENT ClientPlugins)
|
MODULE_ONLY CLIENT COMPONENT ClientPlugins)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user