]> git.sesse.net Git - vlc/commitdiff
modules: added a hack to work-around the buggy 64bit runtime on OS X Leopard
authorFelix Paul Kühne <fkuehne@videolan.org>
Sat, 1 Aug 2009 19:51:55 +0000 (21:51 +0200)
committerFelix Paul Kühne <fkuehne@videolan.org>
Sat, 1 Aug 2009 19:56:13 +0000 (21:56 +0200)
configure.ac
src/modules/modules.c
src/modules/modules.h

index 69a1831b0ddc75745f3cb5ce24ae40b47e81505c..d4bee56c945c80d77fcf4fb279c3703346c1cad3 100644 (file)
@@ -790,8 +790,8 @@ if test "${ac_cv_have_plugins}" = "no"; then
     ac_cv_have_plugins=yes])
 fi
 
-# Only test for dlopen() if the others didn't work
-if test "${ac_cv_have_plugins}" = "no"; then
+# Only test for dlopen() if the others didn't work or on Darwin for 64bit builds
+if test "${ac_cv_have_plugins}" = "no" -o "${SYS}" = "darwin"; then
   AC_CHECK_HEADERS(dlfcn.h sys/dl.h)
   ac_cv_my_have_dlopen=no
   AC_CHECK_FUNC(dlopen,
index 815d11cf921b8a716124ad57004079eeb89e3379..d90cff88028513953a7bbb846f6d1fc2eee6185d 100644 (file)
@@ -1395,7 +1395,10 @@ static void DeleteModule( module_bank_t *p_bank, module_t * p_module )
     {
         if( p_module->b_loaded && p_module->b_unloadable )
         {
-            module_Unload( p_module->handle );
+            #if defined( __APPLE__ ) && defined ( __x86_64__ )
+                if( strcmp( p_module->psz_object_name, "macosx" ) )
+            #endif
+                module_Unload( p_module->handle );
         }
         UndupModule( p_module );
         free( p_module->psz_filename );
index 00836dde077124bc8c537967396cab7afe549868..a1955f42ac60ab2c55da35b1e435db8c3dd110ef 100644 (file)
@@ -28,7 +28,6 @@
 #ifndef __LIBVLC_MODULES_H
 # define __LIBVLC_MODULES_H 1
 
-
 /* Number of tries before we unload an unused module */
 #define MODULE_HIDE_DELAY 50
 
@@ -76,7 +75,7 @@ struct module_cache_t
 #define MODULE_SHORTCUT_MAX 50
 
 /* The module handle type. */
-#if defined(HAVE_DL_DYLD)
+#if defined(HAVE_DL_DYLD) && !defined(__x86_64__)
 #   if defined (HAVE_MACH_O_DYLD_H)
 #       include <mach-o/dyld.h>
 #   endif