[Orxonox-commit 2874] r7577 - code/branches/ois_update/src/libraries/core

rgrieder at orxonox.net rgrieder at orxonox.net
Thu Oct 21 23:32:28 CEST 2010


Author: rgrieder
Date: 2010-10-21 23:32:28 +0200 (Thu, 21 Oct 2010)
New Revision: 7577

Modified:
   code/branches/ois_update/src/libraries/core/DynLib.cc
   code/branches/ois_update/src/libraries/core/DynLib.h
Log:
Trying another fix: Load plugins on OS X as we do on Linux.

Modified: code/branches/ois_update/src/libraries/core/DynLib.cc
===================================================================
--- code/branches/ois_update/src/libraries/core/DynLib.cc	2010-10-21 21:26:17 UTC (rev 7576)
+++ code/branches/ois_update/src/libraries/core/DynLib.cc	2010-10-21 21:32:28 UTC (rev 7577)
@@ -141,15 +141,4 @@
         return "";
 #endif
     }
-
-#ifdef ORXONOX_PLATFORM_APPLE
-    /*static*/ void* DynLib::mac_loadDylib(const char* name)
-    {
-        std::string fullPath=name;
-        if(name[0]!='/')
-            fullPath = macPluginPath()+"/"+fullPath;
-
-            return dlopen(fullPath.c_str(), RTLD_LAZY | RTLD_GLOBAL);
-    }
-#endif
 }

Modified: code/branches/ois_update/src/libraries/core/DynLib.h
===================================================================
--- code/branches/ois_update/src/libraries/core/DynLib.h	2010-10-21 21:26:17 UTC (rev 7576)
+++ code/branches/ois_update/src/libraries/core/DynLib.h	2010-10-21 21:32:28 UTC (rev 7577)
@@ -51,17 +51,11 @@
 struct HINSTANCE__;
 typedef struct HINSTANCE__* hInstance;
 
-#elif defined(ORXONOX_PLATFORM_LINUX)
+#elif defined(ORXONOX_PLATFORM_UNIX)
 #    define DYNLIB_HANDLE void*
 #    define DYNLIB_LOAD( a ) dlopen( a, RTLD_LAZY | RTLD_GLOBAL)
 #    define DYNLIB_GETSYM( a, b ) dlsym( a, b )
 #    define DYNLIB_UNLOAD( a ) dlclose( a )
-
-#elif defined(ORXONOX_PLATFORM_APPLE)
-#    define DYNLIB_HANDLE void*
-#    define DYNLIB_LOAD( a ) DynLib::mac_loadDylib( a )
-#    define DYNLIB_GETSYM( a, b ) dlsym( a, b )
-#    define DYNLIB_UNLOAD( a ) dlclose( a )
 #endif
 
 namespace orxonox
@@ -115,12 +109,6 @@
         void* getSymbol( const std::string& strName ) const throw();
 
     protected:
-
-#ifdef ORXONOX_PLATFORM_APPLE
-        // From macUtils.h in OGRE
-        static void* mac_loadDylib(const char* name);
-#endif
-
         /// Handle to the loaded library.
         DYNLIB_HANDLE m_hInst;
     };




More information about the Orxonox-commit mailing list