Pārlūkot izejas kodu

Complete dynamic library handling on OS X

The dlopen() function used on Linux is also available on OS X.  So we
actually don't need to distinguish between the two.
Marc Legendre 9 gadi atpakaļ
vecāks
revīzija
91656d7141

+ 1 - 7
Source/BansheeUtility/Include/BsDynLib.h

@@ -21,18 +21,12 @@ namespace BansheeEngine
 #    define DYNLIB_GETSYM( a, b ) GetProcAddress( a, b )
 #    define DYNLIB_UNLOAD( a ) !FreeLibrary( a )
 
-#elif BS_PLATFORM == BS_PLATFORM_LINUX
+#elif BS_PLATFORM == BS_PLATFORM_LINUX || BS_PLATFORM == BS_PLATFORM_OSX
 #    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 BS_PLATFORM == BS_PLATFORM_OSX
-#    define DYNLIB_HANDLE void*
-#    define DYNLIB_LOAD( a ) mac_loadDylib( a )
-#    define DYNLIB_GETSYM( a, b ) dlsym( a, b )
-#    define DYNLIB_UNLOAD( a ) dlclose( a )
-
 #endif
 
     /** Class that holds data about a dynamic library. */

+ 0 - 1
Source/BansheeUtility/Source/BsDynLib.cpp

@@ -12,7 +12,6 @@
 #endif
 
 #if BS_PLATFORM == BS_PLATFORM_OSX
-#   include "macUtils.h"
 #   include <dlfcn.h>
 #endif