提交 4d97fb66 authored 作者: Michael Jerris's avatar Michael Jerris

fix windows build breakage from svn rev 11084

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11085 d0543943-73ff-0310-b7d9-9358b9ac24b2
上级 2549501c
...@@ -30,10 +30,10 @@ typedef void * switch_dso_lib_t; ...@@ -30,10 +30,10 @@ typedef void * switch_dso_lib_t;
typedef void * switch_dso_data_t; typedef void * switch_dso_data_t;
void switch_dso_destroy(switch_dso_lib_t *lib); SWITCH_DECLARE(void) switch_dso_destroy(switch_dso_lib_t *lib);
switch_dso_lib_t switch_dso_open(const char *path, int global, char **err); SWITCH_DECLARE(switch_dso_lib_t) switch_dso_open(const char *path, int global, char **err);
switch_dso_func_t switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, char **err); SWITCH_DECLARE(switch_dso_func_t) switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, char **err);
void *switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err); SWITCH_DECLARE(void *) switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err);
#endif #endif
......
...@@ -927,8 +927,8 @@ static switch_status_t sm_load_file(char *filename) ...@@ -927,8 +927,8 @@ static switch_status_t sm_load_file(char *filename)
err: err:
if (err) { if (err || !module) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Loading module %s\n**%s**\n", filename, err); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Error Loading module %s\n**%s**\n", filename, switch_str_nil(err));
switch_safe_free(derr); switch_safe_free(derr);
return SWITCH_STATUS_GENERR; return SWITCH_STATUS_GENERR;
} }
......
...@@ -24,14 +24,14 @@ ...@@ -24,14 +24,14 @@
#ifdef WIN32 #ifdef WIN32
void switch_dso_destroy(switch_dso_lib_t *lib) { SWITCH_DECLARE(void) switch_dso_destroy(switch_dso_lib_t *lib) {
if (lib && *lib) { if (lib && *lib) {
FreeLibrary(*lib); FreeLibrary(*lib);
*lib = NULL; *lib = NULL;
} }
} }
switch_dso_lib_t switch_dso_open(const char *path, int global, char **err) { SWITCH_DECLARE(switch_dso_lib_t) switch_dso_open(const char *path, int global, char **err) {
HINSTANCE lib; HINSTANCE lib;
lib = LoadLibraryEx(path, NULL, 0); lib = LoadLibraryEx(path, NULL, 0);
...@@ -48,7 +48,7 @@ switch_dso_lib_t switch_dso_open(const char *path, int global, char **err) { ...@@ -48,7 +48,7 @@ switch_dso_lib_t switch_dso_open(const char *path, int global, char **err) {
return lib; return lib;
} }
switch_dso_func_t switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, char **err) { SWITCH_DECLARE(switch_dso_func_t) switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, char **err) {
FARPROC func = GetProcAddress(lib, sym); FARPROC func = GetProcAddress(lib, sym);
if (!func) { if (!func) {
DWORD error = GetLastError(); DWORD error = GetLastError();
...@@ -57,7 +57,7 @@ switch_dso_func_t switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, cha ...@@ -57,7 +57,7 @@ switch_dso_func_t switch_dso_func_sym(switch_dso_lib_t lib, const char *sym, cha
return (switch_dso_func_t)func; return (switch_dso_func_t)func;
} }
void *switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err) { SWITCH_DECLARE(void *) switch_dso_data_sym(switch_dso_lib_t lib, const char *sym, char **err) {
FARPROC addr = GetProcAddress(lib, sym); FARPROC addr = GetProcAddress(lib, sym);
if (!addr) { if (!addr) {
DWORD error = GetLastError(); DWORD error = GetLastError();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论