[Commits] Rev 3219: revert last change to plugin.h, as this broke windows build. in file:///H:/bzr/5.5/

Vladislav Vaintroub wlad at montyprogram.com
Wed Jan 18 19:58:00 EET 2012


At file:///H:/bzr/5.5/

------------------------------------------------------------
revno: 3219
revision-id: wlad at montyprogram.com-20120118175749-bv5mrnka1qgm1klq
parent: igor at askmonty.org-20120118083813-8ey87os6x8r52hzx
committer: Vladislav Vaintroub <wlad at montyprogram.com>
branch nick: 5.5
timestamp: Wed 2012-01-18 18:57:49 +0100
message:
  revert last change to plugin.h, as this broke windows build.
-------------- next part --------------
=== modified file 'include/mysql/plugin.h'
--- a/include/mysql/plugin.h	2012-01-13 14:50:02 +0000
+++ b/include/mysql/plugin.h	2012-01-18 17:57:49 +0000
@@ -24,17 +24,21 @@
   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 */
+  #ifdef __cplusplus
+    #define  MYSQL_PLUGIN_EXPORT extern "C"
+  #else
+    #define MYSQL_PLUGIN_EXPORT 
+  #endif
+#endif /*MYSQL_DYNAMIC_PLUGIN */
 #else /*_MSC_VER */
-  #ifdef __cplusplus
-    #define MYSQL_PLUGIN_EXPORT extern "C"
-  #else
-    #define MYSQL_PLUGIN_EXPORT
-  #endif
+#define MYSQL_PLUGIN_EXPORT
 #endif
 
 #ifdef __cplusplus
@@ -118,26 +122,20 @@
 struct st_mysql_plugin DECLS[]= {
 
 #define MARIA_DECLARE_PLUGIN__(NAME, VERSION, PSIZE, DECLS)                   \
-int VERSION= MARIA_PLUGIN_INTERFACE_VERSION;              \
-int PSIZE= sizeof(struct st_maria_plugin);                \
-struct st_maria_plugin DECLS[]= {
+MYSQL_PLUGIN_EXPORT int VERSION= MARIA_PLUGIN_INTERFACE_VERSION;              \
+MYSQL_PLUGIN_EXPORT int PSIZE= sizeof(struct st_maria_plugin);                \
+MYSQL_PLUGIN_EXPORT struct st_maria_plugin DECLS[]= {
 #else
 
 #define __MYSQL_DECLARE_PLUGIN(NAME, VERSION, PSIZE, DECLS)                   \
-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_[]= {
+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_;                      \
-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_[]= {
+#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_[]= {
 
 #endif
 



More information about the commits mailing list