[vlc-devel] commit: modules: added a hack to work-around the buggy 64bit runtime on OS X Leopard ( Felix Paul Kühne )

git version control git at videolan.org
Sat Aug 1 21:52:09 CEST 2009


vlc | branch: 1.0-bugfix | Felix Paul Kühne <fkuehne at videolan.org> | Sat Aug  1 21:51:55 2009 +0200| [7147338b7439f7f4a5d6d9c86e8d5d7a8501be4d] | committer: Felix Paul Kühne 

modules: added a hack to work-around the buggy 64bit runtime on OS X Leopard

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7147338b7439f7f4a5d6d9c86e8d5d7a8501be4d
---

 configure.ac          |    4 ++--
 src/modules/modules.c |    5 ++++-
 src/modules/modules.h |    3 +--
 3 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/configure.ac b/configure.ac
index ff461fc..d04f9e6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -794,8 +794,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,
diff --git a/src/modules/modules.c b/src/modules/modules.c
index c69cf70..3766876 100644
--- a/src/modules/modules.c
+++ b/src/modules/modules.c
@@ -1396,7 +1396,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 );
diff --git a/src/modules/modules.h b/src/modules/modules.h
index 00836dd..a1955f4 100644
--- a/src/modules/modules.h
+++ b/src/modules/modules.h
@@ -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




More information about the vlc-devel mailing list