g_module_build_path problems
- From: Miroslaw Dobrzanski-Neumann <mne mosaic-ag com>
- To: GTKDEV <gtk-devel-list gnome org>
- Subject: g_module_build_path problems
- Date: Thu, 21 Feb 2002 12:24:19 +0100
Dear All,
What is the purpose of g_module_build_path (dir, name)?
* should it complete the module path to build the valid module path?
Than it wrong for all _g_module_build_path () implementations. It does
not validate the created path. The gmodule-dl.c for instance implementation
insists on appending .so which is wrong not only for AIX
i.e. Linux Kernel Modules are named module.o
* should it build a full path for later use with g_module_open ()
It confuses the g_module_open () algorithm
append .la to lookup for the true module name
there is no "<path>/libmodule.so.la" but "<path>/libmodule.la"
If g_module_build_path () should return a checked module path it should be
implemented like the checking code fragment in g_module_open () and not simple
pre-ap/pending fixed suffixes.
You can see the bug in gdk-pixbuf-io.c in method _gdk_pixbuf_load_module()
in this code fragment:
path = g_module_build_path (dir, module_name);
module = g_module_open (path, G_MODULE_BIND_LAZY);
module_name is "pixbufloader-png"
path is "../../gdk-pixbuf/.libs/libpixbufloader-png.so"
$ ls -l gdk-pixbuf/.libs/*pixbufloader-png*
gdk-pixbuf/.libs/libpixbufloader-png.a
gdk-pixbuf/.libs/libpixbufloader-png.exp
gdk-pixbuf/.libs/libpixbufloader-png.la -> ../libpixbufloader-png.la
gdk-pixbuf/.libs/libpixbufloader-png.lai
gdk-pixbuf/.libs/libpixbufloader-png.so.0
Regards,
--
Miroslaw Dobrzanski-Neumann
MOSAIC SOFTWARE AG
Base Development and Research
Tel +49-2225-882-291
Fax +49-2225-882-201
E-mail: mne mosaic-ag com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]