#ifdef _WIN32
WSADATA wsaData;
WSAStartup(MAKEWORD(1, 1), &wsaData);
-#endif
+#else /* _WIN32 */
+ lt_dlinit();
+#endif /* _WIN32 */
m_ShuttingDown = false;
m_ConfigHive = new_object<ConfigHive>();
Timer::StopAllTimers();
Socket::CloseAllSockets();
-#ifdef _WIN32
- WSACleanup();
-#endif
-
for (map<string, Component::RefType>::iterator i = m_Components.begin(); i != m_Components.end(); i++) {
i->second->Stop();
}
+
+#ifdef _WIN32
+ WSACleanup();
+#else /* _WIN32 */
+ lt_dlexit();
+#endif /* _WIN32 */
}
void Application::RunEventLoop(void)
// TODO: log to file
fprintf(stderr, "%s\n", message);
-}
\ No newline at end of file
+}
+
inline HMODULE LoadLibrary(const char *filename)
{
lt_dlhandle handle = 0;
- lt_dladvise advise;
+ lt_dladvise advise;
- if (!lt_dladvise_init(&advise) && !lt_dladvise_global(&advise)) {
- handle = lt_dlopenadvise(filename, advise);
- }
+ if (!lt_dladvise_init(&advise) && !lt_dladvise_global(&advise)) {
+ handle = lt_dlopenadvise(filename, advise);
+ }
- lt_dladvise_destroy(&advise);
+ lt_dladvise_destroy(&advise);
return handle;
}
i2-configfilecomponent.h
libconfigfilecomponent_la_CXXFLAGS = -I${top_srcdir}/base -I${top_srcdir}/jsonrpc
+
+libconfigfilecomponent_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined
\ No newline at end of file
i2-configrpccomponent.h
libconfigrpccomponent_la_CXXFLAGS = -I${top_srcdir}/base -I${top_srcdir}/jsonrpc -I${top_srcdir}/icinga
+
+libconfigrpccomponent_la_LDFLAGS = -module -version-info 0:0:0 -no-undefined
\ No newline at end of file