|
@@ -112,6 +112,12 @@ load_dso_error() {
|
|
|
return errmsg.str();
|
|
return errmsg.str();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void *
|
|
|
|
|
+get_dso_symbol(void *handle, const string &name) {
|
|
|
|
|
+ // Windows puts a leading underscore in front of the symbol name.
|
|
|
|
|
+ return (void *)GetProcAddress((HMODULE)handle, name.c_str());
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
/* end Win32-specific code */
|
|
/* end Win32-specific code */
|
|
|
|
|
|
|
|
#elif defined(IS_OSX)
|
|
#elif defined(IS_OSX)
|
|
@@ -140,6 +146,11 @@ load_dso_error() {
|
|
|
return "No error.";
|
|
return "No error.";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void *
|
|
|
|
|
+get_dso_symbol(void *handle, const string &name) {
|
|
|
|
|
+ return dlsym(handle, name.c_str());
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
#else
|
|
#else
|
|
|
/* begin generic code */
|
|
/* begin generic code */
|
|
|
|
|
|
|
@@ -169,4 +180,9 @@ load_dso_error() {
|
|
|
return "No error.";
|
|
return "No error.";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+void *
|
|
|
|
|
+get_dso_symbol(void *handle, const string &name) {
|
|
|
|
|
+ return dlsym(handle, name.c_str());
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
#endif
|
|
#endif
|