fix windows build breakage from svn rev 11084

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11085 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2009-01-07 14:25:08 +00:00
parent 2549501cf9
commit 4d97fb66a0
3 changed files with 10 additions and 10 deletions

View File

@ -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

View File

@ -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;
} }

View File

@ -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) {
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
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();