summaryrefslogtreecommitdiff
path: root/include/mysql
diff options
context:
space:
mode:
authoracurtis@xiphis.org <>2006-04-13 13:49:29 -0700
committeracurtis@xiphis.org <>2006-04-13 13:49:29 -0700
commit4e11a4d94199c710b0c7d0bf547157c14c480f19 (patch)
tree7d7b722a3af9812d173de1c5398f625484467670 /include/mysql
parentb02463c15aea36ddcd5b4f7d0f5b4594b5c84f62 (diff)
downloadmariadb-git-4e11a4d94199c710b0c7d0bf547157c14c480f19.tar.gz
WL#3201
" Configure support for server plugins "
Diffstat (limited to 'include/mysql')
-rw-r--r--include/mysql/plugin.h21
1 files changed, 18 insertions, 3 deletions
diff --git a/include/mysql/plugin.h b/include/mysql/plugin.h
index a7b3606061f..2093043744a 100644
--- a/include/mysql/plugin.h
+++ b/include/mysql/plugin.h
@@ -37,10 +37,25 @@
be a st_mysql_plugin struct for each plugin to be declared.
*/
-#define mysql_declare_plugin \
-int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION; \
-int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin); \
+
+#ifndef MYSQL_DYNAMIC_PLUGIN
+#define __DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
+int VERSION= MYSQL_PLUGIN_INTERFACE_VERSION; \
+int PSIZE= sizeof(struct st_mysql_plugin); \
+struct st_mysql_plugin DECLS[]= {
+#else
+#define __DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS) \
+int _mysql_plugin_interface_version_= MYSQL_PLUGIN_INTERFACE_VERSION; \
+int _mysql_sizeof_struct_st_plugin_= sizeof(struct st_mysql_plugin); \
struct st_mysql_plugin _mysql_plugin_declarations_[]= {
+#endif
+
+#define _DECLARE_PLUGIN(NAME) \
+__DECLARE_PLUGIN(NAME, builtin_ ## NAME ## _plugin_interface_version, \
+ builtin_ ## NAME ## _sizeof_struct_st_plugin, \
+ builtin_ ## NAME ## _plugin)
+
+#define mysql_declare_plugin(NAME) _DECLARE_PLUGIN(NAME)
#define mysql_declare_plugin_end ,{0,0,0,0,0,0,0,0,0}}
/*