]> granicus.if.org Git - icinga2/commitdiff
Fixed ltdl initialization.
authorGunnar Beutner <gunnar.beutner@netways.de>
Sun, 1 Apr 2012 13:20:13 +0000 (15:20 +0200)
committerGunnar Beutner <gunnar.beutner@netways.de>
Sun, 1 Apr 2012 13:20:13 +0000 (15:20 +0200)
Fixed indentation

base/application.cpp
base/unix.h
configfilecomponent/Makefile.am
configrpccomponent/Makefile.am

index 62b3f13e1d2432481e9f329e731b7da181b03eb5..cee433e4f47f37781b204c2edbc3be09331a07de 100644 (file)
@@ -9,7 +9,9 @@ Application::Application(void)
 #ifdef _WIN32
        WSADATA wsaData;
        WSAStartup(MAKEWORD(1, 1), &wsaData);
-#endif
+#else /* _WIN32 */
+       lt_dlinit();
+#endif /* _WIN32 */
 
        m_ShuttingDown = false;
        m_ConfigHive = new_object<ConfigHive>();
@@ -20,13 +22,15 @@ Application::~Application(void)
        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)
@@ -247,4 +251,5 @@ void Application::Log(const char *format, ...)
 
        // TODO: log to file
        fprintf(stderr, "%s\n", message);
-}
\ No newline at end of file
+}
+
index 727b7e318d32b589437981e968884d83dc12b78e..54d4abe97ce8974f65fc051e376104170feb7088 100644 (file)
@@ -40,13 +40,13 @@ typedef lt_dlhandle HMODULE;
 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;
 }
index 9b0e8bedfa1b3fe63c1118fa6c98f2239a778da1..84d57ce4bd361091d4d32a4011bb3a8226eea53f 100644 (file)
@@ -9,3 +9,5 @@ libconfigfilecomponent_la_SOURCES =  \
        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
index 35ffe934d94ee3d89018efcfd9c703013eb309f3..4435dddf941cff316475d04804bc2d31a5b33644 100644 (file)
@@ -9,3 +9,5 @@ libconfigrpccomponent_la_SOURCES =  \
        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