#At file:///home/hf/work/mysql_common/dst/
2759 Alexey Botchkov 2008-11-28
Bug#41103 6.0 Windows embedded-server tests fail
to be exported correctly from the DLL, data
has to be declared as __declspec(dllimport)
for the client, and as DATA in the .def file.
per-file comments:
include/m_string.h
Bug#41103 6.0 Windows embedded-server tests fail
__declspec(dllimport) added for Windows
include/my_global.h
Bug#41103 6.0 Windows embedded-server tests fail
__declspec(dllimport) added for Windows
include/my_sys.h
Bug#41103 6.0 Windows embedded-server tests fail
__declspec(dllimport) added for Windows
libmysql/libmysql.def
Bug#41103 6.0 Windows embedded-server tests fail
DATA modifiers added
libmysqld/examples/CMakeLists.txt
Bug#41103 6.0 Windows embedded-server tests fail
MY_USE_CLIENT_DLL defined for projects
libmysqld/libmysqld.def
Bug#41103 6.0 Windows embedded-server tests fail
DATA modifiers added
modified:
include/m_string.h
include/my_global.h
include/my_sys.h
libmysql/libmysql.def
libmysqld/examples/CMakeLists.txt
libmysqld/libmysqld.def
=== modified file 'include/m_string.h'
--- a/include/m_string.h 2008-06-26 18:29:30 +0000
+++ b/include/m_string.h 2008-11-28 14:50:36 +0000
@@ -89,8 +89,8 @@ extern char *stpcpy(char *, const char *
#endif
/* Declared in int2str() */
-extern char NEAR _dig_vec_upper[];
-extern char NEAR _dig_vec_lower[];
+MY_DLLEXPORT char NEAR _dig_vec_upper[];
+MY_DLLEXPORT char NEAR _dig_vec_lower[];
#ifdef BAD_STRING_COMPILER
#define strmov(A,B) (memccpy(A,B,0,INT_MAX)-1)
=== modified file 'include/my_global.h'
--- a/include/my_global.h 2008-11-19 10:04:44 +0000
+++ b/include/my_global.h 2008-11-28 14:50:36 +0000
@@ -1615,4 +1615,10 @@ inline void operator delete[](void*, vo
# define __func__ "<unknown>"
#endif
+#ifdef MY_USE_CLIENT_DLL
+#define MY_DLLEXPORT __declspec(dllimport)
+#else
+#define MY_DLLEXPORT extern
+#endif /*MY_USE_CLIENT_DLL*/
+
#endif /* my_global_h */
=== modified file 'include/my_sys.h'
--- a/include/my_sys.h 2008-10-20 19:13:22 +0000
+++ b/include/my_sys.h 2008-11-28 14:50:36 +0000
@@ -218,7 +218,7 @@ extern int errno; /* declare errno */
#endif /* #ifndef errno */
extern char NEAR errbuff[NRERRBUFFS][ERRMSGSIZE];
extern char *home_dir; /* Home directory for user */
-extern const char *my_progname; /* program-name (printed in errors) */
+MY_DLLEXPORT const char *my_progname; /* program-name (printed in errors) */
extern const char *my_progname_short; /* like above but without directory */
extern char NEAR curr_dir[]; /* Current directory for user */
extern void (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
=== modified file 'libmysql/libmysql.def'
--- a/libmysql/libmysql.def 2008-08-11 10:03:45 +0000
+++ b/libmysql/libmysql.def 2008-11-28 14:50:36 +0000
@@ -1,8 +1,9 @@
LIBRARY LIBMYSQL
VERSION 6.0
EXPORTS
- _dig_vec_lower
- _dig_vec_upper
+ _dig_vec_lower DATA
+ _dig_vec_upper DATA
+ my_progname DATA
bmove_upp
delete_dynamic
free_defaults
=== modified file 'libmysqld/examples/CMakeLists.txt'
--- a/libmysqld/examples/CMakeLists.txt 2008-11-19 12:11:30 +0000
+++ b/libmysqld/examples/CMakeLists.txt 2008-11-28 14:50:36 +0000
@@ -24,7 +24,7 @@ IF(WIN32)
ADD_DEFINITIONS(-DUSE_TLS)
ENDIF(WIN32)
-ADD_DEFINITIONS(-DEMBEDDED_LIBRARY)
+ADD_DEFINITIONS(-DMY_USE_CLIENT_DLL)
ADD_EXECUTABLE(mysql_embedded ../../client/completion_hash.cc
../../client/mysql.cc ../../client/readline.cc
=== modified file 'libmysqld/libmysqld.def'
--- a/libmysqld/libmysqld.def 2008-11-26 11:54:39 +0000
+++ b/libmysqld/libmysqld.def 2008-11-28 14:50:36 +0000
@@ -63,8 +63,8 @@ EXPORTS
my_dir
my_micro_time
find_type_or_exit
- _dig_vec_upper
- _dig_vec_lower
+ _dig_vec_upper DATA
+ _dig_vec_lower DATA
bmove_upp
delete_dynamic
free_defaults
@@ -179,7 +179,7 @@ EXPORTS
disabled_my_option
my_charset_latin1
init_alloc_root
- my_progname
+ my_progname DATA
get_charset_name
get_charset_by_csname
print_defaults