Группа :: Система/Серверы
Пакет: arts
Главная Изменения Спек Патчи Загрузить Bugs and FR
Патч: arts-1.1.4-no_ltdl.patch
diff -uNr arts-1.1.4.old/acinclude.m4 arts-1.1.4/acinclude.m4
--- arts-1.1.4.old/acinclude.m4 2003-12-03 14:08:17 +0300
+++ arts-1.1.4/acinclude.m4 2003-12-03 14:08:56 +0300
@@ -7568,7 +7568,7 @@
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
+ LIBLTDL="-ldl"
LTDLINCL=
fi
# For backwards non-gettext consistent compatibility...
diff -uNr arts-1.1.4.old/aclocal.m4 arts-1.1.4/aclocal.m4
--- arts-1.1.4.old/aclocal.m4 2003-12-03 14:08:21 +0300
+++ arts-1.1.4/aclocal.m4 2003-12-03 14:08:56 +0300
@@ -7558,7 +7558,7 @@
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
+ LIBLTDL="-ldl"
LTDLINCL=
fi
# For backwards non-gettext consistent compatibility...
diff -uNr arts-1.1.4.old/admin/libtool.m4.in arts-1.1.4/admin/libtool.m4.in
--- arts-1.1.4.old/admin/libtool.m4.in 2003-05-07 15:50:14 +0400
+++ arts-1.1.4/admin/libtool.m4.in 2003-12-03 14:08:56 +0300
@@ -2165,7 +2165,7 @@
LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl'])
else
ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
- LIBLTDL="-lltdl"
+ LIBLTDL="-ldl"
LTDLINCL=
fi
# For backwards non-gettext consistent compatibility...
diff -uNr arts-1.1.4.old/artsc/artsc.c arts-1.1.4/artsc/artsc.c
--- arts-1.1.4.old/artsc/artsc.c 2003-07-13 23:33:35 +0400
+++ arts-1.1.4/artsc/artsc.c 2003-12-03 14:08:56 +0300
@@ -21,7 +21,7 @@
*/
#include "artsc.h"
-#include "ltdl.h"
+#include <dlfcn.h>
#include <assert.h>
typedef int (*backend_init_ptr)();
@@ -39,7 +39,7 @@
static struct arts_backend {
int available;
int refcnt;
- lt_dlhandle handle;
+ void *handle;
backend_init_ptr init;
backend_suspend_ptr suspend;
@@ -58,33 +58,33 @@
{
if(backend.refcnt == 0)
{
- lt_dlinit();
- backend.handle = lt_dlopen(ARTSC_BACKEND);
+// lt_dlinit();
+ backend.handle = dlopen(ARTSC_BACKEND, RTLD_LAZY);
if(backend.handle)
{
backend.init = (backend_init_ptr)
- lt_dlsym(backend.handle, "arts_backend_init");
+ dlsym(backend.handle, "arts_backend_init");
backend.suspend = (backend_suspend_ptr)
- lt_dlsym(backend.handle, "arts_backend_suspend");
+ dlsym(backend.handle, "arts_backend_suspend");
backend.suspended = (backend_suspended_ptr)
- lt_dlsym(backend.handle, "arts_backend_suspended");
+ dlsym(backend.handle, "arts_backend_suspended");
backend.free = (backend_free_ptr)
- lt_dlsym(backend.handle, "arts_backend_free");
+ dlsym(backend.handle, "arts_backend_free");
backend.play_stream = (backend_play_stream_ptr)
- lt_dlsym(backend.handle, "arts_backend_play_stream");
+ dlsym(backend.handle, "arts_backend_play_stream");
backend.record_stream = (backend_record_stream_ptr)
- lt_dlsym(backend.handle, "arts_backend_record_stream");
+ dlsym(backend.handle, "arts_backend_record_stream");
backend.close_stream = (backend_close_stream_ptr)
- lt_dlsym(backend.handle, "arts_backend_close_stream");
+ dlsym(backend.handle, "arts_backend_close_stream");
backend.write = (backend_write_ptr)
- lt_dlsym(backend.handle, "arts_backend_write");
+ dlsym(backend.handle, "arts_backend_write");
backend.read = (backend_read_ptr)
- lt_dlsym(backend.handle, "arts_backend_read");
+ dlsym(backend.handle, "arts_backend_read");
backend.stream_set = (backend_stream_set_ptr)
- lt_dlsym(backend.handle, "arts_backend_stream_set");
+ dlsym(backend.handle, "arts_backend_stream_set");
backend.stream_get = (backend_stream_get_ptr)
- lt_dlsym(backend.handle, "arts_backend_stream_get");
+ dlsym(backend.handle, "arts_backend_stream_get");
}
if(backend.handle && backend.init && backend.free && backend.play_stream
@@ -108,9 +108,9 @@
{
backend.available = 0;
- if(backend.handle) lt_dlclose(backend.handle);
+ if(backend.handle) dlclose(backend.handle);
}
- lt_dlexit();
+// lt_dlexit();
}
}
diff -uNr arts-1.1.4.old/mcop/extensionloader.cc arts-1.1.4/mcop/extensionloader.cc
--- arts-1.1.4.old/mcop/extensionloader.cc 2001-03-03 20:40:19 +0300
+++ arts-1.1.4/mcop/extensionloader.cc 2003-12-03 14:08:56 +0300
@@ -56,8 +56,8 @@
/* this will catch all startup classes here */
StartupManager::setExtensionLoader(this);
- lt_dlinit();
- handle = lt_dlopen(dlfilename.c_str());
+// lt_dlinit();
+ handle = dlopen(dlfilename.c_str(), RTLD_LAZY);
StartupManager::setExtensionLoader(0);
@@ -73,7 +73,7 @@
else
{
arts_warning("loading extension from '%s' failed: %s",
- dlfilename.c_str(), lt_dlerror());
+ dlfilename.c_str(), dlerror());
}
}
@@ -100,13 +100,15 @@
if(handle)
{
shutdown();
- lt_dlclose(handle);
+ dlclose(handle);
+#if 0
/*
* lt_dlexit & lt_dlinit have a counter, so there is no harm in
* calling one lt_dlinit in the constructor and one lt_dlexit here
*/
lt_dlexit();
+#endif
}
}
diff -uNr arts-1.1.4.old/mcop/extensionloader.h arts-1.1.4/mcop/extensionloader.h
--- arts-1.1.4.old/mcop/extensionloader.h 2003-07-13 23:33:40 +0400
+++ arts-1.1.4/mcop/extensionloader.h 2003-12-03 14:08:56 +0300
@@ -25,7 +25,7 @@
#include <string>
#include <list>
-#include <ltdl.h>
+#include <dlfcn.h>
/*
* BC - Status (2002-03-08): ExtensionLoader
@@ -40,7 +40,7 @@
class ExtensionLoader {
protected:
std::list<class StartupClass *> startupClasses;
- lt_dlhandle handle;
+ void *handle;
bool needShutdown;
public:
diff -uNr arts-1.1.4.old/mcop/startupmanager.cc arts-1.1.4/mcop/startupmanager.cc
--- arts-1.1.4.old/mcop/startupmanager.cc 2003-07-13 23:33:41 +0400
+++ arts-1.1.4/mcop/startupmanager.cc 2003-12-03 14:08:56 +0300
@@ -91,7 +91,7 @@
* and it is impossible that an extension loads an extension while being
* loaded (nothing forbids you to load another extension from an extension
* in a StartupClass or any time later - just don't do it while being
- * lt_dlopen()d
+ * dlopen()d
*/
if(activeExtensionLoader)
arts_assert(extension == 0);
diff -uNr arts-1.1.4.old/mcop/startupmanager.h arts-1.1.4/mcop/startupmanager.h
--- arts-1.1.4.old/mcop/startupmanager.h 2003-07-13 23:33:41 +0400
+++ arts-1.1.4/mcop/startupmanager.h 2003-12-03 14:08:56 +0300
@@ -57,8 +57,8 @@
* since extensions will register startup classes in the same global way
* all other classes do (with StartupManager::add(<some startup class>)),
* the StartupManager supports forwarding all add requests to the
- * active extension, which will allow synchronizing the lt_dlopen
- * lt_dlclose with the calls of startup()/shutdown() of all StartupClasses
+ * active extension, which will allow synchronizing the dlopen
+ * dlclose with the calls of startup()/shutdown() of all StartupClasses
* present in the extension
*/
static void setExtensionLoader(class ExtensionLoader *extension);